Search completed in 1.63 seconds.
3722 results for "request":
Your results are loading. Please wait...
PaymentRequest.PaymentRequest() - Web APIs
the paymentrequest() constructor creates a new paymentrequest object which will be used to handle the process of generating, validating, and submitting a payment request.
... syntax var paymentrequest = new paymentrequest(methoddata, details, [options]); parameters methoddata contains an array of identifiers for the payment methods the merchant web site accepts and any associated payment method specific data.
...for basic credit card services, this structure should match the basiccardrequest dictionary.
...And 17 more matches
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.
...And 5 more matches
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
the paymentrequestupdateevent constructor creates a new paymentrequestupdateevent object which enables a web page to update the details of a paymentrequest in response to a user action.
... syntax var paymentrequestupdateevent = new paymentrequestupdateevent() parameters none.
... return value a new paymentrequestupdateevent object.payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent()' in that specification.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
the paymentrequestorigin read-only property of the paymentrequestevent interface returns the origin where the paymentrequest object was initialized.
... syntax var ausvstring = paymentrequestevent.paymentrequestorigin value a usvstring.
... specifications specification status comment payment handler apithe definition of 'paymentrequestorigin' in that specification.
XMLHttpRequest.mozBackgroundRequest - Web APIs
xmlhttprequest.mozbackgroundrequest is a boolean, indicating if the object represents a background service request.
... if true, no load group is associated with the request, with security dialogs prevented from being shown to the user.
... in cases in where a security dialog (such as authentication or a bad certificate notification) would normally be shown, this request fails instead.
XMLHttpRequest.openRequest() - Web APIs
this mozilla-specific method is available only from within privileged code, and is only called from a c++ context in order to initialize an xmlhttprequest.
... to initialize a request from javascript code, use the standard open() method instead.
WebRequest.jsm
the webrequest module is new in firefox 41.
... the webrequest module provides an api to add event listeners for the various stages of making an http request.
... the event listener receives detailed information about the request, and can modify or cancel the request.
...And 63 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.
...And 52 more matches
XMLHttpRequest - Web APIs
xmlhttprequest (xhr) objects are used to interact with servers.
...xmlhttprequest is used heavily in ajax programming.
...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/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" width="250" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a><polyline points="401,25 411,20 411,30 401,25" stroke="#d4dde4" fill="none"/><line x1...
...And 51 more matches
Network request list - Firefox Developer Tools
the request list of the network monitor shows a list of all the network requests made in the course of loading the page.
... network request list by default, the network monitor shows a list of all the network requests made in the course of loading the page.
... each request is displayed in its own row: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
...And 47 more matches
Using the Payment Request API - Web APIs
the payment request api provides a browser-based method of connecting users and their preferred payment systems and platforms to merchants that they want to pay for goods and services.
... this article is a guide to making use of the payment request api, with examples and suggested best practices.
... the basics of making a payment this section details the basics of using the payment request api to make a payment.
...And 32 more matches
Setting HTTP request headers
in addition to the actual content, some important information is passed with http headers for both http requests and responses.
... you can add your own http headers to any request the application makes, whether the request is initiated by your code explicitly opening an http channel, because of xmlhttprequest activity, an <img> element in content, or even from css.
... http channels when you deal with http requests and responses, typically you are doing this with an nsihttpchannel.
...And 29 more matches
request - Archive of obsolete content
examples outlined in this document are no longer relevent in regards to the twitter api calls and need to be updated make simple network requests.
... for more advanced usage, check out the net/xhr module, based on the browser's xmlhttprequest object.
... globals constructors request(options) this constructor creates a request object that can be used to make network requests.
...And 27 more matches
nsIRequest
netwerk/base/nsirequest.idlscriptable this interface is used by the request initiator to control the request.
... inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsistreamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation.
... method overview void cancel(in nsresult astatus); boolean ispending(); void resume(); void suspend(); attributes attribute type description loadflags nsloadflags the load flags of this request.
...And 26 more matches
Synchronous and asynchronous requests - Web APIs
xmlhttprequest supports both synchronous and asynchronous communications.
... in general, however, asynchronous requests should be preferred to synchronous requests for performance reasons.
... synchronous requests block the execution of code which causes "freezing" on the screen and an unresponsive user experience.
...And 26 more matches
HTTP conditional requests - HTTP
http has a concept of conditional requests, where the result, and even the success of a request, can be changed by comparing the affected resources with the value of a validator.
... such requests can be useful to validate the content of a cache, and sparing a useless control, to verify the integrity of a document, like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server.
... principles http conditional requests are requests that are executed differently, depending on the value of specific headers.
...And 25 more matches
Network request details - Firefox Developer Tools
the request details pane appears when you click on a network request in the request list.
... this pane provides more detailed information about the request.
... network request details clicking on a row displays a new pane in the right-hand side of the network monitor, which provides more detailed information about the request.
...And 24 more matches
IDBRequest - Web APIs
the idbrequest interface of the indexeddb api provides access to results of asynchronous requests to databases and database objects using event handler attributes.
... each reading and writing operation on a database is done using a request.
... the request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the idbrequest instance.
...And 23 more matches
Request - Web APIs
WebAPIRequest
the request interface of the fetch api represents a resource request.
... you can create a new request object using the request() constructor, but you are more likely to encounter a request object being returned as the result of another api operation, such as a service worker fetchevent.request.
... constructor request() creates a new request object.
...And 21 more matches
nsISmsRequestManager
nsismsrequestmanager dom/sms/interfaces/nsismsrequestmanager.idlscriptable used to manage sms related requests and notifications 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/smsrequestmanager;1.
... to create an instance, use: var smsrequestmanager = components.classes["@mozilla.org/sms/smsrequestmanager;1"] .createinstance(components.interfaces.nsismsrequestmanager); method overview long addrequest(in nsidommozsmsrequest arequest); long createrequest(in nsidommozsmsmanager amanager, out nsidommozsmsrequest arequest); void notifycreatemessagelist(in long arequestid, in long alistid, in nsidommozsmsmessage amessage); void notifygetsmsfailed(in long arequestid, in long aerror); void notifygotnextmessage(in long arequestid, in nsidommozsmsmessage amessage); void notifygotsms(in long arequestid, in nsidommozsmsmessage amessage); void notifymarkedmessageread(in long arequestid, in bool aread); void notifymarkmessagereadfailed(in long arequestid, in long ...
...aerror); void notifynomessageinlist(in long arequestid); void notifyreadmessagelistfailed(in long arequestid, in long aerror); void notifysmsdeleted(in long arequestid, in bool adeleted); void notifysmsdeletefailed(in long arequestid, in long aerror); void notifysmssendfailed(in long arequestid, in long aerror); void notifysmssent(in long arequestid, in nsidommozsmsmessage amessage); constants all sms related errors that could apply to smsrequest objects.
...And 20 more matches
Request() - Web APIs
WebAPIRequestRequest
the request() constructor creates a new request object.
... syntax var myrequest = new request(input[, init]); parameters input defines the resource that you wish to fetch.
... a request object, effectively creating a copy.
...And 18 more matches
LockManager.request() - Web APIs
the request() method of the lockmanager interface requests a lock object with parameters specifying its name and characteristics.
... the requested lock is passed to a callback, while the function itself returns a promise that resolves with undefined.
... request an "exclusive" lock when it should only be held by one code instance at a time.
...And 17 more matches
PaymentRequest.show() - Web APIs
the paymentrequest interface's show() method instructs the user agent to begin the process of showing and handling the user interface for the payment request to the user.
... for security reasons, the paymentrequest.show() method can't just be initiated at any time.
... only one payment request can be in the process of being handled at once, across all documents.
...And 17 more matches
imgIRequest
modules/libpr0n/public/imgirequest.idlscriptable please add a summary to this article.
... inherits from: nsirequest last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void cancelandforgetobserver(in nsresult astatus); imgirequest clone(in imgidecoderobserver aobserver); void decrementanimationconsumers(); imgirequest getstaticrequest(); void incrementanimationconsumers(); void lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with.
... status_load_partial 0x2 used internally by imgrequest to flag that a request is being cancelled as a result of a failure of a proxy holder and not an internal failure.
...And 16 more matches
Document.requestStorageAccess() - Web APIs
the requeststorageaccess() method of the document interface returns a promise that resolves if the access to first-party storage was granted, and rejects if access was denied.
... grant the document access to cookies and other site storage and store that fact for the purposes of future calls to document.hasstorageaccess() and requeststorageaccess().
... assuming all of the requirements above are satisfied, firefox will automatically grant storage access to the requesting origin on up to a threshold number of first-party origins in the current session for the duration of user’s session, up to a maximum of 24 hours.
...And 16 more matches
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.
...And 16 more matches
HTTP range requests - HTTP
http range requests allow to send only a portion of an http message from a server to a client.
... 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.
...And 15 more matches
Payment Request API - Web APIs
the payment request api provides a consistent user experience for both merchants and users.
... payment request concepts and usage many problems related to online shopping-cart abandonment can be traced to checkout forms, which can be difficult and time consuming to fill out and often require multiple steps to complete.
... the payment request api is meant to reduce the number of steps needed to complete a payment online, potentially doing away with checkout forms.
...And 14 more matches
Request.cache - Web APIs
WebAPIRequestcache
the cache read-only property of the request interface contains the cache mode of the request.
... it controls how the request will interact with the browser's http cache.
... syntax var currentcachemode = request.cache; value a requestcache value.
...And 12 more matches
HTML in XMLHttpRequest - Web APIs
the w3c xmlhttprequest specification adds html parsing support to xmlhttprequest, which originally supported only xml parsing.
... this feature allows web apps to obtain an html resource as a parsed dom using xmlhttprequest.
... to get an overview of how to use xmlhttprequest in general, see using xmlhttprequest.
...And 12 more matches
generateCRMFRequest() - Archive of obsolete content
crmfobject = crypto.generatecrmfrequest("requesteddn", "regtoken", "authenticator", "escrowauthoritycert", "crmf generation done code", keysize1, "keyparams1", "keygenalg1", ..., keysizen, "keyparamsn", "keygenalgn"); this method will generate a sequence of crmf requests that h...
...as n requests.
... one request for each key pair that is generated.
...And 11 more matches
JS_BeginRequest
syntax void js_beginrequest(jscontext *cx); void js_endrequest(jscontext *cx); name type description cx jscontext * the context in which the calling thread intends to call jsapi functions.
... description when your multithreaded application wants to use a jscontext, it must use js_beginrequest and js_endrequest to bracket maximal non-blocking hunks of native code that call the jsapi.
... this "request model" is necessary to interlock with the global garbage collector.
...And 11 more matches
PaymentRequest - Web APIs
the payment request api's paymentrequest interface the primary access point into the api, and lets web content and apps accept payments from the end user on behalf of the operator of the site or the publisher of the app.
... constructor paymentrequest() secure context creates a new paymentrequest object.
... properties paymentrequest.id read only secure context an unique identifier for a particular paymentrequest, which can be set via details.id.
...And 10 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.
...And 10 more matches
NPN_RequestRead - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a range of bytes from a seekable stream.
...syntax #include <npapi.h> nperror npn_requestread(npstream* stream, npbyterange* rangelist); parameters the function has the following parameters: stream stream of type np_seek from which to read bytes.
... 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.
...And 9 more matches
JS_SuspendRequest
suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
... syntax jsrefcount js_suspendrequest(jscontext *cx); void js_resumerequest(jscontext *cx, jsrefcount savedepth); name type description cx jscontext * the context whose current request is to be suspended or resumed.
... savedepth jsrefcount (only in js_resumerequest) the valued returned by the matching js_suspendrequest call.
...And 9 more matches
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
the error read-only property of the idbrequest interface returns the error in the event of an unsuccessful request.
... syntax var myerror = request.error; value a domerror containing the relevant error.
...the following error codes are returned under certain conditions: error explanation aborterror if you abort the transaction, then all requests still in progress receive this error.
...And 9 more matches
Window.requestAnimationFrame() - Web APIs
the window.requestanimationframe() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint.
... note: your callback routine must itself call requestanimationframe() if you want to animate another frame at the next repaint.
...this will request that your animation function be called before the browser performs the next repaint.
...And 9 more matches
XRSession.requestAnimationFrame() - Web APIs
the xrsession method requestanimationframe(), much like the window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the xr display.
... the specified callback is executed once before the next repaint; if you wish for it to be executed for the following repaint, you must call requestanimationframe() again.
... note: despite the obvious similarities between these methods and the global requestanimationframe() function provided by the window interface, you must not treat these as interchangeable.
...And 9 more matches
JS_YieldRequest
momentarily suspend the current jsapi request, allowing garbage collection to run if another thread has requested it.
... syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling thread.
... requires request.
...And 8 more matches
BasicCardRequest - Web APIs
the basiccardrequest dictionary is a javascript object-structure that can be used in the payment request api.
... the properties of basiccardrequest are defined in the basic card payment spec).
... properties basiccardrequest.supportednetworks optional secure context an optional array of domstrings representing the card networks that the retailer supports (e.g.
...And 8 more matches
IDBRequest.transaction - Web APIs
the transaction read-only property of the idbrequest interface returns the transaction for the request, that is, the transaction the request is being made inside.
... this property can be null for requests not made within transactions, such as for requests returned from idbfactory.open — in this case you're just connecting to a database, so there is no transaction to return.
... syntax var mytransaction = request.transaction; value an idbtransaction.
...And 8 more matches
PaymentRequest.canMakePayment() - Web APIs
the paymentrequest method canmakepayment() determines whether or not the request is configured in a way that is compatible with at least one payment method supported by the user agent.
... for instance, you might call canmakepayment() to determine if the browser will let the user pay using payment request api, and if it won't, you could fall back to another payment method, or offer a list of methods that aren't handled by payment request api (or even provide instructions for paying by mail or by phone).
... syntax paymentrequest.canmakepayment() .then( canpay => { ...
...And 8 more matches
Request.mode - Web APIs
WebAPIRequestmode
the mode read-only property of the request interface contains the mode of the request (e.g., cors, no-cors, same-origin, or navigate.) this is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
... syntax var mymode = request.mode; value a requestmode value.
... the associated mode, available values of which are: same-origin — if a request is made to another origin with this mode set, the result is simply an error.
...And 8 more matches
IDBRequest.readyState - Web APIs
the readystate read-only property of the idbrequest interface returns the state of the request.
... every request starts in the pending state.
... the state changes to done when the request completes successfully or when an error occurs.
...And 7 more matches
PaymentRequest.onshippingaddresschange - Web APIs
the onshippingaddresschange event of the paymentrequest interface is fired whenever the user changes their shipping address, including when an address is added by the user for the first time.
... syntax paymentrequest.addeventlistener('shippingaddresschange', shippingaddresschangeevent => { ...
... }); paymentrequest.onshippingaddresschange = function(shippingaddresschangeevent) { ...
...And 7 more matches
PaymentRequest.onshippingoptionchange - Web APIs
the onshippingoptionchange event of the paymentrequest interface is fired whenever the user changes a shipping option.
... syntax paymentrequest.addeventlistener('shippingoptionchange', shippingoptionchangeevent => { ...
... }); paymentrequest.onshippingoptionchange = function(shippingoptionchangeevent) { ...
...And 7 more matches
XMLHttpRequestEventTarget - Web APIs
xmlhttprequesteventtarget is the interface that describes the event handlers you can implement in an object that will handle events for an xmlhttprequest.
...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/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties...
... xmlhttprequesteventtarget.onabort contains the function to call when a request is aborted and the abort event is received by this object.
...And 7 more matches
XRSystem: requestSession() - Web APIs
the xrsystem interface's requestsession() method returns a promise which resolves to an xrsession object through which you can manage the requested type of webxr session.
... syntax var sessionpromise = xr.requestsession(sessionmode, sessioninit) parameters sessionmode a domstring whose value is one of those included in the xrsessionmode enum.
... return value a promise that resolves with an xrsession object if the device and user agent support the requested mode and features.
...And 7 more matches
nsIXMLHttpRequest
nsixmlhttprequest along with nsijsxmlhttprequest and nsixmlhttprequesteventtarget are mozilla's implementation details of the dom xmlhttprequest object.
... note: if you're a web developer or a mozilla add-on developer, please refer to the xmlhttprequest documentation instead.
... the interface definition: //github.com/realityripple/uxp/blob/master/dom/xhr/nsixmlhttprequest.idl elevated privileges as mentioned in the "non-standard properties" the property of channel was read-only.
...And 6 more matches
IDBOpenDBRequest - Web APIs
the idbopendbrequest interface of the indexeddb api provides access to the results of requests to open or delete databases (performed using idbfactory.open and idbfactory.deletedatabase), using specific event handler attributes.
...50" 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/idbrequest" target="_top"><rect x="151" y="1" width="100" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbrequest</text></a><polyline points="251,25 261,20 261,30 251,25" stroke="#d4dde4" fill="none"/><line x1="261" y1="25" x2="291" y2...
...="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbopendbrequest" target="_top"><rect x="291" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbopendbrequest</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits methods from its parents idbrequest and eventtarget.
...And 6 more matches
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
the id read-only attribute of the paymentrequest interface returns a unique identifier for a particular paymentrequest instance.
... when constructing an instance of the paymentrequest, you are able to supply an custom id via paymentdetailsinit dictionary's id member.
... example this example shows how to give a paymentrequest instance a custom id.
...And 6 more matches
PaymentRequest.shippingAddress - Web APIs
the shippingaddress read-only property of the paymentrequest interface returns the shipping address provided by the user.
... syntax var paymentaddress = paymentrequest.shippingaddress; example generally, the user agent will fill the shippingaddress property value.
... you can trigger this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
...And 6 more matches
PaymentRequest.shippingOption - Web APIs
the shippingoption read-only attribute of the paymentrequest interface returns either the id of a selected shipping option, null (if no shipping option was set to be selected) or a shipping option selected by the user.
... this attribute is only populated if the constructor is called with the requestshipping flag set to true.
... if requestshipping was false (or missing), shippingoption returns null, even the developer provides a selected a shipping option.
...And 6 more matches
PublicKeyCredentialRequestOptions - Web APIs
the publickeycredentialrequestoptions dictionary of the web authentication api holds the options passed to navigator.credentials.get() in order to fetch a given publickeycredential.
... properties publickeycredentialrequestoptions.challenge a buffersource, emitted by the relying party's server and used as a cryptographic challenge.
... publickeycredentialrequestoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the retrieval operation to complete.
...And 6 more matches
nsIRequestObserver
netwerk/base/public/nsirequestobserver.idlscriptable this interface is used by various streams (such as nsichannel ) to indicate the start and end of a request.
... inherits from: nsisupports last changed in gecko 1.0 method overview void onstartrequest(in nsirequest arequest, in nsisupports acontext); void onstoprequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatuscode); methods onstartrequest() called to signify the beginning of an asynchronous request.
... note: an exception thrown from onstartrequest has the side-effect of causing the request to be canceled.
...And 5 more matches
HTMLIFrameElement.allowPaymentRequest - Web APIs
the allowpaymentrequest property of the htmliframeelement interface returns a boolean indicating whether the payment request api may be invoked on a cross-origin iframe.
... syntax var allow = htmliframeelement.allowpaymentrequest value a boolean.
... specifications specification status comment payment request apithe definition of 'allowpaymentrequest' in that specification.
...And 5 more matches
IDBOpenDBRequest.onupgradeneeded - Web APIs
the onupgradeneeded property of the idbopendbrequest interface is the event handler for the upgradeneeded event, triggered when a database of a bigger version number than the existing stored database is loaded.
... syntax idbopendbrequest.onupgradeneeded = function(event) { ...
...for a full working example, see our to-do notifications app (view example live.) var db; // request version 3 of the database.
...And 5 more matches
PaymentRequest.abort() - Web APIs
the paymentrequest.abort() method of the paymentrequest interface causes the user agent to end the payment request and to remove any user interface that might be shown.
... syntax paymentrequest.abort(); returns void.
... parameters none examples the following example sets up a timeout to clear the payment request that might have been abandoned or neglected.
...And 5 more matches
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.
...And 5 more matches
XMLHttpRequest.response - Web APIs
the xmlhttprequest response property returns the response's body content as an arraybuffer, 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.
...And 5 more matches
XMLHttpRequest.responseType - Web APIs
the xmlhttprequest property responsetype is an enumerated string value specifying the type of data contained in the response.
... 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.
...see html in xmlhttprequest to learn more about using xhr to fetch html content.
...And 5 more matches
CSP: upgrade-insecure-requests - HTTP
the http content-security-policy (csp) upgrade-insecure-requests directive instructs user agents to treat all of a site's insecure urls (those served over http) as though they have been replaced with secure urls (those served over https).
... the upgrade-insecure-requests directive is evaluated before block-all-mixed-content and if it is set, the latter is effectively a no-op.
... the upgrade-insecure-requests directive will not ensure that users visiting your site via links on third-party sites will be upgraded to https for the top-level navigation and thus does not replace the strict-transport-security (hsts) header, which should still be set with an appropriate max-age to ensure that users are not subject to ssl stripping attacks.
...And 5 more matches
HTTP request methods - HTTP
WebHTTPMethods
http defines a set of request methods to indicate the desired action to be performed for a given resource.
... although they can also be nouns, these request methods are sometimes referred to as http verbs.
...a request method can be safe, idempotent, or cacheable.
...And 5 more matches
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
a request header is an http header that can be used in an http request, and that doesn't relate to the content of the message.
... request headers, like accept, accept-*, or if-* allow to perform conditional requests; others like cookie, user-agent, or referer precise the context so that the server can tailor the answer.
... not all headers appearing in a request are request headers.
...And 4 more matches
Element.requestFullscreen() - Web APIs
the element.requestfullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.
... syntax var promise = element.requestfullscreen(options); parameters options optional a fullscreenoptions object providing options that control the behavior of the transition to full-screen mode.
... exceptions rather than throw a traditional exception, the requestfullscreen() procedure announces error conditions by rejecting the promise it has returned.
...And 4 more matches
HTMLFormElement.requestSubmit() - Web APIs
the htmlformelement method requestsubmit() requests that the form be submitted using a specific submit button.
... syntax htmlformelement.requestsubmit(submitter); parameters submitter optional the submit button whose attributes describe the method by which the form is to be submitted.
... notfounderror the specified submitter isn't a member of the form on which requestsubmit() was called.
...And 4 more matches
IDBOpenDBRequest.onblocked - Web APIs
the onblocked event handler of the idbopendbrequest interface is the event handler for the blocked event.
... syntax idbopendbrequest.onblocked = function(event) { ...
... }; example var db; // let us open our database var request = indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 4 more matches
IDBRequest.onerror - Web APIs
the onerror event handler of the idbrequest interface handles the error event, fired when a request returns an error.
... syntax request.onerror = function(event) { ...
... }; example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store.
...And 4 more matches
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
the source read-only property of the idbrequest interface returns the source of the request, such as an index or an object store.
... syntax var idbindex = request.source; var idbcursor = request.source; var idbobjectstore = request.source; value an object representing the source of the request, such as an idbindex, idbobjectstore or idbcursor.
... example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store in another request.
...And 4 more matches
PaymentRequest.onpaymentmethodchange - Web APIs
the paymentrequest event handler onpaymentmethodchange is invoked when the paymentmethodchange is fired, indicating that the user has changed payment methods within a given payment handler.
... syntax paymentrequest.addeventlistener('paymentmethodchange', paymentmethodchangeevent => { ...
... }); paymentrequest.onpaymentmethodchange = function(paymentmethodchangeevent) { ...
...And 4 more matches
PaymentRequestEvent - Web APIs
the paymentrequestevent interface of the the payment request api is the object passed to a payment handler when a paymentrequest is made.
... constructor paymentrequestevent() creates a new paymentrequestevent object.
... paymentrequestidread only returns the id of the paymentrequest object.
...And 4 more matches
RTCIceCandidatePairStats.requestsReceived - Web APIs
the rtcicecandidatepairstats dictionary's requestsreceived property indicates the total number of stun connectivity check requests that have been received so far on the connection described by this pairing of candidates.
... syntax requestsreceived = rtcicecandidatepairstats.requestsreceived; value an integer value which specifies the number of stun connectivity and/or consent requests that have been received to date on the connection described by this pair of ice candidates.
... because there's no way to tell the difference between requests made to check connectivity and requests made to check consent, the returned figure includes both.
...And 4 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
here is a an example javascript function that prints the security details of an xmlhttprequest sent over ssl.
... the function is passed the channel property of an xmlhttprequest to extract the following information: was the connection secure?
... the channel property becomes available only after the request is sent and the connection was established, that is, on readystate loaded, interactive or completed.
...And 4 more matches
XMLHttpRequest.open() - Web APIs
the xmlhttprequest method open() initializes a newly-created request, or re-initializes an 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.
...And 4 more matches
XMLHttpRequest.timeout - Web APIs
the xmlhttprequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated.
...timeout shouldn't be used for synchronous xmlhttprequests requests used in a document environment or it will throw an invalidaccesserror exception.
... note: you may not use a timeout for synchronous requests with an owning window.
...And 4 more matches
XMLHttpRequest.withCredentials - Web APIs
the xmlhttprequest.withcredentials property is a boolean that indicates whether or not cross-site access-control requests should be made using credentials such as cookies, authorization headers or tls client certificates.
... setting withcredentials has no effect on same-site requests.
...xmlhttprequest from a different domain cannot set cookie values for their own domain unless withcredentials is set to true before making the request.
...And 4 more matches
BasicCardRequest.supportedNetworks - Web APIs
the supportednetworks property of the basiccardrequest dictionary contains an array of domstrings representing the card networks that the retailer supports (e.g.
...legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
...}; var request = new paymentrequest(supportedinstruments, details, options); specifications specification status comment basic card paymentthe definition of 'supportednetworks' in that specification.
...And 3 more matches
Bluetooth.requestDevice() - Web APIs
the bluetooth.requestdevice() method of the bluetooth interface returns a promise to a bluetoothdevice object with the specified options.
... syntax bluetooth.requestdevice([options]) .then(function(bluetoothdevice) { ...
... parameters options optional an object that sets options for the device request.
...And 3 more matches
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
the request read-only property of the idbcursor interface returns the idbrequest used to obtain the cursor.
... syntax var request = cursor.request; value an idbrequest object instance.
... examples when you open a cursor, the request property is then available on that cursor object, to tell you what request object the cursor originated from.
...And 3 more matches
IDBRequest.onsuccess - Web APIs
the onsuccess event handler of the idbrequest interface handles the success event, fired when the result of a request is successfully returned.
... syntax request.onsuccess = function(event) { ...
... }; example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store.
...And 3 more matches
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
the result read-only property of the idbrequest interface returns the result of the request.
... if the request failed and the result is not available, an invalidstateerror exception is thrown.
... syntax var myresult = request.result; value any example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store.
...And 3 more matches
Notification.requestPermission() - Web APIs
the requestpermission() method of the notification interface requests permission from the user for the current origin to display notifications.
... syntax the latest spec has updated this method to a promise-based syntax that works like this: notification.requestpermission().then(function(permission) { ...
... }); previously, the syntax was based on a simple callback; this version is now deprecated: notification.requestpermission(callback); parameters callback optional deprecated since gecko 46 an optional callback function that is called with the permission value.
...And 3 more matches
PaymentRequest: paymentmethodchange event - Web APIs
paymentmethodchange events are delivered by the payment request api to a paymentrequest object when the user changes payment methods within a given payment handler.
...this code creates a new paymentrequest, adds a handler for the paymentmethodchange event by calling the request's addeventlistener(), then calls show() to present the payment interface to the user.
... const options = { requestshipping: true }; const paymentrequest = new paymentrequest(paymentmethods, detailsforshipping("ground"), options); paymentrequest.addeventlistener("paymentmethodchange", handlepaymentchange, false); paymentrequest.show() .then(response => response.complete("success")) .catch(err => console.log("error handling payment request: " + err)); the event handler function itself, handlepaymentchange(), looks like this: handlepaymentchange = event => { const details...
...And 3 more matches
PaymentRequest.shippingType - Web APIs
the shippingtype read-only property of the paymentrequest interface returns one of "shipping", "delivery", "pickup", or null if one was not provided by the constructor.
... syntax var shippingtype = paymentrequest.shippingtype value one of "shipping", "delivery", "pickup", or null.
... specifications specification status comment payment request apithe definition of 'shippingtype' in that specification.
...And 3 more matches
PaymentRequestEvent() - Web APIs
the paymentrequestevent constructor creates a new paymentrequestevent object which is a constructor for a paymentrequestevent which is the object passed to a payment handler when a paymentrequest is made..
... syntax var paymentrequestevent = new paymentrequesteventy(type, options) parameters type must always be 'paymentrequest'.
... paymentrequestid: the id of the paymentrequest object.
...And 3 more matches
PaymentResponse.requestId - Web APIs
the requestid read-only property of the paymentresponse interface rreturns the free-form identifier supplied by the paymentresponse() constructor by details.id.
... syntax var id = paymentrequest.id value a domstring.
... specifications specification status comment payment request apithe definition of 'requestid' in that specification.
...And 3 more matches
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
... if the transport connection fails and the browser retires the request, the value returned will be the start of the retry request.
... there is no end property for requeststart.
...And 3 more matches
RTCIceCandidatePairStats.requestsSent - Web APIs
the rtcicecandidatepairstats dictionary's requestssent property indicates the total number of stun connectivity check requests that have been sent so far on the connection described by this pair of candidates.
... syntax requestssent = rtcicecandidatepairstats.requestssent; value an integer value which specifies the number of stun connectivity requests that have been sent to date on the connection described by this pair of ice candidates.
... note: the reported number of requests does not include retransmissions.
...And 3 more matches
Request.clone() - Web APIs
WebAPIRequestclone
the clone() method of the request interface creates a copy of the current request object.
...in fact, the main reason clone() exists is to allow multiple uses of body objects (when they are one-use only.) if intend to modify the request, you may prefer the request constructor.
... syntax var newrequest = request.clone(); parameters none.
...And 3 more matches
XMLHttpRequest.getAllResponseHeaders() - Web APIs
the xmlhttprequest method getallresponseheaders() returns all the response headers, separated by crlf, as a string, or returns null if no response has been received.
... note: for multipart requests, this returns the headers from the current part of the request, not from the original channel.
... syntax var headers = xmlhttprequest.getallresponseheaders(); parameters none.
...And 3 more matches
XMLHttpRequest.onreadystatechange - Web APIs
the xmlhttprequest.onreadystatechange property contains the event handler to be called when the readystatechange event is fired, that is every time the readystate property of the xmlhttprequest changes.
... warning: this should not be used with synchronous requests and must not be used from native code.
... syntax xmlhttprequest.onreadystatechange = callback; values callback is the function to be executed when the readystate changes.
...And 3 more matches
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.
...And 3 more matches
XMLHttpRequestResponseType - Web APIs
the xmlhttprequestresponsetype type is an enumerated set of strings which are used to specify the type of data contained in the response of an xmlhttprequest.
... these values are used when getting or setting the responsetype on the request.
...see html in xmlhttprequest to learn more about using xhr to fetch html content.
...And 3 more matches
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 *,-.;=.
...And 2 more matches
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
a cors preflight request is a cors request that checks to see if the cors protocol is understood and a server is aware using specific methods and headers.
... it is an options request, using three http request headers: access-control-request-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.
...And 2 more matches
XHR (XMLHttpRequest) - MDN Web Docs Glossary: Definitions of Web-related terms
xmlhttprequest (xhr) is a javascript api to create ajax requests.
... its methods provide the ability to send network requests between the browser and a server.
... learn more general knowledge xmlhttprequest on wikipedia synchronous vs.
...And 2 more matches
nsIInterfaceRequestor
xpcom/base/nsiinterfacerequestor.idlscriptable this interface defines a generic interface for requesting interfaces that a given object might provide access to.
...the main difference is that interfaces returned are not required to provide a way back to the object implementing nsiinterfacerequestor.
...nsiinterfacerequestor, however, allows you to obtain an interface c from a that may (or most likely) will not have the ability to get back to a.
...And 2 more matches
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
the canvascapturemediastreamtrack method requestframe() requests that a frame be captured from the canvas and sent to the stream.
... applications that need to carefully control the timing of rendering and frame capture can use requestframe() to directly specify when it's time to capture a frame.
... to prevent automatic capture of frames, so that frames are only captured when requestframe() is called, specify a value of 0 for the capturestream() method when creating the stream.
...And 2 more matches
FetchEvent.request - Web APIs
the request read-only property of the fetchevent interface returns the request that triggered the event handler.
... this property is non-nullable (since version 46, in the case of firefox.) if a request is not provided by some other means, the constructor init object must contain a request (see fetchevent.fetchevent().) syntax var recentrequest = fetchevent.request; value a request object.
...this promise resolves to the first matching url request in the cache object.
...And 2 more matches
IDBRequest: error event - Web APIs
the error handler is executed when an error caused a request to fail.
... bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'ho...
...urs', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }); dbopenrequest.addeventlistener('success', event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); objectstorerequest.addeventlistener('error', () => { console.log(`error add...
...And 2 more matches
IDBVersionChangeRequest.setVersion() - Web APIs
the idbversionchangerequest.setversion method updates the version of the database, returning immediately and running a versionchange transaction on the connected database in a separate thread.
...the new way is to define the version in the idbdatabase.open() method and create and delete object stores in the onupgradeneeded event handler associated with the returned request.
... syntax idbversionchangerequest setversion ([treatnullas=emptystring] in domstring version); example tbd parameters version the version to store in the database.
...And 2 more matches
IDBVersionChangeRequest - Web APIs
the new way to do it is to use the idbopendbrequest interface which has now the onblocked handler and the newly needed onupgradeneeded one.
... the idbversionchangerequest interface the indexeddb api represents a request to change the version of a database.
... methods inherits from: idbrequest idbversionchangerequest.setversion updates the version of the database.
...And 2 more matches
MediaRecorder.requestData() - Web APIs
the mediarecorder.requestdata() method (part of the mediarecorder api) is used to raise a dataavailable event containing a blob object of the captured media as it was when the method was called.
... when the requestdata() method is invoked, the browser queues a task that runs the following steps: if mediarecorder.state is not "recording", raise a dom invalidstate error and terminate these steps.
... syntax mediarecorder.requestdata() errors an invalidstate error is raised if the requestdata() method is called while the mediarecorder object’s mediarecorder.state is not "recording" — the media cannot be captured if recording is not occurring.
...And 2 more matches
PaymentRequest: merchantvalidation event - Web APIs
merchantvalidation events are delivered by the payment request api to a paymentrequest object when a payment handler requires that the merchant requesting the purchase validate itself as permitted to use the payment handler.
...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.
... request.addeventlistener("merchantvalidation", event => { event.complete(async () => { const merchantserverurl = window.location.origin + '/validate?url=' + encodeuricomponent(event.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(response => response.text()); }, false); }; const response = await request.show(); how merchant server handles the validation depends on the server implementation and payment method documentation.
...And 2 more matches
PaymentRequest: shippingoptionchange event - Web APIs
for payment requests that request shipping information, and for which shipping options are offered, the shippingoptionchange event is sent to the paymentrequest whenever the user chooses a shipping option from the list of available options.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingoptionchange examples this code snippet sets up a handler for the shippingoptionchange event.
... paymentrequest.addeventlistener("shippingoptionchange", event => { const value = calculatenewtotal(paymentrequest.shippingoption); const total = { currency: "eur", label: "total due", value, }; event.updatewith({ total }); }, false); after caling a custom function, calculatenewtotal(), to compute the updated total based on the newly-selected shipping option as specified by the shippingoption.
...And 2 more matches
PaymentRequest.payerName - Web APIs
this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor.
... specifications specification status comment payment request apithe definition of 'payername' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
ReadableStreamBYOBRequest - Web APIs
the readablestreambyobrequest interface of the streams api represents a pull request into a readablebytestreamcontroller view.
...readablestreambyobrequest instance is created automatically by readablebytestreamcontroller as needed.
... properties readablestreambyobrequest.view read only returns the current view.
...And 2 more matches
Request.context - Web APIs
WebAPIRequestcontext
the deprecated context read-only property of the request interface contains the context of the request (e.g., audio, image, iframe).
... the context of a request is only relevant in the serviceworker api; a service worker can make decisions based on whether the url is for an image, or an embeddable object such as a <video>, iframe, etc.
... note: you can find a full list of the different available contexts including associated context frame types, csp directives, and platform feature examples in the fetch spec request context section.
...And 2 more matches
Request.destination - Web APIs
the destination read-only property of the request interface returns a string describing the type of content being requested.
... the string must be one of those found in the requestdestination enumerated type or the empty string, which is the default value.
... the destination is used by the user agent to, for example, help determine which set of rules to follow for cors purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.
...And 2 more matches
USB.requestDevice() - Web APIs
WebAPIUSBrequestDevice
the requestdevice() method of the usb interface returns a promise that resolves with an instance of usbdevice if the specified device is found.
... syntax usb.requestdevice([filters]) parameters filters an array of filter objects for possible devices you would like to pair.
...both are passed to requestdevice().
...And 2 more matches
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
the request() method of the wakelock interface returns a promise that resolves with a wakelocksentinel object, which allows control over screen dimming and locking.
... syntax var wakelock = navigator.wakelock.request(type); parameters type options are as follows: 'screen': requests a screen wake lock.
... examples the following asynchronous function requests a wakelocksentinel object.
...And 2 more matches
Window.requestFileSystem() - Web APIs
the non-standard window method requestfilesystem() method is a google chrome-specific method which lets a web site or app gain access to a sandboxed file system for its own use.
... even compared to the rest of the file and directory entries api, requestfilesystem() is especially non-standard; only chrome implements it, and all other browser makers have decided that they will not implement it.
... window.requestfilesystem(type, size, successcallback[, errorcallback]); parameters type the type of storage to request.
...And 2 more matches
window.requestIdleCallback() - Web APIs
the window.requestidlecallback() method queues a function to be called during a browser's idle periods.
... you can call requestidlecallback() within an idle callback function to schedule another callback to take place no sooner than the next pass through the event loop.
... syntax var handle = window.requestidlecallback(callback[, options]) return value an id which can be used to cancel the callback by passing it into the window.cancelidlecallback() method.
...And 2 more matches
XMLHttpRequest.getResponseHeader() - Web APIs
the xmlhttprequest method getresponseheader() returns the string containing the text of a particular header's value.
... syntax var myheader = xmlhttprequest.getresponseheader(headername); parameters headername a bytestring indicating the name of the header you want to return the text value of.
... example in this example, a request is created and 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.
...And 2 more matches
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.
... 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".
...And 2 more matches
XMLHttpRequest.readyState - Web APIs
the xmlhttprequest.readystate property returns the state an xmlhttprequest client is in.
... unsent the xmlhttprequest client has been created, but the open() method hasn't been called yet.
...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.
...And 2 more matches
XMLHttpRequest.responseXML - Web APIs
the xmlhttprequest.responsexml read-only property returns a document containing the html or xml retrieved by the request; or null if the request was unsuccessful, has not yet been sent, or if the data can't be parsed as xml or html.
...if the responsetype is set to "document" and the request was made asynchronously, instead the response is parsed as "text/html".
... if the server doesn't specify the content-type as "text/xml" or "application/xml", you can use xmlhttprequest.overridemimetype() to parse it as xml anyway.
...And 2 more matches
XRSession.requestReferenceSpace() - Web APIs
the requestreferencespace() method of the xrsession interface returns a promise that resolves with an instance of either xrreferencespace or xrboundedreferencespace as appropriate given the type of reference space requested.
... syntax refspacepromise = xrsession.requestreferencespace(referencespacetype); parameters type a domstring specifying the type of reference space for which an instance is to be returned.
... the reference space returned by xrsession.requestreferencespace() is either xrreferencespace or xrboundedreferencespace.
...And 2 more matches
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
introduction the purpose of this page is to gather requests for enhancement to the mozilla xforms implementation.
... if you have an idea that might improve mozilla's xforms implementation then you should choose one of the following rfe categories and put your request there.
... you can also contact the xforms team about your request.
...an additional way to attract the xforms team's attention to an enhancement request you are promoting is to vote for the bug that is related with the feature request (if there is no bug yet then please feel free to file it).
BasicCardRequest.supportedTypes - Web APIs
the obsolete supportedtypes property of the basiccardrequest dictionary can optionally be provided to specify an array of domstrings representing the card types that the retailer supports (e.g.
... syntax basiccardrequest.supportedtypes = [cardtype1...cardtypen]; value an array containing one or more domstrings, which describe the card types the retailer supports.
... legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
...}; var request = new paymentrequest(supportedinstruments, details, options); ...
FileRequest - Web APIs
summary the filerequest interface extends the domrequest interface to provide some extra properties necessary for the lockedfile objects.
... properties filerequest.lockedfile read only the lockedfile object from which the request was started.
... filerequest.onprogress a callback handler called repeatedly while the operation represented by the filerequest is in progress.
... the filerequest interface also inherits from the domrequest interface.
IDBRequest: success event - Web APIs
the success event is fired when an idbrequest succeeds.
... bubbles no cancelable no interface event event handler property onsuccess examples this example tries to open a database and listens for the success event using addeventlistener(): // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createi...
...ndex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.addeventlistener('success', (event) => { console.log('database opened successfully!'); }); the same example, but using the onsuccess event handler property: // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { uni...
...que: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.onsuccess = (event) => { console.log('database opened successfully!'); }; ...
Navigator.requestMediaKeySystemAccess() - Web APIs
the navigator.requestmediakeysystemaccess() method returns a promise which delivers a mediakeysystemaccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
...consider that when deciding when to call requestmediakeysystemaccess(); you don't want those requests to happen at inconvenient times.
... syntax ​promise = navigator.requestmediakeysystemaccess(keysystem, supportedconfigurations); parameters keysystem a domstring identifying the key system.
... specifications specification status comment encrypted media extensionsthe definition of 'requestmediakeysystemaccess()' in that specification.
PaymentRequest.onmerchantvalidation - Web APIs
the paymentrequest event handler onmerchantvalidation is invoked when the merchantvalidation is fired, indicating that the payment handler (e.g., apple pay) requires the merchant to validate themselves.
... syntax paymentrequest.onmerchantvalidation = eventhandlerfunction; value an event handler function which is to be called whenever the merchantvalidation event is fired at the paymentrequest, indicating that the payment handler requires the merchant to validate themselves as allowed to use this payment handler.
... examples an example merchant validation handler for the paymentrequest object request looks like this: request.onmerchantvalidation = ev => { ev.complete(async () => { const merchantserverurl = window.location.origin + '/validation?url=' + encodeuricomponent(ev.validationurl); // get validation data, and complete validation; return await fetch(merchantserverurl).then(r => r.text()); }) }; const response = await request.show(); for more information, see merchant validation in payment processing concepts.
... specifications specification status comment payment request apithe definition of 'onmerchantvalidation' in that specification.
PaymentRequest: shippingaddresschange event - Web APIs
the shippingaddresschange event is sent to the paymentrequest object when the user selects a shipping address or changes details of their shipping address.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingaddresschange usage notes depending on the browser, the shipping address information may be redacted for privacy reasons.
... const paymentrequest = new paymentrequest(methoddata, details, options); paymentrequest.addeventlistener("shippingaddresschange", event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupate); }, false); const checkaddress = theaddress => { let detailsupdate = {}; // check the address, return a paymentdetailsupdate object // with any changes or errors.
... return detailsupdate; }; you can also establish a handler for shippingaddresschange using the onshippingaddresschange event handler property: paymentrequest.onshippingaddresschange = event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupdate); }; specifications specification status comment payment request apithe definition of 'shippingaddresschange' in that specification.
PaymentRequestUpdateEvent - Web APIs
the paymentrequestupdateevent interface is used for events sent to a paymentrequest instance when changes are made to shipping-related information for a pending paymentrequest.
... constructor paymentrequestupdateevent() secure context creates a new paymentrequestupdateevent object.
... methods in addition to methods inherited from the parent interface, event, paymentrequestupdateevent offers the following methods: paymentrequestupdateevent.updatewith() secure context if the event handler determines that information included in the payment request needs to be changed, or that new information needs to be added, it calls updatewith() with the information that needs to be replaced or added.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent' in that specification.
RequestDestination - Web APIs
the requestdestination enumerated type contains the permitted values for a request's destination.
... these string values indicate potential types of content that a request may try to retrieve.
...navigator.sendbeacon(), eventsource, <a ping>, <area ping>, fetch(), xmlhttprequest, websocket, cache and more.
... specifications specification status comment fetchthe definition of 'requestdestination' in that specification.
StorageQuota.requestPersistentQuota - Web APIs
the requestpersistentquota() property of the storagequota interface requests persistent storage for the requesting application and returns a promise to an instance of storageinfo.
... there is no guarantee that the requested space will be granted by the user agent.
... syntax storagequota.requestpersistentquota().then(function(storageinfo) { ...
... specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification.
XDomainRequest.onprogress - Web APIs
this method is called periodically as an event handler for progress events on xdomainrequests, so that code can monitor progress while loading content.
... note: while handling this event, you can look at xdomainrequest.responsetext to get the response so far.
... once loading is complete, the xdomainrequest.onload event handler gets called.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onprogress = function(){ //handle partial response with xdr.responsetext } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XDomainRequest.open() - Web APIs
opens an xdomainrequest which is configured to use a given method (get/post) and url.
... syntax xdr.open(method, url); parameters method the http method to use for the request.
... (get or post) url the url to which to send the request.
... example var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); specification not part of any specification.
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&param2=value2"); specification not part of any specification.
XMLHttpRequest.abort() - Web APIs
the xmlhttprequest.abort() method aborts the request if it has already been sent.
... when a request is aborted, its readystate is changed to xmlhttprequest.unsent (0) and the request's status code is set to 0.
... syntax xmlhttprequest.abort() parameters none.
... var xhr = new xmlhttprequest(), method = "get", url = "https://developer.mozilla.org/"; xhr.open(method, url, true); xhr.send(); if (oh_noes_we_need_to_cancel_right_now_or_else) { xhr.abort(); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.sendAsBinary() - Web APIs
the obsolete xmlhttprequest method sendasbinary() is a variant of the send() method that sends binary data.
... syntax xmlhttprequest.sendasbinary(binarystring); parameters binarystring a domstring which encodes the binary content to be sent.
... /*\ |*| |*| :: xmlhttprequest.prototype.sendasbinary() polyfill :: |*| |*| https://developer.mozilla.org/docs/dom/xmlhttprequest#sendasbinary() |*| \*/ if (!xmlhttprequest.prototype.sendasbinary) { xmlhttprequest.prototype.sendasbinary = function (sdata) { var nbytes = sdata.length, ui8data = new uint8array(nbytes); for (var nidx = 0; nidx < nbytes; nidx++) { ui8data[nidx] = sdata.charcodeat(nidx) & 0xff; } ...
...however, on google chrome, when you try to send an arraybuffer, the following warning message will appear: arraybuffer is deprecated in xmlhttprequest.send().
XMLHttpRequest.status - Web APIs
the read-only xmlhttprequest.status property returns the numerical http status code of the xmlhttprequest's response.
... before the request completes, the value of status is 0.
... browsers also report a status of 0 in case of xmlhttprequest errors.
... example var xhr = new xmlhttprequest(); console.log('unsent: ', xhr.status); xhr.open('get', '/server'); console.log('opened: ', xhr.status); xhr.onprogress = function () { console.log('loading: ', xhr.status); }; xhr.onload = function () { console.log('done: ', xhr.status); }; xhr.send(); /** * outputs the following: * * unsent: 0 * opened: 0 * loading: 200 * done: 200 */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.statusText - Web APIs
the read-only xmlhttprequest.statustext property returns a domstring containing the response's status message as returned by the http server.
... unlike xmlhttprequest.status which indicates a numerical status code, this property contains the text of the response status, such as "ok" or "not found".
... if the request's readystate is in unsent or opened state, the value of statustext will be an empty string.
... example var xhr = new xmlhttprequest(); console.log('0 unsent', xhr.statustext); xhr.open('get', '/server', true); console.log('1 opened', xhr.statustext); xhr.onprogress = function () { console.log('3 loading', xhr.statustext); }; xhr.onload = function () { console.log('4 done', xhr.statustext); }; xhr.send(null); /** * outputs the following: * * 0 unsent * 1 opened * 3 loading ok * 4 done ok */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.upload - Web APIs
the xmlhttprequest upload property returns an xmlhttprequestupload object that can be observed to monitor an upload's progress.
... it is an opaque object, but because it's also an xmlhttprequesteventtarget, event listeners can be attached to track its process.
... timeout ontimeout the upload timed out because a reply did not arrive within the time interval specified by the xmlhttprequest.timeout.
... specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onabort - Web APIs
the xmlhttprequesteventtarget.onabort is the function called when an xmlhttprequest transaction is aborted, such as when the 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 ...
XMLHttpRequestEventTarget.onload - Web APIs
the xmlhttprequesteventtarget.onload is the function called when an xmlhttprequest transaction completes successfully.
... syntax xmlhttprequest.onload = callback; values callback is the function to be executed when the request completes successfully.
...the context) is the same xmlhttprequest this callback is related to.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onload = function () { // do something with the retrieved data ( found in xmlhttp.response ) }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
Reason: CORS request did not succeed - HTTP
reason reason: cors request did not succeed what went wrong?
... the http request which makes use of cors failed because the http connection failed at either the network or protocol level.
...an ad blocker or privacy protector) blocking the request.
... the server did not respond to the actual request (even if it responded to the preflight request).
Access-Control-Request-Headers - HTTP
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.
... header type request header forbidden header name yes syntax access-control-request-headers: <header-name>, <header-name>, ...
... directives <header-name> a comma-delimited list of http headers that are included in the request.
... examples access-control-request-headers: x-pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
Access-Control-Request-Method - HTTP
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 same method as the actual request.
... header type request header forbidden header name yes syntax access-control-request-method: <method> directives <method> one of the http request methods, for example get, post, or delete.
... examples access-control-request-method: post specifications specification status comment fetchthe definition of 'access-control-request-method' in that specification.
431 Request Header Fields Too Large - HTTP
WebHTTPStatus431
the http 431 request header fields too large response status code indicates that the server refuses to process the request because the request’s http headers are too long.
... the request may be resubmitted after reducing the size of the request headers.
... 431 can be used when the total size of request headers is too large, or when a single header field is too large.
... servers will often produce this status if: the referer url is too long there are too many cookies sent in the request status 431 request header fields too large specifications specification title rfc 6585, section 5: 431 request header fields too large additional http status codes ...
The life of an HTML HTTP request - Archive of obsolete content
[note: passes nswebshell.mobserver as nsistreamobserver and the webshell as nsicontentviewercontainer to the docloader.] (2) the document loader calls ns_openuri with the url to begin transfering the requested file.
... (3) when data is starting to come from the webserver the nsichannel calls the onstartrequest in the documenloader.
...this streamlistener is returned to the documentloader and connected to the nsichannel of the request.
Fetch metadata request header - MDN Web Docs Glossary: Definitions of Web-related terms
a fetch metadata request header is a http request header that provides additional information about the context the request originated from.
... fetch metadata request headers provide the server with additional information about where the request originated from, enabling it to ignore potentially malicious requests.
... the following are fetch metadata request headers: sec-fetch-site sec-fetch-mode sec-fetch-user sec-fetch-dest ...
Element.requestPointerLock() - Web APIs
the element.requestpointerlock() method lets you asynchronously ask for the pointer to be locked on the given element.
... to track the success or failure of the request, it is necessary to listen for the pointerlockchange and pointerlockerror events at the document level.
... syntax instanceofelement.requestpointerlock(); specifications specification status comment pointer lockthe definition of 'requestpointerlock()' in that specification.
FileRequest.onprogress - Web APIs
summary this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
... syntax instanceoffilerequest.onprogress = function; where instanceoffilerequest is a filerequest object and function is the javascript function to execute.
... example // assuming 'request' which is a filerequest object request.onprogress = function (status) { var progress = document.queryselector('progress'); progress.value = status.loaded; progress.max = status.total; } specification not part of any current specification.
IDBOpenDBRequest: blocked event - Web APIs
bubbles no cancelable no interface idbversionchangeevent event handler property onblocked examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objects...
...tore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.addeventlistener('blocked', () => { console.log('request was blocked'); }); }; using the onblocked property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating d...
...asktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.onblocked = () => { console.log('request was blocked'); }; }; ...
generateRequest() - Web APIs
the mediakeysession.generaterequest() method returns a promise after generating a media request based on initialization data.
... syntax mediakeysession.generaterequest().then(function) { ...
... }); specifications specification status comment encrypted media extensionsthe definition of 'generaterequest()' in that specification.
paymentRequestId - Web APIs
the paymentrequestid read-only property of the paymentrequestevent interface returns the id of the paymentrequest object.
... syntax var id = paymentrequestevent.paymentrequestid value a domstring contains the id.
... specifications specification status comment payment handler apithe definition of 'paymentrequestid' in that specification.
PaymentRequestUpdateEvent.updateWith() - Web APIs
the updatewith() method of the paymentrequestupdateevent interface updates the details of an existing paymentrequest.
... syntax paymentrequestupdateevent.updatewith(details); parameters details a paymentdetailsupdate object specifying the changes applied to the payment request: displayitems optional an array of paymentitem objects, each describing one line item for the payment request.
... specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent.updatewith()' in that specification.
PerformanceTiming.requestStart - Web APIs
the legacy performancetiming.requeststart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser sent the request to obtain the actual document, from the server or from a cache.
... if the transport layer fails after the start of the request and the connection is reopened, this property will be set to the time corresponding to the new request.
... syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification.
PublicKeyCredentialRequestOptions.extensions - Web APIs
extensions, an optional property of the publickeycredentialrequestoptions dictionary, is an object providing the client extensions and their input values.
... extensions are values requesting additional processing by the client and by the authenticator.
... syntax extensions = publickeycredentialrequestoptions.extensions value an object with various keys and values.
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
the rtcicecandidatepairstats property consentrequestssent specifies the number of consent requests that have been sent by this peer to the remote peer on the connection described by the pair of candidates.
... syntax consentrequestssent = rtcicecandidatepairstats.consentrequestssent; value an integer indicating the number of consent requests this peer has sent to the other peer over the connection described by the pair of candidates referenced by this rtcicecandidatepairstats object.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentrequestssent' in that specification.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
the rtcicecandidatepairstats property firstrequesttimestamp specifies the time at which the first stun request was sent on the described candidate pair.
... syntax firstrequesttimestamp = rtcicecandidatepairstats.firstrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the first stun request was sent on the connection described by the described pair of candidates.
... you can use this value in combination with lastrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.firstrequesttimestamp' in that specification.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
the rtcicecandidatepairstats property lastrequesttimestamp indicates the time at which the most recent stun request was sent on the described candidate pair.
... syntax lastrequesttimestamp = rtcicecandidatepairstats.lastrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the last (most recent) stun request was sent on the connection indicated by the described pair of candidates.
... you can use this value in combination with firstrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastrequesttimestamp' in that specification.
ReadableByteStreamController.byobRequest - Web APIs
the byobrequest read-only property of the readablebytestreamcontroller interface returns the current byob pull request, or undefined if there are no pending requests.
... syntax var request = readablebytestreamcontroller.byobrequest; value a readablestreambyobrequest object instance, or undefined.
... specifications specification status comment streamsthe definition of 'byobrequest' in that specification.
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.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request credentials in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.credentials; // returns "same-origin" by default specifications specification status comment fetchthe definition of 'credentials' in that specification.
Request.headers - Web APIs
WebAPIRequestheaders
the headers read-only property of the request interface contains the headers object associated with the request.
... syntax var myheaders = request.headers; value a headers object.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request headers in a variable: var myrequest = new request('flowers.jpg'); var myheaders = myrequest.headers; // headers {} to add a header to the headers object we use headers.append; we then create a new request along with a 2nd init parameter, passing headers in as an init option: var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); mycontenttype = myrequest.headers.get('content-type'); // returns 'image/jpeg' specifications specification ...
Request.integrity - Web APIs
WebAPIRequestintegrity
the integrity read-only property of the request interface contains the subresource integrity value of the request.
... syntax var myintegrity = request.integrity; value the subresource integrity value of the request (e.g., sha256-bpfbw7ivv8q2jlit13fxdyae2tjllusrsz273h2nfse=).
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request integrity value in a variable: var myrequest = new request('flowers.jpg'); var myintegrity = myrequest.integrity; specifications specification status comment fetchthe definition of 'integrity' in that specification.
Request.redirect - Web APIs
WebAPIRequestredirect
the redirect read-only property of the request interface contains the mode for how redirects are handled.
... syntax var myredirect = request.redirect; value a requestredirect enum value, which can be one the following strings: follow error manual if not specified when the request is created, it takes the default value of follow.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request redirect value in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.redirect; specifications specification status comment fetchthe definition of 'redirect' in that specification.
Request.referrer - Web APIs
WebAPIRequestreferrer
the referrer read-only property of the request interface is set by the user agent to be the referrer of the request.
... syntax var myreferrer = request.referrer; value a domstring representing the request's referrer.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrer; // returns "about:client" by default specifications specification status comment fetchthe definition of 'referrer' in that specification.
Request.referrerPolicy - Web APIs
the referrerpolicy read-only property of the request interface returns the referrer policy, which governs what referrer information, sent in the referer header, should be included with the request.
... syntax var myreferrerpolicy = request.referrerpolicy; value a domstring representing the request's referrerpolicy.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer policy in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrerpolicy; // returns "" by default specifications specification status comment fetchthe definition of 'referrerpolicy' in that specification.
Request.url - Web APIs
WebAPIRequesturl
the url read-only property of the request interface contains the url of the request.
... syntax var myurl = request.url; value a usvstring indicating the url of the request.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the url of the request in a variable: var myrequest = new request('flowers.jpg'); var myurl = myrequest.url; // "http://mdn.github.io/fetch-examples/fetch-request/flowers.jpg" specifications specification status comment fetchthe definition of 'url' in that specification.
XDomainRequest.onerror - Web APIs
an event handler which is called when an xdomainrequest encounters an error.
... note: there is no way to determine the cause of the error from the xdomainrequest interface.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onerror = function(){ //handle error } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XDomainRequest.onload - Web APIs
an event handler for when an xdomainrequest has finished receiving the response from the server.
... you can find the entire server response in the xdomainrequest.responsetext property.
... syntax xdr.onload = funcref; example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XDomainRequest.responseText - Web APIs
returns the response body of an xdomainrequest as a string.
... note: this property is valid during the xdomainrequest.onprogress and xdomainrequest.onload events.
... syntax var response = xdr.responsetext; this sets response to contain the response body of the request, as a string.
Using XMLHttpRequest in IE6 - Web APIs
xmlhttprequest was first introduced by microsoft in internet explorer 5.0 as an activex control.
... however, in ie7 and other browsers xmlhttprequest is a native javascript object.
... in all modern browsers, you can create a new xmlhttprequest object using the following code: var request = new xmlhttprequest() however, if you need to also support internet explorer 6 and older, you need to extend your code like this: if (window.xmlhttprequest) { //firefox, opera, ie7, and other browsers will use the native object var request = new xmlhttprequest(); } else { //ie 5 and 6 will use the activex control var request = new activexobject("microsoft.xmlhttp"); } see also using xmlhttprequest ...
XMLHttpRequest: abort event - Web APIs
the abort event is fired when a request has been aborted, for example because the program called xmlhttprequest.abort().
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: error event - Web APIs
the error event is fired when the request encountered an error.
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: load event - Web APIs
the load event is fired when an xmlhttprequest transaction completes successfully.
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadend event - Web APIs
the loadend event is fired when a request has completed, whether successfully (after load) or unsuccessfully (after abort or error).
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadstart event - Web APIs
the loadstart event is fired when a request has started to load data.
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: progress event - Web APIs
the progress event is fired periodically when a request receives more data.
...ion addlisteners(xhr) { xhr.addeventlistener('loadstart', handleevent); 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.moz...
...illademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequestEventTarget.onerror - Web APIs
the xmlhttprequesteventtarget.onerror is the function called when an xmlhttprequest transaction fails due to an error.
... syntax xmlhttprequest.onerror = callback; values callback is the function to be executed when the request fails.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onerror = function () { console.log("** an error occurred during the transaction"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onloadstart - Web APIs
the xmlhttprequesteventtarget.onloadstart is the function called when an xmlhttprequest transaction starts transferring data.
... syntax xmlhttprequest.onloadstart = callback; values callback is the function to be called when the transaction begins to transfer data.
... example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onloadstart = function () { console.log("download underway"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onprogress - Web APIs
the xmlhttprequesteventtarget.onprogress is the function called periodically with information when an xmlhttprequest before success completely.
... syntax xmlhttprequest.onprogress = callback; values callback is the function to be called periodically before the request is completed.
... xmlhttprequest.onprogress = function (event) { event.loaded; event.total; }; example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onprogress = function () { //do something }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XRFrameRequestCallback - Web APIs
the xrframerequestcallback is a callback function passed into xrsession.requestanimationframe (part of webxr api) to obtain the current time and the current xrframe.
... syntax function xrframerequestcallback(time, xrframe){ // process xrframe here } xrsession.requestanimationframe(xrframerequestcallback) parameters domhighrestimestamp a timestamp corresponding to the returned xrframe.
... specifications specification status comment webxr device apithe definition of 'xrframerequestcallback' in that specification.
Reason: CORS request external redirect not allowed - HTTP
reason reason: cors request external redirect not allowed what went wrong?
... the cors request was responded to by the server with an http redirect to a url on a different origin than the original request, which is not permitted during cors requests.
... for example, if the page https://service.tld/fetchdata were requested, and the http response is "301 moved permanently", "307 temporary redirect", or "308 permanent redirect" with a location of https://anotherservice.net/getdata, the cors request will fail in this manner.
Reason: CORS request not HTTP - HTTP
reason reason: cors request not http what went wrong?
... cors requests may only use the https url scheme, but the url specified by the request is of a different type.
... to fix this problem, simply make sure you use https urls when issuing requests involving cors, such as xmlhttprequest, fetch apis, web fonts (@font-face), and webgl textures, and xsl stylesheets.
Upgrade-Insecure-Requests - HTTP
the http upgrade-insecure-requests request header 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 csp directive.
... 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.
... location: https://example.com/ vary: upgrade-insecure-requests specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
400 Bad Request - HTTP
WebHTTPStatus400
the hypertext transfer protocol (http) 400 bad request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
... the client should not repeat this request without modification.
... status 400 bad request specifications specification title rfc 7231, section 6.5.1: 400 bad request hypertext transfer protocol (http/1.1): semantics and content ...
408 Request Timeout - HTTP
WebHTTPStatus408
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.
... status 408 request timeout specifications specification title rfc 7231, section 6.5.7: 408 request timeout hypertext transfer protocol (http/1.1): semantics and content ...
429 Too Many Requests - HTTP
WebHTTPStatus429
the http 429 too many requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").
... a retry-after header might be included to this response indicating how long to wait before making a new request.
... status 429 too many requests example http/1.1 429 too many requests content-type: text/html retry-after: 3600 specifications specification title rfc 6585, section 4: 429 too many requests additional http status codes ...
CRMF Request object - Archive of obsolete content
rfc 4211, the internet x.509 public key infrastructure certificate request message format (crmf), defines a certreqmessage.
... the object returned by generatecrmfrequest() contains one of those.
Blocked: All storage access requests
message firefox: cookieblockedall=request to access cookies or storage on “x” was blocked because we are blocking all storage access requests.
... a request to access cookies or storage was blocked because the browser is blocking all storage access.
Blocked: All third-party storage access requests
message firefox: cookieblockedforeign=request to access cookies or storage on “x” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.
... a request to access cookies or storage was blocked because it came from a third-party (a different origin) and content blocking is enabled.
Blocked: Storage access requests from trackers
message firefox: cookieblockedtracker=request to access cookies or storage on “x” was blocked because it came from a tracker and content blocking is enabled.
... a request to access cookies or storage was blocked because the browser identified it as coming from a tracker and content blocking is enabled.
PRMcastRequest
structure used to specify values for the pr_sockopt_addmember and pr_sockopt_dropmember socket options that define a request to join or leave a multicast group.
... syntax #include <prio.h> struct prmcastrequest { prnetaddr mcaddr; prnetaddr ifaddr; }; typedef struct prmcastrequest prmcastrequest; fields the structure has the following fields: mcaddr ip multicast address of group.
nsIDNSRequest
netwerk/dns/nsidnsrequest.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 method overview void cancel(); methods cancel() called to cancel a pending asynchronous dns request.
nsIXMLHttpRequestEventTarget
content/base/public/nsixmlhttprequest.idlscriptable this interface provides access to the event listeners used when uploading data using the xmlhttprequest object.
...see also using xmlhttprequest xmlhttprequest nsixmlhttprequest nsidomprogressevent ...
nsIXMLHttpRequestUpload
content/base/public/nsixmlhttprequest.idlscriptable this interface provides access to the features needed when uploading data using nsixmlhttprequest.
...y 2.0) attributes attribute type description onabort nsidomeventlistener onerror nsidomeventlistener onload nsidomeventlistener onloadstart nsidomeventlistener onprogress nsidomeventlistener see also nsixmlhttprequest nsixmlhttprequesteventtarget xmlhttprequest using xmlhttprequest ...
FileRequest.lockedFile - Web APIs
summary the lockedfile property represents the lockedfile object from which the request was started.
... syntax var lockedfile = instanceoffilerequest.lockedfile value a lockedfile object.
IDBOpenDBRequest: upgradeneeded event - Web APIs
// open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('h...
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', ...
PaymentRequestEvent.instrumentKey - Web APIs
the instrumentkey read-only property of the paymentrequestevent interface returns a paymentinstrument object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
... syntax var instrumentkey = paymentrequestevent.instrumentkey value a paymentinstrument object.
PaymentRequestEvent.methodData - Web APIs
the methoddata read-only property of the paymentrequestevent interface returns an array of paymentmethoddata objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
... syntax var methoddata[] = paymentrequestevent.methoddata value an array of paymentmethoddata objects.
PaymentRequestEvent.openWindow() - Web APIs
the openwindow property of the paymentrequestevent interface opens the specified url in a new window, if and only if the given url is on the same origin as the calling page.
... syntax var apromise = paymentrequestevent.openwindow(url) parameters url the url to open in the new window.
PaymentRequestEvent.respondWith() - Web APIs
the respondwith property of the paymentrequestevent interface prevents the default event handling and allows you to provide a promise for a paymentresponse object yourself.
... syntax paymentrequestevent.respondwith( // promise that resolves with a paymentresponse.
PaymentRequestEvent.topOrigin - Web APIs
the toporigin read-only property of the paymentrequestevent interface returns the top level payee origin where the paymentrequest object was initialized.
... syntax var ausvstring = paymentrequestevent.toporigin value a usvstring specifications specification status comment payment handler apithe definition of 'toporigin' in that specification.
PaymentRequestEvent.total - Web APIs
the total readonly property of the paymentrequestevent interface returns a paymentcurrencyamount object containing the total amount being requested for payment.
... syntax var paymentcurrencyamount = paymentrequestevent.total value a paymentcurrencyamount object.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
allowcredentials is an optional property of the publickeycredentialrequestoptions dictionary which indicates the existing credentials acceptable for retrieval.
... syntax allowcredentials = publickeycredentialrequestoptions.allowcredentials value an array whose elements are objects with the following properties: type a string describing type of public-key credential to be created.
PublicKeyCredentialRequestOptions.challenge - Web APIs
the challenge property of the publickeycredentialrequestoptions dictionary is a buffersource used as a cryptographic challenge.
... syntax challenge = publickeycredentialrequestoptions.challenge value a buffersource which is at least 16 bytes long.
PublicKeyCredentialRequestOptions.rpId - Web APIs
the rpid property, of the publickeycredentialrequestoptions dictionary, is an optional property which indicates the relying party's identifier as a usvstring.
... syntax rpid = publickeycredentialrequestoptions.rpid value a usvstring for the identifier of the relying party.
PublicKeyCredentialRequestOptions.timeout - Web APIs
the timeout property, of the publickeycredentialrequestoptions dictionary, represents an hint, given in milliseconds, for the time the script is willing to wait for the completion of the retrieval operation.
... syntax timeout = publickeycredentialrequestoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
PublicKeyCredentialRequestOptions.userVerification - Web APIs
userverification is an optional property of the publickeycredentialrequestoptions.
... syntax userverification = publickeycredentialrequestoptions.userverification value a string qualifying how the user verification should be part of the authentication process.
ReadableStreamBYOBRequest.respond() - Web APIs
the error() method of the readablestreambyobrequest interface xxx syntax readablestreambyobrequestinstance.respond(byteswritten); parameters byteswritten xxx return value void.
... exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is detached.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
the respondwithnewview() method of the readablestreambyobrequest interface xxx syntax readablestreambyobrequestinstance.respondwithnewview(view); parameters view xxx return value void.
... exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is non-existant or detached.
ReadableStreamBYOBRequest.view - Web APIs
the view getter property of the readablestreambyobrequest interface returns the current view.
... syntax var view = readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
Request.method - Web APIs
WebAPIRequestmethod
the method read-only property of the request interface contains the request's method (get, post, etc.) syntax var mymethod = request.method; value a bytestring indicating the method of the request.
... example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the method of the request in a variable: var myrequest = new request('flowers.jpg'); var mymethod = myrequest.method; // get specifications specification status comment fetchthe definition of 'method' in that specification.
XDomainRequest.abort() - Web APIs
aborts an xdomainrequest.
... syntax xdr.abort(); example var xdr = new xdomainrequest(); xdr.open("get", "http://example.com/api/method"); xdr.send(); xdr.abort(); specification not part of any specification.
XDomainRequest.ontimeout - Web APIs
an event handler which is called when a pending xdomainrequest times out.
... example var xdr = new xdomainrequest(); xdr.open("post", "http://example.com/api/method"); xdr.ontimeout = function(){ //handle timeout } xdr.onload = function(){ //handle response with xdr.responsetext } xdr.send("param1=value1&param2=value2"); specification not part of any specification.
XMLHttpRequest.channel - Web APIs
xmlhttprequest.channel is an nsichannel that used by the object when performing the request.
...in the case of a multi-part request, this is the initial channel, not the different parts in the multi-part request.
XMLHttpRequest.mozAnon - Web APIs
xmlhttprequest.mozanon is a boolean.
... if true, the request will be sent without cookies or authentication headers.
XMLHttpRequest.mozResponseArrayBuffer - Web APIs
obsolete since gecko 6 is an arraybuffer response to the request, written as a javascript typed array.
... this is null if the request was not successful, or if it hasn't been sent yet.
XMLHttpRequest.multipart - Web APIs
all requests must be asynchronous.
... this enables support for server push; for each xml document that's written to this request, a new xml dom document is created and the onload handler is called between documents.
XMLHttpRequest.responseURL - Web APIs
the read-only xmlhttprequest.responseurl property returns the serialized url of the response or the empty string if the url is null.
... example var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/test', true); xhr.onload = function () { console.log(xhr.responseurl); // http://example.com/test }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
Partitioned: All third-party storage access requests
a request to access cookies or storage was partitioned because it came from a third-party (a different origin) and dynamic first-party isolation is enabled.
PaymentRequestEvent.modifiers - Web APIs
the modifiers read-only property of the paymentrequestevent interface returns an array of objects containing changes to payment details.
XDomainRequest.timeout - Web APIs
gets or sets the amount of time in milliseconds until an xdomainrequest times out.
XMLHttpRequest.mozSystem - Web APIs
if true, the same origin policy is not enforced on the request.
XMLHttpRequest: timeout event - Web APIs
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.
Index - Web APIs
WebAPIIndex
6 abortcontroller api, abortcontroller, experimental, interface, reference the abortcontroller interface represents a controller object that allows you to abort one or more dom requests as and when desired.
... 8 abortcontroller.abort() api, abortcontroller, experimental, fetch, method, reference, abort() the abort() method of the abortcontroller interface aborts a dom request (e.g.
... a fetch request) before it has completed.
...And 431 more matches
HTTP Index - HTTP
WebHTTPIndex
http follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response.
... http is a stateless protocol, meaning that the server does not keep any data (state) between two requests.
... 2 a typical http session http in client-server protocols, like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
...And 175 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
a web application executes a cross-origin http request when it requests a resource that has a different origin (domain, protocol, or port) from its own.
... an example of a cross-origin request: the front-end javascript code served from https://domain-a.com uses xmlhttprequest to make a request for https://domain-b.com/data.json.
... for security reasons, browsers restrict cross-origin http requests initiated from scripts.
...And 76 more matches
Index - HTTP
WebHTTPHeadersIndex
found 122 pages: # page tags and summary 1 http headers http, http header, networking, overview, reference http headers allow the client and the server to pass additional information with the request or the response.
... 2 accept http, http header, reference, request header the accept request http header advertises which content types, expressed as mime types, the client is able to understand.
...browsers set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script.
...And 73 more matches
nsIWebProgressListener
uriloader/base/nsiwebprogresslistener.idlscriptable this interface is implemented by clients wishing to listen in on the progress associated with the loading of asynchronous requests in the context of a nsiwebprogress instance as well as any child nsiwebprogress instances.
... method overview void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags); void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long acurselfprogress, in long amaxselfprogress, in long acurtotalprogress, in long amaxtotalprogress); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus); void...
... onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); constants state transition flags these flags indicate the various states that requests may transition through as they are being loaded.
...And 55 more matches
HTTP response status codes - HTTP
WebHTTPStatus
http response status codes indicate whether a specific http request has been successfully completed.
... information responses 100 continue this interim response indicates that everything so far is ok and that the client should continue the request, or ignore the response if the request is already finished.
... 101 switching protocol this code is sent in response to an upgrade request header from the client, and indicates the protocol the server is switching to.
...And 52 more matches
Client-Server Overview - Learn web development
previous overview: first steps next now that you know the purpose and potential benefits of server-side programming we're going to examine in detail what happens when a server receives a "dynamic request" from a browser.
... as most website server-side code handles requests and responses in similar ways, this will help you understand what you need to do when writing most of your own code.
...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.
...And 51 more matches
Using IndexedDB - Web APIs
start a transaction and make a request to do some database operation, like adding or retrieving data.
... do something with the results (which can be found on the request object).
...such and such feature will not be available."); } opening a database we start the whole process like this: // let us open our database var request = window.indexeddb.open("mytestdatabase", 3); see that?
...And 49 more matches
HTTP headers - HTTP
WebHTTPHeaders
http headers let the client and the server pass additional information with an http request or response.
... headers can be grouped according to their contexts: general headers apply to both requests and responses, but with no relation to the data transmitted in the body.
... request headers contain more information about the resource to be fetched, or about the client requesting the resource.
...And 46 more matches
Getting Started - Developer guides
in a nutshell, it is the use of the xmlhttprequest object to communicate with servers.
... 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 with javascript, you need an instance of an object with the necessary functionality.
... this is where xmlhttprequest comes in.
...And 44 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
2 404 glossary, http errors, infrastructure, navigation a 404 is a standard response code meaning that the server cannot find the requested resource.
... 14 ajax ajax, codingscripting, glossary, infrastructure, l10n:priority ajax, which initially stood for asynchronous javascript and xml, is a programming practice of building complex, dynamic webpages using a technology known as xmlhttprequest.
...these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
...And 39 more matches
Index
MozillaTechXPCOMIndex
73 setting http request headers add-ons, extensions, http, xul, xulrunner http is one of the core technologies behind the web.
... in addition to the actual content, some important information is passed with http headers for both http requests and responses.
... 182 amiwebinstaller extension manager, interfaces, interfaces:scriptable, reference, xpcom interface reference installs an array of add-ons at the request of a webpage.
...And 39 more matches
Index
the usual approach is to create a certificate signing request (csr) as soon as an application is done with the creation step, which will have created a handle to the key pair, and which can be used for the necessary related operations, like producing a proof-of-ownership of the private key, which is usually required when submitting the public key with a csr to a ca.
...the crmf library, which is used to produce certain kinds of certificate requests, is available as a library for static linking only.
...an arena is requested once processing of a task starts, and all memory allocations that are logically associated to that task are requested from the associated arena.
...And 35 more matches
nsIHttpChannel
netwerk/protocol/http/nsihttpchannel.idlscriptable this interface allows for the modification of http request parameters and the inspection of the resulting http response status and headers when they become available.
... http channel, use nsiioservice with a http uri, for example: var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var ch = ios.newchannel("https://www.example.com/", null, null); method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void setemptyrequestheader(in acstring aheader); void setreferrerwithpolicy(in nsiuri referrer, in unsigned long referrerpolicy); void setrequestheader(in acstring...
... aheader, in acstring avalue, in boolean amerge); void setresponseheader(in acstring header, in acstring value, in boolean merge); void visitoriginalresponseheaders(in nsihttpheadervisitor avisitor); void visitrequestheaders(in nsihttpheadervisitor 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 u...
...And 33 more matches
Client-side storage - Learn web development
this api is designed for storing http responses to specific requests, and is very useful for doing things like storing website assets offline so the site can subsequently be used without a network connection.
... inside the window.onload handler, add the following: // open our database; it is created if it doesn't already exist // (see onupgradeneeded below) let request = window.indexeddb.open('notes_db', 1); this line creates a request to open version 1 of a database called notes_db.
...you will see this request pattern used very often throughout indexeddb.
...And 30 more matches
Fetching data from the server - Learn web development
this seemingly small detail has had a huge impact on the performance and behavior of sites, so in this article, we'll explain the concept and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
... 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.
... enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain text) and display them only when needed, helping to solve the problem described above.
...And 30 more matches
Index - Archive of obsolete content
55 request needsupdate, sdk, add-on make simple network requests.
... 95 net/xhr provides access to xmlhttprequest functionality.
... 189 html to dom code snippets, dom, guide, html, intermediate, needsupdate although you can now natively parse html using domparser and xmlhttprequest, this is a new feature that is not yet supported by all browsers in use in the wild.
...And 29 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
introduction when you click a link on a web page, your web browser makes a request to a web server which usually results in a new web page as a response.
...an implementation can also use other transport technologies such as soap-based remote procedure calls, xmlhttprequest interfaces, or dom 3 load.
...this implementation uses xmlhttprequest.
...And 26 more matches
An overview of HTTP - HTTP
WebHTTPOverview
it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
...the messages sent by the client, usually a web browser, are called requests and the messages sent by the server as an answer are called responses.
... components of http-based systems http is a client-server protocol: requests are sent by one entity, the user-agent (or a proxy on behalf of it).
...And 26 more matches
nsIContentPolicy - Archive of obsolete content
method overview short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra, in nsiprincipal arequestprincipal); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra, in nsiprincipal arequestprincipal); constants content types constant value...
... type_xbl 9 indicates an xbl binding request, triggered either by -moz-binding css property or the document.addbinding() method.
... type_xmlhttprequest 11 indicates an xmlhttprequest.
...And 25 more matches
Web Console remoting - Firefox Developer Tools
the networkeventactor is used for each new network request.
... the client can request further network event details - like response body or request headers.
...when you attach to the global consoleactor you receive all of the network requests, page errors, and the other events from all of the tabs and windows, including chrome errors and network events.
...And 24 more matches
Using Fetch - Web APIs
the fetch api provides a javascript interface for accessing and manipulating parts of the http pipeline, such as requests and responses.
... this kind of functionality was previously achieved using xmlhttprequest.
...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.
...And 24 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
requestanimationframe() the modern version of setinterval().
... requestanimationframe() requestanimationframe() is a specialized looping function created for running animations efficiently in the browser.
... (read more about this on creativejs.) note: you can find examples of using requestanimationframe() elsewhere in the course — see for example drawing graphics, and object building practice.
...And 23 more matches
Streams - Plugins
streams produced by the browser can be automatically sent to or requested by the plug-in instance.
... random-access mode: the plug-in calls the npn_requestread method to "pull" stream data.
...seekable streams support random access (for example, local files or http servers that support byte-range requests).
...And 23 more matches
Anatomy of a video game - Game development
on the web, window.requestanimationframe() will be the foundation of most well-programmed per-frame main loops.
...here is an example of a simple main loop: window.main = function () { window.requestanimationframe( main ); // whatever your main loop needs to do }; main(); // start the cycle note: in each of the main() methods discussed here, we schedule a new requestanimationframe before performing our loop contents.
...calling the next requestanimationframe early ensures the browser receives it on time to plan accordingly even if your current frame misses its vsync window.
...And 22 more matches
Sending forms through JavaScript - Learn web development
html forms can send an http request declaratively.
... but forms can also prepare an http request to send via javascript, for example via xmlhttprequest.
... the xmlhttprequest (xhr) dom object can build http requests, send them, and retrieve their results.
...And 21 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
generates encryption/mac keys and outputs public key as pkcs11 certificate signing request /* this source code form is subject to the terms of the mozilla public * license, v.
...-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" #define ns_cert_enc_header "-----begin certificate for encryption-----" #define ns_cert_enc_trailer "-----end certificate for encryption-----" #define ns_cert_vfy_header "-----begin certificate for signature verification-----" #define ns_cert_vfy_trailer "-----end certificate for signature verification-----...
... "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename>...
...And 21 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
i'll also cover nonstandard technologies, such as xmlhttprequest and rich text editing, that mozilla does support because no w3c equivalent existed at the time.
...it also supports some non-standard internet explorer extensions, such as xmlhttprequest.
... 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").
...And 20 more matches
Listening to events on all tabs
void onlocationchange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags ); parameters abrowser the browser representing the tab whose location changed.
... arequest the nsirequest object representing the associated request.
...void onprogresschange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, print32 acurselfprogress, print32 amaxselfprogress, print32 acurtotalprogress, print32 amaxtotalprogress ); parameters abrowser the browser representing the tab for which updated progress information is being provided.
...And 20 more matches
IME handling guide
finally, this class guarantees that requesting to commit or cancel current composition to ime is perefored synchronously.
...this may be too big but ime may request all text in the editor.
...therefore, editorbase requests to commit composition when the following cases occur: the editor loses focus the caret is moved by mouse or javascript value of the editor is changed by javascript node of the editor is removed from dom tree somethings object is modified in an html editor, e.g., resizing an image composition string is moved to a different position which is specified by native ime (e.g., only a part of co...
...And 20 more matches
JS_THREADSAFE
requests in a js_threadsafe build, the application must separate code that uses the jsapi from code that performs blocking i/o or time-consuming calculations.
... a request is a region of code that uses the jsapi.
... requests must be bracketed with calls to js_beginrequest() and js_endrequest().
...And 20 more matches
Migrating from Firebug - Firefox Developer Tools
show network requests the console panel in firebug allows to log ajax requests (aka xmlhttprequests).
...furthermore, the web console even allows to display all other network requests via net > log.
... view json and xml structures to view json and xml responses of ajax requests, firebug has special tabs when expanding the request within the console panel.
...And 20 more matches
WindowOrWorkerGlobalScope.fetch() - Web APIs
the promise resolves to the response object representing the response to your request.
... note: the fetch() method's parameters are identical to those of the request() constructor.
... a request object.
...And 20 more matches
nsIDOMMozNetworkStatsManager
you can test for the presence of the service as follows, for example: if ("moznetworkstats" in navigator) { /* networkstats is available */ } else { alert("i'm sorry, but networkstats services are not supported."); } method overview nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */); nsidomdomrequest addalarm(in nsisupports network, in long threshold, [optional] in jsval options /* networksta...
...tsalarmoptions */); nsidomdomrequest getallalarms([optional] in nsisupports network); nsidomdomrequest removealarms([optional] in long alarmid); nsidomdomrequest clearstats(in nsisupports network); nsidomdomrequest clearallstats(); nsidomdomrequest getavailablenetworks(); nsidomdomrequest getavailableservicetypes(); attributes attribute type description samplerate long minimum time in milliseconds between samples stored in the database.
... nsidomdomrequest getsamples(in nsisupports network, in jsval start, in jsval end, [optional] in jsval options /* networkstatsgetoptions */); parameters network the origin of the data.
...And 19 more matches
nsILoadGroup
netwerk/base/public/nsiloadgroup.idlscriptable a load group maintains a collection of nsirequest objects.
... inherits from: nsirequest last changed in gecko 1.7 method overview void addrequest(in nsirequest arequest, in nsisupports acontext); void removerequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatus); attributes attribute type description activecount unsigned long returns the count of "active" requests (that is requests without the load_background bit set).
... defaultloadrequest nsirequest accesses the default load request for the group.
...And 19 more matches
Background Tasks API - Web APIs
the cooperative scheduling of background tasks api (also referred to as the background tasks api or simply the requestidlecallback() api) provides the ability to queue tasks to be executed automatically by the user agent when it determines that there is free time to do so.
...window.requestidlecallback() makes it possible to become actively engaged in helping to ensure that the browser's event loop runs smoothly, by allowing the browser to tell your code how much time it can safely use without causing the system to lag.
...if your callback needs to change the dom, it should use window.requestanimationframe() to schedule that.
...And 19 more matches
BasicCardResponse - Web APIs
the basiccardresponse dictionary (related to the payment request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address.
... examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object containing further options.
... the first of these three (supportedinstruments in the example below) contains a data property that has to conform to the structure defined by the basiccardrequest dictionary.
...And 19 more matches
A typical HTTP session - HTTP
WebHTTPSession
the client sends its request, and waits for the answer.
... the server processes the request, sending back its answer, providing a status code and appropriate data.
... 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.
...And 19 more matches
Enc Dec MAC Output Public Key as CSR
generates encryption/mac keys and outputs public key as certificate signing request /* this source code form is subject to the terms of the mozilla public * license, v.
...end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" typedef enum { gen_csr, encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6 } headertype; /* this is conditionalized because port_errortostring was introduced with nss 3.13.
... "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify subject\n\n", "-s "); fprintf(stderr, "%-21s specify certficate request file name\n\n", "-r "); fprintf(stderr, "%-21s specify an input file name\n\n", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ...
...And 18 more matches
sample2
e mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" #define lab_header "-----begin key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" #define ns_cert_enc_header "-----begin certificate for encryption-----" #define ns_cert_enc_trailer "-----end certificate for encryption-----" #define ns_cert_vfy_header "-----begin certificate for signature verification-----" #define ns_cert_vfy_trailer "-----end certificate for signature verification-----" #define ns_sig_h...
...[ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find p...
...r, "%-30s - output file name\n\n", "-o <opfilename>"); fprintf(stderr, "%-30s - certificate serial number\n\n", "-m <serialnumber>"); fprintf(stderr, "%-30s - certificate nickname\n\n", "-n <nickname>"); fprintf(stderr, "%-30s - certificate trust\n\n", "-t <trustargs>"); fprintf(stderr, "%-30s - certificate issuer nickname\n\n", "-u <issuernickname>"); fprintf(stderr, "%-30s - certificate signing request \n\n", "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); fprintf(stderr, "%-30s - to enable ascii [optional]\n\n", "-a"); fprintf(stderr, "%-30s - to save certificate to header file as sig verification [optional]\n\n", "-v"); exit(-1); } /* * validate the options used for generate csr command */ static void validategeneratecsrcommand(const char *progname, c...
...And 18 more matches
Using Service Workers - Web APIs
but the overriding problem is that there still isn’t a good overall control mechanism for asset caching and custom network requests.
...(see our promises test example for the source code, or look at it running live.) note: a real service worker implementation would use caching and onfetch rather than the xmlhttprequest api.
... const imgload = (url) => { return new promise((resolve, reject) => { var request = new xmlhttprequest(); request.open('get', url); request.responsetype = 'blob'; request.onload = () => { if (request.status == 200) { resolve(request.response); } else { reject(error('image didn\'t load successfully; error code:' + request.statustext)); } }; request.onerror = () => { reject(error('there was a network error.')); }; request.send(); }); } we return a new promise using the promise() constructor, which takes as an argument a callback function with resolve and reject parameters.
...And 18 more matches
Web Locks API - Web APIs
for example, if a web app running in multiple tabs wants to ensure that only one tab is syncing data between the network and indexed db, each tab could try to acquire a "my_net_db_sync" lock, but only one tab will succeed (the leader election pattern.) the api is used as follows: the lock is requested.
... navigator.locks.request('my_resource', async lock => { // the lock has been acquired.
...}); while a lock is held, requests for the same lock from this execution context, or from other tabs/workers, will be queued.
...And 18 more matches
Connecting to Remote Content - Archive of obsolete content
« previousnext » using xmlhttprequest xmlhttprequest is an api for transferring xml between a local script and a remote server via http.
... let url = "http://www.example.com/"; let request = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createinstance(components.interfaces.nsixmlhttprequest); request.onload = function(aevent) { window.alert("response text: " + aevent.target.responsetext); }; request.onerror = function(aevent) { window.alert("error status: " + aevent.target.status); }; request.open("get", url, true); request.send(null); in this example we demonstrate how to make a xmlhttprequest call in asynchronous mode.
... you can see that an instance of the xmlhttprequest class is created and it holds all functionality for making a request.
...And 17 more matches
NSS tools : certutil
-c create a new binary certificate file from a binary certificate request file.
... use the -i argument to specify the certificate request file.
... -r create a certificate request file that can be submitted to a certificate authority (ca) for processing into a finished certificate.
...And 17 more matches
certutil
-c create a new binary certificate file from a binary certificate request file.
... use the -i argument to specify the certificate request file.
... -r create a certificate request file that can be submitted to a certificate authority (ca) for processing into a finished certificate.
...And 16 more matches
imgIDecoderObserver
image/public/imgidecoderobserver.idlscriptable this interface is used both for observing imgidecoder objects and for observing imgirequest objects.
...method overview void ondataavailable(in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect); native code only!
... void ondiscard(in imgirequest arequest); void onimageisanimated(in imgirequest arequest); void onstartcontainer(in imgirequest arequest, in imgicontainer acontainer); void onstartdecode(in imgirequest arequest); void onstartframe(in imgirequest arequest, in unsigned long aframe); void onstartrequest(in imgirequest arequest); void onstopcontainer(in imgirequest arequest, in imgicontainer acontainer); void onstopdecode(in imgirequest arequest, in nsresult status, in wstring statusarg); void onstopframe(in imgirequest arequest, in unsigned long aframe); void onstoprequest(in imgirequest arequest, in boolean aislastpart); methods native code only!ondataavailable decode notification.
...And 16 more matches
URLs - Plugins
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.
...to request a stream and receive notification of the result in all cases, use npn_geturlnotify.
... for http urls, the browser resolves npn_geturl as the http server method get, which requests url objects.
...And 16 more matches
HTTP Messages - HTTP
WebHTTPMessages
there are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.
... http requests, and responses, share similar structure and are composed of: a start-line describing the requests to be implemented, or its status of whether successful or a failure.
... an optional set of http headers specifying the request, or describing the body included in the message.
...And 16 more matches
Populating the page: how browsers work - Web Performance
to be fast to load, the developers’ goals include sending requested information as fast as possible, or at least seem super fast.
...it occurs whenever a user requests a page by entering a url into the address bar, clicking a link, submitting a form, as well as other actions.
... your browser requests a dns lookup, which is eventually fielded by a name server, which in turn responds with an ip address.
...And 16 more matches
Server-side web frameworks - Learn web development
previous overview: first steps next the previous article showed you what the communication between web clients and servers looks like, the nature of http requests and responses, and what a server-side web application needs to do in order to respond to requests from a web browser.
...basic understanding of how server-side code handles and responds to http requests (see client-server overview).
... work directly with http requests and responses as we saw in the last article, web servers and browsers communicate via the http protocol — servers wait for http requests from the browser and then return information in http responses.
...And 15 more matches
AddressErrors - Web APIs
the addresserrors dictionary is used by the payment request api to to report validation errors in a physical address (typically a billing address or a shipping address).
... addresserrors is the type of the object returned by shippingaddresserrors in the paymentdetailsupdate passed into paymentrequestupdateevent.updatewith() by the shippingaddresschange event handler if a change to the address resulted in a validation error occurring.
...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.
...And 15 more matches
HTTP caching - HTTP
WebHTTPCaching
different kinds of caches caching is a technique that stores a copy of a given resource and serves it back when requested.
... when a web cache has a requested resource in its store, it intercepts the request and returns its copy instead of re-downloading from the originating server.
...the primary cache key consists of the request method and target uri (oftentimes only the uri is used as only get requests are caching targets).
...And 15 more matches
Navigation and resource timings - Web Performance
both provide the same read-only properties, but navigation timing measures the main document's timings whereas the resource timing provides the times for all the assets or resources called in by that main document and the resources' requested resources.
... performance timings the performancetiming api, a javascript api for measuring the loading performance of the requested page, is deprecated but supported in all browsers.
...as displayed in the image below, the navigation process goes from navigationstart, unloadeventstart, unloadeventend, redirectstart, redirectend, fetchstart, domainlookupstart, domainlookupend, connectstart , connectend, secureconnectionstart, requeststart, responsestart, responseend, domloading, dominteractive, domcontentloadedeventstart, domcontentloadedeventend, domcomplete, loadeventstart, and loadeventend.
...And 15 more matches
Sending form data - Learn web development
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.
...And 14 more matches
Observer Notifications
topic description quit-application-requested something has requested that the application be shutdown.
... browser-lastwindow-close-requested sent when the browser wishes to close the last open browser window.
... browser-lastwindow-close-granted sent when all interested parties have responded to the browser-lastwindow-close-requested notification and none of them requested that the close be aborted.
...And 14 more matches
Connection management in HTTP/1.x - HTTP
these connections were short-lived: a new one created each time a request needed sending, and closed once the answer had been received.
...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 of information needed, proving this earlier model inefficient.
...And 14 more matches
Creating Sandboxed HTTP Connections
onstartrequest - gets called when a new request is initiated.
... onstoprequest - the request has finished.
... null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.rea...
...And 13 more matches
sslfnc.html
ssl_request_certificate is a server option that requests a client to authenticate itself.
... ssl_require_certificate is a server option that requires a client to authenticate itself (only if ssl_request_certificate is also on).
... ssl_request_certificate is a server option that requests a client to authenticate itself.
...And 13 more matches
Fullscreen API - Web APIs
methods on the document interface document.exitfullscreen() requests that the user agent switch from full-screen mode back to windowed mode.
... methods on the element interface element.requestfullscreen() asks the user agent to place the specified element (and, by extension, its descendants) into full-screen mode, removing all of the browser's ui elements as well as all other applications from the screen.
... dictionaries fullscreenoptions provides optional settings you can specify when calling requestfullscreen().
...And 13 more matches
Using the Notifications API - Web APIs
requesting permission before an app can send a notification, the user must grant the application the right to do so.
...you should only request consent to display notifications in response to a user gesture (e.g.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notification permission requests not triggered in response to a user gesture.
...And 13 more matches
Starting up and shutting down a WebXR session - Web APIs
finally, you must call requestsession() from a user event handler, such as the handler for the click event.
...to obtain an xrsession, you call your xrsystem's requestsession() method, which returns a promise that resolves with an xrsession if it's able to establish one successfully.
... fundamentally, that looks like this: xr.requestsession("immersive-vr").then((session) => { xrsession = session; /* continue to set up the session */ }); note the parameter passed into requestsession() in this code snippet: immersive-vr.
...And 13 more matches
Efficient animation for web games - Game development
we touch on css transitions and css animations, and javascript loops involving window.requestanimationframe.
... use requestanimationframe when you are animating <canvas> content, or when your dom animations absolutely must synchronise with canvas content animations, do make sure to use window.requestanimationframe, and not older methods such as window.settimeout.
...requestanimationframe causes the browser to redraw and call your function before that frame gets to the screen.
...And 12 more matches
Cache - Web APIs
WebAPICache
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle.
...items in a cache do not get updated unless explicitly requested; they don’t expire unless deleted.
... methods cache.match(request, options) returns a promise that resolves to the response associated with the first matching request in the cache object.
...And 12 more matches
IDBObjectStore - Web APIs
methods idbobjectstore.add() returns an idbrequest object, and, in a separate thread, creates a structured clone of the value, and stores the cloned value in the object store.
... idbobjectstore.clear() creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
... idbobjectstore.count() returns an idbrequest object, and, in a separate thread, returns the total number of records that match the provided key or idbkeyrange.
...And 12 more matches
Understanding latency - Web Performance
latency is generally considered to be the amount of time it takes from when a request is made by the user to the time it takes for the response to get back to that user.
... on a first request, for the first 14kb bytes, latency is longer because it includes a dns lookup, a tcp handshake, the secure tls negotiation.
... subsequent requests will have less latency because the connection to the server is already set.
...And 12 more matches
Intercepting Page Loads - Archive of obsolete content
http notifications are fired for all http requests originating from firefox.
... there are 2 http topics you can listen to, as specified in the observer notifications page: topic description http-on-modify-request called as an http request is made.
... observe : function(asubject, atopic, adata) { if (topic_modify_request == atopic) { let url; asubject.queryinterface(components.interfaces.nsihttpchannel); url = asubject.uri.spec; if (re_url_to_modify.test(url)) { // re_url_to_modify is a regular expression.
...And 11 more matches
Promises - Archive of obsolete content
a task example like the following: components.utils.import("resource://gre/modules/task.jsm"); task.spawn(function* () { var response = yield request("login", { username: user, password: password }); if (response.messages) { try { yield publish({ username: user, messages: response.messages }); } catch (e) { self.reporterror("publication failed", e); } } }); can be converted to a pure promise-based equivalent as such: request("login", { username: user, password: password }) .
... config.indexstats = processor.stats; yield os.file.writeatomic(configpath, json.stringify(config), { tmppath: configpath + "." + math.random(), encoding: "utf-8" }) timestamp = new date; }); http requests http requests should, in nearly all circumstances, be made via the standard xmlhttprequest api.
...moreover, many third-party wrappers for the xmlhttprequest api now support promises out of the box.
...And 11 more matches
Introduction to the server side - Learn web development
when you click a link on a web page, submit a form, or run a search, an http request is sent from your browser to the target server.
... the request includes a url identifying the affected resource, a method that defines the required action (for example to get, delete, or post the resource), and may include additional information encoded in url parameters (the field-value pairs sent via a query string), as post data (data sent by the http post method), or in associated cookies.
... web servers wait for client request messages, process them when they arrive, and reply to the web browser with an http response message.
...And 11 more matches
sslerr.html
on a server socket, this means the remote client has requested the use of a version of ssl older than version 2.
... -12278 (unused) ssl_error_wrong_certificate -12277 "client authentication failed: private key in key database does not correspond to public key in certificate database." ssl_error_bad_cert_domain -12276 "unable to communicate securely with peer: requested domain name does not match the server's certificate." this error code should be returned by the certificate authentication callback function when it detects that the common name in the remote server's certificate does not match the hostname sought by the local client, according to the matching rules specified for cert_verifycertname.
... ssl_error_unknown_cipher_suite -12266 "an unknown ssl cipher suite has been requested." the application has attempted to configure ssl to use an unknown cipher suite.
...And 11 more matches
NSS Tools certutil
-r create a certificate-request file that can be submitted to a certificate authority (ca) for processing into a finished certificate.
... -c create a new binary certificate file from a binary certificate-request file.
... use the -i argument to specify the certificate-request file.
...And 11 more matches
nsIChannel
netwerk/base/nsichannel.idlscriptable this interface allows clients to construct 'get' requests for specific protocols, and manage them in a uniform way.
... inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()), parameters for that request may be set by using the channel attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific parameters.
...after a request has been completed, the channel is still valid for accessing protocol-specific results.
...And 11 more matches
nsIDownloadProgressListener
method overview void ondownloadstatechange(in short astate, in nsidownload adownload); void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, in nsidownload adownload); obsolete since gecko 1.9.1 void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress, in nsidownload adownload); void onsecuritychange(in nsiwebprogress awebprogress, in nsireque...
...st arequest, in unsigned long astate, in nsidownload adownload); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus, in nsidownload adownload); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage, in nsidownload adownload); obsolete since gecko 1.9.1 attributes attribute type description document nsidomdocument document the document of the download manager frontend.
... onlocationchange() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) void onlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, in nsidownload adownload ); parameters awebprogress the nsiwebprogress instance used by the download manager to monitor downloads.
...And 11 more matches
FetchEvent.respondWith() - Web APIs
for example, if an <img> initiates the request, the response body needs to be image data.
... for security reasons, there are a few global rules: you can only return response objects of type "opaque" if the fetchevent.request object's mode is "no-cors".
... you can only return response objects of type "opaqueredirect" if the fetchevent.request object's mode is "manual".
...And 11 more matches
LocalFileSystem - Web APIs
creating new storage you request access to a sandboxed file system by calling window.requestfilesystem().
... using persistent storage the requestfilesystem() method lets you ask for persistent or temporary storage.
... to use persistent storage with the file system api, chrome exposes a requestquota api.
...And 11 more matches
RTCIceCandidatePairStats - Web APIs
consentrequestssent optional the total number of consent requests that have been sent on this candidate pair.
... currentroundtriptime optional a floating-point value indicating the total time, in seconds, that elapsed elapsed between the most recently-sent stun request and the response being received.
... this may be based upon requests that were involved in confirming permission to open the connection.
...And 11 more matches
Storage Access API - Web APIs
the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent.
... the storage access api is intended to solve this problem; embedded cross-origin content can request unrestricted access to its first-party storage on a site-by-site basis via the document.requeststorageaccess() method, and check whether it already has access via the document.hasstorageaccess() method.
...the embedding website needs to add this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
...And 11 more matches
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
...this is null if the request is not complete or was not successful.
... 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.
...And 11 more matches
Tabbed browser - Archive of obsolete content
from a sidebar basically, if your extension code is a sidebar you can use: var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.gbrowser.addtab(...); from a...
... getting the browser that fires the http-on-modify-request notification see the observer notifications page for information on http-on-* notifications.
... note that some http requests aren't associated with a tab; for example, rss feed updates, extension manager requests, xhr requests from xpcom components, etc.
...And 10 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
in general, before issuing a certificate, the ca must use its published verification procedures for that type of certificate to ensure that an entity requesting a certificate is in fact who it claims to be.
... the user has requested a resource controlled by the server.
... the server requires client authentication before permitting access to the requested resource.
...And 10 more matches
Working with JSON - Learn web development
we are going to load it into our page, and use some nifty dom manipulation to display it, like this: obtaining the json to obtain the json, we use an api called xmlhttprequest (often called xhr).
... this is a very useful javascript object that allows us to make network requests to retrieve resources from a server via javascript (e.g.
...add the following at the bottom of your javascript code: let requesturl = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; to create a request, we need to create a new request object instance from the xmlhttprequest constructor, using the new keyword.
...And 10 more matches
Fetch API - Web APIs
WebAPIFetch API
it will seem familiar to anyone who has used xmlhttprequest, but the new api provides a more powerful and flexible feature set.
... concepts and usage fetch provides a generic definition of request and response objects (and other things involved with network requests).
... this will allow them to be used wherever they are needed in the future, whether it’s for service workers, cache api, and other similar things that handle or modify requests and responses, or any kind of use case that might require you to generate your responses programmatically (that is, the use of computer program or personal programming instructions).
...And 10 more matches
IDBTransaction - Web APIs
is it readonly or readwrite), and you access an idbobjectstore to make a request.
...0" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbtransaction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} transactions are started when the transaction is created, not when the first request is placed; for example consider this: var trans1 = db.transaction("foo", "readwrite"); var trans2 = db.transaction("foo", "readwrite"); var objectstore2 = trans2.objectstore("foo") var objectstore1 = trans1.objectstore("foo") objectstore2.put("2", "key"); objectstore1.put("1", "key"); after the code is executed the object store should contain the value "2", since trans2 should run after trans1...
... transaction failures transactions can fail for a fixed number of reasons, all of which (except the user agent crash) will trigger an abort callback: abort due to bad requests, e.g.
...And 10 more matches
PaymentResponse - Web APIs
the paymentresponse interface of the payment request api is returned after a user selects a payment method and approves a payment request.
...this option is only present when the requestpayeremail option is set to true in the options parameter of the paymentrequest() constructor.
...this option is only present when the requestpayername option is set to true in the options parameter of the paymentrequest() constructor.
...And 10 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
setup and utility functions next, we declare the variables and constants used throughout the application, starting with those used to store webgl and webxr specific information: let polyfill = null; let xrsession = null; let xrinputsources = null; let xrreferencespace = null; let xrbutton = null; let gl = null; let animationframerequestid = 0; let shaderprogram = null; let programinfo = null; let buffers = null; let texture = null; let mouseyaw = 0; let mousepitch = 0; this is followed by a set of constants, mostly to contain various vectors and matrices used while rendering the scene.
... async function onxrbuttonclick(event) { if (!xrsession) { navigator.xr.requestsession(session_type) .then(sessionstarted); } else { await xrsession.end(); if (xrsession) { sessionended(); } } } this begins by looking at the value of xrsession to see if we already have a xrsession object representing an ongoing webxr session.
... if we don't, the click represents a request to enable webxr mode, so we check to see if the desired webxr session type is supported.
...And 10 more matches
Creating a dynamic status bar extension - Archive of obsolete content
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.
...And 9 more matches
New Security Model for Web Services - Archive of obsolete content
securing resources from untrusted scripts behind firewalls introduction this page describes an alternative mechanism which can be used to protect all internal resources against requests from sandboxed scripts.
... using a soap header for verification soap messages have a distinct processing model allowing a header to be added that the recipient is required to understand and accept, which identifies the untrusted source of a script making a request.
... soap services which have not been cleared for access by untrusted scripts will reject the requests.
...And 9 more matches
nsIHttpServer
rectorypath) { var file = components.classes['@mozilla.org/file/local;1'] .createinstance(components.interfaces.nsilocalfile); file.initwithpath(directorypath); return server.registerdirectory(path, file); }, registerpathhandler: function(path, handlercallback) { server.registerpathhandler(path, function (request, response) { var req = createhttprequest(request); var resp = new httpresponse(response); handlercallback(req, resp); }); }, registerprefixhandler: function(prefix, handlercallback) { server.registerprefixhandler(prefix, function (request, response) { var req = createhttpreques...
...t(request); var resp = new httpresponse(response); handlercallback(req, resp); }); }, close: function(){ server.stop(function(){}); }, get port() { return server.identity.primaryport } } } reference : mozilla-release/netwerk/test/httpserver/nsihttpserver.idl [scriptable, uuid(cea8812e-faa6-4013-9396-f9936cbb74ec)] interface nsihttpserver : nsisupports { /** * starts up this server, listening upon the given port.
... * * @param callback * an asynchronous callback used to notify the user when this server is * stopped and all pending requests have been fully served * @throws ns_error_null_pointer * if callback is null * @throws ns_error_unexpected * if this server is not running */ void stop(in nsihttpserverstoppedcallback callback); /** * associates the local file represented by the string file with all requests * which match request.
...And 9 more matches
nsISmsDatabaseService
= components.classes["@mozilla.org/sms/smsdatabaseservice;1"] .createinstance(components.interfaces.nsismsdatabaseservice); method overview long savereceivedmessage(in domstring asender, in domstring abody, in unsigned long long adate); long savesentmessage(in domstring areceiver, in domstring abody, in unsigned long long adate); void getmessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void deletemessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void createmessagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnextmessageinlist(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 asender, in domstring abody, in unsigned long long adate ); parameters asender a domstring with the sender of the text message.
... getmessage() void getmessage( in long messageid, in long requestid, [optional] in unsigned long long processid ); parameters messageid a number representing the id of the message.
...And 9 more matches
nsIWebProgressListener2
last changed in gecko 1.9 (firefox 3) inherits from: nsiwebprogresslistener method overview void onprogresschange64(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress); boolean onrefreshattempted(in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri); methods onprogresschange64() notification that the progress has changed for one of the requests associated with awebprogress.
... progress totals are reset to zero when all requests in awebprogress complete (corresponding to onstatechange being called with astateflags including the state_stop and state_is_window flags).
...void onprogresschange64( in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress ); parameters awebprogress the nsiwebprogress instance that fired the notification.
...And 9 more matches
nsIMsgCloudFileProvider
inherits from: nsisupports method overview void init(in string aaccountkey); void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); acstring urlforfile(in nsilocalfile afile); void cancelfileupload(in nsilocalfile afile); void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); void deletefile(in nsilocalfile afile, in nsirequestobserver acallback); void createnewaccount(in acstring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsireque...
... constants the following constants are used for the status codes passed to the onstoprequest functions of the nsirequestobserver's used by the asynchronous methods of nsimsgcloudfileprovider.
... void uploadfile(in nsilocalfile afile, in nsirequestobserver acallback); parameters afile the file to be uploaded.
...And 9 more matches
Guide to the Fullscreen API - Web APIs
activating full-screen mode given an element that you'd like to present in full-screen mode (such as a <video>, for example), you can present it in full-screen mode by simply calling its requestfullscreen() method.
... let's consider this <video> element: <video controls id="myvideo"> <source src="somevideo.webm"></source> <source src="somevideo.mp4"></source> </video> we can put that video into full-screen mode as follows: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } this code checks for the existence of the requestfullscreen() method before calling it.
... when a fullscreen request fails it's not guaranteed that you'll be able to switch into fullscreen mode.
...And 9 more matches
MediaDevices.getUserMedia() - Web APIs
the mediadevices.getusermedia() method prompts the user for permission to use a media input which produces a mediastream with tracks containing the requested types of media.
... note: it's possible for the returned promise to neither resolve nor reject, as the user is not required to make a choice at all and may simply ignore the request.
... syntax var promise = navigator.mediadevices.getusermedia(constraints); parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
...And 9 more matches
Using bounded reference spaces - Web APIs
you can create a session that supports a bounded-floor reference space if available by using code such as the following: async function onactivatexrbutton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual, exiting at once if a session is already in place, then requesting a new session using imme...
...the options specified when requesting the session indicate that at a minimum, the session must be compatible with the local-floor reference space, but that it would be nice if the bounded-floor space were supported as well.
... once the session has been created, our startsessionanimation() function can try to establish a bounded-floor reference space, and if it fails to do so it can then fall back to requesting a local-floor reference space instead (in which we will have to handle boundaries ourselves).
...And 9 more matches
Rendering and the WebXR frame animation callback - Web APIs
before you can render the virtual environment, you need to establish a webxr session by creating an xrsession using the navigator.xr.requestsession() method; you also need to associate the session with a framebuffer and perform other setup tasks.
...once that's in hand, you request that the browser call your rendering function the next time it needs a framebuffer to render your scene.
... this is done by calling the xrsession method requestanimationframe().
...And 9 more matches
Web Authentication API - Web APIs
the full set of required fields, optional fields, and their meanings for creating a registration request can be found in the publickeycredentialcreationoptions dictionary.
... 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.
...And 9 more matches
Event reference
e non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast checkboxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid message message open show less common and non-standard events abortable fetch events event name fired when abort a dom request is aborted, i.e.
... abort progressevent progress and xmlhttprequest progression has been terminated (not due to an error).
... error progressevent progress and xmlhttprequest progression has failed.
...And 9 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
the browser may store it and send it back with later requests to the same server.
... typically, it's used to tell if two requests came from the same browser — keeping a user logged-in, for example.
...cookies are sent with every request, so they can worsen performance (especially for mobile data connections).
...And 9 more matches
Redirections in HTTP - HTTP
principle in http, redirection is triggered by a server sending a special redirect response to a request.
... temporary redirections sometimes the requested resource can't be accessed from its canonical location, but it can be accessed from another place.
... 304 not modified sent for revalidated conditional requests.
...And 9 more matches
Types of attacks - Web security
(click-jacking is sometimes called "user interface redressing", though this is a misuse of the term "redress".) cross-site request forgery (csrf) cross-site scripting (xss) cross-site scripting (xss) is a security exploit which allows an attacker to inject into a website malicious client-side code.
... cross-site scripting attacks usually occur when 1) data enters a web app through an untrusted source (most often a web request) or 2) dynamic content is sent to a web user without being validated for malicious content.
...the victim then retrieves this malicious script from the server when the browser sends a request for data.
...And 9 more matches
Third-party APIs - Learn web development
note: some apis handle access to their functionality slightly differently, requiring the developer to make an http request to a specific url pattern to retrieve data.
...when the developer has registered for a key, they are then known to the api provider, and action can be taken if they start to do anything malicious with the api (such as tracking people's location or trying to spam the api with loads of requests to stop it working, for example).
...this type of api is known as a restful api — instead of getting data using the features of a javascript library like we did with mapquest, we get data by making http requests to specific urls, with data like search terms and other properties encoded in the url (often as url parameters).
...And 8 more matches
Handling common JavaScript problems - Learn web development
see the code snippet in how to make an http request) so developers only have to write one simple bit of code (see jquery.ajax()).
...for example, this ajax example checks to make sure the request is complete and the response has been returned before trying to use the response for anything.
...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.
...And 8 more matches
Performance best practices for Firefox front-end engineers
use requestidlecallback() if you simply cannot avoid doing some kind of long job on the main thread, try to break it up into smaller pieces that you can run when the browser has a free moment to spare, and the user isn't doing anything.
... you can do that using requestidlecallback() and the cooperative scheduling of background tasks api, and doing it only when we have a free second where presumably the user isn’t doing something.
... see also the blog post collective scheduling with requestidlecallback.
...And 8 more matches
HTTP delegation
background up to version 3.11, nss connects directly over http to an ocsp responder to make the request and fetch the response.
...this causes ocsp requests to fail if the network environment requires the use of a proxy.
...or you might choose to leverage an existing http client library and implement the callback functions as a thin layer that forwards requests from nss to the http client library.
...And 8 more matches
HTTP delegation
background up to version 3.11, nss connects directly over http to an ocsp responder to make the request and fetch the response.
...this causes ocsp requests to fail if the network environment requires the use of a proxy.
...or you might choose to leverage an existing http client library and implement the callback functions as a thin layer that forwards requests from nss to the http client library.
...And 8 more matches
nsIIOService
this is the document/element that will get access to the result of this request.
...but if the load is coming from a js api (such as xmlhttprequest) or if the load might be coalesced across multiple elements (such as for ) then pass in the document node instead.
...the principal of the document where the result of this request will be used.
...And 8 more matches
PaymentResponse.complete() - Web APIs
the paymentrequest method complete() of the payment request api notifies the user agent that the user interaction is over, and causes any remaining user interface to be closed.
... this method must be called after the user accepts the payment request and the promise returned by the paymentrequest.show() method is resolved.
... syntax completepromise = paymentrequest.complete(result); parameters result optional a domstring indicating the state of the payment operation upon completion.
...And 8 more matches
PaymentResponse.retry() - Web APIs
syntax retrypromise = paymentrequest.retry(errorfields); parameters errorfields a paymentvalidationerrors object, with the following properties: error optional a general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information.
... typically you will use this by calling show(), then entering a loop or recursive function that checks the paymentresponse for errors or other reasons to retry the payment request.
...the loop exits only when the user either cancels the payment request or the request is successful.
...And 8 more matches
WebXR permissions and security - Web APIs
immersive presentation of vr first, any requests to activate the immersive-vr mode are rejected if the domain issuing the request does not have permission to enable an immersive session.
... once that check is passed, the request to enter immersive-vr mode is allowed if all of the following are true: the requestsession() call was issued by code executing within the handler for a user event, or the from the startup code for a user-launched web application.
... if all of that is true, the promise returned by requestsession() is resolved, and the new xrsession object is passed into the fulfillment handler.
...And 8 more matches
Evolution of HTTP - HTTP
http/0.9 is extremely simple: requests consist of a single line and start with the only possible method get followed by the path to the resource (not the url as both the protocol, server, and port are unnecessary once connected to the server).
... 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 browser itself to understand the success or failure of the request and to adapt its behavior in consequence (like in updating or using its local cache in a specific way) the notion of http headers has been introduced, both for the requests and the responses, allowing metadata to...
... at this point, a typical request and response looked like this: get /mypage.html http/1.0 user-agent: ncsa_mosaic/2.0 (windows 3.1) 200 ok date: tue, 15 nov 1994 08:12:31 gmt server: cern/3.0 libwww/2.17 content-type: text/html <html> a page with an image <img src="/myimage.gif"> </html> followed by a second connection and request to fetch the image (followed by a response to that request): get /myimage.gif http/1.0 user-agent: ncsa_mosaic/2.0 (windows 3.1) 200 ok date: tue, 15 nov 1994 08:12:32 gmt server: cern/3.0 libwww/2.17 content-type: text/gif (image cont...
...And 8 more matches
Protocol upgrade mechanism - HTTP
this means that a typical request that includes upgrade would look something like: get /index.html http/1.1 host: www.example.com connection: 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.
...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.
...after creating the initial http/1.1 session, you need to request the upgrade by adding to a standard request the upgrade and connection headers, as follows: connection: upgrade upgrade: websocket websocket-specific headers the following headers are involved in the websocket upgrade process.
...And 8 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
the second is to re-code to use xmlhttprequest.
... step 3b: option 2: use xmlhttprequest now, how do we replace that?
... the answer to that question is to load your file from a chrome:// uri using xmlhttprequest.
...And 7 more matches
NPP_NewStream - Archive of obsolete content
stream supports random access through calls to npn_requestread (for example, local files or http servers that support byte-range requests).
...the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
...the plugin should set this value to request a mode for the stream.
...And 7 more matches
Using IO Timeout And Interrupt On NT - Archive of obsolete content
when a thread calls an io function, the thread issues an overlapped io request using the overlapped buffer in its <tt>prthread</tt> structure.
...in the meantime, there are dedicated internal threads (called the idle threads) monitoring the io completion port for completed io requests.
... if a completed io request appears at the io completion port, an idle thread fetches it and wakes up the thread that issued the io request earlier.
...And 7 more matches
What is a web server? - Learn web development
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.
...And 7 more matches
Website security - Learn web development
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, or user files that are uploaded and displayed.
... 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.
...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.
...And 7 more matches
Overview of Mozilla embedding APIs
do_getinterface this function simplfies retrieving interfaces via the nsiinterfacerequestor::getinterface(...) method.
... using this function, one can use nsisupports instances and still easily access other interfaces via nsiinterfacerequestor.
... internally, this function tries to convert the nsisupports argument into an nsiinterfacerequestor and then calls getinterface(...) to retrieve the requested interface.
...And 7 more matches
L20n Javascript API
l20n javascript api var ctx = l20n.getcontext(); ctx.linkresource('./locales/strings.l20n'); ctx.requestlocales(); when you freeze the context by calling requestlocales, the resource files will be retrieved, parsed and compiled.
... ctx.registerlocalenegotiator(function(available, requested, deflocale) { return intl.prioritizelocales(available, requested, deflocale); }); negotiator is a function which takes the following arguments: available - all locales available to the context instance, requested - locales preferred by the user, deflocale - the default locale to be used as the ultimate fallback, callback - the function to call when the negotiation completes (useful for ...
... ctx.registerlocalenegotiator(function(available, requested, deflocale, callback) { yourapp.getallavailablelanguages(function(allavailable) { var fallbackchain = yourapp.intersect(allavailable, requested); cb(fallbackchain); }); }); ctx.requestlocales(...requestedlocales: string?) specify the user's preferred locales for the context instance to negotiate against and freeze the context instance.
...And 7 more matches
NSPR Error Handling
error type prerrorcode error functions pr_seterror pr_seterrortext pr_geterror pr_getoserror pr_geterrortextlength pr_geterrortext error codes error codes defined in prerror.h: pr_out_of_memory_error insufficient memory to perform request.
... pr_insufficient_resources_error there are insufficient system resources to process the request.
... pr_no_access_rights_error calling thread does not have privilege to perform the operation requested.
...And 7 more matches
How to embed the JavaScript engine
tystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, }; int main(int argc, const char *argv[]) { jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
... jsautorequest ar(cx); // in practice, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } ...
... js_convertstub, nullptr, nullptr, nullptr, nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...And 7 more matches
nsICachingChannel
the value of this attribute is usually only settable during the processing of a channel's onstartrequest.
...depending on the value of nsirequest.loadflags(), the cache entry may be validated, overwritten, or simply read.
...an error of ns_error_document_not_cached will be sent to the listener's onstoprequest if network io is necessary to complete the request.
...And 7 more matches
nsITraceableChannel
is as follows: register for the "http-on-examine-response" notification to track all http responses; skip redirects (responsestatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsistreamlistener (that passes the data to the original requester - e.g.
... to xmlhttprequest or to the browser tab that made the request) with your own implementation (see "implementing nsistreamlistener" below).
... see modify url before loading page in firefox for an overview of how to modify a request before it is made.
...And 7 more matches
Beacon API - Web APIs
the beacon interface 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).
...And 7 more matches
Cache.match() - Web APIs
WebAPICachematch
the match() method of the cache interface returns a promise that resolves to the response associated with the first matching request in the cache object.
... syntax cache.match(request, {options}).then(function(response) { // do something with the response }); parameters request the request for which you are attempting to find responses in the cache.
... this can be a request object or a url.
...And 7 more matches
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
the open() method of the idbfactory interface requests opening a connection to a database.
... the method returns an idbopendbrequest object immediately, and performs the open operation asynchronously.
... if the operation is successful, a success event is fired on the request object that is returned from this method, with its result attribute set to the new idbdatabase object for the connection.
...And 7 more matches
Basic concepts - Web APIs
instead, you "request" that a database operation happens.
...it's not that different from the way that xmlhttprequest works.
... indexeddb uses a lot of requests.
...And 7 more matches
LocalFileSystemSync - Web APIs
basic concepts you can request access to a sandboxed file system by requesting localfilesystemsync object from within a web worker.
... the global methods in the window object requestfilesystemsync() and resolvelocalfilesystemsyncurl() methods are exposed to the worker's global scope.
... calling window.requestfilesystemsync() for creates new storage for your web app.
...And 7 more matches
PaymentResponse.shippingAddress - Web APIs
the shippingaddress read-only property of the paymentrequest interface returns a paymentaddress object containing the shipping address provided by the user.
... syntax var shippingaddress = paymentrequest.shippingaddress; value a paymentaddress object providing details comprising the shipping address provided by the user.
...you can trigger this by setting paymentoptions.requestshipping to true when calling the paymentrequest constructor.
...And 7 more matches
Writing WebSocket servers - Web APIs
for example, let's assume that your server is listening on example.com, port 8000, and your socket server responds to get requests at example.com/chat.
... tip: the request-uri (/chat here) has no defined meaning in the spec.
... 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.
...And 7 more matches
Ajax - Developer guides
WebGuideAJAX
asynchronous javascript and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a number of existing technologies together, including html or xhtml, css, javascript, dom, xml, xslt, and most importantly the xmlhttprequest object.
... using the xmlhttprequest api the xmlhttprequest api is the core of ajax.
... this article will explain how to use some ajax techniques, like: analyzing and manipulating the response of the server monitoring 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.
...And 7 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
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-when-cross-origin send the full url (stripped of parameters) for same-origin requests, but only send the origin for other cases.
... same-origin send the full url (stripped of parameters) for same-origin requests.
...And 7 more matches
Access-Control-Allow-Headers - HTTP
the access-control-allow-headers response header is used in response to a preflight request which includes the access-control-request-headers to indicate which http headers can be used during the actual request.
... this header is required if the request has an access-control-request-headers header.
... header type response header forbidden header name no syntax access-control-allow-headers: <header-name>[, <header-name>]* access-control-allow-headers: * directives <header-name> the name of a supported request header.
...And 7 more matches
HTTP
WebHTTP
http follows a classical client-server model, with a client opening a connection to make a request, then waiting until it receives a response.
... http is a stateless protocol, meaning that the server does not keep any data (state) between two requests.
...when serving an http request, a server can send a set-cookie http header with the response.
...And 7 more matches
Microsummary topics - Archive of obsolete content
differentiating between user-initiated and microsummary-related requests when firefox updates a microsummary generated by a microsummary generator add-on, it automatically downloads the html content of the page being summarized.
...firefox includes the x-moz request header with these requests.
...thus, to differentiate requests initiated manually by users for the purpose of viewing a web page from those initiated automatically by firefox for the purpose of summarizing that page, check for the presence and value of the x-moz request header.
...And 6 more matches
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets notification of the result.
... url pointer to the url of the request.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify() call, which passes this value (see description below).
...And 6 more matches
Drawing graphics - Learn web development
there are a few javascript functions that will allow you to run functions repeatedly, several times a second, the best one for our purposes here being window.requestanimationframe().
...if that function draws the new update to your animation, then calls requestanimationframe() again just before the end of the function, the animation loop will continue to run.
... the loop ends when you stop calling requestanimationframe() or if you call window.cancelanimationframe() after calling requestanimationframe() but before the frame is called.
...And 6 more matches
Experimental features in Firefox
nightly 33 no developer edition 33 no beta 33 no release 33 no preference name media.track.enabled dom document property: autoplaypolicy the document property autoplaypolicy returns a string indicating how the browser handles requests to automatically play media (either using the autoplay property on a media element or by attempting to trigger playback from javascript code.
... nightly 31 yes developer edition 31 no beta 31 no release 31 no preference name layout.css.convertfromnode.enable payment request api primary payment handling the payment request api provides support for handling web-based payments within web content or apps.
... nightly 55 no developer edition 55 no beta 55 no release 55 no preference name dom.payments.request.enabled and dom.payments.request.supportedregions basic card api extends the payment request api with dictionaries that define data structures describing card payment types and payment responses.
...And 6 more matches
Storage access policy: Block cookies from trackers
specifically, firefox does this by imposing the following restrictions: cookies: block cookie request headers and ignore set-cookie response headers.
... return an empty string for calls to document.cookie and ignore requests to set cookies via document.cookie.
... http connection reuse by domains classified as trackers is limited to requests that occur under the same top-level origin.
...And 6 more matches
Localization sign-off reviews
this article presents an overview of why we do sign-off reviews of localizations, the details on the criteria used for the sign-off reviews, and the process for requesting a review and for following its progress.
... how it all works a large part of the review process takes place before you even submit your request for a sign-off review.
... to put it simply, when we receive your request, we expect that you have spent time testing your work and making sure all strings have been localized and that your changes are relatively functional.
...And 6 more matches
Localization technical reviews
this guide provides details on what a localization technical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress.
...most locales should have the following: #filter substitution pref("general.useragent.locale", "@ab_cd@") how it all works a large part of the review process takes place before you even submit your request for a technical review.
... to put it simply, when we receive your request, we expect that you have spent time testing your work and making sure all strings have been localized and that your language pack is relatively functional.
...And 6 more matches
Basic animations - Web APIs
scheduled updates first there's the window.setinterval(), window.settimeout(), and window.requestanimationframe() functions, which can be used to call a specific function over a set period of time.
... requestanimationframe(callback) tells the browser that you wish to perform an animation and requests that the browser call a specified function to update an animation before the next repaint.
... in the examples below, we'll use the window.requestanimationframe() method to control the animation.
...And 6 more matches
FetchEvent - Web APIs
it contains information about the fetch, including the request and how the receiver will treat the response.
... fetchevent.request read only the request the browser intends to make.
... examples this fetch event uses the browser default for non-get requests.
...And 6 more matches
IDBObjectStore.add() - Web APIs
the add() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, creates a structured clone of the value, and stores the cloned value in the object store.
... to determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the idbobjectstore.add request’s success event, because the transaction may still fail after the success event fires.
...if a record already exists in the object store with the key parameter as its key, then an error constrainerror event is fired on the returned request object.
...And 6 more matches
PaymentResponse.shippingOption - Web APIs
the shippingoption read-only property of the paymentrequest interface returns the id attribute of the shipping option selected by the user.
... this option is only present when the requestshipping option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... syntax var shippingoption = paymentrequest.shippingoption; example in the example below, the paymentrequest.onshippingaoptionchange event is called.
...And 6 more matches
Pointer Lock API - Web APIs
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 declare it something like this, for example if you wanted to request pointer lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event generated as a result of an engagement gesture must be received by the document before requestpointerlock will succeed.
... here is an example of using pointerlockelement: if(document.pointerlockelement === canvas || document.mozpointerlockelement === canvas) { console.log('the pointer lock status is now locked'); } else { console.log('the pointer lock status is now unlocked'); } the document.exitpointerlock() method is used to exit pointer lock, and like requestpointerlock, works asynchronously using the pointerlockchange and pointerlockerror events, which you'll see more about below.
...And 6 more matches
Configuring servers for Ogg media - HTTP
handle http 1.1 byte range requests correctly in order to support seeking and playing back regions of the media that aren't yet downloaded, gecko uses http 1.1 byte-range requests to retrieve the media from the seek target position.
... in addition, gecko uses byte-range requests to seek to the end of the media (assuming you serve the content-length header) in order to determine the duration of the media.
... your server should accept the accept-ranges: bytes http header if it can accept byte-range requests.
...And 6 more matches
Range - HTTP
WebHTTPHeadersRange
the range http request header indicates the part of a document that the server should return.
... several parts can be requested with one range header at once, and the server may send back these ranges in a multipart document.
... header type request header forbidden header name no syntax range: <unit>=<range-start>- range: <unit>=<range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end> range: <unit>=-<suffix-length> directives <unit> the unit in which ranges are specified.
...And 6 more matches
Set-Cookie - HTTP
path=<path-value> optional a path that must exist in the requested url, or the browser won't send the cookie header.
... secure optional a secure cookie is only sent to the server when a request is made with the https: scheme.
...note that a cookie that has been created with httponly will still be sent with javascript-initiated requests, e.g.
...And 6 more matches
Link prefetching FAQ - HTTP
the browser observes all of these hints and queues up each unique request to be prefetched when the browser is idle.
...this is when we kick off prefetch requests.
...when the user visits a prefetched document for real, the remaining portion of the document will be fetched using a http byte-range request.
...And 6 more matches
Network Error Logging - HTTP
success_fraction floating point value between 0 and 1 which specifies the proportion of successful network requests to report.
... defaults to 0, so that no successful network requests will be reported if the key is not present in the json payload.
... failure_fraction floating point value between 0 and 1 which specifies the proportion of failed network requests to report.
...And 6 more matches
Proxy servers and tunneling - HTTP
reverse proxies as the name implies, a reverse proxy does the opposite of what a forward proxy does: a forward proxy acts in behalf of clients (or requesting hosts), a reverse proxy acts in behalf of servers.
... forwarding client information through proxies proxies can make requests appear as if they originated from the proxy's ip address.
... this can be useful if a proxy is used to provide client anonymity, but in other cases information from the original request is lost.
...And 6 more matches
CSS and JavaScript animation performance - Web Performance
there are many ways to implement web animations, such as css transitions/animations or javascript-based animations (using requestanimationframe()).
... requestanimationframe the requestanimationframe() api provides an efficient way to make animations in javascript.
...compared to settimeout()/setinterval(), which need a specific delay parameter, requestanimationframe() is much more efficient.
...And 6 more matches
Critical rendering path - Web Performance
the html may request javascript, which may, in turn, alter the dom.
... the html includes or makes requests for styles, which in turn builds the css object model.
... understanding crp web performance includes the server requests and responses, loading, scripting, rendering, layout, and the painting of the pixels to the screen.
...And 6 more matches
net/xhr - Archive of obsolete content
provides access to xmlhttprequest functionality.
... usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to read from (but not write to) the host system's entire filesystem.
... threat model the xmlhttprequest object can be used by an add-on to "phone home" and transmit potentially sensitive user data to third parties.
...And 5 more matches
NPP_URLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies the plug-in instance of the completion of a url request.
... url url of the npn_geturlnotify() or npn_posturlnotify() request that has completed.
... reason reason code for completion of request.
...And 5 more matches
NPAPI plugin reference - Archive of obsolete content
browser-side plug-in api this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... npn newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
... npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets notification of the result.
...And 5 more matches
Necko walkthrough
has onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously.
...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) this all happens on the main thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
...And 5 more matches
Invariants
(here "the global object" refers to the object at the end of the scope chain of the function object we're executing.) requests many functions require a request.
... that is, they take a parameter cx of type jscontext *, and require that cx is in a request on the current thread.
... "are we in a request on cx?", where cx is any variable of type jscontext *, is a static yes for most lines of code where such a variable exists.
...And 5 more matches
nsICacheEntryDescriptor
inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long offset); nsioutputstream openoutputstream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get th...
...a descriptor with write access can doom the cache entry and choose to fail pending requests.
... this means that pending requests will not get a cache descriptor.
...And 5 more matches
nsIParentalControlsService
toolkit/components/parentalcontrols/public/nsiparentalcontrolsservice.idlscriptable this interface provides access to the operating system's parental controls feature, allowing code to detect whether such a service is enabled and to request overrides to bypass the feature.
...to create an instance, use: var parentalcontrolsservice = components.classes["@mozilla.org/parental-controls-service;1"] .createinstance(components.interfaces.nsiparentalcontrolsservice); method overview void log(in short aentrytype, in boolean aflag, in nsiuri asource, [optional] in nsifile atarget); boolean requesturioverride(in nsiuri atarget, [optional] in nsiinterfacerequestor awindowcontext); boolean requesturioverrides(in nsiarray atargets, [optional] in nsiinterfacerequestor awindowcontext); attributes attribute type description blockfiledownloadsenabled boolean true if the current user account's parental controls restrictions include the blocking of all ...
... requesturioverride() requests that a blocked uri be allowed through parental control filters.
...And 5 more matches
nsIProgressEventSink
notifications will cease once the channel calls its listener's onstoprequest method or once the channel is canceled (via nsirequest.cancel()).
... note: this interface is actually not specific to channels and may be used with other implementations of nsirequest.
... method overview void onprogress(in nsirequest arequest, in nsisupports acontext, in unsigned long long aprogress, in unsigned long long aprogressmax); void onstatus(in nsirequest arequest, in nsisupports acontext, in nsresult astatus, in wstring astatusarg); methods onprogress() called to notify the event sink that progress has occurred for the given request.
...And 5 more matches
Intensive JavaScript - Firefox Developer Tools
the first is to split long-running functions into pieces and use requestanimationframe to schedule each piece, and the second is to run the whole function in a separate thread using a web worker.
... there's also a video version of this walkthrough: the demo website looks like this: it has three controls: a radio button group to control how to run the javascript: as a single blocking operation in the main thread, as a series of smaller operations in the main thread using requestanimationframe(), or in another thread using a worker.
... using requestanimationframe in the first attempt at fixing this, we'll split up the function into a number of much smaller self-contained functions, and schedule each one using requestanimationframe().
...And 5 more matches
Cache.put() - Web APIs
WebAPICacheput
often, you will just want to fetch() one or more requests, then add the result straight to your cache.
... fetch(url).then(function(response) { if (!response.ok) { throw new typeerror('bad response status'); } return cache.put(url, response); }) note: put() will overwrite any key/value pair previously stored in the cache that matches the request.
... note: cache.add/cache.addall do not cache responses with response.status values that are not in the 200 range, whereas cache.put lets you store any request/response pair.
...And 5 more matches
CacheStorage.match() - Web APIs
the match() method of the cachestorage interface checks if a given request or url string is a key for a stored response.
... syntax caches.match(request, options).then(function(response) { // do something with the response }); parameters request the request you want to match.
... this can be a request object or a url string.
...And 5 more matches
Using files from web applications - Web APIs
function fileupload(img, file) { const reader = new filereader(); this.ctrl = createthrobber(img); const xhr = new xmlhttprequest(); this.xhr = xhr; const self = this; this.xhr.upload.addeventlistener("progress", function(e) { if (e.lengthcomputable) { const percentage = math.round((e.loaded * 100) / e.total); self.ctrl.update(percentage); } }, false); xhr.upload.addeventlistener("load", function(e){ self.ctrl.update(100); const canvas = self.ctrl.ctx.c...
..."post", "http://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php"); xhr.overridemimetype('text/plain; charset=x-user-defined-binary'); reader.onload = function(evt) { xhr.send(evt.target.result); }; reader.readasbinarystring(file); } the fileupload() function shown above creates a throbber, which is used to display progress information, and then creates an xmlhttprequest to handle uploading the data.
... before actually transferring the data, several preparatory steps are taken: the xmlhttprequest's upload progress listener is set to update the throbber with new percentage information so that as the upload progresses the throbber will be updated based on the latest information.
...And 5 more matches
Using FormData Objects - Web APIs
the formdata object lets you compile a set of key/value pairs to send using xmlhttprequest.
...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.
... 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.
...And 5 more matches
Using the Gamepad API - Web APIs
performing such checks tends to involve using the gamepad object in conjunction with an animation loop (e.g., requestanimationframe), where developers want to make decisions for the current frame based on the state of the gamepad or gamepads.
... to start with, we declare some variables: the gamepadinfo paragraph that the connection info is written into, the ball that we want to move, the start variable that acts as the id for requestanimation frame, the a and b variables that act as position modifiers for moving the ball, and the shorthand variables that will be used for the requestanimationframe() and cancelanimationframe() cross browser forks.
...if so, we stop the requestanimationframe() loop (see below) and revert the gamepad information back to what it was originally.
...And 5 more matches
IDBDatabaseException - Web APIs
constant value description abort_err 8 a request was aborted, for example, through a call to idbtransaction.abort.
...for example, an object, such as an object store or index, already exists and a request attempted to create a new one.
...it also occurs if a request is made on a source object that has been deleted or removed.
...And 5 more matches
IDBFactory.deleteDatabase() - Web APIs
the deletedatabase() method of the idbfactory interface requests the deletion of a database.
... the method returns an idbopendbrequest object immediately, and performs the deletion operation asynchronously.
... if the database is successfully deleted, then a success event is fired on the request object returned from this method, with its result set to undefined.
...And 5 more matches
IDBIndex - Web APIs
WebAPIIDBIndex
methods inherits from: eventtarget idbindex.count() returns an idbrequest object, and in a separate thread, returns the number of records within a key range.
... idbindex.get() returns an idbrequest object, and, in a separate thread, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is an idbkeyrange.
... idbindex.getkey() returns an idbrequest object, and, in a separate thread, finds either the given key or the primary key, if key is an idbkeyrange.
...And 5 more matches
IDBObjectStore.delete() - Web APIs
the delete() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, deletes the specified record or records.
... syntax var request = objectstore.delete(key); var request = objectstore.delete(keyrange); parameters key the key of the record to be deleted, or an idbkeyrange to delete all records with keys in range.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 5 more matches
IDBObjectStore.get() - Web APIs
the get() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns the object store selected by the specified key.
... if a value is successfully found, then a structured clone of it is created and set as the result of the request object.
... syntax var request = objectstore.get(key); parameters key the key or key range that identifies the record to be retrieved.
...And 5 more matches
IDBObjectStore.put() - Web APIs
it returns an idbrequest object, and, in a separate thread, creates a structured clone of the value and stores the cloned value in the object store.
...if the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.
... syntax let request = objectstore.put(item); let request = objectstore.put(item, key); parameters item the item you wish to update (or insert).
...And 5 more matches
Capabilities, constraints, and settings - Web APIs
this may not represent the actual current state of the track, due to properties whose requested values had to be adjusted and because platform default values aren't represented.
... the most important thing to understand is that most constraints aren't requirements; instead, they're requests.
... requesting a specific value for a setting most simply, each constraint may be a specific value indicating a desired value for the setting.
...And 5 more matches
Payment processing concepts - Web APIs
the payment request api makes it easy to handle payments in a web site or app.
... payee (or merchant) the merchant—either a person or an organization—whose web site or app wishes to receive money through the payment request api.
...see basiccardrequest for details.
...And 5 more matches
Service Worker API - Web APIs
they are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server.
...it takes the form of a javascript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).
...having modified network requests, wide open to man in the middle attacks would be really bad.
...And 5 more matches
XRSession - Web APIs
WebAPIXRSession
to open a webxr session, use the xrsystem interface's requestsession() method.
... cancelanimationframe() removes a callback from the animation frame painting callback from xrsession's set of animation frame rendering callbacks, given the identifying handle returned by a previous call to requestanimationframe().
... requestanimationframe() schedules the specified method to be called the next time the user agent is working on rendering an animation frame for the webxr device.
...And 5 more matches
Web APIs
WebAPI
ensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrt...
...udiodestinationnode audiolistener audionode audionodeoptions audioparam audioparamdescriptor audioparammap audioprocessingevent audioscheduledsourcenode audiotrack audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse authenticatorresponse b baseaudiocontext basiccardrequest basiccardresponse batterymanager beforeinstallpromptevent beforeunloadevent biquadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate...
...gtc ext_texture_filter_anisotropic eckeygenparams eckeyimportparams ecdhkeyderiveparams ecdsaparams effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader filesystementry filesystementrysync filesystemfileentry filesystemflags filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactuator geolocation geolocationcoordinates geolocati...
...And 5 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... crossorigin indicates if the fetching of the image must be done using a cors request.
... image data from a cors-enabled image returned from a cors request can be reused in the <canvas> element without being marked "tainted".
...And 5 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
if 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 crossorigin attribute indicates whether the resource should be fetched with a cors request.
...it specifies the type of content being loaded by the <link>, which is necessary for request matching, application of correct content security policy, and setting of correct accept request header.
...And 5 more matches
CORS errors - HTTP
WebHTTPCORSErrors
this is used to explicitly allow some cross-origin requests while rejecting others.
... if the cors configuration isn't setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
...it's possible that the request is in fact intentionally being disallowed by the user's web application and remote external service.
...And 5 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
service workers are quite powerful as they can take control over network requests, modify them, serve custom responses retrieved from the cache, or synthesize responses completely.
... here, we open a cache with a given name, then add all the files our app uses to the cache, so they are available next time it loads (identified by request url).
... responding to fetches we also have a fetch event at our disposal, which fires every time an http request is fired off from our app.
...And 5 more matches
Appendix D: Loading Scripts - Archive of obsolete content
javascript files or urls may be loaded in this manner by first retrieving their contents into memory using an xmlhttprequest.
... in addition to compile time, reading files synchronously from disk has its own overhead, and xmlhttprequests have significantly more overhead than native loading methods.
... const xmlhttprequest = components.constructor("@mozilla.org/xmlextras/xmlhttprequest;1", "nsixmlhttprequest", "open"); function loadscript(name, context) { // create the sandbox let sandbox = components.utils.sandbox(context, { sandboxprototype: context, wantxrays: false }); // get the caller'...
...And 4 more matches
JavaScript crypto - Archive of obsolete content
services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing text.
... generating keys and issuing user certificates there are several crypto object methods used in generating keys for certificates: generatecrmfrequest(), importusercertificates().
... the generatecrmfrequest() function generates a key and creates a crmf request object.
...And 4 more matches
Using workers in extensions - Archive of obsolete content
how this differs from previous versions this version of the stock ticker extension moves the xmlhttprequest call that fetches updated stock information into a worker thread, which then passes that information back to the main body of the extension's code to update the display in the status bar.
... this demonstrates 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.
...And 4 more matches
CORS - MDN Web Docs Glossary: Definitions of Web-related terms
cors (cross-origin resource sharing) is a system, consisting of transmitting http headers, that determines whether browsers block frontend javascript code from accessing responses for cross-origin requests.
... access-control-allow-credentials indicates whether or not the response to the request can be exposed when the credentials flag is true.
... access-control-allow-headers used in response to a preflight request to indicate which http headers can be used when making the actual request.
...And 4 more matches
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
a cacheable response is an http response that can be cached, that is stored to be retrieved and used later, saving a new request to the server.
... not all http responses can be cached, these are the following constraints for an http response to be cached: the method used in the request is itself cacheable, that is either a get or a head method.
... a response to a post or patch request can also be cached if freshness is indicated and the content-location header is set, but this is rarely implemented.
...And 4 more matches
Index - Learn web development
49 asynchronous javascript beginner, codingscripting, guide, javascript, landing, promises, async, asynchronous, await, callbacks, requestanimationframe, setinterval, settimeout in this module we take a look at asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
... 50 choosing the right approach beginner, intervals, javascript, learn, optimize, promises, async, asynchronous, await, requestanimationframe, setinterval, settimeout, timeouts to finish this module off, we'll provide a brief discussion of the different coding techniques and features we've discussed throughout, looking at which one you should use when, with recommendations and reminders of common pitfalls where appropriate.
... 51 cooperative asynchronous javascript: timeouts and intervals animation, beginner, codingscripting, guide, intervals, javascript, loops, asynchronous, requestanimationframe, setinterval, settimeout, timeouts this tutorial looks at the traditional methods javascript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g.
...And 4 more matches
Choosing the right approach - Learn web development
single delayed operation repeating operation multiple sequential operations multiple simultaneous operations no yes (recursive callbacks) yes (nested callbacks) no code example an example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; docu...
...not as efficient as requestanimationframe(), but allows you to choose a running rate/frame rate.
...unless you need to choose a specific (slower) framerate, it is generally better to use requestanimationframe().
...And 4 more matches
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.
... submitting post data httprequest allows attaching data to the post requests.
...And 4 more matches
Investigating leaks using DMD heap scan mode
in one debugging session where i was investigating the leak from bug 1451985, i eventually reduced the list of entries until this was the most suspicious looking entry: 0x7f0892f29630 size = 392 bytes at byte offset 56 mozilla::dom::scriptloader::processexternalscript[...] [...] i went to that line of scriptloader::processexternalscript(), and it contained a call to scriptloader::createloadrequest().
... fortunately, this method mostly just contains two calls to new, one for scriptloadrequest and one for moduleloadrequest.
...unfortunately, in this particular case, the unoptimized build was so slow i wasn’t getting any logs.) i then looked through the list of leaked objects generated by xpcom_mem_bloat_log and saw that we were leaking a scriptloadrequest, so i went and looked at its class definition, where i noticed that scriptloadrequest had a strong reference to an element that it wasn’t telling the cycle collector about, which seemed suspicious.
...And 4 more matches
An overview of NSS Internals
the usual approach is to create a certificate signing request (csr) as soon as an application is done with the creation step, which will have created a handle to the key pair, and which can be used for the necessary related operations, like producing a proof-of-ownership of the private key, which is usually required when submitting the public key with a csr to a ca.
...the crmf library, which is used to produce certain kinds of certificate requests, is available as a library for static linking only.
...an arena is requested once processing of a task starts, and all memory allocations that are logically associated to that task are requested from the associated arena.
...And 4 more matches
JS_SetInterruptCallback
syntax jsinterruptcallback js_setinterruptcallback(jsruntime *rt, jsinterruptcallback callback); jsinterruptcallback js_getinterruptcallback(jsruntime *rt); void js_requestinterruptcallback(jsruntime *rt); name type description rt jsruntime * the runtime.
... provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
...And 4 more matches
XML Extras
feature status feature status xmlserializer available xmlhttprequest available domparser (string and stream input source) available web services with soap and wsdl no longer available from gecko 1.9/firefox 3.
... qa and testing there are some online tests for mainly exercising the http get method via xmlhttprequest.
... for xmlhttprequest object you can mostly rely on the microsoft xmlhttprequest documentation, with some caveats: all functions and property names begin with a lower case letter and the object creation is different.
...And 4 more matches
Starting WebLock
the category name also maps nicely onto the notion of a notification "topic." the topic name could be something like "xpcom-startup", for instance, and the name-value pair could contain the contract ids required to create the components requesting startup.
...the interface callback looks like this: [scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)] interface nsidirectoryserviceprovider: nsisupports { /** * getfile * * directory service calls this when it gets the first request for * a prop or on every request if the prop is not persistent.
...subsequent requests for this prop will * bypass the provider and use the cache.
...And 4 more matches
Mozilla internal string guide
capacity-aware means that the caller is made aware of how the caller-requested buffer capacity was rounded up to mozjemalloc buckets.
... this is useful when initially requesting best-case buffer size without yet knowing the true size need.
... if the data that actually needs to be written is larger than the best-case estimate but still fits within the rounded-up capacity, there is no need to reallocate despite requesting the best-case capacity.
...And 4 more matches
IAccessibleText
the whole text can be requested by passing the indices zero and ncharacters().
...text returns the requested text() portion.
...s_false if the requested boundary type is not implemented, such as ::ia2_text_boundary_sentence, or if there is nothing to return; [out] values are 0s and null respectively.
...And 4 more matches
imgIContainer
nsiframe getrootlayoutframe(); violates the xpcom interface guidelines pruint16 gettype(); violates the xpcom interface guidelines void init(in print32 awidth, in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void resetanimation(); void restoredatadone(); native code only!
...you can only be guaranteed that querying this will not throw if status_decode_complete is set on the imgirequest.
...exceptions thrown missing exception missing description removeframe() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) void removeframe( in gfxiimageframe item ); parameters item missing description exceptions thrown missing exception missing description requestdecode() void requestdecode(); parameters none.
...And 4 more matches
imgILoader
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/image/loader;1 as a service: var imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader); method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidecoderobserver aobser...
...imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy ); parameters auri the uri to load.
...aloadflags load flags for the request.
...And 4 more matches
nsICache
access_read 1 access requested - i only want to read, if there isn't an entry just fail.
... access_write 2 access requested - i have something new i want to write into the cache, make me a new entry and doom the old one, if any.
... access_read_write 3 access requested - i want to read, but i'm willing to update an existing entry if necessary, or create a new one if none exists.
...And 4 more matches
nsIContentSecurityPolicy
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 boolean permitsancestry(in nsidocshell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in ns...
...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.
...And 4 more matches
nsIDebug
method overview void abort(in string afile, in long aline); void assertion(in string astr, in string aexpr, in string afile, in long aline); void break(in string afile, in long aline); void warning(in string astr, in string afile, in long aline); methods abort() requests the process to trigger a fatal abort.
... void abort( in string afile, in long aline ); parameters afile file containing abort request.
... aline line number of abort request.
...And 4 more matches
nsIDocShell
g documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinputstream aheadersstream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only!
...all values from here upward are confident enough to be used for xmlhttprequest.
...void internalload( in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinputstream aheadersstream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest ); parameters auri the uri to load.
...And 4 more matches
nsIHttpChannelInternal
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void getrequestversion(out unsigned long major, out unsigned long minor); void getresponseversion(out unsigned long major, out unsigned long minor); void httpupgrade(in acstring aprotocolname, in nsihttpupgradelistener alistener); void setcookie(in string acookieheader); void setupfallbackchannel(in string afallbackkey); attributes attribute type description canceled boolean returns true if and only if the ...
... methods getrequestversion() gets the request's major and minor version numbers.
... void getrequestversion( out unsigned long major, out unsigned long minor ); parameters major on return, contains the request's major version number.
...And 4 more matches
nsIStreamListener
inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to consume data from a nsichannel need to implement this interface.
... nsirequestobserver contains two methods.
... so, in all the three methods - ondataavailable(), nsirequestobserver.onstartrequest() and nsirequestobserver.onstoprequest() have to be implemented.
...And 4 more matches
nsIWebBrowserPersist
the object that the embbedder supplies may also implement nsiinterfacerequestor and be prepared to return nsiauthprompt or other interfaces that may be required to download data.
... areferrer the referrer uri to pass with an http request or nsnull.
... areferrerpolicy the referrer policy to use for the request, taken from nsihttpchannel.
...And 4 more matches
Console messages - Firefox Developer Tools
network requests are logged with a line that looks like this: time the time the message was recorded.
... method the specific http request method.
... if the request was made as an xmlhttprequest, there's an additional "xhr" tag indicating this.
...And 4 more matches
AbortController - Web APIs
the abortcontroller interface represents a controller object that allows you to abort one or more web requests as and when desired.
...communicating with a dom request is done using an abortsignal object.
... properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request.
...And 4 more matches
BasicCardResponse.billingAddress - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
BasicCardResponse.cardNumber - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
BasicCardResponse.cardSecurityCode - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
BasicCardResponse.cardholderName - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
BasicCardResponse.expiryMonth - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
BasicCardResponse.expiryYear - Web APIs
example let's look at a sample payment request: var request = new paymentrequest(supportedinstruments, details, options); // call show() to trigger the browser's payment flow.
... request.show().then(function(instrumentresponse) { // do something with the response from the ui.
... console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...And 4 more matches
Document.cookie - Web APIs
WebAPIDocumentcookie
;samesite samesite prevents the browser from sending this cookie along with cross-site requests.
... the lax value value will send the cookie for all same-site requests and top-level navigation get requests.
...the cookie will be sent in all requests—both cross-site and same-site.
...And 4 more matches
Fetch basic concepts - Web APIs
it will seem familiar to anyone who has used xmlhttprequest, but it provides a more powerful and flexible feature set.
... in a nutshell at the heart of fetch are the interface abstractions of http requests, responses, headers, and body payloads, along with a global fetch method for initiating asynchronous resource requests.
... fetch takes the asynchronous nature of such requests one step further.
...And 4 more matches
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
the get() method of the idbindex interface returns an idbrequest object, and, in a separate thread, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is set to an idbkeyrange.
... if a value is found, then a structured clone of it is created and set as the result of the request object: this returns the record the key is associated with.
... syntax var request = myindex.get(key); parameters key optional a key or idbkeyrange that identifies the record to be retrieved.
...And 4 more matches
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
the getkey() method of the idbindex interface returns an idbrequest object, and, in a separate thread, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an idbkeyrange.
... if a primary key is found, it is set as the result of the request object.
... syntax var request = myindex.getkey(key); parameters key optional a key or idbkeyrange that identifies a record to be retrieved.
...And 4 more matches
IDBObjectStore.createIndex() - Web APIs
from inside a idbopendbrequest.onupgradeneeded handler.
...has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) example in the following example you can see the idbopendbrequest.onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
... for a full working example, see our to-do notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // two event handlers for opening the database.
...And 4 more matches
IDBTransaction.objectStore() - Web APIs
syntax idbtransaction.objectstore(name); parameters name the name of the requested object store.
... exceptions this method may raise a domexception of one of the following types: exception description notfounderror the requested object store is not in this transaction's scope.
... invalidstateerror the request was made on a source object that has been deleted or removed, or if the transaction has finished.
...And 4 more matches
PaymentAddress - Web APIs
the paymentaddress interface of the payment request api is used to store shipping or payment address information.
... examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object containing further options.
... the first of these three (supportedinstruments in the example below) contains a data property that has to conform to the structure defined by the basiccardrequest dictionary.
...And 4 more matches
Using the Resource Timing API - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource such as an xmlhttprequest, <svg>, image, script, etc.).
...pull requests and bug reports are welcome.
...this example also calculates the time from the start of the fetch and request start phases (fetchstart and requeststart, respectively), until the response has ended (responseend).
...And 4 more matches
Screen Wake Lock API - Web APIs
you acquire a wakelocksentinel object by calling the navigator.wakelock.request() promise based method that resolves if the platform allows it.
... a request may be rejected for a number of reasons, including system settings (such as power save mode or low battery level) or if the document is not active or visible.
...get an instance of the object by calling wakelock.request.
...And 4 more matches
Geometry and reference spaces in WebXR - Web APIs
instead, the webxr device api is designed to have developers plan their users' experiences and request an appropriate reference space that best represents those needs.
... the reference space returned by xrsession.requestreferencespace() is either xrreferencespace or xrboundedreferencespace.
...it is not only always available when using an immersive session mode (immersive-vr or immersive-ar), but is always included among the optional features when requesting a new session; thus, every session created by navigator.xr.requestsession() supports the local reference space type.
...And 4 more matches
Window.open() - Web APIs
WebAPIWindowopen
examples var windowobjectreference; var windowfeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes"; function openrequestedpopup() { windowobjectreference = window.open("http://www.cnn.com/", "cnn_windowname", windowfeatures); } var windowobjectreference; function openrequestedpopup() { windowobjectreference = window.open( "http://www.domainname.ext/path/imagefile.png", "descriptivewindowname", "resizable,scrollbars,status" ); } if a window with the name already exists, then url is loaded into t...
... window features windowfeatures is an optional string containing a comma-separated list of requested features of the new window.
... noreferrer if this feature is set, the request to load the content located at the specified url will be loaded with the request's referrer set to noreferrer; this prevents the request from sending the url of the page that initiated the request to the server where the request is sent.
...And 4 more matches
Content negotiation - HTTP
when a client wants to obtain a resource, the client requests it using its url.
...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 user-agent header identifies the browser sending the request.
...And 4 more matches
Cross-Origin Resource Policy (CORP) - HTTP
cross-origin resource policy is a policy set by the cross-origin-resource-policy http header that lets web sites and applications opt in to protection against certain requests from other origins (such as those issued with elements like <script> and <img>), to mitigate speculative side-channel attacks, like spectre, as well as cross-site script inclusion attacks.
... the policy is only effective for no-cors requests, which are issued by default for cors-safelisted methods/headers.
... as this policy is expressed via a response header, the actual request is not prevented—rather, the browser prevents the result from being leaked by stripping the response body.
...And 4 more matches
Access-Control-Allow-Credentials - HTTP
the access-control-allow-credentials response header tells browsers whether to expose the response to frontend javascript code when the request's credentials mode (request.credentials) is include.
... when a request's credentials mode (request.credentials) is include, browsers will only expose the response to frontend javascript code if the access-control-allow-credentials value is true.
... when used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials.
...And 4 more matches
Feature-Policy - HTTP
autoplay controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
...when this policy is disabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
... fullscreen controls whether the current document is allowed to use element.requestfullscreen().
...And 4 more matches
Forwarded - HTTP
the forwarded header contains information from the reverse proxy servers that is altered or lost when a proxy is involved in the path of the request.
... header type request header forbidden header name no syntax forwarded: by=<identifier>;for=<identifier>;host=<host>;proto=<http|https> directives <identifier> an identifier disclosing the information that is altered or lost when using a proxy.
... this can be either: an ip address (v4 or v6, optionally with a port, and ipv6 quoted and enclosed in square brackets), an obfuscated identifier (such as "_hidden" or "_secret"), or "unknown" when the preceding entity is not known (and you still want to indicate that forwarding of the request was made).
...And 4 more matches
Referrer-Policy - HTTP
the referrer-policy http header controls how much referrer information (sent via the referer header) should be included with requests.
...no referrer information is sent along with requests.
... 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.
...And 4 more matches
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
the http options method requests permitted communication options for a given url or server.
... request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-age=604800 date: thu, 13 oct 2016 11:45:00 gmt server: eos (lax004/2813) preflighted requests...
... in cors in cors, a preflight request is sent with the options method so that the server can respond if it is acceptable to send the request.
...And 4 more matches
Performance fundamentals - Web Performance
another problem that can delay startup is idle time, caused by waiting for responses to requests (like database loads).
... to avoid this problem, applications should issue requests as early as possible in startup (this is called "front-loading").
...network requests should never be on the critical path to early application startup.
...And 4 more matches
platform/xpcom - Archive of obsolete content
users of xpcom can use this value to retrieve the factory from components.classes: var factory = components.classes['@me.org/request'] var component = factory.createinstance(ci.nsirequest); this parameter is formally optional, but if you don't specify it, users won't be able to retrieve your factory using a contract id.
...users of xpcom can use this value to retrieve the factory using components.classesbyid: var factory = components.classesbyid[id]; var component = factory.createinstance(ci.nsirequest); this parameter is optional.
...for example, this subclass implements the nsirequest interface: var { class } = require('sdk/core/heritage'); var { unknown } = require('sdk/platform/xpcom'); var request = class({ extends: unknown, interfaces: [ 'nsirequest' ], initialize: function initialize() { this.pending = false; }, ispending: function() { return this.pending; }, resume: function() { console.log('resuming...'); }, suspend: function() { console.log('suspend...
...And 3 more matches
Finding window handles - Archive of obsolete content
var basewindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .treeowner .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsibasewindow); then in c++ part, a function take nsib...
...r what desktop/window manager) is in use, for explanation why see the article: standard os libraries - unix section) windows components.utils.import('resource://gre/modules/services.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { throw new error('no browser window found'); } var basewindow = browserwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .treeowner .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var hwndstring = basewindow.nativehandle; components.utils.import('resource://gre/m...
...z_setforegroundwindow:', rez_setforegroundwindow, rez_setforegroundwindow.tostring()); user32.close(); mac os x objective-c components.utils.import('resource://gre/modules/services.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { throw new error('no browser window found'); } var basewindow = browserwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .treeowner .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var nswindowstring = basewindow.nativehandle; components.utils.import('resource://g...
...And 3 more matches
Communication between HTML and your extension - Archive of obsolete content
i set the onblur action to a little javascript function that performed a standard ajax request to get a result.
...the result of the ajax request was the something that i wanted the extension to find.
...some of the events only apply to certain types of elements so i included trying to modify the result of the ajax request to be of the appropriate element type (img, which supports "onload," rather than span, which doesn't, for example).
...And 3 more matches
jspage - Archive of obsolete content
efined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].tolowercase()},features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.queryselector)},plugins:{},engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getelementsbyclassname)?950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:((browser.features.xpath)?((browser.features.query)?525:420):419); },gecko:function(){return(!document.getboxobjectfor&&window.mozinnerscreenx==null)?false:((document.getelementsbyclassname)?19:18);}}},browser||{});browser.platform[browser.platform.name]=true; browser.detect=function(){for(var b in this...
....engines){var a=this.engines[b]();if(a){this.engine={name:b,version:a};this.engine[b]=this.engine[b+a]=true; break;}}return{name:b,version:a};};browser.detect();browser.request=function(){return $try(function(){return new xmlhttprequest();},function(){return new activexobject("msxml2.xmlhttp"); },function(){return new activexobject("microsoft.xmlhttp");});};browser.features.xhr=!!(browser.request());browser.plugins.flash=(function(){var a=($try(function(){return navigator.plugins["shockwave flash"].description; },function(){return new activexobject("shockwaveflash.shockwaveflash").getvariable("$version");})||"0 r0").match(/\d+/g);return{version:parseint(a[0]||0+"."+a[1],10)||0,build:parseint(a[2],10)||0}; })();function $exec(b){if(!b){return b;}if(window.execscript){window.execscript(b);}else{var...
...){a=a[0]||1.618;return math.pow(b,2)*((a+1)*b-a);},bounce:function(f){var e;for(var d=0,c=1;1;d+=c,c/=2){if(f>=(7-4*d)/11){e=c*c-math.pow((11-6*d-11*f)/4,2); break;}}return e;},elastic:function(b,a){return math.pow(2,10*--b)*math.cos(20*b*math.pi*(a[0]||1)/3);}});["quad","cubic","quart","quint"].each(function(b,a){fx.transitions[b]=new fx.transition(function(c){return math.pow(c,[a+2]); });});var request=new class({implements:[chain,events,options],options:{url:"",data:"",headers:{"x-requested-with":"xmlhttprequest",accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",issuccess:null,emulation:true,urlencoded:true,encoding:"utf-8",evalscripts:false,evalresponse:false,nocache:false},initialize:function(a){this.xhr=new browser.reque...
...And 3 more matches
Introduction to SSL - Archive of obsolete content
the details of the protocol are available in request for comments (rfc): 2246,the tls protocol version 1.0.
...the server also sends its own certificate and, if the client is requesting a server resource that requires client authentication, requests the client's certificate.
... if the server has requested client authentication (an optional step in the handshake), the client also signs another piece of data that is unique to this handshake and known by both the client and server.
...And 3 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
e; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowserread'); // necessary with file:///-located files trying to reach external sites if (href !== null) { var response, responsetype; var request = new xmlhttprequest(); request.open('get', href, false); request.setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request.setrequestheader('cache-control', 'no-cache'); if (accept) { request.setrequestheader('accept', accept); } if ...
...(acceptlanguage) { request.setrequestheader('accept-language', acceptlanguage); } switch (parse) { case 'text': // priority should be on media type: var contenttype = request.getresponseheader('content-type'); //text/xml; charset="utf-8" // send to get headers first?
... // let the request be processed below } else { if (encoding === '' || encoding === null) { // encoding has no effect on xml encoding = 'utf-8'; } request.overridemimetype('text/plain; charset='+encoding); //'x-user-defined' ...
...And 3 more matches
Introduction to web APIs - Learn web development
apis that make this possible include xmlhttprequest and the fetch api.
...such apis are often combined with apis for creating animation loops (such as window.requestanimationframe()) and others to make constantly updating scenes like cartoons and games.
... to provide another example, instances of the xmlhttprequest object (each one represents an http request to the server to retrieve a new resource of some kind) has a number of events available on them, for example, the load event is fired when a response has been successfully returned containing the requested resource, and it is now available.
...And 3 more matches
Error codes returned by Mozilla APIs
ns_error_dom_hierarchy_request_err (0x80530003) a node was inserted into a location where it cannot go.
... ns_binding_failed (0x804b0001) ns_binding_aborted (0x804b0002) the asynchronous request failed because it was aborted by some user action.
... ns_binding_redirected (0x804b0003) the asynchronous request has been "redirected" to a different async request.
...And 3 more matches
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
the search bar also contains buttons, as well as a form to type search requests into.
...we did this with the following functions: function canmovebwd() { var request = browser.getcangoback(); request.onsuccess = function() { if (request.result) { back.disabled = false; console.log("it's possible to navigate the history backward."); } else { back.disabled = true; console.log("it's not possible to navigate the history backward."); } } } function canmovefwd() { var request = browser.getcangoforward(); request.onsucc...
...ess = function() { if (request.result) { fwd.disabled = false; console.log("it's possible to navigate the history forward."); } else { fwd.disabled = true; console.log("it's not possible to navigate the history forward."); } } } so here we have functions to detect whether we can navigate forwards/backwards in the history at any point.
...And 3 more matches
HTML parser threading
due to legacy interface design oddities, an nshtml5parser is initialized by calling nshtml5parser::parse(nsiuri*, nsirequestobserver*, void*, nsdtdmode).
...the nsistreamlistener methods (onstartrequest, ondataavailable and onstoprequest) are called on the main thread.
... onstartrequest does all sorts of initialization on the main thread.
...And 3 more matches
Interfacing with the Add-on Repository
starting a request to start a search of the repository, you can use either of the following methods: searchaddons() queries the add-on repository for add-ons matching given search criteria.
... when the user clicks a toolbar button to initiate the query, the following code gets run to start the request: addonrepository.retrieverecommendedaddons(10, this); this asks the repository to fetch up to 10 add-ons, using the object this as the target for callbacks.
... handling failed requests the callback object must have a searchfailed() method; this gets called when a repository search fails to execute.
...And 3 more matches
PR_ClearInterrupt
clears the interrupt request for the calling thread.
... syntax #include <prthread.h> void pr_clearinterrupt(void); description interrupting is a cooperative process, so it's possible that the thread passed to pr_interrupt may never respond to the interrupt request.
... for example, the target thread may reach the agreed-on control point without providing an opportunity for the runtime to notify the thread of the interrupt request.
...And 3 more matches
Certificate functions
validitytimes mxr 3.11 and later cert_completecrldecodeentries mxr 3.6 and later cert_convertanddecodecertificate mxr 3.9.3 and later cert_copyname mxr 3.4 and later cert_copyrdn mxr 3.5 and later cert_createava mxr 3.2.1 and later cert_createcertificate mxr 3.5 and later cert_createcertificaterequest mxr 3.2 and later cert_createname mxr 3.2.1 and later cert_createocspcertid mxr 3.6 and later cert_createocsprequest mxr 3.6 and later cert_createrdn mxr 3.2.1 and later cert_createsubjectcertlist mxr 3.4 and later cert_createvalidity mxr 3.5 and later cert_crlcacherefreshissuer mxr 3.7 ...
....4 and later cert_decodeusernotice mxr 3.2 and later cert_dernametoascii mxr 3.4 and later cert_destroycertarray mxr 3.2 and later cert_destroycertificate mxr 3.2 and later cert_destroycertificatelist mxr 3.2 and later cert_destroycertificatepoliciesextension mxr 3.2 and later cert_destroycertificaterequest mxr 3.2 and later cert_destroycertlist mxr 3.2 and later cert_destroyname mxr 3.2 and later cert_destroyocspcertid mxr 3.6 and later cert_destroyocsprequest mxr 3.6 and later cert_destroyocspresponse mxr 3.7 and later cert_destroyoidsequence mxr 3.9 and later cert_destroyusernotice mxr 3...
... cert_encodecertpoliciesextension mxr 3.12 and later cert_encodecrldistributionpoints mxr 3.5 and later cert_encodegeneralname mxr 3.4 and later cert_encodeinfoaccessextension mxr 3.12 and later cert_encodeinhibitanyextension mxr 3.12 and later cert_encodenoticereference mxr 3.12 and later cert_encodeocsprequest mxr 3.6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymappingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert...
...And 3 more matches
NSS functions
validitytimes mxr 3.11 and later cert_completecrldecodeentries mxr 3.6 and later cert_convertanddecodecertificate mxr 3.9.3 and later cert_copyname mxr 3.4 and later cert_copyrdn mxr 3.5 and later cert_createava mxr 3.2.1 and later cert_createcertificate mxr 3.5 and later cert_createcertificaterequest mxr 3.2 and later cert_createname mxr 3.2.1 and later cert_createocspcertid mxr 3.6 and later cert_createocsprequest mxr 3.6 and later cert_createrdn mxr 3.2.1 and later cert_createsubjectcertlist mxr 3.4 and later cert_createvalidity mxr 3.5 and later cert_crlcacherefreshissuer mxr 3.7 ...
....4 and later cert_decodeusernotice mxr 3.2 and later cert_dernametoascii mxr 3.4 and later cert_destroycertarray mxr 3.2 and later cert_destroycertificate mxr 3.2 and later cert_destroycertificatelist mxr 3.2 and later cert_destroycertificatepoliciesextension mxr 3.2 and later cert_destroycertificaterequest mxr 3.2 and later cert_destroycertlist mxr 3.2 and later cert_destroyname mxr 3.2 and later cert_destroyocspcertid mxr 3.6 and later cert_destroyocsprequest mxr 3.6 and later cert_destroyocspresponse mxr 3.7 and later cert_destroyoidsequence mxr 3.9 and later cert_destroyusernotice mxr 3...
... cert_encodecertpoliciesextension mxr 3.12 and later cert_encodecrldistributionpoints mxr 3.5 and later cert_encodegeneralname mxr 3.4 and later cert_encodeinfoaccessextension mxr 3.12 and later cert_encodeinhibitanyextension mxr 3.12 and later cert_encodenoticereference mxr 3.12 and later cert_encodeocsprequest mxr 3.6 and later cert_encodepolicyconstraintsextension mxr 3.12 and later cert_encodepolicymappingextension mxr 3.12 and later cert_encodesubjectkeyid mxr 3.12 and later cert_encodeusernotice mxr 3.12 and later cert_extractpublickey mxr 3.2 and later cert_findcertbyname mxr 3.2 and later cert...
...And 3 more matches
SpiderMonkey Internals: Thread Safety
the program must group jsapi calls into "requests": js_setcontextthread(cx); js_beginrequest(cx); /* ...
...*/ js_endrequest(cx); js_clearcontextthread(cx); it isn't a bottleneck; multiple threads are allowed to be in requests on the same jsruntime at once.
... see js_beginrequest.
...And 3 more matches
nsIContentSniffer
method overview acstring getmimetypefromcontent(in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength); methods getmimetypefromcontent() given a chunk of data, determines a mime type.
... information from the given request may be used in order to make a better decision.
... note: implementations should consider the request read-only.
...And 3 more matches
nsIResumableChannel
available after onstartrequest.
...the request given to the nsistreamlistener will be qiable to nsiresumableinfo.
...the request will not start until asyncopen or open is called.
...And 3 more matches
nsITextInputProcessorNotification
dom/interfaces/base/nsitextinputprocessorcallback.idlscriptable this interface of a request or notification to ime 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) this interface tells details of a request or notification to ime.
... attributes attribute type description type acstring the type of request or notification to ime.
... types "request-to-commit" this is required to be handled.
...And 3 more matches
XPCOM Interface Reference
ibleeditabletextiaccessiblehyperlinkiaccessiblehypertextiaccessibleimageiaccessiblerelationiaccessibletableiaccessibletable2iaccessibletablecelliaccessibletextiaccessiblevalueidispatchijsdebuggeramiinstallcallbackamiinstalltriggeramiwebinstallinfoamiwebinstalllisteneramiwebinstallpromptamiwebinstallerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentativecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistora...
...viewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbac...
...sihtmleditornsihttpheaderlistenernsihapticfeedbacknsihttpactivitydistributornsihttpactivityobservernsihttpchannelnsihttpchannelinternalnsihttpheadervisitornsihttpservernsihttpupgradelistenernsiidnservicensiiframeboxobjectnsiiniparsernsiiniparserfactorynsiiniparserwriternsiioservicensiidleservicensiinprocesscontentframemessagemanagernsiinputstreamnsiinputstreamcallbacknsiinstalllocationnsiinterfacerequestornsijscidnsijsidnsijsiidnsijsonnsijetpacknsijetpackservicensijumplistbuildernsijumplistitemnsilivemarkservicensiloadgroupnsilocalfilensilocalfilemacnsilocalensilocaleservicensilogininfonsiloginmanagernsiloginmanagercryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultirepo...
...And 3 more matches
Memory - Plugins
npn_memfree requests that the browser free a specified block of memory.
... npn_memflush requests the browser to free up a specified amount of memory if not enough is currently available for the plug-in's requirements.
...the browser may be able to deallocate nonessential memory structures in response to a request.
...And 3 more matches
Index - Firefox Developer Tools
46 network monitor debugging, dev tools, firefox, guide, networking, tools, l10n:priority the network monitor shows you all the network requests firefox makes (for example, when it loads a page, or due to xmlhttprequests), how long each request takes, and details of each request.
... 50 network request details 110n:priority, debugging, dev tools, firefox, guide, networking, tools the request details pane appears when you click on a network request in the request list.
... this pane provides more detailed information about the request.
...And 3 more matches
Cache.keys() - Web APIs
WebAPICachekeys
the requests are returned in the same order that they were inserted.
... note: requests with duplicate urls but different headers can be returned if their responses have the vary header set on them.
... syntax cache.keys(request, {options}).then(function(keys) { // do something with your array of requests }); parameters request optional the request want to return, if a specific key is desired.
...And 3 more matches
CacheStorage - Web APIs
use cachestorage.match() to check if a given request is a key in any of the cache objects that the cachestorage object tracks.
... methods cachestorage.match() checks if a given request is a key in any of the cache objects that the cachestorage object tracks, and returns a promise that resolves to that match.
...we construct a custom response like so: check whether a match for the request is found in the cachestorage.
...And 3 more matches
Advanced animations - Web APIs
again, window.requestanimationframe() helps us to control the animation.
...ll = { x: 100, y: 100, vx: 5, vy: 2, radius: 25, color: 'blue', draw: function() { ctx.beginpath(); ctx.arc(this.x, this.y, this.radius, 0, math.pi * 2, true); ctx.closepath(); ctx.fillstyle = this.color; ctx.fill(); } }; function draw() { ctx.clearrect(0,0, canvas.width, canvas.height); ball.draw(); ball.x += ball.vx; ball.y += ball.vy; raf = window.requestanimationframe(draw); } canvas.addeventlistener('mouseover', function(e) { raf = window.requestanimationframe(draw); }); canvas.addeventlistener('mouseout', function(e) { window.cancelanimationframe(raf); }); ball.draw(); boundaries without any boundary collision testing our ball runs out of the canvas quickly.
...; ctx.fillstyle = this.color; ctx.fill(); } }; function draw() { ctx.clearrect(0,0, canvas.width, canvas.height); ball.draw(); ball.x += ball.vx; ball.y += ball.vy; if (ball.y + ball.vy > canvas.height || ball.y + ball.vy < 0) { ball.vy = -ball.vy; } if (ball.x + ball.vx > canvas.width || ball.x + ball.vx < 0) { ball.vx = -ball.vx; } raf = window.requestanimationframe(draw); } canvas.addeventlistener('mouseover', function(e) { raf = window.requestanimationframe(draw); }); canvas.addeventlistener('mouseout', function(e) { window.cancelanimationframe(raf); }); ball.draw(); acceleration to make the motion more real, you can play with the velocity like this, for example: ball.vy *= .99; ball.vy += .25; this slows down the vertical veloc...
...And 3 more matches
Introduction to the File and Directory Entries API - Web APIs
the file and directory entries api can use different storage types an application can request temporary or persistent storage.
...you send requests for operations to happen, and get notified by callbacks.
...the asynchronous api has the following global methods: requestfilesystem() and resolvelocalfilesystemurl().
...And 3 more matches
HTMLIFrameElement.referrerPolicy - Web APIs
no referrer information is sent along with requests.
... 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.
...And 3 more matches
HTMLScriptElement.referrerPolicy - Web APIs
no referrer information is sent along with requests.
... 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.
...And 3 more matches
Ajax navigation example - Web APIs
second example</a> | <a class="ajax-nav" href="third_page.php">third example</a> | <a class="ajax-nav" href="unexisting.php">unexisting page</a> ] </p> include/header.php: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="js/ajax_nav.js"></script> <link rel="stylesheet" href="css/style.css" /> js/ajax_nav.js: "use strict"; const ajaxrequest = new (function () { function closereq () { oloadingbox.parentnode && document.body.removechild(oloadingbox); bisloading = false; } function abortreq () { if (!bisloading) { return; } oreq.abort(); closereq(); } function ajaxerror () { alert("unknown error."); } function ajaxload () { var vmsg, nstatus = this.
..."&" + sviewkey + "=" + 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 === sajaxclass) { requestpage(this.href); return false; } return true; } function init () { opageinfo.title = document.title; history.replacestate(opageinfo, opageinfo.title, opageinfo.url); for (var olink, nidx = 0, nlen = document.links.length; nidx < nlen; document.links[nidx++].onclick = processlink); } const /* customizable constants */ stargetid = "ajax-content", sviewkey = "view_as", sajaxclass = "ajax-nav", /* not customizable constants */ rsearch =...
...And 3 more matches
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
the update() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.
... syntax var anidbrequest = myidbcursor.update(value); parameters value the new value to be stored at the current position.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 3 more matches
IDBFactory - Web APIs
methods idbfactory.open the current method to request opening a connection to a database.
... idbfactory.deletedatabase a method to request the deletion of a database.
... example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
...And 3 more matches
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
the count() method of the idbindex interface returns an idbrequest object, and in a separate thread, returns the number of records within a key range.
... syntax var request = myindex.count(); var request = myindex.count(key); parameters key optional the key or key range that identifies the record to be counted.
... return value a idbrequest object on which subsequent events related to this operation are fired.
...And 3 more matches
IDBObjectStore.clear() - Web APIs
the clear() method of the idbobjectstore interface creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
... syntax var request = objectstore.clear(); returns an idbrequest object on which subsequent events related to this operation are fired.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 3 more matches
IDBObjectStore.getKey() - Web APIs
the getkey() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns the key selected by the specified query.
... if a key is successfully found, then a structured clone of it is created and set as the result of the request object.
... syntax var request = objectstore.getkey(key); parameters key the key or key range that identifies the record to be retrieved.
...And 3 more matches
IndexedDB API - Web APIs
this method returns an idbrequest object; asynchronous operations communicate to the calling application by firing events on idbrequest objects.
... idbopendbrequest represents a request to open a database.
... idbrequest generic interface that handles database requests and provides access to results.
...And 3 more matches
LockedFile - Web APIs
returns a filerequest.
...returns a filerequest object.
...returns a filerequest object.
...And 3 more matches
MerchantValidationEvent - Web APIs
the merchantvalidationevent interface of the the payment request api enables a merchant to verify themselves as allowed to use a particular payment handler.
... constructor merchantvalidationevent() secure context creates a new merchantvalidationevent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant.
...this may be either one of the standard payment method identifier strings or a url that both identifies and handles requests for the payment handler, such as https://apple.com/apple-pay.
...And 3 more matches
Navigator - Web APIs
WebAPINavigator
navigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object navigator.mediacapabilities read only returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities.
... navigator.credentials returns the credentialscontainer interface which exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out.
... navigator.mediadevices returns a reference to a mediadevices object which can then be used to get information about available media devices (mediadevices.enumeratedevices()), find out what constrainable properties are supported for media on the user's computer and user agent (mediadevices.getsupportedconstraints()), and to request access to media using mediadevices.getusermedia().
...And 3 more matches
PaymentResponse.details - Web APIs
this data is returned by the payment app that satisfies the payment request, and must conform to the structure defined in the basiccardresponse dictionary.
... syntax var detailsobject = paymentresponse.details; example the following example extracts the details from the paymentresponse object to the promise returned from paymentrequest.show().
... 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.
...And 3 more matches
Response.type - Web APIs
WebAPIResponsetype
cors: response was received from a valid cross-origin request.
... opaque: response for “no-cors” request to cross-origin resource.
... opaqueredirect: the fetch request was made with redirect: "manual".
...And 3 more matches
Using the Storage Access API - Web APIs
the storage access api should be used by embedded cross-origin documents to verify whether they have access to their first-party storage and, if not, to request access.
... usage notes the storage access api is designed to allow embedded content to request access to storage that would otherwise be blocked when a user’s browser is set to block all third-party cookies.
... first of all, if the <iframe> is sandboxed, the embedding website needs to add the allow-storage-access-by-user-activation sandbox token to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
...And 3 more matches
Streams API - Web APIs
for example, the response body returned by a successful fetch request can be exposed as a readablestream, and you can then read it using a reader created with readablestream.getreader(), cancel it with readablestream.cancel(), etc.
...a fetch request).
... extensions to other apis request when a new request object is constructed, you can pass it a readablestream in the body property of its requestinit dictionary.
...And 3 more matches
WebXR application life cycle - Web APIs
when the user requests the activation of webxr functionality by engaging with the user interface enabled above, request an xrsession using the desired mode.
... this is done by calling navigator.xr.requestsession(), again specifying the string indicating the mode you want to enable: inline, immersive-vr, or immersive-ar.
... if the promise returned by requestsession() resolves, use the new xrsession to manage the webxr session for the duration of the webxr experience.
...And 3 more matches
Window - Web APIs
WebAPIWindow
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
... window.cancelanimationframe() enables you to cancel a callback previously scheduled with window.requestanimationframe.
... window.cancelidlecallback() enables you to cancel a callback previously scheduled with window.requestidlecallback.
...And 3 more matches
init() - Web APIs
[noscript] void init( in nsiprincipal principal, in nsiscriptcontext scriptcontext, in nsiglobalobject globalobject, in nsiuri baseuri, [optional] in nsiloadgroup loadgroup ); parameters principal the principal to use for the request; this must not be null.
... scriptcontext the script context to use for the request; this must not be null.
... globalobject the object to use as the global for our request.
...And 3 more matches
XRRigidTransform.position - Web APIs
example to create a reference space which can be used to place an object at eye level (assuming eye level is 1.5 meters): function onsessionstarted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }).catch(() => { session.requestreferencespace("local-floor").then(refspacecreated); }); } else { session.requestreferencespace("viewer").then(refspacecreated); } } function refspacecreated(refspace) { if (immersivesession) { xrreferencespace = refspace; } else { xrreferencespac...
...e = refspace.getoffsetreferencespace( new xrrigidtransform({y: -1.5}); ); } xrsession.requestanimationframe(onframe); } after setting up the graphics context for webxr use, this begins by looking to see if a variable immersivesession is true; if so, we first request a bounded-floor reference space.
... if that fails (probably because bounded-floor isn't supported), we try requesting a local-floor reference space.
...And 3 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... allowfullscreen set to true if the <iframe> can activate fullscreen mode by calling the requestfullscreen() method.
... allowpaymentrequest set to true if a cross-origin <iframe> should be allowed to invoke the payment request api.
...And 3 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
... resources that javascript can request, like json, imported scripts, or web workers.
... store in the cache for future requests, reusing the resource if appropriate.
...And 3 more matches
List of default Accept values - HTTP
this is typically used for requests initiated via the address bar of a browser, or via an html <a> element.
... edge text/html, application/xhtml+xml, image/jxr, */* opera text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 values for an image when requesting an image, like through an html <img> element, user-agent often sets a specific list of media types to be welcomed.
... safari */* chrome image/webp,image/apng,image/*,*/*;q=0.8 source internet explorer 8 or earlier */* see ie and the accept header (ieinternals' msdn blog) internet explorer 9 image/png,image/svg+xml,image/*;q=0.8, */*;q=0.5 see fiddler is better with internet explorer 9 (ieinternals' msdn blog) values for a video when a video is requested, via the <video> html element, most browsers use specific values.
...And 3 more matches
Expect - HTTP
WebHTTPHeadersExpect
the expect http request header indicates expectations that need to be fulfilled by the server in order to properly handle the request.
... for example, the server may reject a request if its content-length is too large.
... header type request header forbidden header name yes syntax no other expectations except "100-continue" are specified currently.
...And 3 more matches
If-Match - HTTP
WebHTTPHeadersIf-Match
the if-match http request header makes the request conditional.
... for get and head methods, the server will send back the requested resource only if it matches one of the listed etags.
... there are two common use cases: for get and head methods, used in combination with a range header, it can guarantee that the new ranges requested comes from the same resource than the previous one.
...And 3 more matches
If-None-Match - HTTP
the if-none-match http request header makes the request conditional.
... for get and head methods, the server will send back the requested resource, with a 200 status, only if it doesn't have an etag matching the given ones.
... for other methods, the request will be processed only if the eventually existing resource's etag doesn't match any of the values listed.
...And 3 more matches
Upgrade - HTTP
WebHTTPHeadersUpgrade
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 had not been sent (for example, with a  200 ok).
...And 3 more matches
Intl - JavaScript
locale identification and negotiation the internationalization constructors as well as several language sensitive methods of other constructors (listed under see also) use a common pattern for identifying locales and determining the one they will actually use: they all accept locales and options arguments, and negotiate the requested locale(s) against the locales they support using an algorithm specified in the options.localematcher property.
... locales argument the locales argument requests that a particular locale (or a locale from a list of them) be considered for use in a given operation.
...javascript internationalization functions use the "u" (unicode) extension, which can be used to request additional customization of collator, numberformat, or datetimeformat objects.
...And 3 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache already).
... we can control what is requested from the server and what is retrieved from the cache with a service worker, which will be explained in detail in the next article — for now let's focus on the structure itself.
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa"> fork js13kpwa on github</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com"> andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains basic information about the app, including its title, descrip...
...And 3 more matches
indexed-db - Archive of obsolete content
for example: window.indexeddb = window.indexeddb || window.webkitindexeddb || window.mozindexeddb || window.msindexeddb; var request = window.indexeddb.open("mydatabase"); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; because your main add-on code can't access the dom, you can't do this.
... so you can use the indexed-db module to access the same api: var { indexeddb } = require('sdk/indexed-db'); var request = indexeddb.open('mydatabase'); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; most of the objects that implement the indexeddb api, such as idbtransaction, idbopendbrequest, and idbobjectstore, are accessible through the indexeddb object itself.
... var { indexeddb, idbkeyrange } = require('sdk/indexed-db'); var database = {}; database.onerror = function(e) { console.error(e.value) } function open(version) { var request = indexeddb.open("stuff", version); request.onupgradeneeded = function(e) { var db = e.target.result; e.target.transaction.onerror = database.onerror; if(db.objectstorenames.contains("items")) { db.deleteobjectstore("items"); } var store = db.createobjectstore("items", {keypath: "time"}); }; request.onsuccess = function(e) { database.db = e.target.res...
...And 2 more matches
Progress Listeners - Archive of obsolete content
example create an object which implements nsiwebprogresslistener: const state_start = ci.nsiwebprogresslistener.state_start; const state_stop = ci.nsiwebprogresslistener.state_stop; var mylistener = { queryinterface: xpcomutils.generateqi(["nsiwebprogresslistener", "nsisupportsweakreference"]), onstatechange: function(awebprogress, arequest, aflag, astatus) { // if you use mylistener for more than one tab/window, use // awebprogress.domwindow to obtain the tab/window which triggers the state change if (aflag & state_start) { // this fires when the load event is initiated } if (aflag & state_stop) { // this fires when the load finishes } }, onlocationcha...
...nge: function(aprogress, arequest, auri) { // this fires when the location bar changes; that is load event is confirmed // or when the user switches tabs.
... }, // for definitions of the remaining functions see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } attach the progress listener to a <browser> or a <tabbrowser> element using addprogresslistener, for example for firefox put the following code in a load listener of a main window: gbrowser.addprogresslistener(mylistener); when used with a browser, the second argument is a mask which determines the type of events that will be received.
...And 2 more matches
Enhanced Extension Installation - Archive of obsolete content
the composite datasource handles all read-only information requests, and when data must be written the extension manager determines the appropriate datasource to write and flush to.
... the model looks something like this: nsextensionsdatasource.prototype = { _composite // the composite that manages the two // datasources at the install locations for // read-only information requests _profileextensions // the rdf/xml datasource for the items at the // profile install location _globalextensions // the rdf/xml datasource for the items at the // global install location.
...on the next restart, the xredirprovider now supplies a list of directories to requesting systems listing the new item's components, defaults and chrome manifests.
...And 2 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.addeventlistener("myextensionevent", function(e...
... chromium-like messaging: json request with json callback web page: <html> <head> <script> var something = { send_request: function(data, callback) { // analogue of chrome.extension.sendrequest var request = document.createtextnode(json.stringify(data)); request.addeventlistener("something-response", function(event) { request.parentnode.removechild(request); if (callb...
...ack) { var response = json.parse(request.nodevalue); callback(response); } }, false); document.head.appendchild(request); var event = document.createevent("htmlevents"); event.initevent("something-query", true, false); request.dispatchevent(event); }, callback: function(response) { return alert("response: " + (response ?
...And 2 more matches
Supporting search suggestions in search plugins - Archive of obsolete content
if the user continues to type, a new set of suggestions is requested from the search engine, and the displayed list is refreshed.
... 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.
...this enhancement request - the handling of a selected suggestion, namely calling of a full specified url as proposed in the opensearch standard - is tracked in bug 386591.
...And 2 more matches
Index of archived content - Archive of obsolete content
high-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader chrome console/plain-text ...
...ting a help content pack helper apps (and a bit of save as) hidden prefs how to write and land nanojit patches io guide/directory keys introducing the audio api extension isp data java in firefox extensions javascript os.shared javascript crypto crmf request object generatecrmfrequest() importusercertificates popchallengeresponse jetpack basics content page modifications extenders jetpack snippets libraries ...
... tamarin build system documentation tamarin releases tamarin-central rev 703:2cee46be9ce0 tamarin roadmap tamarin build documentation tamarin mercurial commit hook the download manager schema the life of an html http request the new nsstring class implementation (1999) tracevis transforming xml with xslt:mozilla xslt transforming xml with xslt:the netscape xslt treehydra treehydra build instructions treehydra manual tuning pageload urischeme uris and urls uri...
...And 2 more matches
MMgc - Archive of obsolete content
this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and urlstreams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, urlstream and urlstreamsecurity).
...furthermore we can run this check even more frequently than every mark increment, for instance every time our gc memory allocators request a new block from our primary allocator (the way our extremely helpful greedy collection mode works).
...so the frequency of the incremental marking will be based on two factors: the rate at which we can trace memory and the rate at which the mutator is requesting more memory.
...And 2 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
autoconfig directives here we want to set users central mail preferences: create one account from their login name, get their email address from an ldap request and set the enterprise imap and smtp servers.
... build install mercurial tools [root@b008-02 ~]# yum install mercurial installed: mercurial.i586 0:1.2.1-1.fc11 check merge tools in [root@b008-02 ~]# vim /etc/mercurial/hgrc.d/mergetools.rc get the source comm-central [root@b008-02 moz]# time hg clone http://hg.mozilla.org/comm-central/ commsrc requesting all changes adding changesets adding manifests adding file changes added 2975 changesets with 16793 changes to 7117 files (+3 heads) updating working directory 5644 files updated, 0 files merged, 0 files removed, 0 files unresolved real 0m40.771s user 0m9.284s sys 0m1.304s [root@b008-02 commsrc]# python client.py checkout executing command: ['hg', 'pull', '-r', './.', '-r', 'tip'...
...executing command: ['hg', 'clone', 'http://hg.mozilla.org/releases/mozilla-1.9.1/', './mozilla'] requesting all changes adding changesets ...
...And 2 more matches
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
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.
... 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.
...And 2 more matches
XUL Events - Archive of obsolete content
the event handler should be placed on an observer.checkboxstatechangethe checkboxstatechange event is executed when the state of a <checkbox> element has changed.closethe close event is executed when a request has been made to close the window when the user presses the close button.commandthe command event is executed when an element is activated.commandupdatethe commandupdate event is executed when a command update occurs on a <commandset>.
... attribute: onbroadcast close this event is sent when a request has been made to close the window when the user presses the close button.
... attribute: oncommandupdate contextmenu this event is sent to an element when the user requests to open the context menu for the element.
...And 2 more matches
NPByteRange - Archive of obsolete content
syntax typedef struct _npbyterange { int32 offset; /* negative offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: offset offset in bytes to the start of the requested range.
... next points to the next npbyterange request in the list of requests, or null if this is the last request.
...the only plug-in api call that uses the npbyterange type is npn_requestread(), which lets the plug-in read specified parts of a file without downloading it.
...And 2 more matches
Table Reflow Internals - Archive of obsolete content
absolutely positioned elements) reflows reflowee and passes a reflow state (in) and a reflow metrics (in/out) review of reflow the reflow state: is a node in a tree structurally equivalent to the frame tree of reflow participants contains: reflow type, avail size, various computed values, resolved style structs possible request for preferred size and more.
... review of reflow the reflow metrics contains: max element size (if requested) - the minimum size it can be preferred size (if requested) - the size it would like to be given no size constraints.
...tablecaption frame ↙ ↘ ↓ nstablecol groupframe nstablerow groupframe nsblockframe ↓ ↓ nstablecol frame nstablerow frame ↓ nstablecell frame ↓ nsblock frame table reflow outer table reflows table and caption (if present) table reflows row groups in multiple passes pass 1 - unconstrained width, height and requests max elem width.
...And 2 more matches
MDN Web Docs Glossary: Definitions of Web-related terms
r cipher suite ciphertext class client hints closure cms code splitting codec compile compile time computer programming conditional constant constructor continuous media control flow cookie copyleft cors cors-safelisted request header cors-safelisted response header crawler crlf cross axis cross-site scripting crud cryptanalysis cryptographic hash function cryptography csp csrf css css object model (cssom) css pixel css preprocessor d data structure decr...
... ecma ecmascript effective connection type element empty element encapsulation encryption endianness engine entity entity header event exception expando f fallback alignment falsy favicon fetch directive fetch metadata request header firefox os firewall first contentful paint first cpu idle first input delay first interactive first meaningful paint first paint first-class function flex flex container flex item flexbox forbidden header name forbidden response header name fork ...
... packet page load time page prediction parameter parent object parse parser pdf perceived performance percent-encoding php pixel placeholder names plaintext png polyfill polymorphism pop3 port prefetch preflight request prerender presto primitive privileged privileged code progressive enhancement progressive web apps promise property property (css) property (javascript) protocol prototype prototype-based programming proxy server pseudo-class pseudo-element ...
...And 2 more matches
What is web performance? - Learn web development
a general strategy is to make your files as small as possible, reduce the number of http requests made as much as possible, and employ clever loading techniques (such as preload) to make files available sooner.
... to summarize, many features impact performance including latency, application size, the number of dom nodes, the number of resource requests made, javascript performance, cpu load, and more.
...when you request a url and hit enter / return, the browser finds out where the server is that holds that website's files, establishes a connection to it, and requests the files.
...And 2 more matches
Performance
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?
...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.
...: // addon.js services.mm.loadframescript("framescript.js", /*delayed:*/ true) // stuff communicating with the framescript // framescript.js function onlyonceinabluemoon() { // we only need this during a total solar eclipse while goat blood rains from the sky sendasyncmessage('my-addon:paragraph-count', {num: content.document.queryselectorall('p').length}) } addmessagelistener("my-addon:request-from-parent", onlyonceinabluemoon) better: // addon.js function ontoolbarbutton(event) { let tabmm = gbrowser.mcurrentbrowser.frameloader.messagemanager; let button = event.target; let callback = (message) => { tabmm.removemessagelistener("my-addon:paragraph-count", callback) decoratebutton(button, message.data.num) } tabmm.addmessagelistener("my-addon:paragraph-count", callb...
...And 2 more matches
NSS_3.12_release_notes.html
bug 414985: crash in pkix_pl_ocsprequest_destroy bug 421870: strsclnt crashed in pkix tests.
... all the generalnames in a crldp extension bug 398019: correct confusing and erroneous comments in der_asciitotime bug 422866: vfychain -pp command crashes in nss_shutdown bug 345779: useless assignment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() returns wrong certificate if multiple certs with same subject available bug 404919: memory leak in sftkdb_readsecmoddb() (sftkmod.c) bug 406120: allow application to specify ocsp timeout bug 361025: support for camellia cipher suites to tls rfc4132 bug 376417: pk11_generatekeypair needs to get the key usage from t...
...ts bug 426245: assertion failure went undetected by tinderbox bug 158242: pk11_putcrl is very memory inefficient bug 287563: please make cert_comparenamewithconstraints a non-static function bug 301496: nss_shutdown failure in p7sign bug 324878: crlutil -l outputs false crl names bug 337010: oom crash [[@ nsc_digestkey] dereferencing possibly null att bug 343231: certutil issues certs for invalid requests bug 353371: klocwork 91117 - null pointer dereference in cert_certchainfromcert bug 353374: klocwork 76494 - null ptr derefs in cert_formatname bug 353375: klocwork 76513 - null ptr deref in nsscertificatelist_docallback bug 353413: klocwork 76541 free uninitialized pointer in cert_findcerturlextension bug 353416: klocwork 76593 null ptr deref in nsscryptokiprivatekey_setcertificate bug 353423: ...
...And 2 more matches
NSS 3.15 release notes
nss 3.15 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_15_rtm/src/ new in nss 3.15 new functionality support for ocsp stapling (rfc 6066, certificate status request) has been added for both client and server sockets.
... 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.
...And 2 more matches
NSS 3.35 release notes
applications using nss may explicitly request to use a specific database format, by adding a type prefix to the database directory, provided at nss initialization time.
... if the server sends a helloretryrequest, it is possible to discard the server socket, and make a new socket to handle any subsequent clienthello.
... tls servers can screen new tls 1.3 connections, as they are made using the experimental ssl_helloretryrequestcallback function.
...And 2 more matches
JS_ClearContextThread
there must not be any active or suspended requests using this context.
... each request runs from start to finish on a single thread.
...this is the first thing thread b does with the context, before beginning a request.
...And 2 more matches
JS_SetOperationCallback
these methods/types are renamed to js_setinterruptcallback, js_getinterruptcallback, js_requestinterruptcallback and jsinterruptcallback in spidermonkey 30.
... provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
...And 2 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
from the nsistreamlistener interface, the .ondataavailable(request, context, inputstream, offset, count) method gives you the input stream and the number of bytes available.
...from the nsirequestobserver interface, the .onstartrequest(request, context) method tells you when the request begins, while the .onstoprequest(request, context) method tells you when the request ends.
... a request will have one .onstartrequest(request, context) call, followed by at least one .ondataavailable(...) call, followed by one .onstoprequest(request, context) call.
...And 2 more matches
nsICacheSession
inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentriesifexpired prbool expired entries will ...
...void asyncopencacheentry( in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait ); parameters key the key for cache entry.
... accessrequested the requested access.
...And 2 more matches
nsICharsetResolver
inherits from: nsisupports last changed in gecko 1.7 method overview void notifyresolvedcharset(in acstring charset, in nsisupports closure); acstring requestcharset(in nsiwebnavigation awebnavigation, in nsichannel achannel, out boolean awantcharset, out nsisupports aclosure); methods notifyresolvedcharset() some implementations may request that they be notified when the charset is actually detected.
...closure the closure returned by requestcharset().
... requestcharset() called to resolve the charset that should be used for parsing the document being loaded from achannel.
...And 2 more matches
Component; nsIPrefBranch
return value the value of the requested boolean preference.
... return value returns string - the value of the requested string preference.
... return value returns utf8tring - the value of the requested string preference.
...And 2 more matches
nsIWebNavigation
this will give priority to loading the requested uri in the object implementing this interface.
... postdata if the uri corresponds to a http request, then this stream is appended directly to the http request headers.
...this stream must contain a \r\n sequence separating any http headers from the http request body.
...And 2 more matches
nsIWindowMediator
var {cc: classes, ci: interfaces} = components; var windowlistener = { onopenwindow: function (awindow) { // wait for the window to finish loading let domwindow = awindow.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidomwindowinternal || ci.nsidomwindow); domwindow.addeventlistener("load", function () { domwindow.removeeventlistener("load", arguments.callee, false); //this removes this load function from the window //window has now loaded now do stuff to it //as example this will add a function to listen to tab select and will fire alert in tha...
... inposition requested position one of the zlevel constants.
... windowmediator = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); if (!windowmediator.getouterwindowwithid) { windowmediator.getouterwindowwithid = function (aouterwindowid) { let win = this.getmostrecentwindow(); let winutil = win.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); return winutil.getouterwindowwithid(aouterwindowid); } } getxulwindowenumerator() identical to getenumerator() except it returns nsixulwindow instead of nsidomwindow.
...And 2 more matches
nsIWindowsRegKey
astring getchildname( in unsigned long index ); parameters index the index of the requested child key.
...astring getvaluename( in unsigned long index ); parameters index the index of the requested value.
...boolean haschild( in astring name ); parameters name the name of the requested child key.
...And 2 more matches
Mozilla
bugzilla bugzilla.mozilla.org (often abbreviated b.m.o) is mozilla.org's bug-tracking system, a database for recording bugs and enhancement requests for firefox, thunderbird, seamonkey, camino, and other mozilla.org projects.
...these are memory allocation routines that never return null; that is, they always successfully return the requested block of memory.
... this is in contrast to a traditional, fallible memory allocator that can return null indicating that the request failed.
...And 2 more matches
Browser Side Plug-in API - Plugins
npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets notification of the result.
... npn_memflush requests that the browser free a specified amount of memory.
... npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
...And 2 more matches
Gecko Plugin API Reference - Plugins
npn_geturlnotify requests creation of a new stream with the contents of the specified url; gets notification of the result.
... npn_memflush requests that the browser free a specified amount of memory.
... npn_newstream requests the creation of a new data stream produced by the plug-in and consumed by the browser.
...And 2 more matches
Network monitor toolbar - Firefox Developer Tools
(prior to firefox 77, this toolbar was arranged somewhat differently.) it provides: an icon to clear the network request list.
... a box enabling you to filter requests by url and by properties.
... a set of tool icons: pause (or resume) recording network log search the log request blocking an array of buttons to filter the network request list by type: by the content type of the response xhr requests websocket upgrades and messages (labeled ws) other requests a checkbox that allows you to disable caching.
...And 2 more matches
AbortController.abort() - Web APIs
the abort() method of the abortcontroller interface aborts a dom request (e.g.
... a fetch request) before it has completed.
... this is able to abort fetch requests, consumption of any response body, and streams.
...And 2 more matches
AbortSignal - Web APIs
the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
... abortsignal.aborted read only a boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not (false).
... abort invoked when the dom request(s) the signal is communicating with is/are aborted.
...And 2 more matches
BaseAudioContext.decodeAudioData() - Web APIs
in this case the arraybuffer is loaded from xmlhttprequest and filereader.
... syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
... older callback syntax in this example, the getdata() function uses xhr to load an audio track, setting the responsetype of the request to arraybuffer so that it returns an array buffer as its response that we then store in the audiodata variable .
...And 2 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.
...And 2 more matches
Cache.addAll() - Web APIs
WebAPICacheaddAll
the request objects created during retrieval become keys to the stored response operations.
... note: addall() will overwrite any key/value pairs previously stored in the cache that match the request, but will fail if a resulting put() operation would overwrite a previous cache entry stored by the same addall() method.
... syntax cache.addall(requests[]).then(function() { // requests have been added to the cache }); parameters requests an array of string urls that you want to be fetched and added to the cache.
...And 2 more matches
FileHandle API - Web APIs
api overview this api is based on the following interfaces: idbdatabase.mozcreatefilehandle (was called idbdatabase.mozcreatefilehandle.) idbmutablefile (was previously filehandle.) lockedfile filerequest it also has connections with the file api, especially the file and blob interfaces.
...for example, there are many apis that expect blob or file objects such as filereader (which can be easier to use to read the whole file) or xmlhttprequest.
... var mysnapshot = null; var request = myfilehandle.getfile(); request.onsuccess = function () { mysnapshot = this.result; } managing progress all the methods from the lockedfile interface return a filerequest object.
...And 2 more matches
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
the delete() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.
... syntax myidbcursor.delete(); returns an idbrequest object on which subsequent events related to this operation are fired.
...if the albumtitle of the current cursor is "grace under pressure", we delete that entire record using var request = cursor.delete();.
...And 2 more matches
IDBDatabase: error event - Web APIs
the error event is fired on idbdatabase when a request returns an error and the event bubbles up to the connection object.
... bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: f...
...alse }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const db = dbopenrequest.result; db.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); const objectstore = transaction.objectstore('todolist'); const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlis...
...And 2 more matches
IDBDatabase.onerror - Web APIs
the onerror event handler of the idbdatabase interface handles the error event, fired when a request returns an error and bubbles up to the connection object.
... note: consider using idbopendbrequest.onsuccess instead (see idbrequest.onsuccess, where it is inherited from).
...} example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
...And 2 more matches
IDBDatabase - Web APIs
error fired when a request returns an error and the event bubbles up to the connection object.
... versionchange fired when a database structure change was requested.
...for a complete working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the idbdatabase object, // when the database is opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variab...
...And 2 more matches
IDBObjectStore.count() - Web APIs
the count() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns the total number of records that match the provided key or idbkeyrange.
... syntax var request = objectstore.count(); var request = objectstore.count(query); parameters query optional a key or idbkeyrange object that specifies a range of records you want to count.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 2 more matches
IDBObjectStore.openCursor() - Web APIs
the opencursor() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns a new idbcursorwithvalue object.
... syntax var request = objectstore.opencursor(); var request = objectstore.opencursor(query); var request = objectstore.opencursor(query, direction); parameters query optional a key or idbkeyrange to be queried.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 2 more matches
IDBTransaction.abort() - Web APIs
all pending idbrequest objects created during this transaction have their idbrequest.error attribute set to aborterror.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...And 2 more matches
IDBTransaction.error - Web APIs
it can be a reference to the same error as the request object that raised it, or a transaction failure (for example quotaexceedederror or unknownerror).
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.error +...
...And 2 more matches
IDBTransaction: error event - Web APIs
the error event is fired on idbtransaction when a request returns an error and the event bubbles up to the transaction object.
... bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: f...
...alse }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); transaction.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of ...
...And 2 more matches
IDBTransaction.onerror - Web APIs
the onerror event handler of the idbtransaction interface handles the error event, fired when a request returns an error and bubbles up to the transaction object.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.error +...
...And 2 more matches
Lock - Web APIs
WebAPILock
the lock interface of the the web locks api provides the name and mode of a previously requested lock, which is received in the callback to lockmanager.request().
... properties lock.mode read only returns the access mode passed to lockmanager.request() when the lock was requested.
... lock.name read only returns the name passed to lockmanager.request() when the lock was requested.
...And 2 more matches
Navigator.sendBeacon() - Web APIs
ensuring that data has been sent during the unloading of a document has traditionally been difficult, because user agents typically ignore asynchronous xmlhttprequests made in an unload handler.
... historically, this was addressed with some of the following workarounds to delay the page unload long enough to send data to some url: submitting the data with a blocking synchronous xmlhttprequest call in unload or beforeunload event handlers.
... the following example shows theoretical analytics code that attempts to submit data to a server with a synchronous xmlhttprequest in an unload handler.
...And 2 more matches
PaymentResponse.onpayerdetailchange - Web APIs
the paymentresponse object's onpayerdetailchange property is an event handler which is called to handle the payerdetailchange event, which is sent to the paymentresponse when the user makes changes to their personal information while filling out a payment request form.
... syntax paymentresponse.onpayerdetailchange = eventhandlerfunction; value an event handler function which is called to handle the payerdetailchange event when the user makes changes to their personal information while editing a payment request form.
... examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
...And 2 more matches
PaymentResponse.payerEmail - Web APIs
this option is only present when the requestpayeremail option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... syntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
PerformanceTiming - Web APIs
performancetiming.fetchstart read only when the browser is ready to fetch the document using an http request.
... performancetiming.connectstart read only when the request to open a connection is sent to the network.
...if no such connection is requested, it returns 0.
...And 2 more matches
Permissions - Web APIs
permissions.request() requests permission to use a given api.
... permissions.requestall() requests permission to use a given set of apis.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
Resource Timing API - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to load a specific resource, such as an xmlhttprequest, <svg>, image, or script.
... the interface's properties create a resource loading timeline with high-resolution timestamps for network events such as redirect start and end times, dns lookup start and end times, request start, response start and end times, etc.
...the last three timestamps are, in order: requeststart - the timestamp before the browser starts requesting the resource from the server; responsestart - the timestamp after the browser receives the first byte of the response from the server; and responseend - the timestamp after the browser receives the last byte of the resource.
...And 2 more matches
Using the Screen Capture API - Web APIs
to request that the screen be shared with included audio, the options passed into getdisplaymedia() might look like this: const gdmoptions = { video: true, audio: true } this allows the user total freedom to select whatever they want, within the limits of what the user agent supports.
... capturing audio is always optional, and even when web content requests a stream with both audio and video, the returned mediastream may still have only one video track, with no audio.
... authorizing capture of display contents before streaming of captured screen contents can begin, the user agent will ask the user to confirm the sharing request, and to select the content to share.
...And 2 more matches
ServiceWorkerGlobalScope - Web APIs
additionally, synchronous requests are not allowed from within a service worker — only asynchronous requests, like those initiated via the fetch() method, can be used.
...this returns a promise that resolves to the response object representing the response to your request.
...when fired, the code returns a promise that resolves to the first matching request in the cache object.
...And 2 more matches
StorageManager.persist() - Web APIs
the persist() method of the storagemanager interface requests permission to use persistent storage, and returns a promise that resolves to true if permission is granted and box mode is persistent, and false otherwise.
...if you'd like to contribute to the data, please check out 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 non-standard name: requestpersistentedge full support ≤79firefox full support 55ie ?
...And 2 more matches
WebGL best practices - Web APIs
use webgl.flush() when not using requestanimationframe when not using raf, (such as when using rpaf; see below) use webgl.flush() to encourage eager execution of enqueued commands.
...even basic requests can take as long as 1ms, but they can take even longer if they need to wait for all graphics work to be completed (with an effect similar to glfinish() in native opengl).
... use requestpostanimationframe not requestanimationframe while it's well-known that apps should use requestanimationframe ("raf") instead of settimeout (et al) to redraw on-demand, what's less well-known is that non-trivial webgl apps should often not render within a raf callback.
...And 2 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
this means that most frequently, you'll be using poses within your frame rendering code, which is executed as a callback from the xrframe method requestanimationframe().
... the only way to obtain a pose that adapts positional information from one space to another is through the xrframe object received by your frame rendering callback function specified when you called the xrsession method requestanimationframe().
... for example, given an xrsession whose reference space is worldrefspace, the following line of code would request the first frame of animation to be scheduled: animationframerequestid = xrsession.requestanimationframe(mydrawframe); then, the mydrawframe() function—the callback executed when it's time to draw the frame—might be something like this: function mydrawframe(currentframetime, frame) { let session = frame.session; let viewerpose = frame.getviewerpose(viewerrefspace); animationframerequestid = session.requestanimationframe(mydrawframe); if (viewerpose) { /* ...
...And 2 more matches
Using Web Workers - Web APIs
in addition, they can perform i/o using xmlhttprequest (although the responsexml and channel attributes are always null).
...in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
... to specify a content security policy for the worker, set a content-security-policy response header for the request which delivered the worker script itself.
...And 2 more matches
window.cancelIdleCallback() - Web APIs
summary the window.cancelidlecallback() method cancels a callback previously scheduled with window.requestidlecallback().
... syntax window.cancelidlecallback(handle); parameters handle the id value returned by window.requestidlecallback() when the callback was established.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
XRPermissionDescriptor - Web APIs
the xrpermissiondescriptor's name must be set to xr in order to direct the permissions api to correctly handle the request as applying to webxr.
... mode an xrsessionmode value indicating the xr mode (inline, immersive-vr, or immersive-ar) for which the permissions are requested.
... optionalfeatures an array of strings, each specifying the name of a webxr feature which is requested but not required for the app to function.
...And 2 more matches
XRSession.cancelAnimationFrame() - Web APIs
the cancelanimationframe() method of the xrsession interface cancels an animation frame which was previously requested by calling requestanimationframe.
... syntax xrsession.cancelanimationframe(handle); parameters handle the unique value returned by the call to requestanimationframe() that previously scheduled the animation callback.
...once started, the session schedules its first frame to be rendered by calling requestanimationframe().
...And 2 more matches
Creating a cross-browser video player - Developer guides
to detect if a browser actually supports the fullscreen api and that it is enabled, the following may be called: var fullscreenenabled = !!(document.fullscreenenabled || document.mozfullscreenenabled || document.msfullscreenenabled || document.webkitsupportsfullscreen || document.webkitfullscreenenabled || document.createelement('video').webkitrequestfullscreen); this simply tests all the different prefixed (and of course the non-prefixed!) booleans to see if fullscreen is possible.
... the final tested value, document.createelement('video').webkitrequestfullscreen is required for the last presto version of opera (12.14).
...ction() { if (isfullscreen()) { if (document.exitfullscreen) document.exitfullscreen(); else if (document.mozcancelfullscreen) document.mozcancelfullscreen(); else if (document.webkitcancelfullscreen) document.webkitcancelfullscreen(); else if (document.msexitfullscreen) document.msexitfullscreen(); setfullscreendata(false); } else { if (videocontainer.requestfullscreen) videocontainer.requestfullscreen(); else if (videocontainer.mozrequestfullscreen) videocontainer.mozrequestfullscreen(); else if (videocontainer.webkitrequestfullscreen) videocontainer.webkitrequestfullscreen(); else if (videocontainer.msrequestfullscreen) videocontainer.msrequestfullscreen(); setfullscreendata(true); } } first of all the function checks if...
...And 2 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
if 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 allowed values are: anonymous sends a cross-origin request without a credential.
... use-credentials sends a cross-origin request with a credential.
...And 2 more matches
HTTP authentication - HTTP
the general http authentication framework rfc 7235 defines the http authentication framework, which can be used by a server to challenge a client request, and by a client to provide authentication information.
... a client that wants to authenticate itself with the server can then do so by including an authorization request header with the credentials.
... usually a client will present a password prompt to the user and will then issue the request including the correct authorization header.
...And 2 more matches
Access-Control-Allow-Origin - HTTP
the access-control-allow-origin response header indicates whether the response can be shared with requesting code from the given origin.
... header type response header forbidden header name no syntax access-control-allow-origin: * access-control-allow-origin: <origin> access-control-allow-origin: null directives * for requests without credentials, the literal value "*" can be specified, as a wildcard; the value tells browsers to allow requesting code from any origin to access the resource.
...if the server supports clients from multiple origins, it must return the origin for the specific client making the request.
...And 2 more matches
Cache-Control - HTTP
the cache-control http header holds directives (instructions) for caching in both requests and responses.
... a given directive in a request does not mean the same directive should be in the response.
...(see spec for definitions) cache request directives standard cache-control directives that can be used by the client in an http request.
...And 2 more matches
Content-Security-Policy - HTTP
sandbox enables a sandbox for the requested resource similar to the <iframe> sandbox attribute.
...these violation reports consist of json documents sent via an http post request to the specified uri.
... upgrade-insecure-requests instructs user agents to treat all of a site's insecure urls (those served over http) as though they have been replaced with secure urls (those served over https).
...And 2 more matches
Content-Type - HTTP
in requests, (such as post or put), the client tells the server what type of data is actually sent.
... header type entity header forbidden header name no cors-safelisted response header yes cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x08 (tab)), "():<>?@[\]{}, and 0x7f (delete).
... examples content-type in html forms in a post request, resulting from an html form submission, the content-type of the request is specified by the enctype attribute on the <form> element.
...And 2 more matches
Host - HTTP
WebHTTPHeadersHost
the host request header specifies the host and port number of the server to which the request is being sent.
... if no port is included, the default port for the service requested (e.g., 443 for an https url, and 80 for an http url) is implied.
... a host header field must be sent in all http/1.1 request messages.
...And 2 more matches
Origin - HTTP
WebHTTPHeadersOrigin
the origin request header indicates where a fetch originates from.
...it is sent with cors requests, as well as with post requests.
... note: the origin header is not set on fetch requests with a method of head or get (this behavior was corrected in firefox 65 — see bug 1508661).
...And 2 more matches
Sec-Fetch-User - HTTP
the sec-fetch-user fetch metadata header indicates whether or not a navigation request was triggered by a user activation.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-user: ?0 sec-fetch-user: ?1 values the value is a boolean structured header.
... ?0 the navigation request was triggered by a user activation.
...And 2 more matches
SameSite cookies - HTTP
values the samesite attribute accepts three values: lax cookies are allowed to be sent with top-level navigations and will be sent along with get request initiated by third party website.
... strict cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.
... 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.
...And 2 more matches
HEAD - HTTP
WebHTTPMethodsHEAD
the http head method requests the headers that would be returned if the head request's url was instead requested with the http get method.
... for example, if a url might produce a large download, a head request could read its content-length header to check the filesize without actually downloading the file.
...if it has one anyway, that body must be ignored: any entity headers that might describe the erroneous body are instead assumed to describe the response which a similar get request would have received.
...And 2 more matches
Progressive web app structure - Progressive web apps (PWAs)
that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache already).
... we can control what is requested from the server and what is retrieved from the cache with a service worker, which will be explained in detail in the next article — for now let's focus on the structure itself.
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa">fork js13kpwa on github</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com">andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains some basic info like title, description and links to css, web manifest...
...And 2 more matches
Mixed content - Web security
if the attacker observes http requests to certain images, they could determine which webpage the user is visiting.
... passive content list this section lists all types of http requests which are considered passive content: <img> (src attribute) <audio> (src attribute) <video> (src attribute) <object> subresources (when an <object> performs http requests) mixed active content mixed active content is content that has access to all or parts of the document object model of the https page.
... in the mixed active content case, a man-in-the-middle attacker can intercept the request for the http content.
...And 2 more matches
Web security
the browser may store it and send it back with later requests to the same server.
... typically, it's used to tell if two requests came from the same browser — keeping a user logged-in, for example.
... http access-control-allow-origin the access-control-allow-origin response header indicates whether the response can be shared with requesting code from the given origin.
...And 2 more matches
Cross-domain Content Scripts - Archive of obsolete content
in particular, they can't: access content hosted in an iframe, if that content is served from a different domain make cross-domain xmlhttprequests however, you can enable these features for specific domains by adding them to your add-on's package.json under the "cross-domain-content" key, which itself lives under the "permissions" key: "permissions": { "cross-domain-content": ["http://example.org/", "http://example.com/"] } the domains listed must include the scheme and fully qualified domain name, and these must exactly match the domains serving the content - so in the example above, the content script will not be allowed to access content served from https://example.com/.
... cross-domain xmlhttprequest the following add-on creates a panel whose content is the summary weather forecast for shetland.
...sdk/ui/button/action").actionbutton({ id: "get-forecast", label: "get the forecast", icon: "./icon-16.png", onclick: function() { forecast_panel.show(); } }); the "panel.html" just includes a <div> block for the forecast: <!doctype html> <!-- panel.html --> <html> <head></head> <body> <div id="forecast_summary"></div> </body> </html> the "panel-script.js" uses xmlhttprequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/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(jsonrespo...
...nse); 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 available from pages.
passwords - Archive of obsolete content
so: if a web server at http://www.example.com requested authentication with a response code like this: http/1.0 401 authorization required server: apache/1.3.27 www-authenticate: basic realm="exampleco login" the corresponding values for the credential (excluding username and password) should be: url: "http://www.example.com" realm: "exampleco login" oncomplete and onerror this api is explicitly asynchronous, so all its functions take two c...
... realm string for http authentication credentials, the realm for which the credential was requested.
... realm string for http authentication credentials, the realm for which the credential was requested.
... realm string for http authentication credentials, the realm for which the credential was requested.
places/bookmarks - Archive of obsolete content
bookmark({ title: "mozilla", url: "http://mozilla.com", group: group }), bookmark({ title: "w3", url: "http://w3.org", group: group }) ]; save(bookmarks).on("data", function (item) { // this function will be called three times: // once for each bookmark saved // once for the new group specified implicitly // as the parent of the two items }); the data event is also called for search requests, with each result being passed individually into its own data event.
...the initial instance of the item that was used for the save request.
...the initial instance of the item that was used for the save request.
... arguments array : the array is an ordered list of the input bookmark items, replaced with their updated, latest snapshot instances (the first argument in the data handler), or in the case of an error, the initial instance of the item that was used for the save request (the second argument in the data or error handler).
HTML to DOM - Archive of obsolete content
although you can now natively parse html using domparser and xmlhttprequest, this is a new feature that is not yet supported by all browsers in use in the wild.
... safely parsing simple html to dom when using xmlhttprequest to get the html of a remote webpage, it is often advantageous to turn that html string into dom for easier manipulation.
... parsing complete html to dom loading an html document seems much simpler if it's loaded using the xmlhttprequest object.
... for that matter, we're going to load our html document first: var request = xmlhttprequest(); request.open("get", "http://example.org/file.html", false); request.send(null); our next step is to create the document object that will represent the dom into which we'll insert our newly-retrieved html: var doc = document.implementation.createhtmldocument("example"); doc.documentelement.innerhtml = request.responsetext; after this any manipulation that we might want to do will be something as simple as the following: doc.body.textcontent = "this is inside the body!"; using a hidden iframe element to parse html to a window's dom sample code may need more work.
Miscellaneous - Archive of obsolete content
simulating mouse and key events https://developer.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected text from browser.xul overlay context: var selectedtext = document.commanddispatcher.focusedwindow.getselection().tostring(); or: content.getselection(); // |window| object is implie...
...am;1"].createinstance(ci.nsibinaryinputstream); stream.setinputstream(postdata); var postbytes = stream.readbytearray(stream.available()); var poststr = string.fromcharcode.apply(null, postbytes); //do anything to your poststr alert(poststr); getting a string from the input stream is made somewhat simpler in firefox 4, by the addition of netutil.readinputstreamtostring() getting postdata of a request before the request is sent the above code will get the postdata for a page that has already loaded.
... to see what the postdata looks like before the request is even sent, use the 'http-on-modify-request' observer topic: observerservice.addobserver(observer, 'http-on-modify-request', false); where "observer" is an object that has a method "observe": function observe(subject, topic, data) { subject.queryinterface(components.interfaces.nsiuploadchannel); postdata = subject.uploadstream; } here again, postdata is not a string, but an nsiinputstream, so you can use the last code snippet of the previous section to get the data as a string.
... however, if you are not going to cancel the request, you need to "rewind" it by calling: postdata.queryinterface(ci.nsiseekablestream).seek(ci.nsiseekablestream.ns_seek_set, 0); adding custom certificates to a xulrunner application you need to ship a xulrunner application with your own ssl certificates?
Signing an XPI - Archive of obsolete content
certificate common name: xpi test organization: tjworld organization unit: software state or province: nottingham country (must be exactly 2 characters): gb username: tj email address: certificates@lan.tjworld.net generated public/private key pair certificate request generated certificate has been signed certificate "mytestcert" added to database exported certificate to x509.raw and x509.cacert.
...bug 321156 has been filed to request a way to obviate the installation of intermediate code signing ca certs into firefox.
... your browser will generate a new private key and code signing request (csr) in the background without you necessarily realising it.
...after completing the application process where i entered my details into the online application, i received an automated email requesting documentary evidence of my id in the form of a photo-id or similar.
JXON - Archive of obsolete content
if you have already have a dom tree from using xmlhttprequest, skip to the next paragraph.
... note: if you are using an instance of xmlhttprequest in order to retrieve your xml file, please use the yourrequest.responsexml property to get a parsed xml document.
... don't use yourrequest.responsetext!
... alert((new xmlserializer()).serializetostring(newdoc)); }; var oreq = new xmlhttprequest(); oreq.onload = reqlistener; oreq.open("get", "example.xml", true); oreq.send(); jxon.build syntax jxon.build(document[, verbosity[, freeze[, nesteattributes]]]) jxon.build description returns a javascript object based on the given xml document.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
we start with the request to load a particular link in a particular window, and proceed up to the point at which the data stream is dispatched to the proper handler.
...alt="(10) getcategoryentry()" coords="575,418,821,418,821,455,629,455,629,484,575,484" href="#categorymanager" shape="poly"> <area alt="(12)" coords="539,133,583,163" href="#stream-converter"> <area alt="(11)" coords="485,133,537,163" href="#contenthandler"> <area alt="(9)" coords="445,132,484,165" href="#nsdocumentopeninfo::dispatchcontent"> <area alt="(8)" coords="405,133,439,162" href="#onstartrequest-innards"> <area alt="(7) onstartrequest()" coords="639,129,703,129,703,165,833,165,833,204,639,204" href="#onstartrequest" shape="poly"> <area alt="(6) asyncopen()" coords="637,121,709,121,709,96,783,96,783,58,637,58" href="#asyncopen" shape="poly"> <area alt="(5) open()" coords="311,306,432,371" href="#open"> <area alt="(4)" coords="90,384,127,417" href="#openuri-innards"> <area alt="(0) registe...
... onstartrequest notification comes back from necko nsdocumentopeninfo::onstartrequest checks the response status code on the channel for http channels and drops the load on the floor if warranted (e.g.
...if it does so, we abort the entire dispatch process right here and cancel the necko request; we will not be getting a stream listener to stream data into, since the content handler has taken over completely.
Helper Apps (and a bit of Save As) - Archive of obsolete content
four primary tasks: sets up temporary file and instantiate the nsihelperapplauncherdialog in onstartrequest.
... nsexternalapphandler::onstartrequest creates a temporary file with a salted name to hold the data.
... nsexternalapphandler::onstoprequest set a flag that we're done, then do whatever the user wants if the user has decided (save to disk and open in helper are the current options the user has).
...checks happen in onstartrequest, in the helper app dialog, and as a last ditch in the launching code.
Twitter - Archive of obsolete content
in fact it's hardly more than syntactic sugar for doing xmlhttprequests.
...success is a function that's called when the request successfully completes, and error is a function called when it fails to complete.
... error(xmlhttprequest, textstatus, errorthrown) xmlhttprequest is the xhr used in the request.
...with this style you can use any of the various jquery.ajax() options in your request: data, success, complete, etc.
Tamarin build documentation - Archive of obsolete content
request a build via the form at http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm user email: your email address.
... description: self explanatory check the status of the build @ http://tamarin-builds.mozilla.org/tamarin-redux/ , you can also see your build request in the queue at http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm.
... if you no longer want you sandbox to build and it has not started yet, you can delete the build request from the queue from the request page.
... this is a shared resource, each request takes approximately 2+ hours to run so please use wisely.
Uploading and Downloading Files - Archive of obsolete content
this operation can also be performed via a script using the xmlhttprequest object.
... a formdata object will automatically generate request data with mime type multipart/form-data that existing servers can process.
...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.
... 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.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
a sliding panel will have the start (or end) position extended such that the panel can be the requested size, meaning the arrow will no longer be at the start (or end) of the panel - i.e., the arrow will appear to have been slid along the panel to ensure the arrow is still pointing at the anchor.
...this handler is usually used to dynamically set the contents when the user requests to display it.
...the panel may not appear on the side of the anchor that you requested in which case the arrow will automatically adjust.
... showing: a request has been made to open the popup, but it has not yet been shown.
Extentsions FAQ - Archive of obsolete content
these two links should give you a starting point: http://www..xulplanet.com/tutorials/...u/advmenu.html http://www.xulplanet.com/tutorials/x...dommodify.html request for a thunderbird extension that can automatically detect the default domain when composing e-mails via autodetect.
...x 24px 24px 0px);} to implement a third i would simply change add an attribute and the corresponding css see http://www.w3.org/tr/rec-css2/cascade.html#cascade friday, october 13 - 20, 2006 (↑ top) how to get a refenece to the sidebar window assuming you have chrome privileges, this should work: var ci = components.interfaces; var toplevelwindow = window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow) .queryinterface(ci.nsidomchromewindow); var sidebar = toplevelwindow.document.getelementbyid("sidebar"); alert(sidebar.contentdocument); is there anyone successfully using dojo in a firefox...
... what language does it require to write xpcom/xpconnect component that able to intercept,process and redirect http request?
...can "partial" data be read from the cache while the request is still in progress?how difficult is to write a firefox extensions that does intercetp, process and redirect http request?
NPN_PostURLNotify - Archive of obsolete content
url url of the post request, specified by the plug-in.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify call, which returns this value (see description below).
... npn_posturlnotify calls npp_urlnotify upon successful or unsuccessful completion of the request.
... npn_posturlnotify is typically asynchronous: it returns immediately and only later handles the request and calls npp_urlnotify.
NPP_Write - Archive of obsolete content
can be used to check stream progress or by range requests from npn_requestread.
...after a stream is created by a call to npp_newstream, the browser calls npp_write either: if the plug-in requested a normal-mode stream, the data in the stream is delivered to the plug-in instance in a series of calls to npp_writeready and npp_write.
... if the plug-in requested a seekable stream, the npn_requestread function requests reads of a specified byte range that results in a series of calls to npp_writeready and npp_write.
...in a seekable stream with byte range requests, you can use this parameter to track npn_requestread requests.see also npp_destroystream, npp_newstream, npp_writeready, npstream, npp ...
Building up a basic demo with Three.js - Game development
our render() function will do this job, with a little help from requestanimationframe(), which causes the scene to be re-rendered constantly on every frame: function render() { requestanimationframe(render); renderer.render(scene, camera); } render(); on every new frame the render function is invoked, and the renderer renders the scene and the camera.
...add this line of code, right after the requestanimationframe() invocation inside the render function: cube.rotation.y += 0.01; this rotates the cube on every frame, by a tiny bit, so the animation looks smooth.
...add the following lines, just below the requestanimationframe() invocation: t += 0.01; torus.scale.y = math.abs(math.sin(t)); we use math.sin, ending up with quite an interesting result.
...add the following, again just below our requestanimationframe() invocation: dodecahedron.position.y = -7*math.sin(t*2); this will move the dodecahedron up and down, by applying the sin() value to the y axis on each frame, and a little adjustment to make it look cooler.
Audio for Web games - Game development
many browsers will simply ignore any requests made by your game to automatically play audio; instead playback for audio needs to be started by a user-initiated event, such as a click or tap.
...as long as byte-range requests are accepted (which is the default behavior), we should be able to jump to a specific point in the audio without having to download the preceding content.
...you'll also reduce the number of server requests and save bandwidth.
... loading your tracks with the web audio api you can load separate tracks and loops individually using xmlhttprequest or the fetch api, which means you can load them synchronously or in parallel.
Plug-in Development Overview - Gecko Plugin API Reference
npp_print: request a platform-specific print operation for the instance.
... streams produced by the browser can be automatically sent to the plug-in instance or requested by the plug-in.
... random-access mode: the browser allows the plug-in to request specific ranges of bytes from anywhere in the stream.
... use npn_geturl to request the browser to load a url into a particular browser window or frame for display, or to deliver the data of that url to the plug-in instance in a new stream.
Forbidden header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden header name is the name of any http header that cannot be modified programmatically; specifically, an http request header name (in contrast with a forbidden response header name).
...names starting with `sec-` are reserved for creating new headers safe from apis using fetch that grant developers control over headers, such as xmlhttprequest.
... forbidden header names start with proxy- or sec-, or are one of the following names: accept-charset accept-encoding access-control-request-headers access-control-request-method connection content-length cookie cookie2 date dnt expect feature-policy host keep-alive origin proxy- sec- referer te trailer transfer-encoding upgrade via note: the user-agent header is no longer forbidden, as per spec — see forbidden header name list (this was implemented in firefox 43) — it can now be set in a fetch headers object, or via xhr setrequestheader().
... however, chrome will silently drop the header from fetch requests (see chromium bug 571722).
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
an http header is a field of an http request or response that passes additional information, altering or precising the semantics of the message or of the body.
... traditionally, headers are classed in categories, though this classification is no more part of any specification: general header: headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.
... request header: headers containing more information about the resource to be fetched or about the client itself.
... a basic request with one header: get /example.http http/1.1 host: example.com redirects have mandatory headers (location): 302 found location: /newpage.html a typical set of headers: 304 not modified access-control-allow-origin: * age: 2318192 cache-control: public, max-age=315360000 connection: keep-alive date: mon, 18 jul 2016 16:06:00 gmt server: apache vary: accept-encoding via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (cloudfront) x-amz-cf-id: tol0fem6ui4fgldrkjx0vao5hpkkgzulyn2twd2gawltr7vlnjtvzw== x-backend-s...
WAI-ARIA basics - Learn web development
via xmlhttprequest, or dom apis.
...content that updates without the entire page reloading via a mechanism like xmlhttprequest, fetch, or dom apis.
...in this example we have a simple random quote box: <section> <h1>random quote</h1> <blockquote> <p></p> </blockquote> </section> our javascript loads a json file via xmlhttprequest containing a series of random quotes and their authors.
... note: most browsers will throw a security exception if you try to do an xmlhttprequest call from a file:// url, e.g.
Tips for authoring fast-loading HTML pages - Learn web development
minimize the number of files reducing the number of files referenced in a web page lowers the number of http connections required to download a page, thereby reducing the time for these requests to be sent, and for their responses to be received.
... 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.
...however, the fewer http requests and single image caching can help reduce page-load time.
...it can be somewhat involved, but it will save a lot in page requests on pages which would normally not be cacheable.
Introduction to automated testing - Learn web development
give it the following contents: const request = require("request"); let bsuser = "browserstack_username"; let bskey = "browserstack_access_key"; let baseurl = "https://" + bsuser + ":" + bskey + "@www.browserstack.com/automate/"; function getplandetails(){ request({uri: baseurl + "plan.json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: { automate_plan: <string>, paralle...
... function getbuilds(){ request({uri: baseurl + "builds.json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: [ { automation_build: { name: <string>, duration: <int>, status: <string>, hashed_id: <string> } }, { automation_build: { name: <string>, duration: <int>, status: <string>, hashed_id: <string> } }, ...
... ] */ }; function getsessionsinbuild(build){ let buildid = build.automation_build.hashed_id; request({uri: baseurl + "builds/" + buildid + "/sessions.json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: [ { automation_session: { name: <string>, duration: <int>, os: <string>, os_version: <string>, browser_version: <string>, browser: <string>, device: <string>, status: <string>, hashed_id: <string>, reason: <string>, build_name: <string>, project_name: <string>, logs: <string>, browser_url: <string>, public_url: <string>, video_url: <string>, browser_console_logs_url: <string>, har_logs_url: <string> } }, { automation_session: { name: <string>, duration: <int>, o...
... ] */ } function getsessiondetails(session){ let sessionid = session.automation_session.hashed_id; request({uri: baseurl + "sessions/" + sessionid + ".json"}, function(err, res, body){ console.log(json.parse(body)); }); /* response: { automation_session: { name: <string>, duration: <int>, os: <string>, os_version: <string>, browser_version: <string>, browser: <string>, device: <string>, status: <string>, hashed_id: <string>, reason: <string>, build_name: <string...
Mozilla accessibility architecture
the first request for an accessible is usually the accessible for document in one of the open windows, and the code in widget/src/gtk2 or widget/src/windows must return this doc accessible.
...no matter how the assistive technology client requests the data, the accessible for a given node is only created once.
... performance: by caching the accessible node for each dom node in a hash table, we can hand back accessibles extremely quickly, and avoid recalculating and creating new accessibles every time one is requested for a certain dom node.
... we also avoid calculating the children of an accessible twice, once for getaccchildcount() and again when the specific children are requested.
Mozilla’s UAAG evaluation report
(p2) c preferences, advanced, scripts & windows - allow scripts to "open unrequested windows" 5.2 keep viewport on top.
...(p2) vg preferences, advanced, scripts & windows - allow scripts to "open unrequested windows" we do not have a strategy to "alert the user and allow the user to open it on demand" we do not have exposed prefs for all of our popup control options.
...(p1) g provides sequential access to links and input form controls cannot navigate to non-links and non-input form controls with event handlers cannot configure mozilla to only allow focus changes on explicit user request 9.4 restore history.
...however, any such use should be carefully considered, given the potential impact on network traffic of automatically making such requests for every link/object in the page.
Adding phishing protection data providers
to find an id number to use, you can build a loop that requests the value of browser.safebrowsing.provider.0.name, then browser.safebrowsing.provider.1.name, and so forth until no value is returned.
... browser.safebrowsing.provider.idnum.keyurl an url that returns a private key to be used for encrypting of other requests.
...this request must be encrypted using the private key returned by the keyurl request.
... browser.safebrowsing.provider.idnum.updateurl an url used to request an updated list of phishing sites.
HTMLIFrameElement.executeScript()
syntax var mydomrequest = instanceofhtmliframeelement.executescript(script, options); return value a domrequest object that returns an onsuccess handler if the script is successfully executed against the loaded content, or an onerror handler if not.
... examples var request1 = browser.executescript( var a = 3; a + 3 , {url: 'http://example.com/index.html'}); request1.onsuccess = function() { console.log(request1.result); // 6 } var request2 = browser.executescript( new promise((resolve, reject) => { settimeout(function() { resolve(6); }, 1000}) ) , {origin: 'http://example.com'}); request2.onsuccess = function() { console.log(request2.re...
...sult); // 6 } if the script value is a not a promise, it is simply returned as the request value.
... if the script value is a promise, the result of the request will be the promise-resolved value.
HTMLIFrameElement.getContentDimensions()
syntax var instanceofdomrequest = instanceofhtmliframeelement.getcontentdimensions(); returns a domrequest for handling the dimensions request.
... its request.onsuccess handler handles the success case, and its request.onerror handler handles the failure case.
... the x and y dimensions are available in the request.result.x and request.result.y properties, respectively.
... examples var browser = document.queryselector('iframe'); var request = browser.getcontentdimensions(); request.onsuccess = function() { console.log("page size:", request.result.width + "x" + request.result.height); } request.onerror = function() { console.log("download error"); } specification not part of any specification.
HTMLIFrameElement.getMuted()
syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getmuted(); and a promise version: instanceofhtmliframeelement.getmuted().then(function(muted) { ...
... }); returns callback version: a domrequest that represents the get muted request.
...the muted value is available in the request.result property, and is a boolean value — true means muted, and false means unmuted.
... example callback version: var browser = document.queryselector('iframe'); var request = browser.getmuted(); request.onsuccess = function() { if(request.result) { console.log('the browser is muted.'); } else { console.log('the browser is unmuted.'); } } promise version: var browser = document.queryselector('iframe'); browser.getmuted().then(function(muted) { if(muted) { console.log('the browser is muted.'); } else { console.log('the browser is unmuted.'); } }); specification not part of any specification.
HTMLIFrameElement.getScreenshot()
the getscreenshot() method of the htmliframeelement lets you request a screenshot of a content <iframe>, scaled to fit within a specified maximum width and height.
... syntax var instanceofdomrequest = instanceofhtmliframeelement.getscreenshot(maxwidth, maxheight, mimetype); returns a domrequest for handling the screenshot request.
... its request.onsuccess handler handles the success case (the screenshot is contained in request.result as a blob object), and its request.onerror handler handles the failure case.
... examples var browser = document.queryselector('iframe'); var request = browser.getscreenshot(100, 100); request.onsuccess = function() { var blob = request.result; var url = url.createobjecturl(blob); } specification not part of any specification.
HTMLIFrameElement.getVisible()
the getvisible() method of the htmliframeelement is used to request the current visible state of the browser <iframe>.
... syntax instanceofdomrequest = instanceofhtmliframeelement.getvisible(); returns a domrequest object to handle the getvisible() request's success and error cases.
... if the request is successful, the request's result is a boolean indicating the visible state of the browser <iframe>.
... example var browser = document.queryselector('iframe'); var request = browser.getvisible(); request.onsuccess = function() { console.log('the visible state is: ' + this.result ?
HTMLIFrameElement.getVolume()
syntax there are two versions of this method, a callback version: var request = instanceofhtmliframeelement.getvolume(); and a promise version: instanceofhtmliframeelement.getvolume().then(function(volume) { ...
... }); returns callback version: a domrequest that represents the get volume request.
...the volume value is available in the request.result property, and is a floating point number between 0 and 1.
... example callback version: var browser = document.queryselector('iframe'); var request = browser.getvolume(); request.onsuccess = function() { console.log('the current browser volume is ' + request.result); } promise version: var browser = document.queryselector('iframe'); browser.getvolume().then(function(volume) { console.log('the current browser volume is ' + volume); }); specification not part of any specification.
MozBeforePaint
whenever you're ready to refresh your animation, you call the window.requestanimationframe() method.
... the timestamp property of this event will be set to the time when the animation frame is sampled; this is relevant when trying to synchronize mozrequestanimationframe animations with smil animations or css transitions.
... <!doctype html> <html> <body> <div id="d" style="width:100px; height:100px; background:lime; position:relative;"></div> <script> var d = document.getelementbyid("d"); var start = window.mozanimationstarttime; function step(event) { var progress = event.timestamp - start; d.style.left = math.min(progress/10, 200) + "px"; if (progress < 2000) { window.mozrequestanimationframe(); } else { window.removeeventlistener("mozbeforepaint", step, false); } } window.addeventlistener("mozbeforepaint", step, false); window.mozrequestanimationframe(); </script> </body> </html> as you can see, each time the mozbeforepaint event fires, our step() method is called.
... this computes the current position for the animating box and updates the box's position on screen, and, if the animation sequence is not yet complete, calls window.requestanimationframe() to schedule the next animation frame to be drawn.
Infallible memory allocation
these are memory allocation routines that never return null; that is, they always successfully return the requested block of memory.
... this is in contrast to a traditional, fallible memory allocator that can return null indicating that the request failed.
... the term "infallible" means that your memory allocation request is guaranteed to succeed: your code can never see a failed request, and so doesn't need to check for failure.
...you should do this for large memory allocations because in extremely low memory conditions, as described in how can memory allocation be infallible?, the application may terminate if an infallible allocator can't find the memory you requested.
AddonManager
callbacks installcallback() a callback that is passed a single addoninstall void installcallback( in addoninstall install ) parameters install the addoninstall passed back from the asynchronous request installlistcallback() a callback that is passed an array of addoninstalls void installlistcallback( in addoninstall installs[] ) parameters installs the array of addoninstalls passed back from the asynchronous request addoncallback() a callback that is passed a single addon void addoncallback( in addon addon ) parameters addon the addon passed back from the asynchronous requ...
... addonlistcallback() a callback that is passed an array of addons void addonlistcallback( in addon addons[] ) parameters addons the array of addons passed back from the asynchronous request constants addoninstall states constant description state_available an install that is waiting to be started.
... update check reasons constant description update_when_user_requested an update check performed at the explicit request of the user.
...k to pass the addoninstall to mimetype the mimetype of the add-on hash an optional hash of the add-on name an optional placeholder name while the add-on is being downloaded iconurl an optional placeholder icon url while the add-on is being downloaded version an optional placeholder version while the add-on is being downloaded loadgroup an optional nsiloadgroup to associate any network requests with getinstallforfile() asynchronously gets an addoninstall for an nsifile.
DeferredTask.jsm
method overview bool ispending();obsolete since gecko 28 void start();obsolete since gecko 28 void flush();obsolete since gecko 28 void cancel();obsolete since gecko 28 void arm(); void disarm(); promise finalize(); attributes isarmed boolean indicates whether the task is currently requested to start again later, regardless of whether it is currently running.
... void cancel(); arm request the execution of the task after the delay specified on construction.
... void arm(); disarm cancel any request for a delayed execution of the task, though the task itself cannot be canceled in case it is already running.
...}, 2000); // the task is ready, but will not be executed until requested.
Download
this property becomes true as soon as the cancel() method is called, though the stopped property might remain false until the cancellation request has been processed.
... the cancellation request is asynchronous.
... in case the download completes successfully before the cancellation request could be processed, this method has no effect, and it returns a resolved promise.
...this behavior is designed for the case where the call to cancel happens asynchronously, and is consistent with the case where the cancellation request could not be processed in time.
Initial setup
add a request about creating your locale's repository to the new locales newsgroup.
...add a request about creating your locale's repository to the new locales newsgroup.
...add a request about creating your ldap account to the new locales newsgroup.
...add a request about creating your locale's bugzilla component to the new locales newsgroup.
DMD
unreported { 150 blocks in heap block record 283 of 5,495 21,600 bytes (20,400 requested / 1,200 slop) individual block sizes: 144 x 150 0.00% of the heap (16.85% cumulative) 0.02% of unreported (94.68% cumulative) allocated at { #01: replace_malloc (/home/njn/moz/mi5/go64dmd/memory/replace/dmd/../../../../memory/replace/dmd/dmd.cpp:1286) #02: malloc (/home/njn/moz/mi5/go64dmd/memory/build/../../../memory/build/replace_malloc.c:153) #03: moz_xmalloc (/home/njn/m...
...nt, unsigned int, bool) (/home/njn/moz/mi5/dom/xml/nsxmlcontentsink.cpp:1007) } } it tells you that there were 150 heap blocks that were allocated from the program point indicated by the "allocated at" stack trace, that these blocks took up 21,600 bytes, that all 150 blocks had a size of 144 bytes, and that 1,200 of those bytes were "slop" (wasted space caused by the heap allocator rounding up request sizes).
...for example: unreported { 420,010 blocks in heap block record 2 of 5,495 29,203,408 bytes (27,777,288 requested / 1,426,120 slop) individual block sizes: 2,048 x 3; 1,024 x 103; 512 x 147; 496 x 7; 480 x 31; 464 x 6; 448 x 50; 432 x 41; 416 x 28; 400 x 53; 384 x 43; 368 x 216; 352 x 141; 336 x 58; 320 x 104; 304 x 5,130; 288 x 150; 272 x 591; 256 x 6,017; 240 x 1,372; 224 x 93; 208 x 488; 192 x 1,919; 176 x 18,903; 160 x 1,754; 144 x 5,041; 128 x 36,709; 112 x 5,571; 96 x 6,280; 80 x 40,738; 64 x 37,92...
...rted (57.53% cumulative) allocated at { #01: (no stack trace recorded due to --stacks=partial) } } in contrast, stack traces are always recorded when a block is reported, which means you can end up with records like this where the allocation point is unknown but the reporting point is known: once-reported { 104,491 blocks in heap block record 13 of 4,689 10,392,000 bytes (10,392,000 requested / 0 slop) individual block sizes: 512 x 124; 256 x 242; 192 x 813; 128 x 54,664; 64 x 48,648 1.35% of the heap (48.65% cumulative) 1.64% of once-reported (59.18% cumulative) allocated at { #01: (no stack trace recorded due to --stacks=partial) } reported at { #01: mozilla::dmd::dmdfuncs::report(void const*) (/home/njn/moz/mi5/go64dmd/memory/replace/dmd/../../../../memory/rep...
PR_Interrupt
sets the interrupt request for a target thread.
... syntax #include <prthread.h> prstatus pr_interrupt(prthread *thread); parameter pr_interrupt has the following parameter: thread the thread whose interrupt request you want to set.
... description the purpose of pr_interrupt is to request that a thread performing some task stop what it is doing and return to some control point.
... the interrupt request remains in the thread's state until it is delivered exactly once or explicitly canceled.
PR_NewTCPSocket
a tcp connection is established by a passive 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.
...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.
PR_OpenTCPSocket
a tcp connection is established by a passive 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.
...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.
Threads
a thread is created by an explicit client request and remains a valid, independent execution entity until it returns from its root function or the process abnormally terminates.
... interrupting and yielding pr_interrupt requests an interrupt of another thread.
... once the target thread has been notified of the request, the request stays with the thread until the notification either has been delivered exactly once or is cleared.
... pr_clearinterrupt clears a previous interrupt request.
Python binding for NSS
ntext nss.nss_shutdown_context release 0.15.0 release date 2014-09-09 scm tag pynss_release_0_15_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_15_0/src/ change log the primary enhancements in this version was fixing access to extensions in a certificaterequest and giving access to certificaterequest attributes.
...see test/test_cert_request.py for examples.
... the following classes were added: certattribute the following class methods were added: certattribute.format_lines certattribute.format nss.secitem.get_integer the following class properties were added: certificaterequest.attributes certattribute.type_oid certattribute.type_tag certattribute.type_str certattribute.values the following module functions were added: base64_to_binary the following files were added: test_cert_request release 0.14.1 release date 2013-10-28 scm ta...
...n-nss now compatible with standard library rewrite httplib_example.py to use standard library and illustrate ssl, non-ssl, connection class, http class usage the following classes were added: authkeyid basicconstraints crldistributionpoint crldistributionpts certificateextension generalname signedcrl dn rdn ava certificaterequest the following module functions were added: nss.nss.nss_is_initialized() nss.nss.cert_crl_reason_from_name() nss.nss.cert_crl_reason_name() nss.nss.cert_general_name_type_from_name() nss.nss.cert_general_name_type_name() nss.nss.cert_usage_flags() nss.nss.decode_der_crl() nss.nss.der_universal_secitem_fmt_lines() nss.nss.import_crl() ...
gtstd.html
>certutil -a -d server_db -n "myco's root ca" -t "tc,," -a -i ca_db/rootca.crt create the server certificate request, specifying the subject name for the server certificate.
... >certutil -r -d server_db -s "cn=myco.mcom.org,o=myco,st=california,c=us" -a -o server_db/server.req enter password or pin for "communicator certificate db": this step simulates the ca signing and issuing a new server certificate based on the server's certificate request.
... >certutil -a -d client_db -n "myco's root ca" -t "tc,," -a -i ca_db/rootca.crt create the client certificate request, specifying the subject name for the certificate.
... >certutil -r -d client_db -s "cn=joe client,o=myco,st=california,c=us" -a -o client_db/client.req enter password or pin for "communicator certificate db": this step simulates the ca signing and issuing a new client certificate based on the client's certificate request.
Necko Interfaces Overview
scheme, host, path, ...) per protocol implementation necko provides uri impl's for common uri formats (see nsstandardurl, nssimpleuri) nsichannel : nsirequest represents a logical connection to the resource identified by a nsiuri per protocol implementation single use (ie.
... channel is used to download the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
... http) maps uri string to nsiuri instance via newuri method creates nsichannel instance from nsiuri instance via newchannel method nsistreamlistener : nsirequestobserver implemented by the consumer of a nsichannel instance passed to nsichannel::asyncopen method nsirequestobserver::onstartrequest - notifies start of async download nsistreamlistener::ondataavailable - notifies presence of downloaded data nsirequestobserver::onstoprequest - notifies completion of async download, possibly w/ error nsiloadgroup : nsirequest attribute of a nsirequest channel impl adds itself to its load group during invocation of asyncopen channel impl removes itself from its load group when download completes load groups in gecko own all channels used to load a particular page (until the channels comp...
...lete) all channels owned by a load group can be canceled at once via the load group's nsirequest::cancel method nsitransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o methods: openinputstream, openoutputstream asynchronous i/o methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Index
191 js_beginrequest jsapi reference, spidermonkey indicates to the js engine that the calling thread is entering a region of code that may call into the jsapi but does not block.
... 463 js_setinterruptcallback jsapi_reference, reference, spidermonkey these functions allow setting an interrupt callback that will be called from the js thread some time after any thread triggered the callback using js_requestinterruptcallback.
...js_stringtoversion may return any of the following values: 487 js_suspendrequest jsapi reference, spidermonkey suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
...js_versiontostring may return any of the following values: 504 js_yieldrequest jsapi_reference, spidermonkey momentarily suspend the current jsapi request, allowing garbage collection to run if another thread has requested it.
JS_LookupProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
... flags unsigned (only in js_lookuppropertywithflags) a combination of bits requesting special search behavior.
...flags js_lookuppropertywithflags and js_lookuppropertywithflagsbyid allow the caller to specify flags requesting special lookup behavior.
A Web PKI x509 certificate primer
generate csr using this command: openssl req -new -key key.pem -days 1096 -extensions v3_ca -batch -out example.csr -utf8 -subj '/cn=www.example.com' this creates a new certificate signing request (csr) that will be valid for 3 years.
... generate csr "openssl req -new -key rootkey.pem -days 5480 -extensions v3_ca -batch -out root.csr -utf8 -subj '/c=us/o=orgname/ou=someinternalname' make a new certificate signing request (csr) that will be valid for 15 years.
... generate csr "openssl req -new -key intkey.pem -days 2922 -extensions v3_ca -batch -out int.csr - utf8 -subj '/c=us/o=orgname/ou=someinternalname2' make a new certificate signing request (csr) that will be valid for 8 years.
... generate csr "openssl req -new -key key.pem -days 1096 -extensions v3_ca -batch -out example.csr - utf8 -subj '/cn=www.example.com' make a new certificate signing request (csr) that will be valid for 3 years.
An Overview of XPCOM
if the object supports the requested interface, it adds a reference to itself and passes back a pointer to that interface.
...but casting can become more involved where you must first cast void then to the requested type, because you must return the interface pointer in the vtable corresponding to the requested interface.
...instead, a contract id only specifies a given set of interfaces that it wants implemented, and any number of different cids may step in and fill that request.
... ns_error_factory_not_registered returned when a requested class is not registered.
Finishing the Component
after that, * they can request specific services by calling getservice.
... the web locking policy that we are going to put into place is quite simple: for every load request that comes through, we will ensure that the uri is in the list of "good" urls on the white list.
...the networking library, necko, deals only with these interfaces when handling requests.
...nsiioservice is the part of the networking library ("necko") that's responsible for kicking off network requests, managing protocols such as http, ftp, or file, and creating nsiuris.
amIWebInstallListener
/ thunderbird 8.0 / seamonkey 2.5) method overview boolean onwebinstallblocked(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); void onwebinstalldisabled(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); boolean onwebinstallrequested(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindowinternal.
... onwebinstallrequested() called when a website wants to ask the user to install add-ons.
... boolean onwebinstallrequested( in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, in pruint32 acount optional ); parameters awindow the window that triggered the installs.
... ainstalls the addoninstalls that were requested.
nsIAsyncInputStream
if the stream implements nsiasyncinputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the asyncwait() method).
...method overview void asyncwait(in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underl...
...void asyncwait( in nsiinputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready.
...arequestedcount wait until at least this many bytes can be read.
nsIAsyncOutputStream
if the stream implements nsiasyncoutputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes writable or closed (via the asyncwait() method).
...method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstreamready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the un...
...void asyncwait( in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready.
...arequestedcount wait until at least this many bytes can be written.
nsIAuthPromptProvider
netwerk/base/public/nsiauthpromptprovider.idlscriptable this interface requests a prompt interface for the given prompt reason.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getauthprompt(in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); constants constant value description prompt_normal 0 normal (non-proxy) prompt request.
... prompt_proxy 1 proxy authentication request.
... methods getauthprompt() this method requests a prompt interface for the given prompt reason.
nsIChannelEventSink
these methods are called before onstartrequest.
...new requests for this resource should continue to use the uri of the old channel.
...new requests for this resource should use the uri of the new channel (this might be an http 301 reponse).
... exceptions thrown this method can throw any exception; if an exception occurs, the load will be canceled, and no network requests will occur for the new channel.
nsIComponentManager
(see also nsifactory.createinstance.) void createinstance( in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters aclass the classid of the object instance that is being requested.
... void createinstancebycontractid( in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters acontractid the contractid of the object instance that is being requested.
... void getclassobject( in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters aclass the classid of the factory that is being requested.
... void getclassobjectbycontractid( in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters acontractid the contractid of the factory that is being requested.
nsIDNSService
resolve_speculate (1 << 4) indicates request is speculative.
... speculative requests return errors if prefetching is disabled by configuration.
...any pending asynchronous requests will be canceled, and the local cache of dns records will be cleared.
...example let dnsservice = components.classes["@mozilla.org/network/dns-service;1"] .createinstance(components.interfaces.nsidnsservice); let thread = components.classes["@mozilla.org/thread-manager;1"] .getservice(components.interfaces.nsithreadmanager).currentthread; let host = "www.mozilla.org"; let listener = { onlookupcomplete: function(request, record, status) { if (!components.issuccesscode(status)) { // handle error here return; } let address = record.getnextaddrasstring(); console.log(host + " = " + address); } }; dnsservice.asyncresolve(host, 0, listener, thread); ...
nsIEffectiveTLDService
return value an acstring containing the base domain (public suffix plus the requested number of additional parts).
... ns_error_insufficient_domain_levels this exception is thrown if there were insufficient subdomain levels in the hostname to satisfy the requested aadditionalparts value.
... return value an acstring containing the base domain (public suffix plus the requested number of additional parts).
... ns_error_insufficient_domain_levels this exception is thrown if there were insufficient subdomain levels in the hostname to satisfy the requested aadditionalparts value.
nsIExternalHelperAppService
vice, use: var externalhelperappservice = components.classes["@mozilla.org/uriloader/external-helper-app-service;1"] .getservice(components.interfaces.nsiexternalhelperappservice); method overview boolean applydecodingforextension(in autf8string aextension, in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods applydecodingforextension() determines whether or not data whose filename has the specified extension should be decoded from the specified encoding type before being saved or delivered to helper applications.
...when the onstoprequest is issued, the stream listener implementation will launch the helper app with this data.
... nsistreamlistener docontent( in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave ); parameters amimecontenttype the content type of the incoming data.
... arequest the request corresponding to the incoming data.
nsIHttpHeaderVisitor
netwerk/protocol/http/nsihttpheadervisitor.idlscriptable this interface is used to view http request and response headers.
... inherits from: nsisupports last changed in gecko 1.7 method overview void visitheader(in acstring aheader, in acstring avalue); methods visitheader() called by the nsihttpchannel implementation when visiting request and response headers.
... this._isflash = false; }; mynsihttpheadervisitor.prototype.visitheader = function ( aheader, avalue ) { if ( aheader.indexof( "content-type" ) !== -1 ) { if ( avalue.indexof( "application/x-shockwave-flash" ) !== -1 ) { this._isflash = true; } } }; mynsihttpheadervisitor.prototype.isflash = function ( ) { return this._isflash; }; myhttprequestobserver = function ( ) { this.register( ); this.aborted = components.results.ns_binding_aborted; this.nsihttpchannel = components.interfaces.nsihttpchannel; this.nsichannel = components.interfaces.nsichannel; this.nsirequest = components.interfaces.nsirequest; }; myhttprequestobserver.prototype.observe = function ( subject, topic, data ) { var uri...
...visitor; if ( subject instanceof this.nsihttpchannel ) { avisitor = new mynsihttpheadervisitor( ); subject.visitresponseheaders( avisitor ); if ( avisitor.isflash( ) ) { uri = subject.uri; subject.cancel( this.aborted ); alert( "found flash!" ); //handle flash file here } } }; myhttprequestobserver.prototype.register = function ( ) { var observerservice = components.classes[ "@mozilla.org/observer-service;1" ].getservice( components.interfaces.nsiobserverservice ); observerservice.addobserver(this, "http-on-examine-response", false); observerservice.addobserver(this, "http-on-examine-cached-response", false); }; myhttprequestobserver.prototype.unregister = f...
nsIModule
aclass the classid of object instance requested.
... aiid the iid of interface requested.
... exceptions thrown ns_error_factory_not_registered indicates that the requested class is not available.
... ns_error_no_interface indicates that the requested interface is not supported.
nsIPrefService
is used, the branch will be able to easily access the preferences browser.startup.page, browser.startup.homepage, and browser.startup.homepage_override by simply requesting page, homepage, or homepage_override.
... return value nsiprefbranch - the object representing the requested branch.
...is used, the branch will be able to easily access the preferences browser.startup.page, browser.startup.homepage, and browser.startup.homepage_override by simply requesting page, homepage, or homepage_override.
... return value nsiprefbranch - the object representing the requested default branch.
nsIRadioInterfaceLayer
to create an instance, use: var radiointerfacelayer = components.classes["@mozilla.org/telephony/system-worker-manager;1"] .getservice(components.interfaces.nsiinterfacerequestor) .createinstance(components.interfaces.nsiradiointerfacelayer); method overview void answercall(in unsigned long callindex); void deactivatedatacall(in domstring cid, in domstring reason); void dial(in domstring number); void enumeratecalls(in nsiriltelephonycallback callback); void getdatacalllist(); unsigned short 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 nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
...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.
...requestid missing description processid missing description setupdatacall() pdp apis.
nsITextInputProcessorCallback
dom/interfaces/base/nsitextinputprocessor.idlscriptable a callback interface for nsitextinputprocessor user 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) nsitextinputprocessorcallback is defined for receiving requests and notifications to ime from gecko.
... example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _tip: null, _callback: function simpleime_callback(atip, anotification) { try { switch (anotification.type) { case "request-to-commit": atip.commitcomposition(); break; case "request-to-cancel": atip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocompose = false; break; } return true; ...
... }, } method overview boolean onnotify(in nsitextinputprocessor atextinputprocessor, in nsitextinputprocessornotification anotification); methods onnotify() this is called when gecko requests or notifies something to ime.
... anotification a notification or request.
nsIUpdateCheckListener
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void oncheckcomplete(in nsixmlhttprequest request, [array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); void onerror(in nsixmlhttprequest request, in nsiupdate update); void onprogress(in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize); methods oncheckcomplete() called when the update check is completed.
... void oncheckcomplete( in nsixmlhttprequest request, [array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount ); parameters request the nsixmlhttprequest object handling the update check.
...void onerror( in nsixmlhttprequest request, in nsiupdate update ); parameters request the nsixmlhttprequest object handling the update check.
...void onprogress( in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize ); parameters request the nsixmlhttprequest object handling the update check.
XPCOM Interface Reference by grouping
nloadprogresslistener element internal nsiworker nsiworkerglobalscope nsiworkermessageevent nsiworkermessageport nsiworkerscope tree nsitreeboxobject nsitreecolumn nsitreecolumns nsitreecontentview nsitreeselection nsitreeview xform nsixformsmodelelement nsixformsnsinstanceelement nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframemessagemanager nsiframeloader nsiframeloaderowner nsiframemessagelistener nsiframemessagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiappl...
... nsisupportsprint64 nsisupportspriority nsisupportsprtime nsisupportspruint16 nsisupportspruint32 nsisupportspruint64 nsisupportspruint8 nsisupportsstring nsisupportsvoid nsisupportsweakreference nsivariant do not use nsienumerator nsiinprocesscontentframemessagemanager nsiscriptableio nsixpcscriptable future nsixmlhttprequestupload obsolete nsixmlrpcclient nsixmlrpcfault security auth nsiauthmodule nsiauthprompt nsiauthpromptprovider nsiauthpromptwrapper nsiasyncverifyredirectcallback content nsicontentpolicy credentials nsilogininfo nsiloginmanager using nsiloginman...
...ead nsithread nsithreadeventfilter nsithreadinternal nsithreadmanager nsithreadobserver nsithreadpool nsithreadpoollistener nsitoolkit util nsiversioncomparator nsiweakreference nsifactory nsiinterfacerequestor nsijscid nsijsid nsijsiid nsimodule nsiobserver nsiobserverservice nsiproperties nsiproperty nsipropertybag nsipropertybag2 nsipropertyelement nsiserversocket nsiserversocketlistener nsiservicemanager nsisocketprovider nsisocketproviderservice nsisockettranspor...
... file nsifilepicker nsifileprotocolhandler nsifilespec nsifilestreams nsifileutilities nsifileview memory nsimemory network channel nsichannel nsichanneleventsink nsirequest nsirequestobserver nsiresumablechannel nsidnsservice nsiftpchannel nsiftpeventsink nsihttpchannel nsihttpchannelinternal nsihttpheadervisitor nsiidnservice nsiprotocolhandler nsiprotocolproxycallback nsiprotocolproxyfilter nsiprotocolproxyservice nsiproxyinfo...
Plug-in Development Overview - Plugins
npp_print: request a platform-specific print operation for the instance.
... streams produced by the browser can be automatically sent to the plug-in instance or requested by the plug-in.
... random-access mode: the browser allows the plug-in to request specific ranges of bytes from anywhere in the stream.
... use npn_geturl to request the browser to load a url into a particular browser window or frame for display, or to deliver the data of that url to the plug-in instance in a new stream.
Network Monitor - Firefox Developer Tools
the network monitor shows you all the network requests firefox makes (for example, when it loads a page, or due to xmlhttprequests), how long each request takes, and details of each request.
...when it first opens, the network monitor does not show request information.
...once the tool is monitoring network requests, the display looks like this: when it is actively monitoring activity, the network monitor records network requests any time the toolbox is open, even if the network monitor itself is not selected.
... ui overview the ui is divided into four main pieces: the main screen contains the toolbar, the network request list, and the network request details pane: the performance analysis view is a separate screen: working with the network monitor the following articles cover different aspects of using the network monitor: toolbar network request list network request details network traffic recording performance analysis throttling ...
Tips - Firefox Developer Tools
network monitor click the request summary to compare performance of cache vs.
... when a request is selected click "edit and resend" 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.
Cache.add() - Web APIs
WebAPICacheadd
note: add() will overwrite any key/value pair previously stored in the cache that matches the request.
... syntax cache.add(request).then(function() { // request has been added to the cache }); parameters request the request you want to add to the cache.
... this can be a request object or a url.
... the response status is not in the 200 range (i.e., not a successful response.) this occurs if the request does not return successfully, but also if the request is a cross-origin no-cors request (in which case the reported status is always 0.) examples this code block waits for an installevent to fire, then calls waituntil() to handle the install process for the app.
Cache.delete() - Web APIs
WebAPICachedelete
the delete() method of the cache interface finds the cache entry whose key is the request, and if found, deletes the cache entry and returns a promise that resolves to true.
... syntax cache.delete(request, {options}).then(function(found) { // your cache entry has been deleted if found }); parameters request the request you are looking to delete.
... this can be a request object or a url.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
DOMException - Web APIs
(legacy code value: 1 and legacy constant name: index_size_err) hierarchyrequesterror the node tree hierarchy is not correct.
... (legacy code value: 3 and legacy constant name: hierarchy_request_err) wrongdocumenterror the object is in the wrong document.
... transactioninactiveerror a request was placed against a transaction that is currently not active or is finished (no legacy code value and constant name).
... notallowederror the request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (no legacy code value and constant name).
Document.onfullscreenerror - Web APIs
the document.onfullscreenerror property is an event handler for the fullscreenerror event that is sent to the document when it fails to transition into full-screen mode after a prior call to element.requestfullscreen().
... example this example attempts to call requestfullscreen() outside of an event handler.
... since requestfullscreen() can only be called in response to user action, for security reasons, this will fail, causing the fullscreenerror to be sent to the document.
... document.documentelement.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Element - Web APIs
WebAPIElement
element.requestfullscreen() asynchronously asks the browser to make the element full-screen.
... element.requestpointerlock() allows to asynchronously ask for the pointer to be locked on the given element.
... candidate recommendation added the requestpointerlock() method.
... living standard added the requestfullscreen() method.
Using the Geolocation API - Web APIs
this initiates an asynchronous request to detect the user's position, and queries the positioning hardware to get up-to-date information.
...a third, optional, parameter is an options object where you can set the maximum age of the position returned, the time to wait for a request, and if you want high accuracy for the position.
... const watchid = navigator.geolocation.watchposition((position) => { dosomething(position.coords.latitude, position.coords.longitude); }); the watchposition() method returns an id number that can be used to uniquely identify the requested position watcher; you use this value in tandem with the clearwatch() method to stop watching the user's location.
... this object allows you to specify whether to enable high accuracy, a maximum age for the returned position value (up until this age it will be cached and reused if the same position is requested again; after this the browser will request fresh position data), and a timeout value that dictates how long the browser should attempt to get the position data for, before it times out.
HTMLFormElement - Web APIs
requestsubmit() requests that the form be submitted using the specified submit button and its corresponding configuration.
... deprecated methods htmlformelement.requestautocomplete() triggers a native browser interface to assist the user in completing the fields which have an autofill field name value that is not off or on.
..." value="dog"> dog</label></p> </fieldset> <fieldset> <legend>owned vehicles</legend> <p><label><input type="checkbox" name="vehicle" value="bike">i have a bike</label></p> <p><label><input type="checkbox" name="vehicle" value="car">i have a car</label></p> </fieldset> <p><button>submit</button></p> </form> </body> </html> submitting forms and uploading files using xmlhttprequest if you want to know how to serialize and submit a form using the xmlhttprequest api, please read this paragraph.
... living standard the following method has been added: requestautocomplete().
Headers - Web APIs
WebAPIHeaders
the headers interface of the fetch api allows you to perform various actions on http request and response headers.
... these actions include retrieving, setting, adding to, and removing headers from the list of the request's headers.
... a headers object also has an associated guard, which takes a value of immutable, request, request-no-cors, response, or none.
... you can retrieve a headers object via the request.headers and response.headers properties, and create a new headers object using the headers.headers() constructor.
IDBCursor - Web APIs
WebAPIIDBCursor
idbcursor.request read only returns the idbrequest that was used to obtain the cursor.
... idbcursor.delete() returns an idbrequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.
... idbcursor.update() returns an idbrequest object, and, in a separate thread, updates the value at the current position of the cursor in the object store.
... recommendation added continueprimarykey() and support for binary keys, and the idbcursor.request property.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
syntax idbdatabase.close(); example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // opening a database.
... // create event handlers for both success and failure of dbopenrequest.onerror = function(event) { note.innerhtml += "<li>error loading database.</li>"; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += "<li>database initialised.</li>"; // store the result of opening the database in the db variable.
... db = dbopenrequest.result; // now let"s close the database again!
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.createObjectStore() - Web APIs
transactioninactiveerror occurs if a request is made on a source database that doesn't exist (e.g.
... example // let us open our database var request = window.indexeddb.open("todolist", 4); // this handler is called when a new version of the database // is created, either when one has not been created before // or when a new version number is submitted by calling // window.indexeddb.open().
...request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += "<li>error loading database.</li>"; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); n...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.onversionchange - Web APIs
the onversionchange event handler of the idbdatabase interface handles the versionchange event, fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested elsewhere (most probably in another window/tab on the same computer).
...} example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
... request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function(event) { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("n...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase: versionchange event - Web APIs
the versionchange event is fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested.
... bubbles no cancelable no interface event event handler property onversionchange examples this example opens a database and, on success, adds a listener to versionchange: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'mon...
...th', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.addeventlistener('success', event => { const db = event.target.result; db.addeventlistener('versionchange', event => { console.log('the version of this database has changed'); }); }); the same example, using the onversionchange event handler property: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex(...
...'minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = event.target.result; db.onversionchange = event => { console.log('the version of this database has changed'); }; }; ...
IDBIndex.getAllKeys() - Web APIs
the getallkeys() method of the idbindex interface instantly retrieves the primary keys of all objects inside the index, setting them as the result of the request object.
... syntax var allkeysrequest = idbindex.getallkeys(); var allkeysrequest = idbindex.getallkeys(query); var allkeysrequest = idbindex.getallkeys(query, count); parameters query optional a key or an idbkeyrange identifying the keys to retrieve.
... return value an idbrequest object on which subsequent events related to this operation are fired.
... example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBIndex.openCursor() - Web APIs
the opencursor() method of the idbindex interface returns an idbrequest object, and, in a separate thread, creates a cursor over the specified key range.
... syntax var request = myindex.opencursor(); var request = myindex.opencursor(range); var request = myindex.opencursor(range, direction); parameters range optional a key or idbkeyrange to use as the cursor's range.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.openKeyCursor() - Web APIs
the openkeycursor() method of the idbindex interface returns an idbrequest object, and, in a separate thread, creates a cursor over the specified key range, as arranged by this index.
... syntax var request = myindex.openkeycursor(); var request = myindex.openkeycursor(range); var request = myindex.openkeycursor(range, direction); parameters range optional a key or idbkeyrange to use as the cursor's range.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.autoIncrement - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.autoincrement); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'autoincrement' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.deleteIndex() - Web APIs
example in the following example you can see the idbopendbrequest.onupgradeneeded handler being used to update the database structure if a database with a higher version number is loaded.
... for a full working example, see our to-do notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // run the displaydata() function to populate the task list with all the to-do list data already in the idb displaydata(); }; // this event handles the event whereby a new version of the database needs to be created // either one has not been created before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique:...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.getAll() - Web APIs
the getall() method of the idbobjectstore interface returns an idbrequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... if a value is successfully found, then a structured clone of it is created and set as the result of the request object.
... syntax var request = objectstore.getall(); var request = objectstore.getall(query); var request = objectstore.getall(query, count); parameters query optional a key or idbkeyrange to be queried.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.getAllKeys() - Web APIs
the getallkeys() method of the idbobjectstore interface returns an idbrequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... if a value is successfully found, then a structured clone of it is created and set as the result of the request object.
... syntax var request = objectstore.getallkeys(); var request = objectstore.getallkeys(query); var request = objectstore.getallkeys(query, count); parameters query optional a value that is or resolves to an idbkeyrange.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.keyPath - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.keypath); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.name - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.name); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.openKeyCursor() - Web APIs
the openkeycursor() method of the idbobjectstore interface returns an idbrequest object whose result will be set to an idbcursor that can be used to iterate through matching results.
... syntax var request = objectstore.openkeycursor(); var request = objectstore.openkeycursor(query); var request = objectstore.openkeycursor(query, direction); parameters query optional the key range to be queried.
... return value an idbrequest object on which subsequent events related to this operation are fired.
... example in this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.openkeycursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification...
IDBObjectStore.transaction - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.transaction); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction: abort event - Web APIs
bubbles yes cancelable no interface event event handler property onabort this can happen for any of the following reasons: bad requests, (for example, trying to add the same key twice, or put the same index key when the key has a uniqueness constraint), an explicit abort() call an uncaught exception in the request's success/error handler, an i/o error (an actual failure to write to disk, for example disk detached, or other os/hardware failure) quota exceeded.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }...
...); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `abort` transaction.addeventlistener('abort', () => { console.log('transaction was aborted'); }); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error cr...
...asktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `abort` transaction.onabort = (event) => { console.log('transaction was aborted'); }; // abort the transaction transaction.abort(); }; ...
IDBTransaction.commit() - Web APIs
note that commit() doesn't normally have to be called — a transaction will automatically commit when all outstanding requests have been satisfied and no new requests have been made.
... commit() can be used to start the commit process without waiting for events from outstanding requests to be dispatched.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("myobjstore"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // force the changes to be committed to the database asap transaction.commit(); specification s...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction: complete event - Web APIs
bubbles no cancelable no interface event event handler property oncomplete examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.
...createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `complete` transaction.addeventlistener('complete', event => { console.log('transaction was competed'); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; using the oncomplete property: // open the database const ...
...dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a read/write ...
...eady for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // add a listener for `complete` transaction.oncomplete = event => { console.log('transaction was competed'); }; const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; ...
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the database (idbdatabase) connection with which this transaction is associated transaction.db; }; specification specification status comment indexed database api 2.0the definition of 'db' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction.mode - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
... duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the mode this transaction has been opened in (should be "readwrite" in this case) transaction.mode; }; specification specification status comment indexed database api 2.0the definition of 'mode' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction.onabort - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.error + ...
...'</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; transaction.onabort = function() { // report when the transaction was successfully aborted console.log("transaction aborted!"); }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the defini...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransaction.oncomplete - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error: ' + transaction.error + ...
...'</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.oncomplete) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'oncomplete' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBVersionChangeEvent.newVersion - Web APIs
example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
... // moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction; window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, // so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'newversion' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBVersionChangeEvent - Web APIs
the idbversionchangeevent interface of the indexeddb api indicates that the version of the database has changed, as the result of an idbopendbrequest.onupgradeneeded event handler function.
... example in the following code snippet, we make a request to open a database, and include handlers for the success and error cases.
...// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction; window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, so we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbversionchangeevent' in that specification.
Checking when a deadline is due - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var request = objectstore.add(newitem[0]); in this section we create an object called newitem that stores the data in the format required to insert it into the database.
... request.onsuccess = function(event) { note.innerhtml += '<li>new item added to database.</li>'; title.value = ''; hours.value = null; minutes.value = null; day.value = 01; month.value = 'january'; year.value = 2020; }; } this next section creates a log message to say the new item addition is successful, and resets the form so it's ready for the next task...
...read using indexeddb for an explanation): // now we need to update the value of notified to "yes" in this particular data object, so the // notification won't be set off on it again // first open up a tranaction as usual var objectstore = db.transaction(['todolist'], "readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var request = objectstore.get(title); request.onsuccess = function() { // grab the data object returned as the result var data = request.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts the item back into the database var requestupdate = objectstore.put(data); // when this new request su...
...cceeds, run the displaydata() function again to update the display requestupdate.onsuccess = function() { displaydata(); } if the checks all match, we then run the createnotification() function to provide a notification to the user.
Locks.name - Web APIs
WebAPILockname
the name read-only property of the lock interface returns the name passed to lockmanager.request selected when the lock was requested.
... the name of a lock is passed by script when the lock is requested.
... example the following examples show how the name property passed in the call to lockmanager.request().
... navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'name' in that specification.
MediaStreamConstraints - Web APIs
track constraints audio either a boolean (which indicates whether or not an audio track is requested) or a mediatrackconstraints object providing the constraints which must be met by the audio track included in the returned mediastream.
... if constraints are specified, an audio track is inherently requested.
... video either a boolean (which indicates whether or not a video track is requested) or a mediatrackconstraints object providing the constraints which must be met by the video track included in the returned mediastream.
... if constraints are specified, a video track is inherently requested.
msPlayToSource - Web APIs
msplaytosource is used in the sourcerequested handler -- get the playtosource object from an audio, video, or img element using the msplaytosource property and pass it to e.setsource, then set the playtosource.next property to the msplaytosource of another element for continual playing.
... var ptm = windows.media.playto.playtomanager.getforcurrentview(); // step 2: register for the sourcerequested event (user swipes devices charm).
... ptm.addeventlistener("sourcerequested", function(e) { // step 3: specify the media to be streamed (to filter devices).
... e.sourcerequest.setsource(document.getelementbyid("videoplayer").msplaytosource); // the media will then be streamed to the device chosen by the user in the ui.
Notification - Web APIs
notification.requestpermission() requests permission from the user to display notifications.
... 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.
... not support desktop notification"); } // let's check whether notification permissions have already been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask the user for permission else if (notification.permission !== "denied") { notification.requestpermission().then(function (permission) { // if the user accepts, let's create a notification if (permission === "granted") { var notification = new notification("hi there!"); } }); } // at last, if the user has denied notifications, and you // want to be respectful there is no need to bother them any more.
... } we no longer show a live sample on this page, as chrome and firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow.
PaymentDetailsBase - Web APIs
properties displayitemsoptional an array of paymentitem objects, each describing one line item for the payment request.
... paymentdetailsinit provides payment information when calling the paymentrequest() constructor.
...this can be delivered to the payment interface using either paymentdetailsupdateevent.updatewith() or by returning it from the optional detailsupdate promise provided to the paymentrequest.show() call that begins the user interaction.
... specifications specification status comment payment request apithe definition of 'paymentdetailsbase' in that specification.
PaymentMethodChangeEvent - Web APIs
the paymentmethodchangeevent interface of the payment request api describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using apple pay).
... properties in addition to the properties below, this interface includes properties inherited from paymentrequestupdateevent.
... methods this interface includes methods inherited from paymentrequestupdateevent.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent' in that specification.
PaymentResponse: payerdetailchange event - Web APIs
payerdetailchange events are delivered by the payment request api to a paymentresponse object when the user makes changes to their personal information while filling out a payment request form.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all b...
... const options = { requestshipping: true, requestpayeremail: true, requestpayername: true, requestpayerphone: true, }; const request = new paymentrequest(methods, details, options); const response = request.show(); // get the data from the response let { payername: oldpayername, payeremail: oldpayeremail, payerphone: oldpayerphone, } = response; // set up a handler for payerdetailchange events, to // request corrections as needed.
...} specifications specification status comment payment request apithe definition of 'payerdetailchange event' in that specification.
Using the Permissions API - Web APIs
historically, different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
...for example, it can query whether permission to use a particular api is granted or denied, and specifically request permission to use an api.
...this object will eventually include methods for querying, requesting, and revoking permissions, although currently it only contains permissions.query(); see below.
... however, future additions to browser functionality should provide the request() method, which will allow us to programatically request permissions, any time we like.
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
... syntax apromise = mypeerconnection.createoffer([options]); mypeerconnection.createoffer(successcallback, failurecallback, [options]) parameters options optional an rtcofferoptions dictionary providing options requested for the offer.
... errorcallback an rtcpeerconnectionerrorcallback which will be passed a single domexception object explaining why the request to create an offer failed.
... options optional an optional rtcofferoptions dictionary providing options requested for the offer.
RTCPeerConnection - Web APIs
d it.removetrack()the rtcpeerconnection.removetrack() method tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding rtcrtpsender from the list of senders as reported by rtcpeerconnection.getsenders().restartice()the webrtc api's rtcpeerconnection interface offers the restartice() method to allow a web application to easily request that ice candidate gathering be redone on both ends of the connection.setconfiguration() the rtcpeerconnection.setconfiguration() method sets the current configuration of the rtcpeerconnection based on the values included in the specified rtcconfiguration object.
... icecandidate sent to the peer connection to request that the specified candidate be transmitted to the remote peer.
... constants rtcbundlepolicy enum the rtcbundlepolicy enum defines string constants which are used to request a specific policy for gathering ice candidates if the remote peer isn't "bundle-aware" (compatible with the sdp bundle standard for bundling multiple media streams on a single transport link).
... "closed" the ice agent for this rtcpeerconnection has shut down and is no longer handling requests.
Sensor APIs - Web APIs
the only time anything is shown to the user is when permissions need to be requested and when the sensor type isn't supported by the device.
... if (event.error.name === 'notallowederror') { // branch to code for requesting permission.
...a brief example, shown below, requests permission before attempting to use the sensor.
...the actual reading frequency depends device hardware and consequently may be less than requested.
USBDevice.controlTransferIn() - Web APIs
the controltransferin() method of the usbdevice interface returns a promise that resolves with a usbintransferresult when the result of a command or status request has been received from the usb device.
...the available options are: requesttype: must be one of three values specifying whether the tranfer is "standard" (common to all usb devices) "class" (common to an industry-standard class of devices) or "vendor".
... request: a vendor-specific command.
... value: vender-specific request parameters.
USBDevice.controlTransferOut() - Web APIs
the available options are: requesttype: must be one of three values specifying whether the tranfer is "standard" (common to all usb devices) "class" (common to an industry-standard class of devices) or "vendor".
... request: a vendor-specific command.
... value: vender-specific request parameters.
...check with your device to see what the specific request requires.
WakeLock - Web APIs
WebAPIWakeLock
methods request requests a wakelocksentinel object, which returns a promise that resolves with a wakelocksentinel object.
... examples the following asynchronous function requests a wakelocksentinel object.
... the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
... const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelock' in that specification.
Writing a WebSocket server in C# - Web APIs
ent = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); //enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.dataavailable); byte[] bytes = new byte[client.available]; stream.read(bytes, 0, bytes.length); } handshaking when a client connects to a server, it sends a get request to upgrade the connection to a websocket from a simple http request.
... using system.text; using system.text.regularexpressions; while(client.available < 3) { // wait for enough bytes to be available } byte[] bytes = new byte[client.available]; stream.read(bytes, 0, bytes.length); //translate bytes of request to string string data = encoding.utf8.getstring(bytes); if (regex.ismatch(data, "^get")) { } else { } the response is easy to build, but might be a little bit difficult to understand.
... you must: obtain the value of the "sec-websocket-key" request header without any leading or trailing whitespace concatenate it with "258eafa5-e914-47da-95ca-c5ab0dc85b11" (a special guid specified by rfc 6455) compute sha-1 and base64 hash of the new value write the hash back as the value of "sec-websocket-accept" response header in an http response if (new system.text.regularexpressions.regex("^get").ismatch(data)) { const string eol = "\r\n"; // http/1.1 defines the sequence cr lf as the end-of-line marker byte[] response = encoding.utf8.getbytes("http/1.1 101 switching protocols" + eol + "connection: upgrade" + eol + "up...
...obtain the value of the "sec-websocket-key" request header without any leading or trailing whitespace // 2.
Functions and classes available to Web Workers - Web APIs
48 (48) (yes) (yes) (yes) domrequest and domcursor respectively, these objects represents an ongoing operation (with listeners for reacting to the operation completely successfully, or failing, for example), and an ongoing operation over a list of results.
... 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.
... basic implementation (yes) appcodename, product, taintenabled(): 28 (28) online: 29 (29) navigatorlanguage: (yes) appname, appversion, online, platform, useragent: 10.0 other: no support (yes) (yes) xmlhttprequest creates and returns a new xmlhttprequest object; this mimics the behavior of the standard xmlhttprequest() constructor.
... note that the responsexml and channel attributes on xmlhttprequest always return null.
window.cancelAnimationFrame() - Web APIs
the window.cancelanimationframe() method cancels an animation frame request previously scheduled through a call to window.requestanimationframe().
... syntax window.cancelanimationframe(requestid); parameters requestid the id value returned by the call to window.requestanimationframe() that requested the callback.
... examples var requestanimationframe = window.requestanimationframe || window.mozrequestanimationframe || window.webkitrequestanimationframe || window.msrequestanimationframe; var cancelanimationframe = window.cancelanimationframe || window.mozcancelanimationframe; var start = window.mozanimationstarttime; // only supported in ff.
... var myreq; function step(timestamp) { var progress = timestamp - start; d.style.left = math.min(progress / 10, 200) + 'px'; if (progress < 2000) { // it's important to update the requestid each time you're calling requestanimationframe myreq = requestanimationframe(step); } } myreq = requestanimationframe(step); // the cancelation uses the last requestid cancelanimationframe(myreq); specifications specification status comment html living standardthe definition of 'cancelanimationframe()' in that specification.
Window.onmozbeforepaint - Web APIs
this is used in concert with the window.mozrequestanimationframe() method to perform smooth, synchronized animations from javascript code.
... example see window.mozrequestanimationframe() for an example.
... notes this event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozrequestanimationframe().
...this time is the same for all animations being run in the same browser window, including those using the window.mozrequestanimationframe() method, css transitions, and smil animations.
XRReferenceSpace - Web APIs
it expands upon the base class, xrspace, by adding support for several different tracking behaviors as well as to request a new reference space which describes the offset transform between the tracked object and another location in the world.
... reference space types the reference space returned by xrsession.requestreferencespace() is either xrreferencespace or xrboundedreferencespace.
...to do that, call the xrsession method requestreferencespace(), specifying the reference space type you wish to obtain.
... xrsession.requestreferencespace("local").then((refspace) => { xrreferencespace = refspace; /* ...
XRSystem - Web APIs
WebAPIXRSystem
requestsession() returns a promise that resolves to a new xrsession with the specified xrsessionmode.
... examples the following example shows how to use both issessionsupported() and requestsession().
... if (navigator.xr) { immersivebutton.addeventlistener("click", onbuttonclicked); navigator.xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { immersivebutton.disabled = false; } else { immersivebutton.disabled = true; }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then(() => { // onsessionstarted() not shown for reasons of brevity and clarity.
...if there isn't, we use requestsession() to start one and, once the returned promise resolves, we call a function onsessionstarted() to set up our session for rendering and so forth.
msCachingEnabled - Web APIs
the mscachingenabled method gets the current caching state for an xmlhttprequest.
... syntax var cachestate = xmlhttprequest.mscachingenabled(); parameters cachestate[out, retval] type = boolean.
... if true, xmlhttprequest is cached to disk.
...if true, xmlhttprequest is cached to disk.
Media buffering, seeking, and time ranges - Developer guides
some parts of the media may be seekable but not buffered if byte-range requests are enabled on the server.
... byte range requests allow parts of the media file to be delivered from the server and so can be ready to play almost immediately — thus they are seekable.
...in practice this is good enough as the browser either enables range requests or it doesn't.
...if range requests are enabled this value usually becomes the duration of the media almost instantly.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
if 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 allowed values are: anonymous sends a cross-origin request without a credential.
... use-credentials sends a cross-origin request with a credential.
... when not present, the resource is fetched without a cors request (i.e.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... using email inputs e-mail addresses are among the most frequently-inputted textual data forms on the web; they're used when logging into web sites, when requesting information, to allow order confirmation, for webmail, and so forth.
...} <form> <div class="emailbox"> <label for="emailaddress">your e-mail address</label><br> <input id="emailaddress" type="email" size="64" maxlength="64" required placeholder="username@beststartupever.com" pattern=".+@beststartupever.com" title="please provide only a best startup ever corporate e-mail address"> </div> <div class="messagebox"> <label for="message">request</label><br> <textarea id="message" cols="80" rows="8" required placeholder="my shoes are too tight, and i have forgotten how to dance."></textarea> </div> <input type="submit" value="send request"> </form> our <form> contains one <input> of type email for the user's e-mail address, a <textarea> to enter their message for it into, and an <input> of type "submit", which creat...
...this simple regular expression requests a string that consists of at least one character of any kind, then an "@" followed by the domain name "beststartupever.com".
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... html the form that requests the month and year looks like this: <form> <div class="nativedatepicker"> <label for="month-visit">what month would you like to visit us?</label> <input type="month" id="month-visit" name="month-visit"> <span class="validity"></span> </div> <p class="fallbacklabel">what month would you like to visit us?</p> <div class="fallbackdatepicker"> <div> <span> <lab...
...n> <option>september</option> <option>october</option> <option>november</option> <option>december</option> </select> </span> <span> <label for="year">year:</label> <select id="year" name="year"> </select> </span> </div> </div> </form> the <div> with the id nativedatepicker uses the month input type to request the month and year, while the <div> with the id fallbackdatepicker instead uses a pair of <select> elements.
... the first requests the month, and the second the year.
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
<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.
... <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 url is then sent to the server using an http get request.
... post the form's data is included in the body of the request that is sent to the url given by the formaction or action attribute using an http post method.
Choosing between www and non-www URLs - HTTP
or, one server can be handled by several machines, cooperating to produce the answer or balancing the load of the requests between them.
... using http 301 redirects in this case, you need to configure the server receiving the http requests (which is most likely the same for www and non-www urls) to respond with an adequate http 301 response to any request to the non-canonical domain.
... example: a server receives a request for http://www.example.org/whaddup (when the canonical domain is example.org) the server answers with a code 301 with the header location: http://example.org/whaddup.
... the client issues a request to the canonical domain: http://example.org/whatddup the html5 boilerplate project has an example on how to configure an apache server to redirect one domain to the other.
Identifying resources on the Web - HTTP
the target of an http request is called a "resource", whose nature isn't defined further; it can be a document, a photo, or anything else.
...there are sometimes reasons identity and location are not given by the same uri: http uses a specific http header, alt-svc when the resource requested wants the client to access it at another location.
...it indicates which web server is being requested.
...it is worth noting that the part after the #, also known as fragment identifier, is never sent to the server with the request.
Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’ - HTTP
the cors request requires that the server permit the use of credentials, but the server's access-control-allow-credentials header's value isn't set to true to enable their use.
... to fix this problem on the client side, revise the code to not request the use of credentials.
... if the request is being issued using xmlhttprequest, make sure you're not setting withcredentials to true.
... if using the fetch api, make sure request.credentials is "omit".
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
... if the server is under your control, add the origin of the requesting site to the set of domains permitted access by adding it to the access-control-allow-origin header's value.
...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.
... 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 also set a vary: origin header to indicate that some headers are being set dynamically depending on the origin.
Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’ - HTTP
the cors request was attempted with the credentials flag set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
... to correct this problem on the client side, simply ensure that the credentials flag's value is false when issuing your cors request.
... if the request is being issued using xmlhttprequest, make sure you're not setting withcredentials to true.
... if using the fetch api, make sure request.credentials is "omit".
Accept - HTTP
WebHTTPHeadersAccept
the accept request http header advertises which content types, expressed as mime types, the client is able to understand.
...browsers set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script.
... header type request header forbidden header name no cors-safelisted request header yes, with the additional restriction that values can't contain a cors-unsafe request header byte: 0x00-0x1f (except 0x09 (ht)), "():<>?@[\]{}, and 0x7f (del).
... examples accept: text/html accept: image/* // general default accept: */* // default for navigation requests accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8 specifications specification title rfc 7231, section 5.3.2: accept hypertext transfer protocol (http/1.1): semantics and context ...
Access-Control-Allow-Methods - HTTP
the access-control-allow-methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request.
...access-control-allow-methods: * directives <method> comma-delimited list of the allowed http request methods.
... * (wildcard) the value "*" only counts as a special wildcard value for requests without credentials (requests without http cookies or http authentication information).
... in requests with credentials, it is treated as the literal method name "*" without special semantics.
Access-Control-Expose-Headers - HTTP
access-control-expose-headers: * directives <header-name> a list of exposed headers consisting of zero or more header names other than the cors-safelisted request headers that the resource might use and can be exposed.
... * (wildcard) the value "*" only counts as a special wildcard value for requests without credentials (requests without http cookies or http authentication information).
... in requests with credentials, it is treated as the literal header name "*" without special semantics.
... examples to expose a non-cors-safelisted request header, you can specify: access-control-expose-headers: content-length to additionally expose a custom header, like x-kuma-revision, you can specify multiple headers separated by a comma: access-control-expose-headers: content-length, x-kuma-revision in requests without credentials, you can also use a wildcard value: access-control-expose-headers: * however, this won't wildcard the authorization header, so if you need to expose that, you will need to list it explicitly: access-control-expose-headers: *, authorization specifications specification status comment fetchthe definition of 'access-control-expose-header...
Content-Location - HTTP
header type entity header forbidden header name no syntax content-location: <url> directives <url> a relative (to the request url) or absolute url.
... examples requesting data from a server in different formats let's say a site's api can return data in json, xml, or csv formats.
... if the url for a particular document is at https://example.com/documents/foo, the site could return different urls for content-location depending on the request's accept header: request header response header accept: application/json, text/json content-location: /documents/foo.json accept: application/xml, text/xml content-location: /documents/foo.xml accept: text/plain, text/* content-location: /documents/foo.txt these urls are examples — the site could serve the different filetypes with any url patterns it wishes, such as a query string parameter: /documents/foo?format=json, /documents/foo?format=xml, and so on.
... then the client could remember that the json version is available at that particular url, skipping content negotation the next time it requests that document.
ETag - HTTP
WebHTTPHeadersETag
this means weak etags prevent caching when byte range requests are used, but strong etags mean range requests can still be cached.
... "<etag_value>" entity tag uniquely representing the requested resource.
... for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
... specifications specification title rfc 7232, section 2.3: etag hypertext transfer protocol (http/1.1): conditional requests ...
If-Modified-Since - HTTP
the if-modified-since request http header makes the request conditional: the server will send back the requested resource, with a 200 status, only if it has been last modified after the given date.
... 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.
... header type request header forbidden header name no syntax if-modified-since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
... examples if-modified-since: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7232, section 3.3: if-modified-since hypertext transfer protocol (http/1.1): conditional requests ...
If-Unmodified-Since - HTTP
the if-unmodified-since request http header makes the request conditional: the server will send back the requested resource, or accept it in the case of a post or another non-safe method, only if it has not been last modified after the given date.
... in conjunction with a range request with a if-range header, it can be used to ensure that the new fragment requested comes from an unmodified document.
... header type request header forbidden header name no syntax if-unmodified-since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
... examples if-unmodified-since: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7232, section 3.4: if-unmodified-since hypertext transfer protocol (http/1.1): conditional requests ...
Sec-Fetch-Site - HTTP
the sec-fetch-site fetch metadata header indicates the relationship between a request initiator's origin and the origin of the resource.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted response header cors-safelisted request header syntax sec-fetch-site: cross-site sec-fetch-site: same-origin sec-fetch-site: same-site sec-fetch-site: none values cross-site same-origin same-site none this request does not relate to any context like site, origin, or frame.
... this can happen when user had initiated this request by, e.g.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-site http request header ...
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.
... 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.
... examples want-digest: sha-256 want-digest: sha-512;q=0.3, sha-256;q=1, md5;q=0 basic operation the sender provides a list of digests which it is prepared to accept, and the server uses one of them: request: get /item want-digest: sha-256;q=0.3, sha;q=1 response: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= unsupported digests the server does not support any of the requested digest algorithms, so uses a different algorithm: request: get /item want-digest: sha;q=1 response: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9...
...dbpe= the server does not support any of the requested digest algorithms, so responds with a 400 error and includes another want-digest header, listing the algorithms that it does support: request: get /item want-digest: sha;q=1 response: http/1.1 400 bad request want-digest: sha-256, sha-512 specifications specification title draft-ietf-httpbis-digest-headers-latest resource digests for http this header was originally defined in rfc 3230, but the definition of "selected representation" in rfc 7231 made the original definition inconsistent with current http specifications.
PATCH - HTTP
WebHTTPMethodsPATCH
the http patch request method applies partial modifications to a resource.
... a patch request is considered a set of instructions on how to modify a resource.
...the word "idempotent" means that any number of repeated, identical requests will leave the resource in the same state.
... request has body yes successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax patch /file.txt http/1.1 example request patch /file.txt http/1.1 host: www.example.com content-type: application/example if-match: "e0023aa4e" content-length: 100 [description of changes] response a successf...
POST - HTTP
WebHTTPMethodsPOST
the type of the body of the request is indicated by the content-type header.
... a post request is typically sent via an html form and results in a change on the server.
... text/plain when the post request is sent via a method other than an html form — like via an xmlhttprequest — the body can take any type.
... request has body yes successful response has body yes safe no idempotent no cacheable only if freshness information is included allowed in html forms yes syntax post /test example a simple form using the default application/x-www-form-urlencoded content type: post /test http/1.1 host: foo.example content-type: application/x-www-fo...
PUT - HTTP
WebHTTPMethodsPUT
the http put request method creates a new resource or replaces a representation of the target resource with the request payload.
... 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), whereas successive identical post requests may have additional effects, akin to placing an order several times.
... request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (created) response.
... 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.
202 Accepted - HTTP
WebHTTPStatus202
the hypertext transfer 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.
304 Not Modified - HTTP
WebHTTPStatus304
the http 304 not modified client redirection response code indicates that there is no need to retransmit the requested resources.
...this happens when the request method is safe, like a get or a head request, or when the request is conditional and uses a if-none-match or a if-modified-since header.
... many developer tools' network panels of browsers create extraneous requests leading to 304 responses, so that access to the local cache is visible to developers.
... status 304 not modified specifications specification title rfc 7232, section 4.1: 304 not modified hypertext transfer protocol (http/1.1): conditional requests ...
307 Temporary Redirect - HTTP
WebHTTPStatus307
http 307 temporary redirect redirect status response code indicates that the resource requested has been temporarily moved to the url given by the location headers.
... the method and the body of the original request are reused to perform the redirected request.
... the only difference between 307 and 302 is that 307 guarantees that the method and the body will not be changed when the redirected request is made.
...for get requests, their behavior is identical.
412 Precondition Failed - HTTP
WebHTTPStatus412
this happens with conditional requests on methods other than get or head when the condition defined by the if-unmodified-since or if-none-match headers is not fulfilled.
... in that case, the request, usually an upload or a modification of a resource, cannot be made and this error response is sent back.
... for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
... specifications specification title rfc 7232, section 4.2: 412 precondition failed hypertext transfer protocol (http/1.1): conditional requests ...
Intl.Collator.prototype.resolvedOptions() - JavaScript
if 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 any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
... collation the value requested using the unicode extension key "co", if it is supported for locale, or "default".
... numeric casefirst the values requested for these properties in the options argument or using the unicode extension keys "kn" and "kf" or filled in as defaults.
Using dns-prefetch - Web Performance
dns-prefetch is an attempt to resolve domain names before resources get requested.
... when a browser requests a resource from a (third party) server, that cross-origin’s domain name must be resolved to an ip address before the browser can issue the request.
...while dns caching can help to reduce this latency, dns resolution can add significant latency to requests.
...combining the two provides an opportunity to further reduce the perceived latency of cross-origin requests.
Subresource Integrity - Web security
note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
... cross-origin resource sharing and subresource integrity for subresource-integrity verification of a resource served from an origin other than the document in which it's embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
... therefore, the resource must be served with an access-control-allow-origin header that allows the resource to be shared with the requesting origin; for example: access-control-allow-origin: * examples in the following examples, assume that oqvuafxrkap7fdgccy5uykm6+r9gqq8k/uxy9rx7hnqlgyl1kpzqho1wx4jwy8wc is already known to be the expected sha-384 hash (digest) of a particular script example-framework.js, and there’s a copy of the script hosted at https://example.com/example-framework.js.
... note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
Loading and running WebAssembly code - WebAssembly
using xmlhttprequest xmlhttprequest is somewhat older 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.
... next, send the request using xmlhttprequest.send().
... 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.
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions: settimeout() setinterval() setimmediate() requestanimationframe() the settimeout() function is commonly used if you wish to have your function called once after the specified delay.
...the requestanimationframe() function tells the browser that you wish to perform an animation and requests that the browser schedule a repaint of the window for the next animation frame.
... requestanimationframe() requestanimationframe() tells the browser that you wish to perform an animation and requests that the browser schedule a repaint of the window for the next animation frame.
Install Manifests - Archive of obsolete content
if an extension includes the following then it must request unpacking: binary xpcom components plugins search plugins dlls loaded with ctypes dictionaries window icons examples <description about="urn:mozilla:install-manifest"> <em:id>extension@mysite.com</em:id> <em:unpack>true</em:unpack> ...
... 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.
...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.
Appendix A: Add-on Performance - Archive of obsolete content
jsm provide the cleanest way to separate js into modules that can be loaded on request, unlike chrome scripts which are generally loaded with the overlay at startup.
...this is what you should do first to make sure that you filter out all cases that don't interest you so that your add-on doesn't slow down other requests.
... never use xmlhttprequest in synchronous mode.
Appendix F: Monitoring DOM changes - Archive of obsolete content
network listeners ajax-based page changes are almost universally tied to xmlhttprequests.
... these requests can be tracked from chrome code using a variety of methods, including web progress listeners, http observers, and content policies.
... while these are not exceptionally efficient (they run for every http request, and considerably more often for some methods), they work very well for certain applications pure css pure css can be more powerful than most people suspect.
Adding preferences to an extension - Archive of obsolete content
watchstock() while we're at it, let's add a method that sets which stock we want to be watching, changing the preference and immediately requesting a refresh of the display.
... a callback, we can't rely on // "this" referring to the right object, so we need to reference // it by its full name var symbol = stockwatcher.tickersymbol; var fullurl = "http://quote.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=" + symbol; function inforeceived() { var samplepanel = document.getelementbyid('stockwatcher2'); var output = httprequest.responsetext; if (output.length) { // remove any whitespace from the end of the string output = output.replace(/\w*$/, ""); // build the tooltip string var fieldarray = output.split(","); samplepanel.label = symbol + ": " + fieldarray[1]; samplepanel.tooltiptext = "chg: " + fieldarray[4] + " | " + "open: " + fieldarray[5]...
... + " | " + "low: " + fieldarray[6] + " | " + "high: " + fieldarray[7] + " | " + "vol: " + fieldarray[8]; } } var httprequest = new xmlhttprequest(); httprequest.open("get", fullurl, true); httprequest.onload = inforeceived; httprequest.send(null); } } note that we use stockwatcher.tickersymbol here instead of this.tickersymbol to get the stock symbol to watch.
Creating a Web based tone generator - Archive of obsolete content
the function requestsounddata() produces the samples to be played.
... var currentposition = audio.mozcurrentsampleoffset(); var available = currentposition + prebuffersize - currentwriteposition; if(available > 0) { // request some sound data from the callback function.
... var frequency = 0, currentsoundsample; var samplerate = 44100; function requestsounddata(sounddata) { if (!frequency) { return; // no sound selected } var k = 2* math.pi * frequency / samplerate; for (var i=0, size=sounddata.length; i<size; i++) { sounddata[i] = math.sin(k * currentsoundsample++); } } var audiodestination = new audiodatadestination(samplerate, requestsounddata); function start()...
Autodial for Windows NT - Archive of obsolete content
in an attempt to help users who want to use the autodial feature of the os, i added the autodial helper feature requested in bug 93002.
...these two behave the same for mozilla, and trigger autodial when you fail to reach a requested address.
...a parallel feature has been requested in bug 130774: if we trigger the autodial connection, we should ask the user if he wants to hang up the connection when we close mozilla.
Layout System Overview - Archive of obsolete content
a content element is passed to the style system and a request is made to resolve the style for that element.
...the presentation shell owns and maintains a reflow queue where requests for reflow are held until it is time to perform a reflow, and then pulled out and executed.
...the frame is able to provide a reference to its parent and to its children upon request.
Tamarin Build System Documentation - Archive of obsolete content
checkins (hg push) to http://hg.mozilla.org/tamarin-redux and sandbox requests will trigger a buildbot build when all build slaves are idle the next build begins before the build begins buildbot waits for 2 minutes of no checkin activity the build system prioritizes tamarin-redux checkins over sandbox builds when several tamarin-redux checkins occur the newest change is built including all checkins since the last build each sandbox build occurs in the order they were submi...
... create a user repository, instructions are https://developer.mozilla.org/en/publishing_mercurial_clones go to the request a sandbox build page http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm enter the repository url, revision number, email address, and description.
... if buildbot is busy the queue is displayed http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm the submitter of a sandbox build may remove a build request by clicking on the cancel button tamarin-redux builds are higher priority than sandbox builds, they cannot be removed but the most checkin including all new checkins are built how can i run buildbot scripts locally?
XUL Questions and Answers - Archive of obsolete content
as an extension author, you have at least two options: use dom methods to dynamically create or rearrange elements file an enhancement request in bugzilla to have extra ids added.
...is: listobj = new object(); listobj.wpl = components.interfaces.nsiwebprogresslistener; listobj.queryinterface = function(aiid) { if (aiid.equals(listobj.wpl) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; } listobj.onstatechange = function(aprogress, arequest, aflag, astatus) { if (aflag & listobj.wpl.state_start) { // this fires when the load event is initiated } else { if (aflag & listobj.wpl.state_stop) { if ( aflag & listobj.wpl.state_is_window ) { // this fires when all load finish } if ( aflag & listobj.wpl.state_is_network ) { // fires when all load are really over, // do something "final" h...
...ere // (my two cents) } else { // this fires when a load finishes } } } return 0; } // this fires when the location bar changes i.e load event is confirmed // or when the user switches tabs listobj.onlocationchange = function(aprogress, arequest, auri) { // do whatever you want to do return 0; } // for definitions of the remaining functions see xulplanet.com listobj.onprogresschange = function() { return 0 }; listobj.onstatuschange = function() { return 0 }; listobj.onsecuritychange = function() { return 0 }; listobj.onlinkiconavailable = function() { return 0 }; /* i use the progress listener to trap the end of a local html "template" file loading, and run xslt transormations.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
//example.com/soap/'; var ns = 'http://example.com/soap/namespace'; 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: c...
...ontent, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charse...
...t + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.send(content); ...
NPN_GetURL - Archive of obsolete content
url pointer to the url of the request.
...for http urls, the browser resolves this method as the http server method get, which requests url objects.
... use npn_geturlnotify() instead of npn_geturl() in these cases: to request a stream and receive notification of the result.
NPN_MemFlush - Archive of obsolete content
requests that the browser free a specified amount of memory.
...to request that the browser free as much memory as possible, call npn_memflush() repeatedly until it returns 0.
...in general, plug-ins should use npn_memalloc() to allocate memory in the browser's memory space, since this function automatically frees cached data if necessary to fulfill the request.
NPN_PostURL - Archive of obsolete content
url url of the request, specified by the plug-in.
...npn_posturl is typically asynchronous: it returns immediately and only later handles the request.
... for this reason, you may find it useful to call npn_posturlnotify instead; this function notifies your plug-in upon successful or unsuccessful completion of the request.
Writing JavaScript for XHTML - Archive of obsolete content
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.
... for completeness here is the accept field, that firefox 2.0.0.9 sends with its requests: accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 further reading you will find several useful articles in the developer wiki: xml in mozilla dom xml introduction xml extras dom 2 methods you will need are: dom:document.createelementns dom:document.getelementsbytagnamens see also properly using css and javascript in...
Index - Game development
2 anatomy of a video game games, javascript, main loop, requestanimationframe i want to be clear that any of the above, or none of them, could be best for your game.
...we touch on css transitions and css animations, and javascript loops involving window.requestanimationframe.
... 64 finishing up beginner, canvas, games, javascript, tutorial, lives, requestanimationframe there's always room for improvements in any game we write.
Finishing up - Game development
drawlives(); improving rendering with requestanimationframe() now let's work on something that is not connected to the game mechanics, but to the way it is being rendered.
... requestanimationframe helps the browser render the game better than the fixed framerate we currently have implemented using setinterval().
... replace the following line: var interval = setinterval(draw, 10); with simply: draw(); and remove each instance of: clearinterval(interval); // needed for chrome to end game then, at the very bottom of the draw() function (just before the closing curly brace), add in the following line, which causes the draw() function to call itself over and over again: requestanimationframe(draw); the draw() function is now getting executed again and again within a requestanimationframe() loop, but instead of the fixed 10 milliseconds frame rate, we are giving control of the framerate back to the browser.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
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.
... when software communicates asynchronously, a program may make a request for information from another piece of software (such as a server), and continue to do other things while waiting for a reply.
... for example, the ajax (asynchronous javascript and xml) programming technique—now usually simply "ajax", even though json is usually used rather than xml in modern applications—is a mechanism that requests relatively small amounts of data from the server using http, with the result being returned when available rather than immediately.
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
an entity header is an http header that can be used in an http request or response, and describes the content of the body of themessage.
... even if they are neither request, nor response headers, entity headers are often included in such terms.
... a few request headers after a get request: in the following example, content-length is an entity header, while host and user-agent are requests headers: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content-length: 128 learn more technical knowledge list of all http headers ...
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
an http method is idempotent if an identical request can be made once or several times in a row with the same effect while leaving the server in the same state.
... to be idempotent, only the actual back-end state of the server is considered, the status code returned by each request may differ: the first call of a delete will likely return a 200, while successive ones will likely return a 404.
... same results: get /pagex http/1.1 get /pagex http/1.1 get /pagex http/1.1 get /pagex http/1.1 post /add_row http/1.1 is not idempotent; if it is called several times, it adds several rows: post /add_row http/1.1 post /add_row http/1.1 -> adds a 2nd row post /add_row http/1.1 -> adds a 3rd row delete /idx/delete http/1.1 is idempotent, even if the returned status code may change between requests: delete /idx/delete http/1.1 -> returns 200 if idx exists delete /idx/delete http/1.1 -> returns 404 as it just got deleted delete /idx/delete http/1.1 -> returns 404 learn more general knowledge definition of idempotent in the http specification.
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
prefetching is when content is downloaded in the background, this is based on the assumption that the content will likely be requested, enabling the content to load instantly if and when the user requests it.
... the content is downloaded and cached for anticipated future use without the user making an explicit request for it.
...they are most relevant when there are a plethora of links to external websites that may be clicked on, like search engine results, dns prefetching resolves domain names in advance thereby speeding up load times by reducing the time associated with domain lookup at request time.
Proxy server - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy intercepts requests and serves back responses; it may forward the requests, or not (for example in the case of a cache), and it may modify it (for example changing its headers, at the boundary between two networks).
...in general there are two main types of proxy servers: a forward proxy that handles requests from and to anywhere on the internet.
... a reverse proxy taking requests from the internet and forwarding them to servers in an internal network.
Time to first byte - MDN Web Docs Glossary: Definitions of Web-related terms
time to first byte (ttfb) refers to the time between the browser requesting a page and when it receives the first byte of information from the server.
... this time includes dns lookup and establishing the connection using a tcp handshake and ssl handshake if the request is made over https.
... ttfb is the time it takes between the start of the request and the start of the response, in milliseconds: ttfb = responsestart - requeststart see also: a typical http session performanceresourcetiming performancetiming ...
How do you set up a local testing server? - Learn web development
this can be due to a variety of reasons, the most likely being: they feature asynchronous requests.
... some browsers (including chrome) will not run async requests (see fetching data from the server) if you just run the example from a local file.
... running a simple local http server to get around the problem of async requests, we need to test such examples by running them through a local web server.
Introducing asynchronous JavaScript - Learn web development
let's look at another example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; docu...
...it uses xmlhttprequest (often abbreviated to "xhr") to fetch the resource at the given url, then pass the response to the callback to do something with.
...a good example is the fetch() api, which is basically like a modern, more efficient version of xmlhttprequest.
Object building practice - Learn web development
the finished example will look a little something like this: this example will make use of the canvas api for drawing the balls to the screen, and the requestanimationframe api for animating the whole display — you don't need to have any previous knowledge of these apis, and we hope that by the time you've finished this article you'll be interested in exploring them more.
... add the following to the bottom of your code now: function loop() { ctx.fillstyle = 'rgba(0, 0, 0, 0.25)'; ctx.fillrect(0, 0, width, height); for (let i = 0; i < balls.length; i++) { balls[i].draw(); balls[i].update(); } requestanimationframe(loop); } all programs that animate things generally involve an animation loop, which serves to update the information in the program and then render the resulting view on each frame of the animation; this is the basis for most games and other such programs.
... runs the function again using the requestanimationframe() method — when this method is repeatedly run and passed the same function name, it runs that function a set number of times per second to create a smooth animation.
Test your skills: JSON - Learn web development
this basically means that you can't request a file from one origin using code on a different origin.
... in the live code editor above, both the javascript code and the requested json file are on the same origin (the code sits on a github repo, and is embedded here in an <iframe>).
... if you put your code on codepen for example, it would fail because the json it is requesting is not on the same origin.
Server-side website programming first steps - Learn web development
client-server overview now that you know the purpose and potential benefits of server-side programming, we're going to examine in detail what happens when a server receives a "dynamic request" from a browser.
... as most websites' server-side code handles requests and responses in a similar way, this will help you understand what you need to do when writing your own code.
... server-side web frameworks the last article showed you what a server-side web application needs to do in order to respond to requests from a web browser.
Setting up your own test automation environment - Learn web development
let's update our bstack_google_test.js demo, to show how these features work: first, we'll need to import the node request module, so we can use it to send requests to the rest api.
... add the following line at the very top of your code: const request = require("request"); now we'll update our capabilities object to include a project name — add the following line before the closing curly brace, remembering to add a comma at the end of the previous line (you can vary the build and project names to organize the tests in different windows in the browserstack automation dashboard): 'project' : 'google test 2' next we need to access the sessionid of the current session, so we know where to send the request (the id is included in the request url, as you'll see later).
...block near the bottom of the code to add rest api calls (again, replace the your-user-name and your-access-key placeholders in the code with your actual user name and access key values): driver.sleep(2000).then(function() { driver.gettitle().then(function(title) { if(title === 'webdriver - google search') { console.log('test passed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":"passed","reason":"google results showed correct title"}}); } else { console.log('test failed'); request({uri: "https://your-user-name:your-access-key@www.browserstack.com/automate/sessions/" + sessionid + ".json", method:"put", form:{"status":...
Git and GitHub - Learn web development
different team members will commonly want to create their own separate versions of the code (called branches in git), work on a new feature in that version, and then get it merged in a controlled manner (in github we use pull requests) with the master version when they are done with it.
... hello world (from github) this is a good place to start — this practical guide gets you to jump right into using github, learning the basics of git such as creating repositories and branches, making commits, and opening and merging pull requests.
... about pull requests (from github) a useful guide to managing pull requests, the way that your suggested code changes are delivered to people's repositories for consideration.
Command line crash course - Learn web development
we will first try to fetch the contents of mdn's "fetch" page using the curl command (which can be used to request content from urls), from /docs/web/api/fetch.
... therefore, if you use curl to request /docs/web/api/fetch, you won’t get an output.
...| grep location | awk '{ print "https://developer.mozilla.org" $2 }' your final output should look something like this: /docs/web/api/fetch /docs/web/api/globalfetch/globalfetch.fetch() /docs/web/api/globalfetch/fetch /docs/web/api/windoworworkerglobalscope/fetch by combining these commands we've customised the output to show the full urls that the mozilla server is redirecting through when we request the /docs/web/api/fetch url.
What to do and what not to do in Bugzilla
if you need faster access to get canconfirm or editbugs, especially in order to triage bugs or to participate in a bug day, then you can ask in #bmo on irc, or you may create a bug requesting permissions.
... resolving bugs as incomplete the problem is vaguely described with no steps to reproduce, or is a support request.
...esting work critical crashes, loss of data, severe memory leak major major loss of function normal regular issue, some loss of functionality under specific circumstances minor minor loss of function, or other problem where easy workaround is present trivial cosmetic problem like misspelled words or misaligned text enhancement request for enhancement the blocker severity should be used very seldomly, because only a fraction of the hundreds of thousands bugs really block the development of mozilla and these are normally fixed very quickly.
Debugging update problems
checking update requests if you're debugging the application update feature in firefox or other mozilla applications, you may need to see what requests are occurring.
... you can do this using the live http headers addon to determine the url of the update request.
... that url might look something like: https://aus3.mozilla.org/update/3/firefox/12.0a1/20120106040225/darwin_x86_64-gcc3-u-i386-x86_64-shark/nightly-profiling/darwin%2010.8.0/default/default/update.xml?force=1 you can then request this url manually to see what's inside.
Limitations of chrome scripts
http requests you can't observe http requests in the content process.
... a common pattern here is to use the notificationcallbacks property of the nsihttpchannel to get the dom window that initiated the load, like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.notificationcallbacks.getinterface(ci.nsidomwindow); } } or this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.notificationcallbacks.getinterface(ci.nsiload...
...in an http observer, you can get the browser message manager for the window using code like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var loadcontext = httpchannel.notificationcallbacks.getinterface(ci.nsiloadcontext); // topframeelement is the <browser> element var topframeelement = loadcontext.topframeelement; var browsermm = topframeelement.messagemanager; console.log("browsermm: " + browsermm); } } however, before firefox 38, this te...
HTMLIFrameElement.download()
syntax var instanceofdomrequest = instanceofhtmliframeelement.download(url, options); returns a domrequest for handling the download request.
... its request.onsuccess handler handles the success case, and its request.onerror handler handles the failure case.
... examples var browser = document.queryselector('iframe'); var request = browser.download(foourl, { filename: 'foo.bin' }); request.onsuccess = function() { console.log("file downladed"); } request.onerror = function() { console.log("download error"); } specification not part of any specification.
HTMLIFrameElement.getStructuredData()
syntax var instanceofdomrequest = instanceofhtmliframeelement.getstructureddata(); returns a domrequest to handle the getstructureddata() request's success and error cases.
... if the request is successful, the request.result is a json object representation of all microdata contained on the page loaded in the browser.
... examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getstructureddata(); request.onsuccess = function() { console.log(request.result); } }); running this code in a browser api app and then loading up a page that contains microdata (such as the website of british alt-country band salter cane) will result in a json object being returned, along the lines of: { "items": [ { "type":["http://microformats.org/profile/hcard"], "properties":{"fn":["chris askew"], "n":[ { "properties": { "given-name":["chris"], "family-name":["askew"], ...
mozbrowsersecuritychange
this may mean that the request is being loaded as part of a page in which some content was received over an insecure channel.
... secure: indicates that the data corresponding to the request was received over a secure channel.
... insecure: indicates that the data corresponding to the request was received over an insecure channel.
HTMLIFrameElement.purgeHistory()
syntax there is a domrequest version and a promise version: var mydomrequest = instanceofhtmliframeelement.purgehistory(); instanceofhtmliframeelement.purgehistory().then(function() { ...
... }); returns either a domrequest object that returns an onsuccess handler if the history is deleted, or an onerror handler if not.
... examples domrequest: var browser = document.queryselector('iframe'); var request = browser.purgehistory(); request.onsuccess = function() { console.log('history deleted!'); } request.onerror = function() { console.error(this.error.name); } promise: var browser = document.queryselector('iframe'); browser.purgehistory().then(function() { console.log('history deleted!'); }, function(error) { console.error(this.error.name); }); specification not part of any specification.
Browser API
this can influence resource allocation and some function usage such as requestanimationframe.
... browser api methods removed in firefox 65 in firefox 65, several of the mozilla browser api methods were removed in an effort to cut down on domrequest usage in the browser, and remove the parts of the browser api that are no longer needed (it is used only by the firefox devtools at this point).
... mozbrowserusernameandpasswordrequired sent when an http authentification is requested.
WebChannel.jsm
components.utils.import("resource://gre/modules/webchannel.jsm"); constructor webchannel(string webchannelid, nsiuri originorpermission); 2nd argument is a valid origin that should 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.
JavaScript code modules
http.jsm a wrapper for xmlhttprequest that provides convenient and simplified api for dealing with http requests.
... webrequest.jsm provides an api to add event listeners for the various stages of making an http request.
... the event listener receives detailed information about the request, and can modify or cancel the request.
Release phase
his (add the emphasized line): [paths] default = hg.mozilla.org/releases/l10n-central/x-testing default-push = ssh://hg.mozilla.org/releases/l10n-central/x-testing if you haven't already cloned the remote repository, enter this command: hg clone ssh://hg.mozilla.org/releases/l10n-central/x-testing mercurial will let you know that it's cloning the repository: destination directory: x-testing requesting all changes adding changesets adding manifests adding file changes added 4 changesets with 242 changes to 239 files updating to branch default 239 files updated, 0 files merged, 0 files removed, 0 files unresolved the default push url is the same as the default pull url (i.e., ssh://hg.mozilla.org/releases/l10n-central/x-testing).
... there is a specific process to follow in bugzilla for requesting these reviews: file a bug requesting the review.
... enter :pike as the requestee.
Fonts for Mozilla's MathML engine
an enhancement request has been submitted to microsoft to install latin modern math and stix by default.
...enhancement requests have been submitted to apple to ship opentype math fonts in the default installation.
... note: there is an enhancement request opened on the noto bug tracker to improve math support.
Phishing: a short definition
earlier responses by affected banks, and payment providers, was to attempt educating users to not click links in emails, along with requesting to verify email legitimacy through checking for relevant personal information.
...if both factors don’t match, the service will reject authentication requests.
...unfortunately, some users still feel it's too tedious unlocking a phone, opening the otp app, and manually typing a few digits each time a provider requests a new token.
NSS 3.16.3 release notes
ab:8c:e8:6a:81:10:9f:e4:8e ou = valicert class 2 policy validation authority sha1 fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6 ou = valicert class 3 policy validation authority sha1 fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb additionally, the following ca certificate was removed as requested by the ca ou = tdc internet root ca sha1 fingerprint: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a the following ca certificates were added cn = certification authority of wosign sha1 fingerprint: b9:42:94:bf:91:ea:8f:b6:4b:e6:10:97:c7:fb:00:13:59:b6:76:cb cn = ca 沃通根证书 sha1 fingerprint: 16:32:47:8d:89...
...public primary certification authority sha1 fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2 turned off websites and code signing trust bits (1024-bit root) ou = class 2 public primary certification authority - g2 sha1 fingerprint: b3:ea:c4:47:76:c9:c8:1c:ea:f2:9d:95:b6:cc:a0:08:1b:67:ec:9d turned off code signing trust bit (change requested by ca) cn = verisign class 2 public primary certification authority - g3 sha-1 fingerprint: 61:ef:43:d7:7f:ca:d4:61:51:bc:98:e0:c3:59:12:af:9f:eb:63:11 turned off code signing trust bit (change requested by ca) cn = ac raíz certicámara s.a.
... sha1 fingerprint: cb:a1:c5:f8:b0:e3:5e:b8:b9:45:12:d3:f9:34:a2:e9:06:10:d3:36 turned off websites trust bit (change requested by ca) cn = netlock uzleti (class b) tanusitvanykiado sha1 fingerprint: 87:9f:4b:ee:05:df:98:58:3b:e3:60:d6:33:e7:0d:3f:fe:98:71:af turned off websites and code signing trust bits (1024-bit root) cn = netlock expressz (class c) tanusitvanykiado sha1 fingerprint: e3:92:51:2f:0a:cf:f5:05:df:f6:de:06:7f:75:37:e1:65:ea:57:4b turned off websites and code signing trust bits (1024-bit root) bugs fixed in nss 3.16.3 this bugzilla query returns all the bugs fixed in nss 3.16.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&targ...
NSS 3.31 release notes
notable changes in nss 3.31 the apis that set a tls version range have been changed to trim the requested range to the overlap with a systemwide crypto policy, if configured.
... previously, ssl_versionrangeset and ssl_versionrangesetdefault returned a failure if the requested version range wasn't fully allowed by the systemwide crypto policy.
... they have been changed to return success, if at least one tls version overlaps between the requested range and the systemwide policy.
NSS Sample Code Sample1
the other hosts (secondary) request keys from the // primary host.
...this // 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 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.
sslintro.html
the handshake occurs automatically the first time communication is requested with a socket read/write or send/receive call.
...this occurs, for example, when an https server has received a request and determines that before it can answer the request, it needs to request an authentication certificate from the client.
... at the http protocol level, nothing more is being said (that is, no http request or response is being sent), so the server first uses ssl_rehandshake to begin a new handshake and then call ssl_forcehandshake to drive the handshake to completion.
Shumway
there are two places where shumway bugs are tracked: github (via issues and pull requests) manages problems relating to shumway, itself.
...please note that source code will be requested for the shumway developers to use as small test cases.
... you could also directly commit bug fixes as pull requests.
JSAPI User Guide
the word javascript may bring to mind features such as event handlers (like onclick), dom objects, window.open, and xmlhttprequest.
...report->filename : "[no filename]", (unsigned int) report->lineno, message); } int run(jscontext *cx) { // enter a request before running anything in the context.
... jsautorequest ar(cx); // create the global object and a new compartment.
JSDeletePropertyOp
provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
JSFastNative
provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
JSNative
provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
JSPropertyOp
provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
JS_CheckAccess
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
... mode jsaccessmode the type of access requested (read, write, etc.) vp jsval * out parameter.
JS_SetBranchCallback
provides request.
... in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
... the callback does not need to call js_beginrequest()).
JSAPI reference
k enum jscontextop js_getruntime js_getparentruntime added in spidermonkey 31 js_getobjectruntime added in spidermonkey 17 js_getcontextprivate js_setcontextprivate js_getsecondcontextprivate added in spidermonkey 17 js_setsecondcontextprivate added in spidermonkey 17 js_setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 ...
... js_beginrequest js_endrequest js_yieldrequest obsolete since jsapi 18 js_suspendrequest obsolete since jsapi 18 js_resumerequest obsolete since jsapi 18 js_getcontextthread obsolete since jsapi 8 js_setcontextthread obsolete since jsapi 8 js_clearcontextthread obsolete since jsapi 8 the following functions are always available, but in non-js_threadsafe builds, they do nothing: js_lockruntime obsolete...
... macros js_default_xml_namespace_id obsolete since jsapi 21 jsfun_bound_method obsolete since javascript 1.8.5 jsfun_getter obsolete since javascript 1.8.5 jsfun_setter obsolete since javascript 1.8.5 jsfun_global_parent obsolete since javascript 1.8.5 jsfun_heavyweight obsolete since jsapi 19 jsfun_lambda obsolete since jsapi 19 c++ features class jsautorequest class jsautolocalrootscope obsolete since javascript 1.8.5 class js::perfmeasurement (in jsperf.h) tracing and debugging js_setfunctioncallback added in spidermonkey 1.8.5 obsolete since jsapi 37 js_getfunctioncallback added in spidermonkey 1.8.5 obsolete since jsapi 37 ...
Feed content access API
use an xmlhttprequest to load the feed, then pass its string to an nsifeedprocessor to parse the feed.
... loading the feed and sending it to the parser is done using code similar to this: fetch: function(feedurl) { var httprequest = null; function inforeceived() { var data = httprequest.responsetext; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var uri = ioservice.newuri(feedurl, null, null); if (data.length) { var parser = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor); var listener = new feedtestresultlistener(); try { parser.listener = listener; parser.parsefromstring(data, uri); } cat...
...ch(e) { alert("error parsing feed."); } } } httprequest = new xmlhttprequest(); httprequest.open("get", feedurl, true); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're loading a document into a string, then parsing that string using its parsefromstring() method.
Using the Places annotation service
titemannotationstring(aitemid, aname); getitemannotationint32(aitemid, aname); getitemannotationint64(aitemid, aname); getitemannotationdouble(aitemid, aname); getitemannotationbinary(aitemid, aname, adata, adatalen, amimetype); from javascript: getpageannotation(auri, aname); getitemannotation(aitemid, aname); these functions will return/throw ns_error_not_available if the annotation requested does not exist.
... you can use the annotations service's hasannotation method to determine in advance if the page has the requested annotation.
...when the annotation name is "favicon," the annotation protocol handler will pass the request through to the favicon service for handling.
Components.isSuccessCode
if the task is sufficiently complex that it can fail, the notification will include a status code indicating the success or failure of the operation (see, for example, nsirequestobserver.onstoprequest()).
... const cc = components.classes; const ci = components.interfaces; const cr = components.results; // global flags polled externally var copyfailed = false; var copyinprogress = false; function copybufferedstream(instream, outstream) { var copyobserver = { onstartrequest: function(request, context) { copyinprogress = true; }, onstoprequest: function(request, context, statuscode) { copyinprogress = false; // did the copy fail?
... if (!components.issuccesscode(statuscode)) copyfailed = true; }, queryinterface: function(aiid) { if (aiid.equals(ci.nsirequestobserver) || aiid.equals(ci.nsisupports)) return this; throw cr.ns_error_no_interface; } }; var copier = cc["@mozilla.org/network/async-stream-copier;1"] .createinstance(ci.nsiasyncstreamcopier); copier.init(instream, outstream, null, true, false, 8192, true, true); copier.asynccopy(copyobserver, null); } ...
Components.utils.importGlobalProperties
system scopes such as jsms and frame scripts don't have certain objects, such as indexeddb and xmlhttprequest, that are available to dom window globals.
... atob blob btoa crypto css fetch file nsidomfile indexeddb nodefilter firefox 60 nsidomnodefilter obsolete since gecko 60 rtcidentityprovider textdecoder textencoder url urlsearchparams xmlhttprequest nsixmlhttprequest obsolete since gecko 60 for string/object in table without a minimum firefox version, it is not exactly known since when it was available, however it is guranteed available from firefox 28 and up.
... var domfile = services.appshell.hiddendomwindow.file('/path/to/file'); xpcom components some objects have an xpcom alternative, which typically allows more flexibility then the dom version here is an example of how to use the dom xmlhttprequest through xpcom interface of nsixmlhttprequest: var oreq = cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(ci.nsixmlhttprequest); ...
imgIContainerObserver
method overview void framechanged(in imgirequest arequest, in imgicontainer acontainer, [const] in nsintrect adirtyrect); native code only!
...void framechanged( in imgirequest arequest, in imgicontainer acontainer, [const] in nsintrect adirtyrect ); parameters arequest the image request for which the change occurred.
... notes the arequest parameter was added to this method in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
mozIAsyncHistory
.getservice(components.interfaces.moziasynchistory); method overview void getplacesinfo(in jsval aplaceidentifiers, in mozivisitinfocallback acallback); void isurivisited(in nsiuri auri, in mozivisitedstatuscallback acallback); void updateplaces(in moziplaceinfo, [optional] in mozivisitinfocallback acallback); methods getplacesinfo() starts an asynchronous request to determine whether or not a given uri has been visited; you must implement a callback to receive the result of the request.
... isurivisited() starts an asynchronous request to determine whether or not a given uri has been visited; you must implement a callback to receive the result of the request.
... acallback an object implementing the mozivisitedstatuscallback.isvisited() method; this method will be called with the results once the request has been completed.
mozIStorageService
openspecialdatabase() opens a connection to a named special database storage that identifies the type of storage requested.
...mozistorageconnection openspecialdatabase( in string astoragekey ); parameters astoragekey a string key identifying the type of storage requested.
... return value a new mozistorageconnection providing access to the requested database.
nsIApplicationUpdateService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void adddownloadlistener(in nsirequestobserver listener); astring downloadupdate(in nsiupdate update, in boolean background); void pausedownload(); void removedownloadlistener(in nsirequestobserver listener); nsiupdate selectupdate([array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); attributes attribute type description backgroundchecker nsiupdatechecker the update checker being used for ...
...void adddownloadlistener( in nsirequestobserver listener ); parameters listener an object implementing nsirequestobserver and optionally nsiprogresseventsink that will be notified of state and progress information as the update is downloaded.
...void removedownloadlistener( in nsirequestobserver listener ); parameters listener the listener object to remove.
nsIDirIndexListener
they can then be transformed into an output format (such as rdf, html and so on) inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void onindexavailable(in nsirequest arequest, in nsisupports actxt, in nsidirindex aindex); void oninformationavailable(in nsirequest arequest, in nsisupports actxt, in astring ainfo); methods onindexavailable() called for each directory entry.
... void onindexavailable( in nsirequest arequest, in nsisupports actxt, in nsidirindex aindex ); parameters arequest the request.
...void oninformationavailable( in nsirequest arequest, in nsisupports actxt, in astring ainfo ); parameters arequest the request.
nsIDirectoryServiceProvider
method overview nsifile getfile(in string prop, out prbool persistent); methods getfile() the directory service calls this method when it gets the first request for a prop or on every request if the prop is not persistent.
...subsequent requests for this prop will bypass the provider and use the cache.
... false if the provider will be asked for this prop each time it is requested.
nsIDownloadManagerUI
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getattention(); void show([optional] in nsiinterfacerequestor awindowcontext, [optional] in unsigned long aid, [optional] in short areason); attributes attribute type description visible boolean true if the download manager ui is visible; otherwise false.
... constants constant value description reason_user_interacted 0 when opening the download manager user interface, this value indicates that it's being done at the user's request.
... void show( in nsiinterfacerequestor awindowcontext, optional in unsigned long aid, optional in short areason optional ); parameters awindowcontext optional the parent window context to show the user interface.
nsIFactory
this can be nsnull if no aggregation is requested.
... iid the iid of the interface being requested in the component which is being currently created.
... exceptions thrown ns_error_no_interface indicates that the requested interface is not supported.
nsIFaviconService
an async request will be created for this uri and if the data is available, it will asynchronously get saved in the database without any further work from the caller.
... afaviconloadtype one of nsifaviconservice.favicon_load_private or nsifaviconservice.favicon_load_non_private to indicate that any network requests performed should act like ones from a private browsing context (ie.
...this should be determined via privatebrowsingutils.iswindowprivate(somerelatedwindow) if the favicon may expose the user's private browsing data by performing a network request, otherwise favicon_load_non_private may be used.
nsIHttpActivityObserver
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.
...http transaction activity for activity notifications of type activity_type_http_transaction, there are three activities that include extra data: activity_subtype_request_header aextrastringdata contains the text of the header.
nsIMutableArray
exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
... exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
... exceptions thrown ns_error_failure when a weak reference is requested, but the element does not support nsiweakreference.
nsIProtocolProxyCallback
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void onproxyavailable(in nsicancelable arequest, in nsiuri auri, in nsiproxyinfo aproxyinfo, in nsresult astatus); methods onproxyavailable() this method is called when proxy info is available or when an error in the proxy resolution occurs.
... void onproxyavailable( in nsicancelable arequest, in nsiuri auri, in nsiproxyinfo aproxyinfo, in nsresult astatus ); parameters arequest the value returned from asyncresolve.
...this is a failure code if the request could not be satisfied, in which case the value of astatus indicates the reason for the failure and aproxyinfo will be null.
nsIServiceManager
void getservice( in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters aclass the classid of the service that is being requested.
... void getservicebycontractid( in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result ); parameters acontractid the contractid of the service that is being requested.
...after that, they can request specific services by calling getservice().
nsISmsService
rvice); 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 of the message.
... send() void send( in domstring number, in domstring message, in long requestid, in unsigned long long processid optional ); parameters number a domstring with a telephone number to send to.
... requestid missing description processid optional missing description see also smsmanager smsmessage ...
nsIUploadChannel2
acontenttype this value will replace any existing content-type header on the http request, regardless of whether or not its empty.
...amethod the http request method to set on the stream.
... astreamhasheaders true if the stream already contains headers for the http request.
nsIWebBrowser
the chrome may optionally implement nsiinterfacerequestor, nsiwebbrowserchromefocus, nsicontextmenulistener and nsitooltiplistener to receive additional notifications from the browser object.
...note: nsiinterfacerequestor and nsiweakreference might also need to be implemented by the chrome object.
... see also nsibasewindow nsicontextmenulistener nsidomwindow nsiembeddingsitewindow nsiinterfacerequestor nsishistorylistener nsitooltiplistener nsiuricontentlistener nsiweakreference nsiwebbrowserchrome nsiwebbrowserchromefocus nsiwebprogresslistener ...
Autoconfiguration in Thunderbird
the component is actively watched for new bugs (as of november 2015) so there is no need to request review on the file.
...this may be on the same machine as other web servers, but the web server must be configured to the content to any requested domain.
... server_name autoconfig.*; return 301 http://autoconfig.hoster.com$request_uri; } or serve them directly from a common directory: server { listen 10.2.3.4:80; #again, use your server's public ip here!
Mailnews and Mail code review requirements
to obtained a ui-review on an attachment, set ui-review to '?' and enter :bwinton (for blake winton) as the requestee.
... if a reviewer feels that the patch would benefit from additional reviews, they should request a second review from an appropriate person.
... unit test rules patches are required to include automated tests which are run during make check or via mozmill in thunderbird, but submitters are encouraged to request exceptions from reviewers in cases where the cost is believed to outweigh the benefit.
Drawing and Event Handling - Plugins
npp_print: request a platform-specific print operation for the instance.
...the variable parameter contains the information the call is requesting, in this case npnvnetscapewindow (the native window in which plug-in drawing occurs).
... windows the requested information, a value of type hwnd, is returned from npn_getvalue in the value parameter.
Set an XHR breakpoint - Firefox Developer Tools
an xhr (xmlhttprequest) breakpoint breaks code execution when an xhr request is dispatched so that you can examine the current state of the program.
... you can break on all requests or on those that include a specific url.
... when your code breaks on an xhr request, the righthand pane will have two additional sections: call stack the list of functions that were executed in order ot get to the currently executing code.
Inspecting web sockets - Firefox Developer Tools
accessing the inspector when you are inspecting a web app that utilizes a web socket connection, the web socket requests are listed in the list of requests in the network monitor along with all other requests.
...only requests with the 101 status code (websocket protocol handshake) are visible, which indicates that the server is switching to a web socket connection.
... clicking on a web socket request opens the usual sidebar to reveal additional details.
Performance Analysis - Firefox Developer Tools
(alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stopwatch icon in the main window.) the network monitor then loads the site twice: once with an empty browser cache, and once with a primed browser cache.
... to get back to the network monitor's list of network requests click the "back" button on the left.
... network monitor features the following articles cover different aspects of using the network monitor: toolbar network request list network request details network traffic recording throttling ...
Web Console Helpers - Firefox Developer Tools
:block (starting in firefox 80) followed by an unquoted string, blocks requests where the url contains that string.
... in the network monitor, the string now appears and is selected in the request blocking sidebar.
...in the network monitor, the string is removed from the request blocking sidebar.
AbortController.signal - Web APIs
the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
... when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AudioContext.getOutputTimestamp() - Web APIs
performancetime: a point in the time coordinate system of a performance interface; the time after the document containing the audio context was first rendered examples in the following code we start to play an audio file after a play button is clicked, and start off a requestanimationframe loop running, which constantly outputs the contexttime and performancetime.
... play.addeventlistener('click', () => { if(!audioctx) { audioctx = new window.audiocontext(); } getdata(); source.start(0); play.setattribute('disabled', 'disabled'); raf = requestanimationframe(outputtimestamps); }); stop.addeventlistener('click', () => { source.stop(0); play.removeattribute('disabled'); cancelanimationframe(raf); }); // function to output timestamps function outputtimestamps() { let ts = audioctx.getoutputtimestamp() console.log('context time: ' + ts.contexttime + ' | performance time: ' + ts.performancetime); raf = requestanimationframe(outputtimestamps); } specifications specification status comment web audio apithe definition of 'getoutpu...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Bluetooth - Web APIs
WebAPIBluetooth
referringdevice; promise<sequence<bluetoothdevice>> getdevices(); promise<bluetoothdevice> requestdevice(optional requestdeviceoptions options = {}); }; bluetooth includes bluetoothdeviceeventhandlers; bluetooth includes characteristiceventhandlers; bluetooth includes serviceeventhandlers; properties inherits properties from its parent eventtarget.
... bluetooth.getdevices() returns a promise that resolved to an array of bluetoothdevices which the origin already obtained permission for via a call to bluetooth.requestdevice().
... bluetooth.requestdevice() returns a promise to a bluetoothdevice object with the specified options.
Body - Web APIs
WebAPIBody
the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled.
... body is implemented by both request and response.
...you'll notice that since we are requesting an image, we need to run body.blob() (response implements body) to give the response its correct mime type.
Cache.matchAll() - Web APIs
WebAPICachematchAll
syntax cache.matchall(request, {options}).then(function(response) { // do something with the response array }); parameters request optional the request for which you are attempting to find responses in the cache.
... this can be a request object or a url.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
Clipboard - Web APIs
WebAPIClipboard
read() requests arbitrary data (such as images) from the clipboard, returning a promise.
... readtext() requests text from the system clipboard; returns a promise which is resolved with a domstring containing the clipboard's text once it's available.
... for webextensions, you can request the clipboardread and clipboardwrite permissions to be able to use clipboard.readtext() and clipboard.writetext().
ClipboardItem - Web APIs
the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... gettype() returns a promise that resolves with a blob of the requested mime type, or an error if the mime type is not found.
... examples writing to clipboard here we're writing a new clipboarditem.clipboarditem() to the clipboard by requesting a png image using the fetch api, and in turn, the responses' blob() method, to create the new clipboarditem.
CredentialsContainer.get() - Web APIs
syntax var promise = credentialscontainer.get([options]) parameters options optional an object of type credentialrequestoptions that contains options for the request.
... federated: a federatedcredentialrequestoptions object containing requirements for returned federated credentials.
... publickey: an publickeycredentialrequestoptions object containing requirements for returned webauthn credentials.
DirectoryReaderSync - Web APIs
self.requestfilesystemsync = self.webkitrequestfilesystemsync || self.requestfilesystemsync; // global for holding the list of entry file system urls.
... if (!data.cmd || data.cmd != 'list') { return; } try { var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); getallentries(fs.root.createreader()); self.postmessage({entries: paths}); } catch (e) { onerror(e); } }; method overview entrysync readentries () raises (fileexception); method readentries() returns a lost of entries from a specific directory.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Document.exitFullscreen() - Web APIs
the document method exitfullscreen() requests that the element on this document which is currently being presented in full-screen mode be taken out of full-screen mode, restoring the previous state of the screen.
... this usually reverses the effects of a previous call to element.requestfullscreen().
... document.onclick = function (event) { if (document.fullscreenelement) { document.exitfullscreen() .then(() => console.log("document exited form full screen mode")) .catch((err) => console.error(err)) } else { document.documentelement.requestfullscreen(); } } note: for a more complete example, see the example in element.requestfullscreen().
Document.fullscreenEnabled - Web APIs
syntax var isfullscreenavailable = document.fullscreenenabled; value a boolean value which is true if the document and the elements within can be placed into full-screen mode by calling element.requestfullscreen().
... example in this example, before attempting to request full-screen mode for a <video> element, the value of fullscreenenabled is checked, in order to avoid making the attempt when not available.
... function requestfullscreen() { if (document.fullscreenenabled) { videoelement.requestfullscreen(); } else { console.log('your browser cannot use fullscreen right now'); } } specifications specification status comment fullscreen apithe definition of 'document.fullscreenenabled' in that specification.
Document: scroll event - Web APIs
instead, it is recommended to throttle the event using requestanimationframe(), settimeout(), or a customevent, as follows.
...this example optimizes thescroll event for requestanimationframe.
... // reference: http://www.html5rocks.com/en/tutorials/speed/animations/ let last_known_scroll_position = 0; let ticking = false; function dosomething(scroll_pos) { // do something with the scroll position } window.addeventlistener('scroll', function(e) { last_known_scroll_position = window.scrolly; if (!ticking) { window.requestanimationframe(function() { dosomething(last_known_scroll_position); ticking = false; }); ticking = true; } }); see more, similar examples on the resize event page.
Element: scroll event - Web APIs
instead, it is recommended to throttle the event using requestanimationframe(), settimeout(), or a customevent, as follows.
...this example optimizes thescroll event for requestanimationframe.
... // reference: http://www.html5rocks.com/en/tutorials/speed/animations/ let last_known_scroll_position = 0; let ticking = false; function dosomething(scroll_pos) { // do something with the scroll position } window.addeventlistener('scroll', function(e) { last_known_scroll_position = window.scrolly; if (!ticking) { window.requestanimationframe(function() { dosomething(last_known_scroll_position); ticking = false; }); ticking = true; } }); note: you can find more examples on the resize event page.
FetchEvent.preloadResponse - Web APIs
this promise resolves to the first matching url request in the cache object.
... addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'preloadresponse' in that specification.
FetchEvent.navigationPreload - Web APIs
addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileException - Web APIs
invalid_modification_err 9 the modification requested is not allowed.
...for example, the app is accessing a directoryentry when the user is requesting a fileentry.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystem - Web APIs
some browsers offer additional apis to create and manage file systems, such as chrome's requestfilesystem() method.
... basic concepts there are two ways to get access to a filesystem object: you can directly ask for one representing a sandboxed file system created just for your web app directly by calling window.requestfilesystem().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryEntry.getDirectory() - Web APIs
fileerror.security_err the request to access the directory was denied for security reasons.
... create optional if this property is true, and the requested file or directory doesn't exist, the user agent should create it.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryEntry.getFile() - Web APIs
fileerror.security_err the request to access the file was denied for security reasons.
... create optional if this property is true, and the requested file or directory doesn't exist, the user agent should create it.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryEntry - Web APIs
window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; window.directoryentry = window.directoryentry || window.webkitdirectoryentry; ...
... function onfs(fs){ fs.root.getdirectory('documents', {create:true}, function(directoryentry){ //directoryentry.isfile === false //directoryentry.isdirectory === true //directoryentry.name === 'documents' //directoryentry.fullpath === '/documents' }, onerror); } // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, onfs, onerror); properties this interface has no properties of its own, but inherits properties from its parent interface, filesystementry.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry - Web APIs
window.requestfilesystem = window.requestfilesystem || window.webkitrequestfilesystem; ...
... // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, function(fs) { fs.root.getfile('log.txt', {}, function(fileentry) { fileentry.remove(function() { console.log('file removed.'); }, onerror); }, onerror); }, onerror); properties this interface provides the following properties.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FullscreenOptions.navigationUI - Web APIs
the fullscreenoptions dictionary's navigationui property is used when calling requestfullscreen() to specify to what extent the user agent should include its standard user interface while the element is presented in full-screen mode.
... example in this example, the entire document is placed into full-screen mode by calling requestfullscreen() on the document's document.documentelement, which is the document's root <html> element.
... let elem = document.documentelement; elem.requestfullscreen({ navigationui: "show" }).then({}).catch(err => { alert(`an error occurred while trying to switch into full-screen mode: ${err.message} (${err.name})`); }); the promise's resolve handler does nothing, but if the promise is rejected, an error message is displayed by calling alert().
HTMLImageElement.crossOrigin - Web APIs
permitted values are: anonymous requests by the <img> element have their mode set to cors and their credentials mode set to same-origin.
... use-credentials requests by the htmlimageelement will use the cors mode and the include credentials mode; all image requests by the element will use cors, regardless of what domain the fetch is from.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLTableElement - Web APIs
when set, if the object doesn't represent a <caption>, a domexception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <thead>, a domexception with the hierarchyrequesterror name is thrown.
...when set, if the object doesn't represent a <tfoot>, a domexception with the hierarchyrequesterror name is thrown.
IDBDatabase: abort event - Web APIs
// open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('mi...
...nutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('abort', () => { console.log('transaction aborted'); }); // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.re...
...asktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.onabort = () => { console.log('transaction aborted'); }; // open a read/write db transaction, ready for adding the data const transaction = db.transaction(['todolist'], 'readwrite'); // abort the transaction transaction.abort(); }; ...
IDBDatabase: close event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples this example opens a database and listens for the close event: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('mi...
...nutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('close', () => { console.log('database connection closed'); }); }; the same example, using the onclose property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the object...
...store will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.onclose = () => { console.log('database connection closed'); }; }; ...
IDBDatabase.deleteObjectStore() - Web APIs
transactioninactiveerror occurs if a request is made on a source database that doesn't exist (e.g.
... example var dbname = "sampledb"; var dbversion = 2; var request = indexeddb.open(dbname, dbversion); request.onupgradeneeded = function(e) { var db = request.result; if (e.oldversion < 1) { db.createobjectstore("store1"); } if (e.oldversion < 2) { db.deleteobjectstore("store1"); db.createobjectstore("store2"); } // etc.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
// let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.objectStoreNames - Web APIs
example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.onabort - Web APIs
}; example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
... dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function() { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function() { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); // define what data items the objectstore will contain objectstore.createindex("hours", "hours", { unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notif...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.transaction() - Web APIs
for a complete example, see our to-do notifications app (view example live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... // this is used a lot below db = dbopenrequest.result; // run the displaydata() function to populate the task list with // all the to-do list data already in the idb displaydata(); }; // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["todolist"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.version - Web APIs
example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database // being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
... this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
syntax var getallkeysrequest = idbindex.getall(); var getallkeysrequest = idbindex.getall(query); var getallkeysrequest = idbindex.getall(query, count); parameters query optional a key or an idbkeyrange identifying the records to retrieve.
... return value an idbrequest object on which subsequent events related to this operation are fired.
... example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBObjectStore.indexNames - Web APIs
for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); console.log(objectstore.indexnames); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'indexnames' in that specificat...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBTransactionSync - Web APIs
idbobjectstoresync objectstore( in domstring name ) raises (idbdatabaseexception); parameters name the name of the requested object store.
... returns idbobjectstoresync an object for accessing the requested object store.
... exceptions the method can raise an idbdatabaseexception with the following code: not_found_err if the requested object store is not in this transaction's scope.
Locks.mode - Web APIs
WebAPILockmode
the mode read-only property of the lock interface returns the access mode passed to lockmanager.request() when the lock was requested.
... example the following examples show how the mode property is passed in the call to lockmanager.request().
... // should show "exclusive" (the default) navigator.locks.request("my_resource", show_lock_properties); // should show "exclusive" navigator.locks.request("my_resource", {mode: "exclusive"}, show_lock_properties); // should show "shared" navigator.locks.request("my_resource", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'mode' in that specification.
LockedFile.getMetadata() - Web APIs
syntax var request = instanceoflockedfile.getmetadata(param); parameters param optional an object used to request specific metadata.
...the following metadata are supported: size : will provide the size of the file lastmodified : will provide the date when the file was last modified return a filerequest object.
... in case of success, the request's result is an object with the metadata requested through the param object.
LockedFile.readAsArrayBuffer() - Web APIs
syntax var request = instanceoflockedfile.readasarraybuffer(size); parameters size a number representing the number of bytes to read in the file.
... return a filerequest object to handle the success or failure of the operation.
... in case of success, the request's result is an arraybuffer representing the data that have been read.
LockedFile.readAsText() - Web APIs
syntax var request = instanceoflockedfile.readastext(size[, encoding]); parameters size a number representing the number of bytes to read in the file.
... return a filerequest object to handle the success or failure of the operation.
... in case of success, the request's result is a string representing the data that have been read.
MediaTrackConstraints.cursor - Web APIs
the mediatrackconstraints dictionary's cursor property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the cursor constrainable property, which is used to specify whether or not the cursor should be included in the captured video.
... example: cursor always visible this example sets up the constraints to request that the cursor always be visible.
... let displaymediaoptions = { cursor: "always" }; example: cursor visible during motion with fallback in this example, the cursor property is configured to request that the cursor be visible when in motion, falling back to always being visible if the user agent doesn't support in-motion only cursor rendering.
MerchantValidationEvent.complete() - Web APIs
another payment request is currently being processed, the current payment request is not currently being displayed to the user, or payment information is currently being updated.
... example in this example, we see the client-side code needed to support merchant validation for a payment request called payrequest: payrequest.onmerchantvalidation = event => { const validationdatapromise = getvalidationdata(event.validationurl); event.complete(validationdatapromise); } function getvalidationdata(url) { /* ...retrieve the validation data from the url...
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.complete()' in that specification.
NavigationPreloadManager - Web APIs
addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Online and offline events - Web APIs
you need to know when the user is offline, so that you can queue your server requests for a later time.
...according to the specification: the navigator.online attribute must return false if the user agent will not contact the network when the user follows links or when a script requests a remote page (or knows that such an attempt would fail)...
...und: red; } and the corresponding htmlxxx when mochitests for this are created, point to those instead and update this example -nickolay <div id="status"></div> <div id="log"></div> <p>this is a test</p> here's the live result notes if the api isn't implemented in the browser, you can use other signals to detect if you are offline including using service workers and responses from xmlhttprequest.
Notifications API - Web APIs
first, the user needs to grant the current origin permission to display system notifications, which is generally done when the app or site initialises, using the notification.requestpermission() method.
... this should be done in response to a user gesture, such as clicking a button, for example: btn.addeventlistener('click', function() { let promise = notification.requestpermission(); // wait for permission }) this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
... this will spawn a request dialog, along the following lines: from here the user can choose to allow notifications from this origin, or block them.
PaymentAddress.toJSON() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
PaymentCurrencyAmount.currencySystem - Web APIs
this obsolete property was removed in the may 3, 2018 update of the payment request api specification.
... specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
... candidate recommendation no longer part of the specification payment request api the definition of 'paymentcurrencyamount.currencysystem' in that specification.
PaymentDetailsUpdate - Web APIs
this can be done either by calling the paymentrequestupdateevent.updatewith() method or by using the paymentrequest.show() method's detailspromise parameter to provide a promise that returns a paymentdetailsupdate that updates the payment information before the user interface is even enabled for the first time.
... displayitems optional an array of paymentitem objects, each describing one line item for the payment request.
... specifications specification status comment payment request apithe definition of 'paymentdetailsupdate' in that specification.
PaymentMethodChangeEvent.methodDetails - Web APIs
request.onpaymentmethodchange = function(ev) { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "visa": // do apple pay specific handling for visa card...
... ev.updatewith(newstuff); }; const response = await request.show(); note that the methoddetails property is being used by the calculatediscount() function to compute any payment discount, then updatewith() is called to update the event with the computed update.
... specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methoddetails' in that specification.
PaymentMethodChangeEvent.methodName - Web APIs
see payment method identifiers in payment request api for more information.
... request.onpaymentmethodchange = function(ev) { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "visa": // do apple pay specific handling for visa card...
... ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methodname' in that specification.
PaymentValidationErrors - Web APIs
the paymentvalidationerrors dictionary represents objects providing information about any and all errors that occurred while processing a payment request.
... when validation of the paymentresponse returned by the paymentrequest.show() or paymentresponse.retry() methods fails, your code creates a paymentvalidationerrors object to pass into retry() so that the user agent knows what needs to be fixed and what if any error messages to display to the user.
... example specifications specification status comment payment request api candidate recommendation initial definition.
ProgressEvent - Web APIs
the progressevent interface represents events measuring progress of an underlying process, like an http request (for an xmlhttprequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>).
... examples the following example adds a progressevent to a 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.
PublicKeyCredentialCreationOptions.extensions - Web APIs
extensions are values requesting additional processing by the client and by the authenticator.
... note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.extensions.
...as of june 2020, only appid (used during creation with publickeycredentialrequestoptions.extensions) is supported by chrome and edge.
PublicKeyCredentialCreationOptions - Web APIs
properties publickeycredentialcreationoptions.rp an object describing the relying party which requested the credential creation.
...those extensions are used to request additional processing (e.g.
...smith", }, // requested format of new keypair pubkeycredparams: [{ type: "public-key", alg: cose_alg_ecdsa_w_sha256, }], // timeout after 1 minute timeout: 60000, // do not send the authenticator's origin attestation attestation: "none", extensions: { uvm: true, exts: true }, // filter out authenticators...
PushManager.register() - Web APIs
the register method is used to ask the system to request a new endpoint for notifications.
... syntax var request = navigator.push.register(); return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be a string, which is the endpoint url.
PushManager.unregister() - Web APIs
syntax var request = navigator.push.unregister(pushendpoint); properties pushendpoint a pushendpoint to be unregistered.
... return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be a pushregistration object representing the endpoint that has been unregistered.
PushManager - Web APIs
the pushmanager interface of the push api provides a way to receive notifications from third-party servers as well as request urls for push notifications.
... deprecated methods pushmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
....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 available, and can be sent to it using, // for example, an xmlhttprequest.
RTCIceCandidatePairStats.readable - Web APIs
the obsolete rtcicecandidatepairstats property readable reports whether or not the connection described by the candidate pair has received at least one valid incoming ice request.
... syntax isreadable = rtcicecandidatepairstats.readable; value a boolean value which is true if the connection described by this candidate pair has received at least one valid ice request, and is therefore ready to be read from.
... note: this property was removed from the specification in early 2017 because you can determine whether or not the connection is readable by checking to see if requestsreceived is greater than 0: if (icpstats.requestsreceived > 0) { /* at least one ice request has been received */ } ...
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionsreceived property indicates the total number of stun connectivity check request retransmissions that have been received so far on the pair of candidates.
... syntax retransmissionsreceived = rtcicecandidatepairstats.retransmissionsreceived; value an integer value indicating the total number of retransmitted stun connectivity check requests have been received on the connection referenced by this candidate pair so far.
... note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionssent property indicates the total number of stun connectivity check request retransmissions that have been sent so far on the pair of candidates.
... syntax retransmissionssent = rtcicecandidatepairstats.retransmissionssent; value an integer value indicating the total number of retransmitted stun connectivity check requests have been sent on the connection referenced by this candidate pair so far.
... note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
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.
RTCPeerConnection.restartIce() - Web APIs
the webrtc api's rtcpeerconnection interface offers the restartice() method to allow a web application to easily request that ice candidate gathering be redone on both ends of the connection.
... if negotiation fails to complete—either due to rollback or because incoming offers are in the process of being negotiated—the rtcpeerconnection will remember that you requested ice restart.
... pc.addeventlistener("iceconnectionstatechange", event => { if (pc.iceconnectionstate === "failed") { /* possibly reconfigure the connection in some way here */ /* then request ice restart */ pc.restartice(); } }); with this code in place, a transition to the failed state during ice negotiation will cause a negotiationneeded event to be fired, in response to which your code should renegotiate as usual.
Response.clone() - Web APIs
WebAPIResponseclone
example in our fetch response clone example (see fetch response clone live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch().
... var image1 = document.queryselector('.img1'); var image2 = document.queryselector('.img2'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { var response2 = response.clone(); response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image1.src = objecturl; }); response2.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image2.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'clone()' in ...
Response.headers - Web APIs
WebAPIResponseheaders
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.headers); // returns a headers{} object response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'headers' in that specification.
Response.ok - Web APIs
WebAPIResponseok
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.ok); // returns true if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'ok' in that specification.
Response.redirected - Web APIs
the read-only redirected property of the response interface indicates whether or not the response is the result of a request you made which was redirected.
... syntax var isredirected = response.redirected; value a boolean which is true if the response indicates that your request was redirected.
... examples detecting redirects checking to see if the response comes from a redirected request is as simple as checking this flag on the response object.
Response.status - Web APIs
WebAPIResponsestatus
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.status); // returns 200 response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'status' in that specification.
Response.statusText - Web APIs
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.statustext); // returns "ok" if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'statustext' in that specification.
Response.url - Web APIs
WebAPIResponseurl
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.url); // returns /docs/web/api/response/flowers.jpg response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'url' in that specification.
ServiceWorkerGlobalScope.onfetch - Web APIs
when fired, the code returns a promise that resolves to the first matching request in the cache object.
... self.addeventlistener('fetch', function(event) { console.log('handling fetch event for', event.request.url); event.respondwith( caches.match(event.request).then(function(response) { if (response) { console.log('found response in cache:', response); return response; } console.log('no response found in cache.
... about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
StorageQuota - Web APIs
the storagequota property of the navigator interface of the quota management api provides means to query and request storage usage and quota information.
... storagequota.requestpersistentquota requests persistent storage for the requesting application and returns a promise to an instance of storageinfo.
... there is no guarantee that the requested space will be granted by the user agent.
USBOutTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb host to the usb device.
... properties usbouttransferresult.byteswrittenread only returns the number of bytes from the transfer request that were sent to the device.
... usbouttransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
Visual Viewport API - Web APIs
one thing that may not be clear in this example is the use of the pendingupdate flag and the call to requestanimationframe().
...using requestanimationframe() ensures that the transform ocurrs before the next render.
... let pendingupdate = false; function viewporthandler(event) { if (pendingupdate) return; pendingupdate = true; requestanimationframe(() => { pendingupdate = false; var layoutviewport = document.getelementbyid('layoutviewport'); // since the bar is position: fixed we need to offset it by the // visual viewport's offset from the layout viewport origin.
WakeLockSentinel - Web APIs
an object representing the wake lock is returned via the navigator.wakelock.request() method.
... examples in this example we create an asynchronous function which requests a wakelocksentinel.
... // create a reference for the wake lock let wakelock = null; // create an async function to request a wake lock const requestwakelock = async () => { try { wakelock = await navigator.wakelock.request('screen'); // listen for our release event wakelock.addeventlistener('release', () => { // if wake lock is released alter the ui accordingly }); } catch (err) { // if wake lock request fails - usually system related, such as battery } } wakelockonbutton.addeventlistener('click', () => { requestwakelock(); }) wakelockoffbutton.addeventlistener('click', () => { if (wakelock !== null) { wa...
WebGLActiveInfo - Web APIs
properties webglactiveinfo.name the read-only name of the requested variable.
... webglactiveinfo.size the read-only size of the requested variable.
... webglactiveinfo.type the read-only type of the requested variable.
WebGLRenderingContext.makeXRCompatible() - Web APIs
ase invalidstateerror: showsimplemessagebox("you don't appear to have a compatible xr headset available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.contains("use-webxr") && navigator.xr) { try { xrsession = await navigator.xr.requestsession("immersive-vr"); usingxr = true; } catch(err) { xrsession = null; usingxr = false; } } startgame(); } function startgame() { currentscene = "scene1"; loadsceneresources(currentscene); /* and so on */ } this works by having two buttons, one which starts the game normally and the other which starts the game in vr mode.
...the function determines that the button clicked was the one requesting immersive-vr mode by checking to see if the button has the use-webxr class on it.
... if the button clicked by the user has that class (and we've confirmed that webxr is available by ensuring that the navigator.xr property exists), we use requestsession() to request a new webxr session and set the usingxr flag to true.
A basic 2D WebGL animation example - Web APIs
entrotation); gl.uniform4fv(uglobalcolor, [0.1, 0.7, 0.2, 1.0]); gl.bindbuffer(gl.array_buffer, vertexbuffer); avertexposition = gl.getattriblocation(shaderprogram, "avertexposition"); gl.enablevertexattribarray(avertexposition); gl.vertexattribpointer(avertexposition, vertexnumcomponents, gl.float, false, 0, 0); gl.drawarrays(gl.triangles, 0, vertexcount); window.requestanimationframe(function(currenttime) { let deltaangle = ((currenttime - previoustime) / 1000.0) * degreespersecond; currentangle = (currentangle + deltaangle) % 360; previoustime = currenttime; animatescene(); }); } the first thing that needs to be done in order to draw a frame of the animation is to clear the background to the desired color.
...that's done here by calling requestanimationframe(), which asks that a callback function be executed the next time the browser is ready to update the screen.
... our requestanimationframe() callback receives as input a single parameter, currenttime, which specifies the time at which the frame drawing began.
WebRTC connectivity - Web APIs
srflx a server reflexive candidate is generated by a stun/turn server; the connection's initiator requests a candidate from the stun server, which forwards the request through the remote peer's nat, which creates and returns a candidate whose ip address is local to the remote peer.
... the stun server then replies to the initiator's request with a candidate whose ip address is unrelated to the remote peer.
... tcp candidate types tcp candidates (that is, candidates whose protocol is tcp) can be of these types: active the transport will try to open an outbound connection but won't receive incoming connection requests.
Signaling and video calling - Web APIs
you can use anything you like, from websocket to xmlhttprequest to carrier pigeons to exchange the signaling information between the two peers.
...this function's role is to close the call, and send a signalling server notification to the other peer, requesting it also close.
... once the rtcpeerconnection has been created, we request access to the user's camera and microphone by calling mediadevices.getusermedia(), which is exposed to us through the navigator.mediadevices.getusermedia property.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
here's what that looks like conceptually: your code tells the webxr engine that you want to provide the next animation frame by calling the xrsession method requestanimationframe(), providing a callback function that renders a frame of animation.
... example frame callback a fairly basic (but typical) callback for rendering frames might look like this: function myanimationframecallback(time, frame) { let adjustedrefspace = applypositionoffsets(xrreferencespace); let pose = frame.getviewerpose(adjustedrefspace); animationframerequestid = frame.session.requestanimationframe(myanimationframecallback); if (pose) { let gllayer = frame.session.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); checkglerror("binding the framebuffer"); gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit | gl.depth_buffer_bit); checkglerror("clearing the framebuffe...
... next, we go ahead and queue up the request to render the next frame of video, so we don't have to worry about doing it later, by simply calling requestanimationframe() again.
Visualizations with Web Audio API - Web APIs
escribed in the previous section to set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into our array analyser.getbytetimedomaindata(dataarray); next, fill the canvas with a solid colour to start canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); set a line width and stroke...
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); next, we start our draw() function off, again setting up a loop with requestanimationframe() so that the displayed data keeps updating, and clearing the display with each animation frame.
... function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); now we set our barwidth to be equal to the canvas width divided by the number of bars (the buffer length).
XRRigidTransform() - Web APIs
examples in this example, the beginning of the animation of a scene is shown, starting with a request for a reference space of a given type, then shifting the coordinate system based on a transform before requesting the first animation frame.
... let animationframerequestid = 0; xrsession.requestreferencespace("local-floor") .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace.
... then requestanimationframe() is called to ask for a new animation frame to draw into.
XRRigidTransform - Web APIs
even better, once it's been computed, it's cached so that subsequent requests are significantly faster.
...it then requests the first animation frame callback by calling the session's requestanimationframe() method.
... xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification.
XRSession.visibilityState - Web APIs
the possible values of visibilitystate are: hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
...to that end, the session's requestanimationframe() callbacks are being processed at the xr device's native refresh rate and input controllers are being processed as normal.
...in order to optimize resource utilization, the user agent may be handling the session's requestanimationframe() callbacks at a throttled rate.
XRVisibilityState - Web APIs
values hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
...to that end, the session's requestanimationframe() callbacks are being processed at the xr device's native refresh rate and input controllers are being processed as normal.
...in order to optimize resource utilization, the user agent may be handling the session's requestanimationframe() callbacks at a throttled rate.
XRWebGLLayer() - Web APIs
the browser selects the anti-aliasing method to use; there is no support for requesting a specific mode yet.
... depth optional a boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated.
... stencil optional a boolean value which, if true, requests that the new layer include a stencil buffer.
XRWebGLLayerInit.antialias - Web APIs
the boolean antialias property, if present and set to true in the xrwebgllayerinit object provided as the xrwebgllayer() constructor's layerinit parameter, requests that the new webgl rendering layer support anti-aliasing.
... there is no way to request a specific anti-aliasing format or level; this decision is left up to the user agent.
... syntax let layerinit = { antialias: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { antialias: boolvalue }); value a boolean value which can be set to true to request anti-aliasing support in the new webgl rendering layer.
XRWebGLLayerInit - Web APIs
the browser selects the anti-aliasing method to use; there is no support for requesting a specific mode yet.
... depth optional a boolean value which, if true, requests that the new layer have a depth buffer; otherwise, no depth layer is allocated.
... stencil optional a boolean value which, if true, requests that the new layer include a stencil buffer.
Cognitive accessibility - Accessibility
enable the user to postpone content updates by providing a way to request content updates rather than updating automatically.
... change setting based on an active request form control operation and data entry should result in predictable behavior.
... if a submission causes a legal or financial transaction to occur, provide a stated time within which the request can be amended or canceled by the user.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
no support for document formatting or "dom" as requested by some vendors: support a custom interface that gives them the formatting information they are requesting.
...the tree view object itself handles all of the requests for get_accname for child objects.
... 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.
Web accessibility for seizures and physical reactions - Accessibility
this is "1" if the user has requested not to be tracked by web sites, content, or advertising" media queries level 5 environmentmq (planned in media queries level 5) light-level has three valid values: dim, normal, and washed.
... 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 colors.
... prefers-reduced-transparency the prefers-reduced-transparency media feature is used to detect if the user has requested the system minimize the amount of transparent or translucent layer effects it uses.
CSS Animations tips and tricks - CSS: Cascading Style Sheets
function play() { document.queryselector(".box").classname = "box"; window.requestanimationframe(function(time) { window.requestanimationframe(function(time) { document.queryselector(".box").classname = "box changing"; }); }); } this looks weird, doesn't it?
... to be sure that the styles are recalculated, we use window.requestanimationframe(), specifying a callback.
... our callback cleverly calls requestanimationframe() a second time!
HTML5 - Developer guides
WebGuideHTMLHTML5
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.
... xmlhttprequest level 2 allows fetching asynchronously some parts of the page, allowing it to display dynamic content, varying according to the time and user actions.
... requestanimationframe allows control of animations rendering to obtain optimal performance.
Index - Developer guides
WebGuideIndex
2 ajax ajax, dom, json, javascript, references, xmlhttprequest asynchronous javascript and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a number of existing technologies together 3 community ajax if you know of useful mailing lists, newsgroups, forums, or other communities related to ajax, please link to them here.
... 4 getting started ajax, api, advanced, javascript, webmechanics, xmlhttprequest this article guides you through the ajax basics and gives you some simple hands-on examples to get you started.
... 37 parsing and serializing xml ajax, add-ons, dom, dom parsing, document, extensions, guide, htmldocument, json, parsing, parsing xml, serializing, serializing xml, xml, xmldocument, xmlhttprequest in this article, we'll look at the objects provided by the web platform to make the common tasks of serializing and parsing xml easy.
Parsing and serializing XML - Developer guides
xmlhttprequest loads content from a url; xml content is returned as an xml document object with a dom tree built from the xml itself.
..."error while parsing" : odom.documentelement.nodename); parsing url-addressable resources into dom trees using xmlhttprequest here is sample code that reads and parses a url-addressable xml file into a dom tree: var xhr = new xmlhttprequest(); xhr.onload = function() { dump(xhr.responsexml.documentelement.nodename); } xhr.onerror = function() { dump("error while getting xml."); } xhr.open("get", "example.xml"); xhr.responsetype = "document"; xhr.send(); the value returned in the xhr object's responsexml field is...
...alternatively, use a dom tree obtained from xmlhttprequest.
User input and controls - Developer guides
this is the code to request pointer lock on an element: element.requestpointerlock(); note: for a full tutorial and reference, read our pointer_lock_api page.
...you can achieve this by calling element.requestfullscreen() on that element.
... bear in mind that many browsers still implement this with a vendor prefix, so you will probably need to fork your code something like this: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } else if (elem.msrequestfullscreen) { elem.msrequestfullscreen(); } else if (elem.mozrequestfullscreen) { elem.mozrequestfullscreen(); } else if (elem.webkitrequestfullscreen) { elem.webkitrequestfullscreen(); } note: to find more out about adding fullscreen functionality your application, read our documentation about using fullscreen mode.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
... these attributes are enumerated, and have the following possible values: keyword description anonymous cors requests for this element will have the credentials flag set to 'same-origin'.
... use-credentials cors requests for this element will have the credentials flag set to 'include'.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...possible (case insensitive) values: post: the post method; form data sent as the request body.
... examples html <!-- form which will send a get request to the current url --> <form> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form which will send a post request to the current url --> <form method="post"> <label>name: <input name="submitted-name" autocomplete="name"> </label> <button>save</button> </form> <!-- form with fieldset, legend, and label --> <form metho...
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
if 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 requested facing mode isn't available, the user agent may fall back to its preferred default mode.
... note: capture was previously a boolean attribute which, if present, requested that the device's media capture device(s) such as camera or microphone be used instead of requesting a file input.
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
if 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 url is then sent to the server using an http get request.
... post the form's data is included in the body of the request that is sent to the url given by the formaction or action attribute using an http post request.
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... <label for="userpassword">password: </label> <input id="userpassword" type="password" required> <input type="submit" value="submit"> specifying an input mode if your recommended (or required) password syntax rules would benefit from an alternate text entry interface than the standard keyboard, you can use the inputmode attribute to request a specific one.
... examples requesting a social security number this example only accepts input which matches the format for a valid united states social security number.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
39 html attribute: crossorigin advanced, attribute, cors, html, needscontent, reference, security the crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
...it is expected that the <keygen> element will be used in an html form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.
... 235 preloading content with rel="preload" guide, html, javascript, link, media, performance, web performance, as, preload, rel the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
Using the application cache - HTML: Hypertext Markup Language
all requests to such resources bypass the cache, even if the user is offline.
... as an example, you can use network entries to load and execute scripts and other code from the server instead of the cache: cache manifest network: /api the cache manifest section listed above ensures that requests to load resources contained in the http://www.example.com/api/ subtree always go to the network without attempting to access the cache.
...for example, let's say the cache manifest file http://www.example.com/example.appcache includes the following content: cache manifest fallback: example/bar/ example.html any request to http://www.example.com/example/bar/ or any of its subdirectories and their content cause the browser to issue a network request to attempt to load the requested resource.
Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’ - HTTP
the http method being used by the cors request is not included in the list of methods specified by the response's access-control-allow-methods header.
... this header specifies a comma-delineated list of the http methods which may be used when using cors to access the url specified in the request; if the request is using any other method, this error occurs.
... for example, if the response includes: access-control-allow-methods: get,head,post trying to use a put request will fail with this error.
Reason: CORS preflight channel did not succeed - HTTP
the cors request requires preflight, preflighting could not be performed.
... there are a couple of reasons why preflighting might fail: a cross-site request has previously been performed that already did a preflight, and doing the preflight again is not permitted.
... the preflight request simply suffered any kind of networking error that might ordinarily occur.
Accept-Charset - HTTP
the accept-charset request http header advertises which character encodings the client understands.
... if the server cannot serve any character encoding from this request header, it can theoretically send back a 406 not acceptable error code.
... 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.
Allow - HTTP
WebHTTPHeadersAllow
this header must be sent if the server responds with a 405 method not allowed status code to indicate which request methods can be used.
... an empty allow header indicates that the resource allows no request methods, which might occur temporarily for a given resource, for example.
... header type entity header forbidden header name no syntax allow: <http-methods> directives <http-methods> the comma-separated list of allowed http request methods.
Connection - HTTP
if the value sent is keep-alive, the connection is persistent and not closed, allowing for subsequent requests to the same server to be done.
...this is the default on http/1.0 requests.
...having a persistent connection is the default on http/1.1 requests.
Content-Range - HTTP
<range-start> an integer in the given unit indicating the beginning of the request range.
... <range-end> an integer in the given unit indicating the end of the requested range.
... examples content-range: bytes 200-1000/67589 specifications specification title rfc 7233, section 4.2: content-range hypertext transfer protocol (http/1.1): range requests ...
CSP: referrer - HTTP
no referrer information is sent along with requests.
... "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.
DNT - HTTP
WebHTTPHeadersDNT
the dnt (do not track) request header indicates the user's tracking preference.
... header type request header forbidden header name yes syntax dnt: 0 dnt: 1 dnt: null directives 0 the user prefers to allow tracking on the target site.
... examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification.
Early-Data - HTTP
the early-data header is set by an intermediary to indicate that the request has been conveyed in tls early data, and also indicates that the intermediary understands the 425 (too early) status code.
... the early-data header is not set by the originator of the request (i.e., a browser).
... header type request header forbidden header name no syntax early-data: 1 examples get /resource http/1.0 host: example.com early-data: 1 specifications specification title rfc 8470, section 5.1: the early-data header field using early data in http ...
Feature-Policy: payment - HTTP
the http feature-policy header field's payment directive controls whether the current document is allowed to use the payment request api.
... when this policy is disabled, the paymentrequest() constructor will throw a syntaxerror.
... specifications specification status comment payment request api candidate recommendation see section 16.
From - HTTP
WebHTTPHeadersFrom
the from request header contains an internet email address for a human user who controls the requesting user agent.
...a crawler), the from header should be sent, so you can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests.
... header type request header forbidden header name no syntax from: <email> directives <email> a machine-usable email address.
If-Range - HTTP
WebHTTPHeadersIf-Range
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.
... header type request header forbidden header name no syntax if-range: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt if-range: <etag> directives <etag> an entity tag uniquely representing the requested resource.
... examples if-range: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7233, section 3.2: if-range hypertext transfer protocol (http/1.1): range requests ...
Keep-Alive - HTTP
the keep-alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests.
... max: indicating the maximum number of requests that can be sent on this connection before closing it.
... unless 0, this value is ignored for non-pipelined connections as another request will be sent in the next response.
Pragma - HTTP
WebHTTPHeadersPragma
the pragma http/1.0 general header is an implementation-specific header that may have various effects along the request-response chain.
... note: pragma is not specified for http responses and is therefore not a reliable replacement for the general http/1.1 cache-control header, although it does behave the same as cache-control: no-cache, if the cache-control header field is omitted in a request.
...forces caches to submit the request to the origin server for validation before releasing a cached copy.
Referer - HTTP
WebHTTPHeadersReferer
the referer request header contains the address of the previous web page from which a link to the currently requested page was followed.
... an unsecured http request is used and the referring page was received with a secure protocol (https).
... header type request header forbidden header name yes syntax referer: <url> directives <url> an absolute or partial address of the previous web page from which a link to the currently requested page was followed.
Retry-After - HTTP
the retry-after response http header indicates how long the user agent should wait before making a follow-up request.
... when sent with a 429 (too many requests) response, this indicates how long to wait before making a new request.
... when sent with a redirect response, such as 301 (moved permanently), this indicates the minimum time that the user agent is asked to wait before issuing the redirected request.
Sec-Fetch-Dest - HTTP
the sec-fetch-dest fetch metadata header indicates the request's destination, that is how the fetched data will be used.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-dest: audio sec-fetch-dest: audioworklet sec-fetch-dest: document sec-fetch-dest: embed sec-fetch-dest: empty sec-fetch-dest: font sec-fetch-dest: image sec-fetch-dest: manifest sec-fetch-dest: nested-document sec-fetch-dest: object sec-fetch-dest: paintworklet sec-fetch-dest: report sec-fetch-dest: script sec-fetch-dest: serviceworker sec-fetch-dest: sharedworker sec-fetch-dest: style sec-fetch-dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: audioworklet sec-fetch-dest: audioworklet values audio audioworklet document embed empty font image ...
... manifest object paintworklet report script serviceworker sharedworker style track video worker xslt nested-document examples todo specifications specification title fetch metadata request headers the sec-fetch-dest http request header ...
Tk - HTTP
WebHTTPHeadersTk
the tk response header indicates the tracking status that applied to the corresponding request.
...the origin server is unable or unwilling to respect a tracking preference received from the requesting user agent.
...the request resulted in a potential change to the tracking status applicable to this user, user agent, or device.
X-Forwarded-Host - HTTP
the x-forwarded-host (xfh) header is a de-facto standard header for identifying the original host requested by the client in the host http request header.
... host names and ports of reverse proxies (load balancers, cdns) may differ from the origin server handling the request, in that case the x-forwarded-host header is useful to determine which host was originally used.
... header type request header forbidden header name no syntax x-forwarded-host: <host> directives <host> the domain name of the forwarded server.
GET - HTTP
WebHTTPMethodsGET
the http get method requests a representation of the specified resource.
... requests using get should only retrieve data.
... request has body no successful response has body yes safe yes idempotent yes cacheable yes allowed in html forms yes syntax get /index.html specifications specification title rfc 7231, section 4.3.1: get hypertext transfer protocol (http/1.1): semantics and content ...
TRACE - HTTP
WebHTTPMethodsTRACE
the final recipient of the request should reflect the message received, excluding some fields described below, back to the client as the message body of a 200 (ok) response with a content-type of message/http.
... the final recipient is either the origin server or the first server to receive a max-forwards value of 0 in the request.
... request has body no successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax trace /index.html specifications specification title rfc 7231, section 4.3.8: trace hypertext transfer protocol (http/1.1): semantics and content ...
HTTP resources and specifications - HTTP
specification title status rfc 7230 hypertext transfer protocol (http/1.1): message syntax and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/1.1): caching proposed standard rfc 5861 http cache-control extensions for stale content informational rfc 8246 http immutable responses proposed standard rfc 7235 hypertext transf...
... rfc 7540 hypertext transfer protocol version 2 (http/2) proposed standard rfc 7541 hpack: header compression for http/2 on the standard track rfc 7838 http alternative services on the standard track rfc 7301 transport layer security (tls) application-layer protocol negotiation extension used to negotiate http/2 at the transport to save an extra request/response round trip.
... cross-origin resource sharing living standard rfc 7034 http header field x-frame-options informational rfc 6797 http strict transport security (hsts) proposed standard upgrade insecure requests upgrade insecure requests candidate recommendation content security policy 1.0 content security policy 1.0 csp 1.1 and csp 3.0 doesn't extend the http standard obsolete microsoft document specifying legacy document modes* defines x-ua-compatible note rfc 5689 http extensions for web distributed authoring and versioning (webdav) these extensions of the web, ...
200 OK - HTTP
WebHTTPStatus200
the http 200 ok success status response code indicates that the request has succeeded.
... the meaning of a success depends on the http request method: get: the resource has been fetched and is transmitted in the message body.
... trace: the message body contains the request message as received by the server.
201 Created - HTTP
WebHTTPStatus201
the http 201 created success status response code indicates that the request has succeeded and has led to the creation of a resource.
... the new resource is effectively created before this response is sent back and the new resource is returned in the body of the message, its location being either the url of the request, or the content of the location header.
... the common use case of this status code is as the result of a post request.
501 Not Implemented - HTTP
WebHTTPStatus501
the hypertext transfer protocol (http) 501 not implemented server error response code means that the server does not support the functionality required to fulfill the request.
... this status can also send a retry-after header, telling the requester when to check back to see if the functionality is supported by then.
... 501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource.
BigInt.prototype.toLocaleString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...s console.log(bigint.tolocalestring('de-de')); // → 123.456.789.123.456.789 // arabic in most arabic speaking countries uses eastern arabic digits console.log(bigint.tolocalestring('ar-eg')); // → ١٢٣٬٤٥٦٬٧٨٩٬١٢٣٬٤٥٦٬٧٨٩ // india uses thousands/lakh/crore separators console.log(bigint.tolocalestring('en-in')); // → 1,23,45,67,89,12,34,56,789 // the nu extension key requests a numbering system, e.g.
... chinese decimal console.log(bigint.tolocalestring('zh-hans-cn-u-nu-hanidec')); // → 一二三,四五六,七八九,一二三,四五六,七八九 // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(bigint.tolocalestring(['ban', 'id'])); // → 123.456.789.123.456.789 using options the results provided by tolocalestring can be customized using the options argument: var bigint = 123456789123456789n; // request a currency format console.log(bigint.tolocalestring('de-de', { style: 'currency', currency: 'eur' })); // → 123.456.789.123.456.789,00 € // the japanese yen doesn't use a minor unit console.log(bigint.tolocalestring('ja-jp', { style: 'currency', currency: 'jpy' })) // → ¥123,456,789,123,...
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
if 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 any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
..."gregory" numberingsystem the values requested using the unicode extension keys "ca" and "nu" or filled in as default values.
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
if 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 any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
... numberingsystem the value provided for this properties in the options argument, if present, or the value requested using the unicode extension key "nu" or filled in as a default.
Intl.NumberFormat - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...r thousands console.log(new intl.numberformat('de-de').format(number)); // → 123.456,789 // arabic in most arabic speaking countries uses real arabic digits console.log(new intl.numberformat('ar-eg').format(number)); // → ١٢٣٤٥٦٫٧٨٩ // india uses thousands/lakh/crore separators console.log(new intl.numberformat('en-in').format(number)); // → 1,23,456.789 // the nu extension key requests a numbering system, e.g.
... chinese decimal console.log(new intl.numberformat('zh-hans-cn-u-nu-hanidec').format(number)); // → 一二三,四五六.七八九 // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(new intl.numberformat(['ban', 'id']).format(number)); // → 123.456,789 using options the results can be customized using the options argument: var number = 123456.789; // request a currency format console.log(new intl.numberformat('de-de', { style: 'currency', currency: 'eur' }).format(number)); // → 123.456,79 € // the japanese yen doesn't use a minor unit console.log(new intl.numberformat('ja-jp', { style: 'currency', currency: 'jpy' }).format(number)); // → ¥123,457 // limit to three significant digits con...
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
if 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 any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
... numberingsystem the value requested using the unicode extension key "nu" or filled in as a default.
Number.prototype.toLocaleString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...s comma as decimal separator and period for thousands console.log(number.tolocalestring('de-de')); // → 123.456,789 // arabic in most arabic speaking countries uses eastern arabic digits console.log(number.tolocalestring('ar-eg')); // → ١٢٣٤٥٦٫٧٨٩ // india uses thousands/lakh/crore separators console.log(number.tolocalestring('en-in')); // → 1,23,456.789 // the nu extension key requests a numbering system, e.g.
... chinese decimal console.log(number.tolocalestring('zh-hans-cn-u-nu-hanidec')); // → 一二三,四五六.七八九 // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(number.tolocalestring(['ban', 'id'])); // → 123.456,789 using options the results provided by tolocalestring can be customized using the options argument: var number = 123456.789; // request a currency format console.log(number.tolocalestring('de-de', { style: 'currency', currency: 'eur' })); // → 123.456,79 € // the japanese yen doesn't use a minor unit console.log(number.tolocalestring('ja-jp', { style: 'currency', currency: 'jpy' })) // → ¥123,457 // limit to three significant digits console.log(number.tolocalestring('en...
Codecs used by WebRTC - Web media technologies
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.
... default codecs unless otherwise specified, the default—or, more accurately, preferred—codecs requested by each browser's implementation of webrtc are shown in the table below.
Web Performance
this article explains what latency is, how it impacts performance, how to measure latency, and how to reduce it.using dns-prefetchdns-prefetch is an attempt to resolve domain names before resources get requested.
... beacon api the beacon interface schedules an asynchronous and non-blocking request to a web server.
... reading performance charts developer tools provide information on performance, memory, and network requests.
Same-origin policy - Web security
cross-origin network access the same-origin policy controls interactions between two different origins, such as when you use xmlhttprequest or an <img> element.
...some http requests require preflight.
... how to block cross-origin access to prevent cross-origin writes, check an unguessable token in the request — known as a cross-site request forgery (csrf) token.
Features restricted to secure contexts - Web security
not supported 63 background sync (see syncmanager, for example) 49 not supported not supported not supported cache-control: immutable not supported 15 11 49 credential management api 51 not supported not supported not supported generic sensor api 67 not supported not supported not supported payment request api (and basic card payment).
... 61 15 11.1 in development (behind the dom.payments.request.enabled pref).
... getusermedia() restricted to secure contexts in chrome 47 temporary access available only (users cannot choose "remember this decision" in the permission request dialog).
Introduction to using XPath in JavaScript - XPath
ments in an html document: var paragraphcount = document.evaluate( 'count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.numbervalue + ' paragraph elements' ); although javascript allows us to convert the number to a string for display, the xpath interface will not automatically convert the numerical result if the stringvalue property is requested, so the following code will not work: var paragraphcount = document.evaluate('count(//p)', document, null, xpathresult.any_type, null ); alert( 'this document contains ' + paragraphcount.stringvalue + ' paragraph elements' ); instead, it will return an exception with the code ns_dom_type_error.
...ddress street="1600 pennsylvania avenue" city="washington" country="usa"/> <phonenumber>202-456-1111</phonenumber> </person> <person> <name first="tony" last="blair" /> <address street="10 downing street" city="london" country="uk"/> <phonenumber>020 7925 0918</phonenumber> </person> </people> to make the contents of the xml document available within the extension, we create an xmlhttprequest object to load the document synchronously, the variable xmldoc will contain the document as an xmldocument object against which we can use the evaluate method javascript used in the extensions xul/js documents.
... var req = new xmlhttprequest(); req.open("get", "chrome://yourextension/content/peopledb.xml", false); req.send(null); var xmldoc = req.responsexml; var nsresolver = xmldoc.creatensresolver( xmldoc.ownerdocument == null ?
Caching compiled WebAssembly modules - WebAssembly
function opendatabase() { return new promise((resolve, reject) => { var request = indexeddb.open(dbname, dbversion); request.onerror = reject.bind(null, 'error opening wasm cache database'); request.onsuccess = () => { resolve(request.result) }; request.onupgradeneeded = event => { var db = request.result; if (db.objectstorenames.contains(storename)) { console.log(`clearing out version ${event.oldversion} wasm cache`); ...
... function lookupindatabase(db) { return new promise((resolve, reject) => { var store = db.transaction([storename]).objectstore(storename); var request = store.get(url); request.onerror = reject.bind(null, `error getting wasm module ${url}`); request.onsuccess = event => { if (request.result) resolve(request.result); else reject(`module ${url} was not found in wasm cache`); } }); } storing and instantiating modules next, we define a function storeindatabase() that fires off an async o...
... function storeindatabase(db, module) { var store = db.transaction([storename], 'readwrite').objectstore(storename); var request = store.put(module, url); request.onerror = err => { console.log(`failed to store in wasm cache: ${err}`) }; request.onsuccess = err => { console.log(`successfully stored ${url} in wasm cache`) }; } using our helper functions with all the promise-based helper functions defined, we can now express the core logic of an indexeddb cache lookup.
Low-Level APIs - Archive of obsolete content
in many cases these modules have simpler, more restricted analogs among the "high-level apis" (for example, windows or request).
... net/xhr provides access to xmlhttprequest functionality.
Release notes - Archive of obsolete content
added anonymous option to request.
... added a delete() method to sdk/request.
Chrome Authority - Archive of obsolete content
manifest generation the manifest is a list, included in the generated xpi, which specifies which modules have requested require() access to which other modules.
... it also records which modules have requested chrome access.
Downloading Files - Archive of obsolete content
var privacy = privatebrowsingutils.privacycontextfromwindow(aurlsourcewindow); var progresselement = document.getelementbyid("progress_element"); persist.progresslistener = { onprogresschange: function(awebprogress, arequest, acurselfprogress, amaxselfprogress, acurtotalprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.textcontent = percentcomplete +"%"; }, onstatechange: function(awebprogress, arequest, astateflags, astatus) { // do something } } persist.saveuri(obj_uri, null, null, null, "", targetfile, privacy); downl...
... instead of using qi like above, you can also implement nsiinterfacerequestor and return nsiauthprompt from there, like nsiwebbrowserpersist.progresslistener documentation suggests.
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.
...here is an example: var datastring = "name1=data1&name2=data2"; // post method requests must wrap the encoded text in a mime // stream const cc = components.classes; const ci = components.interfaces; var stringstream = cc["@mozilla.org/io/string-input-stream;1"].
Windows - Archive of obsolete content
this can be used in cases in which you need to uniquely identify a dom window during the duration of the application's lifespan: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.outerwindowid; after running that code, windowid contains the outer window's unique id.
... similarly, you can get the current inner window id using the nsidomwindowutils attribute currentinnerwindowid: var util = win.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsidomwindowutils); var windowid = util.currentinnerwindowid; programatically modifying html when attempting to modify html elements, it is important to specify the namespace.
Setting Up a Development Environment - Archive of obsolete content
tamper data tamper data intercepts http requests and their responses.
...try to identify what is going on with some of the requests being sent.
User Notifications and Alerts - Archive of obsolete content
this section lists a few alternatives that give you the possibility of notifying the user and requesting action without being too annoying.
...on = new object(); let declinebutton = new object(); let message = this._bundle.getstring("xulschoolhello.friendmessage.label"); let that = this; acceptbutton.label = this._bundle.getstring("xulschoolhello.acceptbutton.label"); acceptbutton.accesskey = this._bundle.getstring("xulschoolhello.acceptbutton.accesskey"); acceptbutton.popup = null; acceptbutton.callback = function() { that.acceptrequest(); }; // similarly for decline button.
Notes on HTML Reflow - Archive of obsolete content
a frame requests a incremental reflow (or one is requested on a frame's behalf) when something about the frame itself has changed.
...to request (or schedule ) an incremental reflow (e.g., in response to a change in the content model), a reflow command object is created and passed to the presentation shell via the nsipresshell::appendreflowcommand method.
Enabling the behavior - updating the status periodically - Archive of obsolete content
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.
...this allows users to get relatively frequent updates about tinderbox without overloading the tinderbox server or slowing down mozilla with requests.
Developing New Mozilla Features - Archive of obsolete content
and since few of us are perfect, chances are that revisions will be requested.
... review and super-review take time improving the code as requested by the reviewers takes time.
JavaScript Client API - Archive of obsolete content
createrecord the createrecord( id, collection ) method gets called by the engine to request a new record for an item with a given guid.
...the higher you set this number, the more urgently the scheduler treats your request.
importUserCertificates - Archive of obsolete content
the request id in the response being imported must match the request id in the associated certification request or recovery request.
...if it fails, one of the following error strings will be returned: error string description "error:usercancel" the user canceled the import operation "error:invalidcertificate" one of the certificate packages was incorrectly formatted "error:internalerror" the software encountered some internal error, such as out of memory "error:invalidrequestid" the request id in the response message does not match any outstanding request ...
popChallengeResponse - Archive of obsolete content
"error:internalerror" the software encountered some internal error, such as out of memory challenge-response proof of possession expected input: popodeckeychallcontent ::= sequence of challenge -- one challenge per encryption key certification request (in the -- same order as these requests appear in fullcerttemplates).
... -- 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 b...
Mozilla Application Framework in Detail - Archive of obsolete content
web services mozilla includes built-in support for popular web services standards xml-rpc, soap, and wsdl as well as a simple xmlhttprequest object similar to the one in ie.
...mozilla's xml-rpc support includes synchronous and asynchronous requesting and downloading of data from a server.
Mozilla Crypto FAQ - Archive of obsolete content
in light of the new encryption export regulations it is also possible that the bernstein case may be declared moot on the basis that professor bernstein is now free to do what he originally requested to do, i.e., publish his encryption source code online.
...see also the request for an advisory opinion made to the bureau of export administration by bernstein's lawyers and the resulting advisory opinion issued by bxa in response to that request.
Space Manager Detailed Design - Archive of obsolete content
if the (adjusted) y offset intersects a band, then gather the banddata: walk the internal banddata list from head to tail for each band data entry, see if the top of the band is greater than the (adjusted) y offset requested if it is, then band is below the offset requested, so the area between the band and the y offset is available - create a trapezoid with that region and return it.
... first, walk all of the bands until a band that is to the right of the desired offset is located starting at that band, walk the remaining bands: if the current band is to the right of the requested band, then there is available space.
Supporting per-window private browsing - Archive of obsolete content
var channel = services.io.newchannel("http://example.org", null, null); channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel.setprivate(true); // force the channel to be loaded in private mode similarly, xmlhttprequest objects created via createinstance(ci.nsixmlhttprequest) will often require explicit adjustment, since they have no context from which to derive a privacy status.
... var xhr = components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createinstance(components.interfaces.nsixmlhttpreqeust); var channel = xhr.channel.queryinterface(components.interfaces.nsiprivatebrowsingchannel); channel.setprivate(true); ...
Venkman Introduction - Archive of obsolete content
any loaded file which matches the file pattern, and contains an executable line at the requested line number will have a breakpoint set.
... using file->open from venkman will open a local file in the debugger, and using file->open web location will open and display the entire html contents of the requested page.
Binding Implementations - Archive of obsolete content
a getter contains script whose return value is handed back when the property is requested.
... properties also support a shorthand syntax for defining getters and setters that forward requests or assignments to an anonymous content element.
Elements - Archive of obsolete content
onget - the onget attribute's value is a script that executes when the value of the property is requested.
...the return value of the script represents the value of the property that will be returned to the requestor.
The Implementation of the Application Object Model - Archive of obsolete content
this code is responsible for lazily presenting content nodes based on the rdf graph structure to the application that requests those nodes.
... since this presentation happens "on demand", no content node is instantiated until the application specifically requests it, or demands an operation that requires the instantiation of the node to successfully complete, e.g., asking for the number of children of a content node.
menupopup - Archive of obsolete content
this handler is usually used to dynamically set the contents when the user requests to display it.
... showing: a request has been made to open the popup, but it has not yet been shown.
tooltip - Archive of obsolete content
this handler is usually used to dynamically set the contents when the user requests to display it.
... showing: a request has been made to open the popup, but it has not yet been shown.
2006-10-06 - Archive of obsolete content
peter lairo requested someone who are knowledgeable in w3c standards to confirm if the use of <blockquote type="cite"> is valid w3c code.
... a: robert helmer pointed out the mozilla.org's config file could be found here and to look for -->mozconfig<---------------------------------------- -->end mozconfig<---------------------------------------- updated: developer documentation issues for thunderbird 2 eric shepherd has requested feedback for any developer documentation issues that might need dealing with for thunderbird 2.
Browser-side plug-in API - Archive of obsolete content
this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... npn_destroystream npn_forceredraw npn_getauthenticationinfo npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_invalidaterect npn_invalidateregion npn_memalloc npn_memflush npn_memfree npn_newstream npn_pluginthreadasynccall npn_poppopupsenabledstate npn_posturl npn_posturlnotify npn_pushpopupsenabledstate npn_reloadplugins npn_requestread npn_setvalue npn_setvalueforurl npn_status npn_useragent npn_version npn_write ...
NPN_GetValueForURL - Archive of obsolete content
the browser passes back the requested information.
... description this entry point is designed to allow plugins which implement their own http stacks to form requests to the web server in the same way the browser does.
NPP_Print - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a platform-specific print operation for an embedded or full-screen plug-in.
... description npp_print is called when the user requests printing for a web page that contains a visible plug-in (either embedded or full-page).
.htaccess ( hypertext access ) - Archive of obsolete content
deny from 146.0.74.205 # blocks all access from 146.0.74.205 to the directory ssi or server side include : include external files to each file requested by the user without the need to write include statements in the file; you can have them automatically attached to all the files, whether at top or bottom, automatically through your .htaccess file.
... php_value auto_prepend_file "/real/path/to/file/functions.php" # adds function.php at the top of requested document php_value auto_append_file "/real/path/to/file/footer.php" # adds footer.html at bottom of requested document customized error responses : user can be directed to different pages depending on the error they caused or by the webserver.
Tamarin Tracing Build Documentation - Archive of obsolete content
request a build via the form at http://tamarin-builds.mozilla.org/build_trigger/requestbuild.cfm user email: your email address.
...this is a shared resource, each request takes approximately 3+ hours to run so please use wisely.
The Basics of Web Services - Archive of obsolete content
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.
...both web services and forms send and receive requests.
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
armed with some basic java knowledge, you can extend javascript to include some of the most desired capability such as database access, remote web requests, and xml processing.
...first a call to get the xml feed is made using the get method from the jaxer.web namespace, using the option that requests the response as a new e4x object.
Troubleshooting XForms Forms - Archive of obsolete content
conflicts with other plug-ins if you are using the noscript plugin you may notice that your put and/or post requests are being converted to get requests.
...the xss sub-tab has the following options: turn cross-site post requests into data-less get requests anti-xss protection exceptions you can temporarily fix the problem by unchecking the turn cross-site post requests into data-less get requests check box.
RFE to the Custom Controls - Archive of obsolete content
rfe put your requests here.
... input that shows/modifies the dom like the request above for output.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
this class should also inherit from nsiclassinfo and implement its methods to be able to request all necessary privileges from the mozilla security manager (see example 2).
... if (!scriptablepeer) { nsitestplugin *scriptablepeer = new nsscriptablepeer(); if (scriptablepeer) ns_addref(scriptablepeer); // addref for ourself, // don't forget to release on // shutdown to trigger its destruction } // add reference for the caller requesting the object ns_addref(scriptablepeer); *(nsisupports **)value = scriptablepeer; } else if (variable == nppvpluginscriptableiid) { nsiid* ptr = (nsiid *)npn_memalloc(sizeof(nsiid)); *ptr = scriptableiid; *(nsiid **)value = ptr; } return rv; } nperror npp_destroy (npp instance, npsaveddata** save) { if(instance == null) return npe...
Desktop mouse and keyboard controls - Game development
draw function perform the action assigned to it — move the ship left: function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); if(rightpressed) { playerx += 5; } else if(leftpressed) { playerx -= 5; } if(downpressed) { playery += 5; } else if(uppressed) { playery -= 5; } ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } the draw function first clears the whole canvas — we draw everything from scratch on every single frame.
...then the player's ship is drawn on the screen and the next draw is called from within the requestanimationframe.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
...using cdn for those library files is preferable for a number of reasons: serving libraries' static assets over cdn lowers the request burden on an organization's own servers.
CSRF - MDN Web Docs Glossary: Definitions of Web-related terms
csrf (cross-site request forgery) is an attack that impersonates a trusted user and sends a website unwanted commands.
... learn more general knowledge cross-site request forgery on wikipedia prevention measures ...
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
client hints are a set of http request header fields for proactive content negotiation allowing clients to indicate a list of device and agent specific preferences.
...for example, based on accept-ch example above, the client could append dpr, width, viewport-width, and downlink headers to all subsequent requests.
DoS attack - MDN Web Docs Glossary: Definitions of Web-related terms
dos (denial of service) is a network attack that prevents legitimate use of server resources by flooding the server with requests.
...here is a non-exhaustive list of dos attack types: bandwidth attack service request flood syn flooding attack icmp flood attack peer-to-peer attack permanent dos attack application level flood attack learn more denial-of-service attack on wikipedia denial-of-service on owasp ddos ...
Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
dos (denial of service) is a network attack that prevents legitimate use of server resources by flooding the server with requests.
...here is a non-exhaustive list of dos attack types: bandwidth attack service request flood syn flooding attack icmp flood attack peer-to-peer attack permanent dos attack application level flood attack learn more denial-of-service attack on wikipedia denial-of-service on owasp ddos ...
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
the initial response from an http request is generally an html file listing other resources such as javascript, css, images and other media files that need to be downloaded.
... http2 supports unlimited concurrent requests making domain sharding an obsolete requirement when http/2 is enabled.
General header - MDN Web Docs Glossary: Definitions of Web-related terms
a general header is an http header that can be used in both request and response messages but doesn't apply to the content itself.
... depending on the context they are used in, general headers are either response or request headers.
HSTS - MDN Web Docs Glossary: Definitions of Web-related terms
http strict transport security lets a web site inform the browser that it should never load the site using http and should automatically convert all attempts to access the site using http to https requests instead.
... in other words, it tells the browser that changing the protocol from http to https in a url works (and is more secure) and asks the browser to do it for every request.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency is the network time it takes for a requested resource to reach its destination.
...high latency is bad, meaning it takes a long time for the requested resource to reach its destination.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
in the early days of the web, mvc architecture was mostly implemented on the server-side, with the client requesting updates via forms or links, and receiving updated views back to display in the browser.
... however, these days, more of the logic is pushed to the client with the advent of client-side data stores, and xmlhttprequest allowing partial page updates as required.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
page prediction is a browser feature or script which, when enabled, tells the browser to download resources the user is likely to visit before the user requests the content.
...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.
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
however, these entity requests are usually called responses headers in such a context.
... the following shows a few response headers after a get request.
Web performance - MDN Web Docs Glossary: Definitions of Web-related terms
web performance is the objective time from when a request for content is made until the requested content is displayed in the user's browser, objective render times, and the subjective user experience of load time and runtime.
...subjectively, it is the user's perception of whether the time it takes between the time the user requests the content and the time until the user feels the content requested is available and usable feels slow or fast.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
what is important here is that by calling a safe method, the client doesn't request any server change itself, and therefore won't create an unnecessary load or burden for the server.
...in particular, an application should not allow get requests to alter its state.
Practical positioning examples - Learn web development
in addition, so-called "single page apps" are becoming very popular — especially for mobile web uis — because having everything served as a single file cuts down on the number of http requests required to view all the content, thereby improving performance.
... note: some web developers take things even further, only having one page of information loaded at once, and dynamically changing the information shown using a javascript feature such as xmlhttprequest.
How do you make sure your website works properly? - Learn web development
http statuses servers respond with a status message whenever they receive a request.
... 304 for basic.css means that this file has not changed since the last request, so the browser can use the file in its cache rather than receiving a fresh copy.
What is a URL? - Learn web development
it indicates which web server is being requested.
...it is worth noting that the part after the #, also known as the fragment identifier, is never sent to the server with the request.
What is a Domain Name? - Learn web development
how does a dns request work?
... now that the computer knows the requested ip address, your browser can negotiate contents with the web server.
How the Web works - Learn web development
the browser sends an http request message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods).
... if the server approves the client's request, the server sends the client a "200 ok" message, which means "of course you can look at that website!
Creating hyperlinks - Learn web development
then it goes to that server and finds the file that's being requested.
... with a relative url, the browser just looks up the file that's being requested on the same server.
From object to iframe — other embedding technologies - Learn web development
ie 10 and above) requests heightened security settings; we'll say more about this in the next section.
...in 2015, alex stamos, then-chief security officer at facebook, requested that adobe discontinue flash.
Graceful asynchronous programming with Promises - Learn web development
also, the user may not respond immediately to these permission requests.
...the following block converts the basic request model used by many indexeddb methods to use promises (see this code, for example).
Perceived performance - Learn web development
loading essential data in initial requests and progressively loading features and data only as needed helps mitigate low bandwidth and lower spec hardware.
... make things like type-ahead a progressive enhancement: use css to display input modal, js to add typeahead/autocomplete as it is available make task initiators appear more interactive making a content request on keydown rather than waiting for keyup can shave 200ms off the perceived load of the content.
Web performance resources - Learn web development
these styles will improve perceived performance as the css does not require a file request.
...to further optimize inline your svg data within html markup to avoid http requests.
Properly configuring server MIME types - Learn web development
note: historically, firefox has loaded css files even if they had the wrong mime type, as long as the html document that requested them was being processed in quirks mode.
... for security reasons, gecko 2.0 will no longer do this for stylesheets loaded from a different origin than the requesting document.
Browser chrome tests
function test() { // requestlongertimeout accepts an integer factor, that is a multiplier for the the default 30 seconds timeout.
... requestlongertimeout(2); waitforexplicitfinish(); settimeout(completetest, 40000); } function completetest() { ok(true, "timeout did not run"); finish(); } exceptions in tests any exceptions thrown under test() will be caught and reported in the test output as a failure.
Bugzilla
bugzilla.mozilla.org (often abbreviated b.m.o) is mozilla.org's bug-tracking system, a database for recording bugs and enhancement requests for firefox, thunderbird, seamonkey, camino, and other mozilla.org projects.
... testopia - test case management extension bugzilla.org - the project site wikipedia:bugzilla - general description of bugzilla (not specific to mozilla projects) bmo on wiki.mozilla.org - information about mozilla's customized bugzilla installation, including how to contribute to it tools bugzilla todos lists review and flag requests, patches to check in, unfulfilled requests you made of other people, and assigned bugs.
HTTP logging
logging only http request and response headers there are two ways to do this: replace moz_log=nshttp:5 with moz_log=nshttp:3 in the commands above.
... there's a handy extension for firefox called http header live that you can use to capture just the http request and response headers.
Commenting IDL for better documentation
* * @returns an astring containing the requested funny quote.
... * * @throws ns_error_failure unable to locate the requested quote.
Contributing to the Mozilla code base
now that you've got your first bug fixed you should request level 1 access to the repository to push to the try server and get automated feedback about your changes on multiple platforms.
... after fixing a nontrivial number of bugs you should request level 3 access so you can land your own code after it has been reviewed.
Process scripts
this can be achieved by traversing the docshell tree up to the top window and then retrieving its content message manager, as follows: function contentmmfromcontentwindow(window) { let tree = window.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidocshelltreeitem); let top = tree.sametyperoottreeitem; let iface = queryinterface(ci.nsidocshell).queryinterface(ci.nsiinterfacerequestor); return iface.getinterface(ci.nsicontentframemessagemanager); } this is intended for unprivileged pages running in a content process.
... if the above doesn't work try this: function contentmmfromcontentwindow_method2(acontentwindow) { return acontentwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidocshell) .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsicontentframemessagemanager); } ...
Blocked: Custom cookie permission
message firefox: cookieblockedbypermission=request to access cookies or storage on “x” was blocked because of custom cookie permission.
... a request to access cookies or storage was blocked because there's a custom user-defined permission set.
HTMLIFrameElement.setVisible()
as an example, if the content of a browser <iframe> uses the window.requestanimationframe method and if the visible state is set to true, window.requestanimationframe will be called as often as necessary.
... however, if the visible state is set to false, window.requestanimationframe will be called only when there are free resources to do it.
Embedding Tips
you may also use the progress listener to query the request supplied in onstatechange for more information.
... for example, if you wanted to check the server response headers, you might check onstatechange for state_start | state_is_request flags, and from the nsirequest argument qi fornsihttpchanne and call methods on that to determine response codes and other information from the server.
How to get a stacktrace with WinDbg
after the crash or hang you need to capture the debug information to include in a bug comment or support request.
...to provide the information to the development community, submit this file with a support request or attach it to a related bug on bugzilla.
Implementing Download Resuming
if the download gets interrupted, necko will call the stream listener's onstoprequest method with a failure status.
...you may want to use nsisimplestreamlistener to simplify this task; to get progress notifications, you can implement nsiprogresseventsink and set an interface requester as the notificationcallbacks of the channel that gives out such an event sink (this needs to be done before calling asyncopen).
Internationalized Domain Names (IDN) Support in Mozilla Browsers
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.
... how mozilla browsers handle non-ascii domain names unicode and nameprep when mozilla receives idn input from the user via the location bar or a request to process non-ascii host name links, it first turns them into unicode, then normalizes the input string to make it conform to general uri requirement.
Downloads.jsm
promise resolves to the requested downloadlist object.
... promise resolves to the requested downloadsummary object.
FxAccountsProfileClient.jsm
examples using the fxaccountsprofileclient chrome code let client = new fxaccountsprofileclient({ serverurl: "https://profile.accounts.firefox.com/v1", token: "fxa_oauth_bearer_token", }); client.fetchprofile().then(profile => console.log(profile)); error handling the fxaccountsprofileclient.jsm normalizes request and client errors into fxaccountsprofileclienterror object.
... fxaccountsprofileclienterror attributes name string name of the error fxaccountsprofileclienterror code number status code of the request errno number error number error string error description message string error message ...
Webapps.jsm
n(adata, aid) _cloneapp: function(adata, anewapp, alocalemanifest, amanifest, 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, aislocalfileinsta...
...ll) _opensignedpackage: function(ainstallorigin, amanifesturl, azipfile, acertdb) _readpackage: function(aoldapp, anewapp, aislocalfileinstall, aisupdate,) _checksignature: function(aapp, aissigned, aislocalfileinstall) _saveetag: function(aisupdate, aoldapp, arequestchannel, ahash, amanifest) _checkorigin: function(aissigned, aoldapp, amanifest, aisupdate) _getids: function(aissigned, azipreader, aconverter, anewapp, aoldapp,) _checkforstoreidmatch: function(aisupdate, anewapp, astoreid, astoreversion) revertdownloadpackage: function(aid, aoldapp, anewapp, aisupdate, aerror) uninstall: function(amanifesturl) _promptforuninstall: function(adata) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinst...
Application Translation with Mercurial
aboutprivatebrowsing.dtd, patch, v1 go to the review 'flags' category and set the one for review to ?, meaning that you request review for the patch.
...if the person requests changes, follow the instructions under proof-reading and altering the patch.
Index
17 localization sign-off reviews guide, localization, mozilla this article presents an overview of why we do sign-off reviews of localizations, the details on the criteria used for the sign-off reviews, and the process for requesting a review and for following its progress.
... 18 localization technical reviews guide, localization, mozilla this guide provides details on what a localization technical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress.
Localizing extension metadata on addons.mozilla.org
the values you provide here are used as fallback values if someone requests a language that doesn't exist.
...you can already request for amo fields localization on the forums, and these fields will be added soon to the web translation system.
Localizing with Mercurial
the localization team owner needs to file a bug requesting an hg account.
... this bug will request level 1 l10n priviledges.
Mozilla DOM Hacking Guide
there are two other similar macros: #define dom_classinfo_map_begin_no_primary_interface(_class) _dom_classinfo_map_begin(_class, nsnull, pr_true) this macro is used if the dom class (for example xmlhttprequest) does not have any interface, yet you want the xmlhttprequest object to be available from javascript.
...it's the queryinterface implementation for the nsiclassinfo interface, which is requested internally by xpconnect.
Mozilla Web Services Security Model
load [not implemented!] ability to load documents via xmlhttprequest or similar mechanisms.
... soap soap requests without verification headers soapv soap requests with verification headers the from attribute the from attribute on the allow element says which calling sites the allow element applies to.
JS::PerfMeasurement
perfmeasurement::perfmeasurement(eventmask tomeasure) the constructor creates a new profiling object, which measures some subset of the requested events.
... it will not have any more bits set than were set in the mask passed to the constructor, but if the os cannot or will not measure all of the requested events, then only those events that will actually be measured have their bits set.
Patches and pushes
enter :flod as the requestee.
... if the r+ is "with nits" (i.e., that's short for nit-picky requests), fix those before committing.
PR_Access
returns one of the following values: if the requested access is permitted, pr_success.
... if the requested access is not permitted, pr_failure.
PR_GetRandomNoise
size the size, in bytes, of the requested random number.
...the generated size may be less than the size requested.
PR_Listen
returns the function returns one of the following values: upon successful completion of listen request, pr_success.
...it creates a queue for pending connections and starts to listen for connection requests on the socket.
PR_MALLOC
syntax #include <prmem.h> void * pr_malloc(_bytes); parameter _bytes size of the requested memory block.
... description this macro allocates memory of the requested size from the heap.
NSS 3.25.1 release notes
notable changes in nss 3.25.1 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
... bugs fixed in nss 3.25.1 the following bug has been fixed in nss 3.25.1: ignore md5 signature algorithms in certificate requests compatibility nss 3.25.1 shared libraries are backwards compatible with all older nss 3.x shared libraries.
NSS 3.26.2 release notes
notable changes in nss 3.26.2 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
... bugs fixed in nss 3.26.2 the following bug has been fixed in nss 3.26.2: ignore md5 signature algorithms in certificate requests compatibility nss 3.26.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.38 release notes
when creating a certificate request (csr) using certutil -r, an existing orphan private key can be reused.
... new functions in secitem.h secitem_makeitem - allocate and make an item with the requested contents new macros in ssl.h ssl_record_size_limit - used to control the tls record size limit extension notable changes in nss 3.38 fixed cve-2018-0495 in bug 1464971.
NSS 3.48 release notes
applications may set environment variable nss_min_mp_pbe_iteration_count to request a higher iteration count than the library's default, or nss_max_mp_pbe_iteration_count to request a lower iteration count for test environments.
... nss 3.48 bug 1600775 - require nspr 4.24 for nss 3.48 bug 1593401 - fix race condition in self-encrypt functions bug 1599545 - fix assertion and add test for early key update bug 1597799 - fix a crash in nssckfwobject_getattributesize bug 1591178 - add entrust root certification authority - g4 certificate to nss bug 1590001 - prevent negotiation of versions lower than 1.3 after helloretryrequest bug 1596450 - added a simplified and unified mac implementation for hmac and cmac behind pkcs#11 bug 1522203 - remove an old pentium pro performance workaround bug 1592557 - fix prng known-answer-test scripts bug 1586176 - encryptupdate should use maxout not block size (cve-2019-11745) bug 1593141 - add `notbefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::trustdo...
NSS API Guidelines
high cert lib/certhigh ocsp.h, ocspt.h crmf provides functions, and data types, to handle certificate management message format (cmmf) and certificate request message format (crmf, see rfc 2511) data.
... secport_verify_pointer(classname, pointer, secerror, returnvalue)- check if a given pointer really belongs to the requested class.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
it's perfectly valid to reject the password change request with a return value such as ckr_function_not_supported.
... to get a key into an initialized token, go to your local certificate authority and initiate a certificate request.
NSS tools : pk12util
if the cryptographic module does not support the requested algorithm, then the next best fit will be selected (usually the default).
... if no suitable replacement for the desired algorithm can be found, the tool returns the error no security module can perform the requested operation.
NSS Tools pk12util
it may be the case that the cryptographic module does not support the requested algorithm and a best fit will be selected, likely to be the default.
... if no suitable replacement for the desired algorithm can be found a "no security module can perform the requested operation" will appear on the error message.
NSS tools : pk12util
if the cryptographic module does not support the requested algorithm, then the next best fit will be selected (usually the default).
... if no suitable replacement for the desired algorithm can be found, the tool returns the error no security module can perform the requested operation.
NSS tools : signtool
however, all of the requested fields are optional for test certificates.
... organization unit: server products division state or province: california country (must be exactly 2 characters): us username: someuser email address: someuser@netscape.com enter password or pin for "communicator certificate db": [password will not echo] generated public/private key pair certificate request generated certificate has been signed certificate "mytestcert" added to database exported certificate to x509.raw and x509.cacert.
Multithreading in Necko
for example, the http protocol handler has code that runs on the socket transport thread to kick off pending requests well before the main thread would get around to doing so.
... dns thread (0-1) on most platforms dns requests a processed on a background thread.
JS::Add*Root
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoIdArray
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoSaveExceptionState
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoValueArray
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Call
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CloneFunctionObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Compile
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CompileFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CompileOffThread
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CompileOptions
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Construct
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CreateError
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CurrentGlobalOrNull
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Evaluate
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::GetFirstArgumentAsTypeHint
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::GetSelfHostedFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::NewFunctionFromSpec
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::OrdinaryToPrimitive
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::PropertySpecNameToPermanentId
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ProtoKeyToId
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Remove*Root
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Rooted
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToInt32
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToInt64
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToNumber
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToPrimitive
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint16
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint32
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint64
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JSAutoByteString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JSID_IS_STRING
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Add*Root
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_AliasElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_AliasProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_AlreadyHasOwnProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_BindCallable
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_BufferIsCompilableUnit
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CallFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearDateCaches
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearNonGlobalObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearPendingException
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearRegExpStatics
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearScope
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CloneFunctionObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipals
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipalsVersion
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFunctionForPrincipals
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileScriptForPrincipals
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileUCFunctionForPrincipalsVersion
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileUTF8File
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileUTF8FileHandle
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConstructObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConvertArguments
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConvertArgumentsVA
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConvertValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileFunctionBody
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileScriptObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeepFreezeObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefaultValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineConstDoubles
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineFunctions
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineOwnProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineProperties
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefinePropertyWithTinyId
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteElement2
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteProperty2
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DestroyContext
in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx.
... however, there must not be any suspended requests on cx.
JS_DestroyScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DropExceptionState
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EncodeString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_EncodeStringToBuffer
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EnterLocalRootScope
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Enumerate
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EnumerateStandardClasses
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EvaluateScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EvaluateScriptForPrincipals
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteRegExp
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScriptPart
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScriptVersion
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_FlattenString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_FlushCaches
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ForgetLocalRoot
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ForwardGetPropertyTo
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_FreezeObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetArrayLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetArrayPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClassObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClassPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetConstructor
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetEmptyStringValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetExternalStringClosure
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionCallback
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionScript
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGCParameter
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForCompartmentOrNull
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForScopeChain
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetLatin1FlatStringChars
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLatin1InternedStringChars
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLatin1StringCharsAndLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLocaleCallbacks
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetObjectPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetOwnPropertyDescriptor
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPendingException
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyAttributes
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyAttrsGetterAndSetter
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyDefault
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyDescriptor
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringCharAt
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringCharsAndLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringEncodingLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_HasArrayLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasInstance
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasOwnProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToProtoKey
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InitCTypesClass
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InitClass
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InitStandardClasses
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InstanceOf
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InternJSString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InternString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsConstructing_PossiblyWithGivenThisObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsExtensible
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsIdentifier
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LeaveLocalRootScope
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LeaveLocalRootScopeWithResult
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LinkConstructorAndPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LockGCThing
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LookupElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LooselyEqual
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_MakeStringImmutable
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_New
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewArrayObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewCompartmentAndGlobalObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDateObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDateObjectMsec
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDependentString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDouble
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDoubleValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewExternalString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewGlobalObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewNumberValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewObjectForConstructor
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewPlainObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewPropertyIterator
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewRegExpObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewScriptObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewUCString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewStringCopyN
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewStringCopyZ
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NextProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ObjectIsDate
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ParseJSON
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PopArguments
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PreventExtensions
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PushArguments
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PutEscapedString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Remove*Root
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportError
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportErrorNumber
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportPendingException
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ResolveStandardClass
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_RestoreExceptionState
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SameValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SaveExceptionState
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetAllNonReservedSlotsToUndefined
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetArrayLength
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetElement
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetErrorReporter
example code with error handling omitted: class myrequest { public: void execute() { auto rt = js_newruntime(memlimit); js_setruntimeprivate(rt, this); js_seterrorreporter(rt, &myrequest::dispatcherror); // execute js } void onerror(const std::string& error) { // handle error } static void dispatcherror( jscontext* ctx, const char* message, jserror...
...report* report) { auto rt = js_getruntime(ctx); auto rt_userdata = js_getruntimeprivate(rt); if (rt_userdata) { auto req = static_cast<myrequest*>(rt_userdata); req->onerror(message); } } }; see also mxr id search for js_geterrorreporter mxr id search for js_seterrorreporter bug 1277278 - js_seterrorreporter is renamed to js::setwarningreporter ...
JS_SetFunctionCallback
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetGCCallback
if a thread that is not in an active request calls js_gc while gc is already happening on another thread).
...other threads may be running in active requests.
JS_SetGlobalObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetParent
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetPendingException
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetProperty
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetPropertyAttributes
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetPrototype
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetRegExpInput
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StrictlyEqual
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StringEqualsAscii
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_TypeOfValue
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToBoolean
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToECMAInt32
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToFunction
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToId
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToInt32
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToNumber
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToObject
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToSource
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToString
requires request.
... in a js_threadsafe build, the caller must be in a request on this jscontext.
SpiderMonkey 1.8.5
erbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentandglobalobject js_newdateobject js_newdateobjectmsec js_newfunctionbyid body new c++ helpers while jsapi remains a c api, the engine is now implemented in c++.
... jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_addnamedroot – use js_add*root js_addnamedrootrt – use js_add*root js_addroot – use js_add*root js_clearnewbornroots – no longer needed js_clearoperationcallback js_clearregexproots js_decompilescript js_destroyscript js_enterlocalrootscope js_executescriptpart js_forgetlocalroot js_getfunctionname js_getoperationlimit js_getscriptob...
SpiderMonkey 1.8.7
erbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentandglobalobject js_newdateobject js_newdateobjectmsec js_newfunctionbyid body new c++ helpers while jsapi remains a c api, the engine is now implemented in c++.
... jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_getscopechain use js_getglobalforscopechain api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
Shell global objects
interruptif(cond) requests interrupt callback if cond is true.
...hook gets passed the requested code's url, and should return a string.
Embedded Dialog API
responsibilities of the embedding application basic windowing api to be able to respond to script requests to open new windows, an embedded gecko browser must have a way of opening new windows.
...this flag requests the presence or absence of particular features in the window surrounding the browser; features such as a toolbar or menubar.
Avoiding leaks in JavaScript XPCOM components
the most common strategies for managing heap allocation are the following: malloc and free (or new and delete) the simplest strategy for heap allocation is that the programmer makes one function call to request memory from the heap and another one to return it.
...consider the example of bug 170022 (which also demonstrates a leak via a global variable, fixed later in bug 231266): const observer = { observe: function(subject, topic, data) { if (topic != "open-new-tab-request" || subject != window) return; delayedopentab(data); } }; const service = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); service.addobserver(observer, "open-new-tab-request", false); in this example, there is a similar cycle between observe and service.
HOWTO
async network requests problem you want to make network requests or do other asynchronous work in xpcshell.
... however, when you start your script, it exits immediately, before the network request returns.
inIDOMUtils
if you have requested anonymous content, then if the element has an xbl binding then this will be the binding's anonymous nodes, otherwise if the element is itself an anonymous node containing an insertion point then this will be a list combining the element's explicit children from its binding parent's anonymous nodes and any children inserted as a result of the insertion point.
...if you have requested anonymous content and the element's parent has an xbl binding then the element containing the insertion point is returned instead.
mozIStorageConnection
an asynchronous statement can only be used to dispatch asynchronous requests to the asynchronous execution thread and cannot be used to take any synchronous actions on the database.
... exceptions thrown ns_error_failure table already exists or the requested table couldn't be created.
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage consumers receive callbacks during the execution of sqlite requests.
... return value return true to abort the request or false to allow it to continue.
nsIArray
uuid the iid of the requested interface.
... result the object, queryinterface'd to the requested interface.
nsIAsyncStreamCopier
inherits from: nsirequest last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void asynccopy(in nsirequestobserver aobserver, in nsisupports aobservercontext); void init(in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink); methods asynccopy() starts the copy operation.
...void asynccopy( in nsirequestobserver aobserver, in nsisupports aobservercontext ); parameters aobserver receives notifications.
nsIBadCertListener2
method overview boolean notifycertproblem(in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite); methods notifycertproblem() called in case of a broken ssl status.
... boolean notifycertproblem( in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
nsIContentFrameMessageManager
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 a tab, this code would run from a framescript.
... var acfmm = window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidocshell) .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsicontentframemessagemanager); ...
nsIContentViewer
void loadcomplete(in unsigned long astatus); void loadstart(in nsisupports adoc); void move(in long ax, in long ay); void open(in nsisupports astate, in nsishentry ashentry); void pagehide(in boolean isunload); boolean permitunload([optional] in boolean acallercloseswindow); boolean requestwindowclose(); void resetclosewindow(); void setbounds([const] in nsintrectref abounds); native code only!
...requestwindowclose() boolean requestwindowclose(); parameters none.
nsIDNSListener
inherits from: nsisupports last changed in gecko 1.7 method overview void onlookupcomplete(in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus); methods onlookupcomplete() called when an asynchronous host lookup completes.
... void onlookupcomplete( in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus ); parameters arequest the value returned from asyncresolve.
nsIDOMProgressEvent
dom/interfaces/events/nsidomprogressevent.idlscriptable this interface represents the events sent with progress information while uploading data using the xmlhttprequest object.
... see also using xmlhttprequest xmlhttprequest nsixmlhttprequesteventtarget nsixmlhttprequest ...
nsIDocumentLoader
g/docloaderservice;1"] .createinstance(components.interfaces.nsidocumentloader); method overview void clearparentdocloader(); obsolete since gecko 1.8 void createdocumentloader(out nsidocumentloader aninstance); obsolete since gecko 1.8 void destroy(); obsolete since gecko 1.8 void fireonlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri); obsolete since gecko 1.8 void fireonstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); obsolete since gecko 1.8 void getcontentviewercontainer(in nsisupports adocumentid, out nsicontentviewercontainer aresult); native code only!
... fireonlocationchange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonlocationchange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri ); parameters awebprogress arequest auri fireonstatuschange() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void fireonstatuschange( in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage ); parameters awebprogress arequ...
nsIDownloadObserver
inherits from: nsisupports last changed in gecko 1.7 method overview void ondownloadcomplete(in nsidownloader downloader, in nsirequest request, in nsisupports ctxt, in nsresult status, in nsifile result); methods ondownloadcomplete() called to signal a download that has completed.
... void ondownloadcomplete( in nsidownloader downloader, in nsirequest request, in nsisupports ctxt, in nsresult status, in nsifile result ); parameters downloader request ctxt status result ...
nsIExternalProtocolService
xternalprotocolhandlerexists(in string aprotocolscheme); astring getapplicationdescription(in autf8string ascheme); nsihandlerinfo getprotocolhandlerinfo(in acstring aprotocolscheme); nsihandlerinfo getprotocolhandlerinfofromos(in acstring aprotocolscheme, out boolean afound); boolean isexposedprotocol(in string aprotocolscheme); void loaduri(in nsiuri auri, [optional] in nsiinterfacerequestor awindowcontext); void loadurl(in nsiuri aurl); void setprotocolhandlerdefaults(in nsihandlerinfo ahandlerinfo, in boolean aoshandlerexists); methods externalprotocolhandlerexists() check whether a handler for a specific protocol exists.
...void loaduri( in nsiuri auri, [optional] in nsiinterfacerequestor awindowcontext ); parameters auri the uri to load.
nsIFeedProcessor
to create an instance, use: var feedprocessor = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor); method overview void parseasync(in nsirequestobserver requestobserver, in nsiuri uri); void parsefromstream(in nsiinputstream stream, in nsiuri uri); void parsefromstring(in astring str, in nsiuri uri); attributes attribute type description listener nsifeedresultlistener the feed result listener that will respond to feed events.
... void parseasync( in nsirequestobserver requestobserver, in nsiuri uri ); parameters requestobserver the observer to be notified when parsing starts and stops.
nsIMemoryReporterManager
registermultireporter() requests that memory multi-reporter notifications be sent to the specified objects.
... registerreporter() requests that memory reporter notifications be sent to the specified objects.
nsIMessageWakeupService
requesting wakeups to request a wakeup, a wakeup condition must be registered with the category manager in the "wakeup-request" category.
...to indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nscomponent @mozilla.org/myservice;1,nsimyinterface,getservice,mymessage1,mymessage2[,..] the category entry value consists of a comma separate string that contains: the contract id for your component (e.g.
nsIMsgIdentity
requestreturnreceipt boolean readonly: default request for return receipt option for this identity.
... receiptheadertype long readonly: requestdsn boolean readonly: default request for dsn option for this identity.
nsIProtocolHandler
boolean allowport( in long port, in string scheme ); parameters port the port for which an override is being requested.
... scheme the scheme for which an override is being requested.
nsIProtocolProxyService
etfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, in nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description resolve_non_blocking 1<<0 this flag may be passed to the resolve method to request that it fail instead of block the calling thread.
... if a nsiprotocolhandler disallows all proxying, then filters will never have a chance to intercept proxy requests for such urls.
nsIPushSubscription
sending a post request to this url routes the message to the instance of firefox that created the subscription.
... example const { classes: cc, interfaces: ci, utils: cu } = components; const scriptsecuritymanager = cc["@mozilla.org/scriptsecuritymanager;1"] .getservice(ci.nsiscriptsecuritymanager); const pushservice = cc["@mozilla.org/push/service;1"] .getservice(ci.nsipushservice); function sendsubscriptiontoserver(subscription) { let request = cc["@mozilla.org/xmlextras/xmlhttprequest;1"] .createinstance(ci.nsixmlhttprequest); request.open("post", "https://example.com/register-for-push", true); request.addeventlistener("error", () => { cu.reporterror("error sending subscription to server"); }); request.send(json.stringify({ endpoint: subscription.endpoint, // base64-encode the key and authentica...
nsISHistory
requestedindex long the index of the last document that started to load that is not yet finished loading.
...nsishentry getentryatindex( in long index, in boolean modifyindex ); parameters index the index value whose entry is requested.
nsISSLErrorListener
method overview boolean notifysslerror(in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite); methods notifysslerror() called in case of an ssl error.
... boolean notifysslerror( in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
nsIScriptableIO
if the text mode is specified, a buffer is always used, regardless of whether or not it is specifically requested.
...if the text mode is specified, a buffer is always used, regardless of whether or not it is specifically requested.
nsIScrollable
when passing this in to a method you are requesting or setting data for the horizontal scrollbar.
...when passing this in to a method you are requesting or setting data for the vertical scrollbar.
nsISearchEngine
responsetype since an engine can have several different request urls, differentiated by response types, this parameter selects a request to add parameters to.
... purpose [optional] a string meant to indicate the context of the search request.
nsISelection
return value whether or not the range contains the requested noe.
...nsidomrange getrangeat( in long index ); parameters index return value the nsidomrange requested modify() modifies the selection.
nsISpeculativeConnect
method overview void speculativeconnect(in nsiuri auri, in nsiinterfacerequestor acallbacks, in nsieventtarget atarget); methods speculativeconnect() call this method to hint to the networking layer that a new transaction for the specified uri is likely to happen soon.
...void speculativeconnect( in nsiuri auri, in nsiinterfacerequestor acallbacks, in nsieventtarget atarget ); parameters auri the uri of the hinted transaction.
nsIStringBundle
return value returns the requested string.
... return value returns the requested string.
nsISupports
void queryinterface( in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result ); parameters uuid the uuid of the requested interface result the resulting interface pointer.
... exceptions thrown ns_error_no_interface the requested interface is not available.
nsITaskbarWindowPreview
note that even while the preview is hidden, its thumbnails and/or previews may still be requested by other parts of the operating system through the nsitaskbarwindowpreview's controller.
... return value an nsitaskbarpreviewbutton describing the requested button.
nsITransferable
requestingnode nsidomnode the source dom node this transferable was created from.
... to get the appropriate load context in javascript callers, one needs to get to the document that the transferable corresponds to, and then get the load context from the document like this: var loadcontext = doc.defaultview.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsiloadcontext); in c++ callers, if you have the corresponding document, you can just call nsidocument.getloadcontext() to get to the load context object.
nsIWeakReference
void queryreferent( in nsiidref uuid, [iid_is(uuid), retval] out nsqiresult result ); parameters uuid the uuid of the requested interface.
...ns_error_no_interface the requested interface is not available.
nsIWebProgress
the nsiwebprogress interface is used to add or remove nsiwebprogresslistener instances to observe the loading of asynchronous requests (usually in the context of a dom window).
... constant value description notify_state_request 0x00000001 only receive the nsiwebprogresslistener.onstatechange() event if the astateflags parameter includes nsiwebprogresslistener::state_is_request.
nsIZipWriter
afile, in boolean aqueue); void addentrystream(in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsiinputstream astream, in boolean aqueue); void close(); nsizipentry getentry(in autf8string azipentry); boolean hasentry(in autf8string azipentry); void open(in nsifile afile, in print32 aioflags); void processqueue(in nsirequestobserver aobserver, in nsisupports acontext); void removeentry(in autf8string azipentry, in boolean aqueue); attributes attribute type description comment acstring gets or sets the comment associated with the currently open zip file.
... void processqueue( in nsirequestobserver aobserver, in nsisupports acontext ); parameters aobserver the observer to receive notifications from the queue.
Using nsIDirectoryService
in the example below, prop is a string that references your requested file locations.
...when the service is asked for a file location, it goes through its list of providers asking each if it knows the requested location until it finds one that does.
XPCOM
unless otherwise noted you register for the topics using the nsiobserverservice.setting http request headershttp is one of the core technologies behind the web.
... in addition to the actual content, some important information is passed with http headers for both http requests and responses.storagestorage is a sqlite database api.
Address Book examples
* the onshow method should take the input fields in the document, * and render the requested photo in the img tag with id * atargetid.
... the * onsave method is responsible for analyzing the photo of this * type requested by the user, and storing it, as well as the * other fields required by onload/onshow to retrieve and display * the photo again.
Address book sync client design
* * atransactionid - the id for this particular request * astatus - status code for the sync request * amsg - a text string describing the error (if any).
... * * atransactionid - the id for this particular request * astatus - status code for the sync request * amsg - a text string describing the error (if any).
Plug-in Side Plug-in API - Plugins
npp_print requests a platform-specific print operation for an embedded or full-screen plug-in.
... npp_urlnotify notifies the instance of the completion of a url request.
Debugging service workers - Firefox Developer Tools
it is also worth knowing that if you are testing an app's offline capabilities, you'll be able to see whether requests are being retrieved from a service worker-initiated cache rather than from the network by looking at network monitor.
... note: there is currently a bug whereby the network monitor cannot show network requests from a service worker running in a different process to the application (bug 1432311).
Browser Console - Firefox Developer Tools
so it logs the same sorts of information as the web console - network requests, javascript, css, and security errors and warnings, and messages explicitly logged by javascript code.
... 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).
Debugger.Frame - Firefox Developer Tools
(in the terms used by the ecmascript specification, the variableenvironment of the execution context for the eval code is the variableenvironment of the execution context that this frame represents.) if implementation restrictions prevent spidermonkey from extending this frame’s environment as requested, this call throws an error exception.
...in the terms used by the ecmascript specification, the variableenvironment of the execution context for the eval code is the variableenvironment of the execution context that this frame represents, and thebindings appear in a new declarative environment, which is the eval code’s lexicalenvironment.) if implementation restrictions prevent spidermonkey from extending this frame’s environment as requested, this call throws an error exception.
Network monitor recording - Firefox Developer Tools
this is useful in situations where, for example, you are trying to get a stable view of a page for debugging purposes, but under normal circumstances the view keeps evolving due to persistent network requests.
... network monitor features the following articles cover different aspects of using the network monitor: toolbar network request list network request details performance analysis throttling ...
Rich output - Firefox Developer Tools
examining request details similar to examining object details, you can see the details about a network request directly in the console.
... click on the arrow next to the request and a details panel will open that is equivalent to the headers panel in the network monitor tool.
AbortController.AbortController() - Web APIs
when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
AbortSignal: abort event - Web APIs
the abort event of the fetch api is fired when a fetch request is aborted, i.e.
... 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() { console.log('request aborted'); }; specifications specification status domthe definition of 'abort' in that specification.
AbortSignal.aborted - Web APIs
the aborted read-only property returns a boolean that indicates whether the dom request(s) the signal is communicating with is/are aborted (true) or not (false).
...console.log('request has been aborted') : console.log('request not aborted'); specifications specification status comment domthe definition of 'onabort' in that specification.
AbortSignal.onabort - Web APIs
when the fetch request(s) the signal is communicating with is/are aborted.
... 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.
AbsoluteOrientationSensor - Web APIs
model.quaternion.fromarray(sensor.quaternion).inverse(); }); sensor.addeventlistener('error', error => { if (event.error.name == 'notreadableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requesting permissions for multiple device sensors.
... because the permissions uses promises, a good way to request permissions is to use promise.all.
AnalyserNode.fftSize - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount ; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { ...
AnalyserNode.frequencyBinCount - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,heig...
AnalyserNode.getByteFrequencyData() - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-b...
AnalyserNode.getByteTimeDomainData() - Web APIs
return value void | none example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; const bufferlength = analyser.fftsize; const dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; const slicewidth = width * 1.0 / bufferlength; let x = 0; canvasctx.beginpath(); for(var i = 0; i < bufferlength; i++) { const v = dataarray[i]/128.0; cons...
AnalyserNode.getFloatFrequencyData() - Web APIs
while the audio is playing, we collect the frequency data repeatedly with requestanimationframe() and draw a "winamp bargraph style" to a <canvas> element.
...//create 2d canvas const canvas = document.createelement('canvas'); canvas.style.position = 'absolute'; canvas.style.top = 0; canvas.style.left = 0; canvas.width = window.innerwidth; canvas.height = window.innerheight; document.body.appendchild(canvas); const canvasctx = canvas.getcontext('2d'); canvasctx.clearrect(0, 0, canvas.width, canvas.height); function draw() { //schedule next redraw requestanimationframe(draw); //get spectrum data analysernode.getfloatfrequencydata(dataarray); //draw black background canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, canvas.width, canvas.height); //draw spectrum const barwidth = (canvas.width / bufferlength) * 2.5; let posx = 0; for (let i = 0; i < bufferlength; i++) { const barheight = (dataarray[i] + 140) * 2; ...
AnalyserNode.getFloatTimeDomainData() - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 1024; var bufferlength = analyser.fftsize; console.log(bufferlength); var dataarray = new float32array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getfloattimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { var v = dataarray[i] * 200.0; var y ...
AnalyserNode.maxDecibels - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-b...
AnalyserNode.minDecibels - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-b...
AnalyserNode.smoothingTimeConstant - Web APIs
example the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input.
... analyser.fftsize = 256; var bufferlength = analyser.frequencybincount; console.log(bufferlength); var dataarray = new uint8array(bufferlength); canvasctx.clearrect(0, 0, width, height); function draw() { drawvisual = requestanimationframe(draw); analyser.getbytefrequencydata(dataarray); canvasctx.fillstyle = 'rgb(0, 0, 0)'; canvasctx.fillrect(0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-b...
AnalyserNode - Web APIs
basic usage the following example shows basic usage of an audiocontext to create an analysernode, then requestanimationframe and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // get a canvas defined with id "oscilloscope" var canvas = document.getelementbyid("oscilloscope"); var canvasctx = canvas.getcontext("2d"); // draw an oscilloscope of the current audio source function draw() { requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = "rgb(200, 200, 200)"; canvasctx.fillrect(0, 0, canvas.width, canvas.height); canvasctx.linewidth = 2; canvasctx.strokestyle = "rgb(0, 0, 0)"; canvasctx.beginpath(); var slicewidth = canvas.width * 1.0 / bufferlength; var x = 0; for (var i = 0; i < bufferlength; i++) { var v = dataarr...
AudioBufferSourceNode.loop - Web APIs
you can run the full example live (or view the source.) function getdata() { source = audioctx.createbuffersource(); 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; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destinat...
...ion); 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'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
AudioBufferSourceNode.loopEnd - Web APIs
function getdata() { source = audioctx.createbuffersource(); 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; songlength = buffer.duration; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; ...
... source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioBufferSourceNode.loopStart - Web APIs
function getdata() { source = audioctx.createbuffersource(); 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; songlength = buffer.duration; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; ...
... source.connect(audioctx.destination); source.loop = true; loopstartcontrol.setattribute('max', math.floor(songlength)); loopendcontrol.setattribute('max', math.floor(songlength)); }, function(e){"error with decoding audio data" + e.err}); } request.send(); } ...
AudioBufferSourceNode.playbackRate - Web APIs
<input class="playback-rate-control" type="range" min="0.25" max="3" step="0.05" value="1"> <span class="playback-rate-value">1.0</span> function getdata() { source = audioctx.createbuffersource(); 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; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destinat...
...ion); 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 = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'playbackrate' in that specification.
AudioContext.baseLatency - Web APIs
note: you can request a certain latency during construction time with the latencyhint option, but the browser may ignore the option.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
AuthenticatorResponse.clientDataJSON - Web APIs
the original value is passed via publickeycredentialrequestoptions.challenge or publickeycredentialcreationoptions.challenge.
... origin the fully qualified origin of the requester which has been given by the client/browser to the authenticator.
BaseAudioContext.createAnalyser() - Web APIs
example the following example shows basic usage of an audiocontext to create an analyser node, then use requestanimationframe() to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input.
... analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); analyser.getbytetimedomaindata(dataarray); // draw an oscilloscope of the current audio source function draw() { drawvisual = requestanimationframe(draw); analyser.getbytetimedomaindata(dataarray); canvasctx.fillstyle = 'rgb(200, 200, 200)'; canvasctx.fillrect(0, 0, width, height); canvasctx.linewidth = 2; canvasctx.strokestyle = 'rgb(0, 0, 0)'; canvasctx.beginpath(); var slicewidth = width * 1.0 / bufferlength; var x = 0; for(var i = 0; i < bufferlength; i++) { ...
BaseAudioContext.createConvolver() - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e)...
...{"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
BluetoothCharacteristicProperties - Web APIs
let device = await navigator.bluetooth.requestdevice({ filters: [{services: ['heart_rate']}] }); let gatt = await device.gatt.connect(); let service = await gatt.getprimaryservice('heart_rate'); let characteristic = await service.getcharacteristic('heart_rate_measurement'); if (characteristic.properties.notify) { characteristics.addeventlistener('characteristicvaluechanged', function(event) { console.log(`received heart rate mea...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
if you need to play ogg during downloading (stream it) - consider htmlaudioelement: new audio("music.ogg").play(); in getdata() we create a new request using the request() constructor, then use it to fetch an ogg music track.
... once getdata() has finished running, we start the audio source playing with start(0), then disable the play button so it can't be clicked again when it is already playing (this would cause an error.) function getdata() { source = audioctx.createbuffersource(); var myrequest = new request('viper.ogg'); fetch(myrequest).then(function(response) { return response.arraybuffer(); }).then(function(buffer) { audioctx.decodeaudiodata(buffer, function(decodeddata) { source.buffer = decodeddata; source.connect(audioctx.destination); }); }); }; // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); ...
Body.blob() - Web APIs
WebAPIBodyblob
example in our fetch request example (run fetch request live), we create a new request using the request() constructor, then use it to fetch a jpg.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest) .then(response => response.blob()) .then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'blob()' in that specification.
Body.json() - Web APIs
WebAPIBodyjson
example in our fetch json example (run fetch json live), we create a new request using the request() constructor, then use it to fetch a .json file.
... const mylist = document.queryselector('ul'); const myrequest = new request('products.json'); fetch(myrequest) .then(response => response.json()) .then(data => { for (const product of data.products) { let listitem = document.createelement('li'); listitem.appendchild( document.createelement('strong') ).textcontent = product.name; listitem.append( ` can be found in ${ product.location }.
Body.text() - Web APIs
WebAPIBodytext
when getdata() is run, we create a new request using the request() constructor, then use it to fetch a specific .txt file.
... let myarticle = document.queryselector('article'); let mylinks = document.queryselectorall('ul a'); for(let i = 0; i <= mylinks.length-1; i++) { mylinks[i].onclick = function(e) { e.preventdefault(); let linkdata = e.target.getattribute('data-page'); getdata(linkdata); } }; function getdata(pageid) { console.log(pageid); var myrequest = new request(pageid + '.txt'); fetch(myrequest).then(function(response) { return response.text().then(function(text) { myarticle.innerhtml = text; }); }); } specifications specification status comment fetchthe definition of 'text()' in that specification.
BudgetService.reserve() - Web APIs
the reserve() property of the budgetservice interface returns a promise that resolves to a boolean indicating whether the requested budget operation can be reserved.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BudgetService - Web APIs
budgetservice.reserve() returns a promise that resolves to a boolean, indicating whether the requested budget operation can be reserved.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
CSSStyleSheet.insertRule() - Web APIs
if rule cannot be inserted at index 0 due to some css constraint, the method aborts with a hierarchyrequesterror.
... if trying to insert an @import at-rule after a style rule, the method aborts with a hierarchyrequesterror.
ConvolverNode.buffer - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e)...
...{"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
ConvolverNode.normalize - Web APIs
// grab audio track via xhr for convolver node var soundsource, concerthallbuffer; ajaxrequest = new xmlhttprequest(); ajaxrequest.open('get', 'concert-crowd.ogg', true); ajaxrequest.responsetype = 'arraybuffer'; ajaxrequest.onload = function() { var audiodata = ajaxrequest.response; audioctx.decodeaudiodata(audiodata, function(buffer) { concerthallbuffer = buffer; soundsource = audioctx.createbuffersource(); soundsource.buffer = concerthallbuffer; }, function(e)...
...{"error with decoding audio data" + e.err}); } ajaxrequest.send(); ...
DataTransfer.dropEffect - Web APIs
for the dragenter and dragover events, dropeffect will be initialized based on what action the user is requesting.
...within event handlers for dragenter and dragover events, dropeffect should be modified if a different action is desired than the action that the user is requesting.
Document.exitPointerLock() - Web APIs
the exitpointerlock() method asynchronously releases a pointer lock previously requested through element.requestpointerlock.
... to track the success or failure of the request, it is necessary to listen for the pointerlockchange and pointerlockerror events.
Element.getAttributeNS() - Web APIs
getattributens() differs from getattribute() in that it allows you to further specify the requested attribute as being part of a particular namespace, as in the example above, where the attribute is part of the fictional "specialspace" namespace on mozilla.
...for that reason, you should use hasattributens() to check for an attribute's existence prior to calling getattributens() if it is possible that the requested attribute does not exist on the specified element.
FileList - Web APIs
WebAPIFileList
return value the file representing the requested file.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.copyTo() - Web APIs
errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.getMetadata() - Web APIs
fileerror.security_err security restrictions prohibit obtaining the requested metadata.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.moveTo() - Web APIs
errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFileEntry - Web APIs
var bb = new blobbuilder(); bb.append('meow'); filewriter.write(bb.getblob('text/plain')); }, errorhandler); }, errorhandler); } window.requestfilesystem(window.temporary, 1024*1024, oninitfs, errorhandler); specifications specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFlags - Web APIs
properties create optional if this property is true, and the requested file or directory doesn't exist, the user agent should create it.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
File and Directory Entries API - Web APIs
they're available on the window object and implemented in localfilesystem: requestfilesystem() and resolvelocalfilesystemurl().
...they're available on the worker object and implemented in localfilesystemsync: requestfilesystemsync() and resolvelocalfilesystemsyncurl().
FormData - Web APIs
WebAPIFormData
the formdata interface provides 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.
... specifications specification status comment xmlhttprequestthe definition of 'formdata' in that specification.
FormDataEvent - Web APIs
this allows a formdata object to be quickly obtained in response to a formdata event firing, rather than needing to put it together yourself when you wish to submit form data via a method like xmlhttprequest (see using formdata objects).
...ntdefault(); // construct a formdata object, which fires the formdata event new 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); }); specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
GeolocationCoordinates.longitude - Web APIs
upon receiving a click event, we call getcurrentposition() to request the device's current position.
... this is an asynchronous request, so we provide a callback which receives as in put a geolocationposition object describing the determined position.
HTMLCanvasElement.toDataURL() - Web APIs
if the requested type is not image/png, but the returned value starts with data:image/png, then the requested type is not supported.
... return value a domstring containing the requested data uri.
HTMLFormElement: formdata event - Web APIs
ntdefault(); // construct a formdata object, which fires the formdata event new 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 xmlhttpreque...
...st(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'formdata' in that specification.
HTMLImageElement.useMap - Web APIs
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement - Web APIs
keep in mind that browsers may ignore autoplay requests, so you should ensure that your code isn't dependent on autoplay working.
... pause fired when a request to pause play is handled and the activity has entered its paused state, most commonly occurring when the media's htmlmediaelement.pause() method is called.
HTMLSelectElement.add() - Web APIs
exceptions a domerror of the type hierarchyrequesterror if the item passed to the method is an ancestor of the htmlselectelement.
...it throws a domerror of the type hierarchyrequesterror if the passed item is an ancestor of the htmlselectelement and no longer throws if the before parameter is not found.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
this is further alleviated by using asynchronous javascript techniques such as promises to allow the main code to continue to run while waiting for the results of a request.
... however, code running at a more fundamental level—such as code comprising a library or framework—may need a way to schedule code to be run at a safe time while still executing on the main thread, independent of the results of any single request or task.
Working with the History API - Web APIs
adding and modifying history entries using pushstate() changes the referrer that gets used in the http header for xmlhttprequest objects created after you change the state.
... the referrer will be the url of the document whose window is this at the time of creation of the xmlhttprequest object.
IDBEnvironment - Web APIs
example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open("todolist"); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; }; } browser compatibility the compatibility table on this page is generated from structured data.
... if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndexSync - Web APIs
returns void exceptions this method can raise an idbdatabaseexception with the following code: not_found_err if no records exist in this index for the requested key range.
... returns void exceptions this method can raise an idbdatabaseexception with the following code: not_found_err if no records exist in this index for the requested key range.
FileHandle.getFile() - Web APIs
syntax var request = instanceoffilehandle.getfile(); return a domrequest object.
... in case of success, the request's result is a file object.
IDBMutableFile - Web APIs
mutablefile.getfile() returns a domrequest object.
... in case of success, the request's result is a file object representing a snapshot of the handled file.
IDBVersionChangeEvent.oldVersion - Web APIs
example var dbname = "sampledb"; var dbversion = 2; var request = indexeddb.open(dbname, dbversion); request.onupgradeneeded = function(e) { var db = request.result; if (e.oldversion < 1) { db.createobjectstore("store1"); } if (e.oldversion < 2) { db.deleteobjectstore("store1"); db.createobjectstore("store2"); } // etc.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IdleDeadline - Web APIs
the idledeadline interface is used as the data type of the input parameter to idle callbacks established by calling window.requestidlecallback().
... to learn more about how request callbacks work, see collaborative scheduling of background tasks.
Timing element visibility with the Intersection Observer API - Web APIs
function handlerefreshinterval() { let redrawlist = []; visibleads.foreach(function(adbox) { let previoustime = adbox.dataset.totalviewtime; updateadtimer(adbox); if (previoustime != adbox.dataset.totalviewtime) { redrawlist.push(adbox); } }); if (redrawlist.length) { window.requestanimationframe(function(time) { redrawlist.foreach(function(adbox) { drawadtimer(adbox); }); }); } } the array redrawlist will be used to keep a list of all the ads which need to be redrawn during this refresh cycle, since it may not be exactly the same as the elapsed time due to system activity or because you've set the interval to something other than every 1000 millis...
... finally, if there's at least one element to redraw, we use requestanimationframe() to schedule a function that will redraw each element in the redrawlist during the next animation frame.
Intersection Observer API - Web APIs
the intersection observer api lets code register a callback function that is executed whenever an element they wish to monitor enters or exits another element (or the viewport), or when the amount by which the two intersect changes by a requested amount.
...it should operate as quickly as possible; if anything time-consuming needs to be done, use window.requestidlecallback().
LockManager.query() - Web APIs
WebAPILockManagerquery
pending: an array of lock objects for pending lock requests.
... example const state = await navigator.locks.query(); for (const lock of state.held) { console.log(`held lock: name ${lock.name}, mode ${lock.mode}`); } for (const request of state.pending) { console.log(`requested lock: name ${request.name}, mode ${request.mode}`); } specifications specification status comment web locks apithe definition of 'query()' in that specification.
LockManager - Web APIs
the lockmanager interface of the the web locks api provides methods for requesting a new lock object and querying for an existing lock object.
... methods lockmanager.request() requests a lock object with parameters specifying its name and characteristics.
LockedFile.append() - Web APIs
WebAPILockedFileappend
syntax var request = instanceoflockedfile.append(data); parameters data the data to write into the file.
... return a filerequest object to handle the success or failure of the operation.
LockedFile.truncate() - Web APIs
syntax var request = instanceoflockedfile.truncate(start); parameters start optional a number representing the index where to start the operation.
... return a filerequest object to handle the success or failure of the operation.
LockedFile.write() - Web APIs
WebAPILockedFilewrite
syntax var request = instanceoflockedfile.write(data); parameters data the data to write into the file.
... return a filerequest object to handle the success or failure of the operation.
MediaDevices.getDisplayMedia() - Web APIs
since getdisplaymedia() requires a video track, the returned stream will have one even if no video track is expressly requested by the constraints object.
... async function startcapture(displaymediaoptions) { let capturestream = null; try { capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capturestream; } this uses await to asynchronously wait for getdisplaymedia() to resolve with a mediastream which contains the display contents as requested by the specified options.
MediaKeyMessageEvent() - Web APIs
syntax var mediakeymessageevent = new mediakeymessageevent(typearg, options) parameters typearg a domstring containing one of may be one of license-request, license-renewal, license-renewal, or individualization-request.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaRecorder.ondataavailable - Web APIs
when mediarecorder.requestdata() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered; then a new blob is created and media capture continues into that blob.
...you can use timeslice alongside mediarecorder.stop() and mediarecorder.requestdata() to produce multiple same-length blobs plus other shorter blobs as well.
MediaRecorder.onerror - Web APIs
this exception can also occur when a request is made on a source that has been deleted or removed.
... notsupportederror an attempt was made to instantiate a mediarecorder using a mime type that isn't supported on the user's device; one or more of the requested container, codecs, or profiles as well as other information may be invalid.
MediaRecorder.start() - Web APIs
you can record the entire duration of the media into a single blob (or until you call requestdata()), or you can specify the number of milliseconds to record at a time.
...if this parameter isn't included, the entire media duration is recorded into a single blob unless the requestdata() method is called to obtain the blob and trigger the creation of a new blob into which the media continues to be recorded.
MediaSource.endOfStream() - Web APIs
for example, you might have a function that handles media chunk requests, separate from other network requests.
... when you make an xmlhttprequest call for a media chunk, and onabort or onerror triggers, you might want to call endofstream('network'), display a descriptive message in the ui, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) decode: terminates playback and signals that a decoding error has occured.
MediaSource - Web APIs
examples the following simple example loads a video with xmlhttprequest, playing it as soon as it can.
... this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); }; specifications specification status comment media source extensionsthe definition of 'mediasource' in that specification.
MediaTrackConstraints.autoGainControl - Web APIs
the mediatrackconstraints dictionary's autogaincontrol property is a constrainboolean describing the requested or mandatory constraints placed upon the value of the autogaincontrol constrainable property.
...if, instead, the value is given as an object with an exact field, that field's boolean value indicates a required setting for the automatic gain control feature; if it can't be met, then the request will result in an error.
MediaTrackConstraints.echoCancellation - Web APIs
the mediatrackconstraints dictionary's echocancellation property is a constrainboolean describing the requested or mandatory constraints placed upon the value of the echocancellation constrainable property.
...if, instead, the value is given as an object with an exact field, that field's boolean value indicates a required setting for the echo cancellation feature; if it can't be met, then the request will result in an error.
MediaTrackConstraints.facingMode - Web APIs
the mediatrackconstraints dictionary's facingmode property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the facingmode constrainable property.
... an exact value in this case indicates that the specified facing mode is specifically required; for example: var constraints = { facingmode: { exact: "user" } }; this indicates that only a user-facing camera is acceptable; if there is no user-facing camera, or the user declines permission to use that camera, the media request will fail.
MediaTrackConstraints.noiseSuppression - Web APIs
the mediatrackconstraints dictionary's noisesuppression property is a constrainboolean describing the requested or mandatory constraints placed upon the value of the noisesuppression constrainable property.
...if, instead, the value is given as an object with an exact field, that field's boolean value indicates a required setting for the noise suppression feature; if it can't be met, then the request will result in an error.
MediaTrackSupportedConstraints.frameRate - Web APIs
the framerate constraint can be used to establish acceptable upper and lower bounds on the video frame rate for a new video track, or to specify an exact frame rate that must be provided for the request to succeed.
... example this simple example looks to see if your browser supports constraining the frame rate when requesting video tracks.
MediaTrackSupportedConstraints - Web APIs
because of the way interface definitions in webidl work, if a constraint is requested but not supported, no error will occur.
... instead, the specified constraints will be applied, with any unrecognized constraints stripped from the request.that can lead to confusing and hard to debug errors, so be sure to use getsupportedconstraints() to retrieve this information before attempting to establish constraints if you need to know the difference between silently ignoring a constraint and a constraint being accepted.
MerchantValidationEvent.methodName - Web APIs
syntax methodid = merchantvalidationevent.methodname; value a read-only domstring which uniquely identifies the payment handler which is requesting merchant validation.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification.
Navigation Timing API - Web APIs
concepts and usage you can use the navigation timing api to gather performance data on the client side, which you can then transmit to a server using xmlhttprequest or other techniques.
... calculate request response time you can calculate the time elapsed between the beginning of a request and the completion of getting the response using code like this: const connecttime = perfdata.responseend - perfdata.requeststart; here, the time at which the request was initiated (requeststart).
Navigator.getUserMedia() - Web APIs
syntax navigator.getusermedia(constraints, successcallback, errorcallback); parameters constraints a mediastreamconstraints object specifying the types of media to request, along with any requirements for each type.
... successcallback a function which is invoked when the request for media access is approved.
Notification.permission - Web APIs
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.
... // let's check whether notification permissions have alredy been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask the user for permission else if (notification.permission !== 'denied' || notification.permission === "default") { notification.requestpermission(function (permission) { // if the user accepts, let's create a notification if (permission === "granted") { var notification = new notification("hi there!"); } }); } // at last, if the user has denied notifications, and you // want to be respectful there is no need to bother them any more.
OfflineAudioContext.startRendering() - Web APIs
mple, see our offline-audio-context-promise github repo (see the source code too.) // define online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it 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; source.connect(offlinectx.destination); source.start(); //source.loop = true; o...
...x.createbuffersource(); song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'startrendering()' in that specification.
OfflineAudioContext - Web APIs
mple, see our offline-audio-context-promise github repo (see the source code too.) // define online and offline audio context var audioctx = new audiocontext(); var offlinectx = new offlineaudiocontext(2,44100*40,44100); source = offlinectx.createbuffersource(); // use xhr to load an audio track, and // decodeaudiodata to decode it and offlineaudiocontext to render it 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; source.connect(offlinectx.destination); source.start(); //source.loop = true; o...
...x.createbuffersource(); song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'offlineaudiocontext' in that specification.
OffscreenCanvas - Web APIs
}; you can also use requestanimationframe in workers onmessage = function(evt) { const canvas = evt.data.canvas; const gl = canvas.getcontext("webgl"); function render(time) { // ...
... requestanimationframe(render); } requestanimationframe(render); }; specifications specification status comment html living standardthe definition of 'offscreencanvas' in that specification.
PasswordCredential - Web APIs
the data in the objects will be added to the request body and sent to the remote endpoint with the credentials.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PayerErrors - Web APIs
the payererrors dictionary is used by the payment request api to indicate the presence of—and to explain how to correct—validation errors in the payer details.
... example specifications specification status comment payment request apithe definition of 'payererrors' in that specification.
PaymentAddress.country - Web APIs
ntry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
... specifications specification status comment payment request apithe definition of 'paymentaddress.country' in that specification.
PaymentCurrencyAmount - Web APIs
the paymentcurrencyamount dictionary describes an amount of money in terms of both a number of units and the currency (us dollars, euro, yen, etc.), and is part of the payment request api.
... specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
PaymentDetailsUpdate.error - Web APIs
this happens if both of the following are true: the paymentrequest specifies using its requestshipping property that shipping information is required.
... specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.error' in that specification.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
the paymentdetailsupdate dictionary's shippingaddresserrors property, if present, contains an addresserrors object whose contents provide error messages for one or more of the values in the paymentaddress specified as paymentrequest.shippingaddress.
... specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.shippingaddresserrors' in that specification.
PaymentItem - Web APIs
the paymentitem dictionary is used by the payment request api to describe a single line item on a payment request.
... specifications specification status comment payment request apithe definition of 'paymentitem' in that specification.
PaymentResponse.methodName - Web APIs
example the following example extracts the method name from the paymentresponse object to the promise returned from paymentrequest.show().
... 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.
PayerResponse.payerPhone - Web APIs
this option is only present when the requestpayerphone option is set to true in the paymentoptions object passed to the paymentrequest constructor.
... syntax var payerphone = paymentresponse.payerphone; specifications specification status comment payment request api candidate recommendation initial definition.
PerformanceEntry.entryType - Web APIs
resource performanceresourcetiming url the resolved url of the requested resource.
... this value doesn't change even if the request is redirected.
PerformanceEntry.name - Web APIs
url performanceresourcetiming resource the resolved url of the requested resource.
... this value doesn't change even if the request is redirected.
PerformanceResourceTiming - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an xmlhttprequest, <svg>, image, or script.
... performanceresourcetiming.requeststartread only a domhighrestimestamp immediately before the browser starts requesting the resource from the server.
PermissionStatus - Web APIs
properties permissionstatus.state read only returns the state of a requested permission; one of 'granted', 'denied', or 'prompt'.
... permissionstatus.statusread only returns the state of a requested permission; one of 'granted', 'denied', or 'prompt'.
Permissions.revoke() - Web APIs
returns a promise that calls its fulfillment handler with a permissionstatus object indicating the result of the request.
... example this function can be used by an app to request that its own geolocation api permission be revoked.
PublicKeyCredential.getClientExtensionResults() - Web APIs
during the creation or fetching of a publickeycredential (respectively via navigator.credentials.create() and navigator.credentials.get()), it is possible to have "custom" processing by the client for different extensions which are respectively given by publickeycredentialcreationoptions.extensions and publickeycredentialrequestoptions.extensions.
...as of march 2019, only appid (used during creation with publickeycredentialrequestoptions.extensions) is supported by chrome and edge.
PushManager.hasPermission() - Web APIs
the pushmanager.haspermission() method of the pushmanager interface returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushManager.registrations() - Web APIs
syntax var request = navigator.push.registrations(); return a domrequest object to handle the success or failure of the method call.
... if the method call is successful, the request's result will be an array of pushregistration objects.
PushRegistrationManager - Web APIs
pushregistrationmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Web Push API Notifications best practices - Web APIs
sometimes news sites request push notifications so they can essentially say "look at me!
...for example, safari 12.1 now requires—and other browsers either already do, or are planning[1] to do so—that the user interact with the page in some way before the page can request permission to perform push notifications.
Push API - Web APIs
WebAPIPush API
see the following articles 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.
... pushmanager provides a way to receive notifications from third-party servers, as well as request urls for push notifications.
RTCIceCandidate.tcpType - Web APIs
"active" the transport will try to open an outbound connection but won't receive inoming connection requests.
... "passive" the transport will receive incoming connection requests but won't try to open an outbound connection.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
this value is computed by observing the time that elapsed between the most recent stun request being sent to the remote peer and the response to that request arriving.
... this information may come from ongoing stun connectivity checks as well as from consent requests made when the connection was initially being opened.
RTCIceCandidatePairStats.responsesSent - Web APIs
syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the number of times a repsonse has been sent to a stun connectivity check request.
... note: since it isn't possible to tell the difference between connectivity check requests and consent requests, this value includes both.
RTCIceCandidatePairStats.writable - Web APIs
syntax iswritable = rtcicecandidatepairstats.writable; value a boolean value which is true if the connection described by this candidate pair has received acknowledgement of receipt (ack) for at least one ice request and that stun consent hasn't expired.
... note: this property was removed from the specification in early 2017 because you can determine whether or not an incoming ice request is available to read by checking to see if responsesreceived is greater than 0 and that the time specified by consentexpiredtimestamp has not passed: if (icpstats.responsesreceived > 0 && icpstats.consentexpiredtimestamp < performance.now()) { /* at least one ice response has been received */ } ...
RTCIceTcpCandidateType - Web APIs
values "active" the transport will try to open an outbound connection but won't receive inoming connection requests.
... "passive" the transport will receive incoming connection requests but won't try to open an outbound connection.
RTCIceTransportState - Web APIs
"closed" the transport has shut down and is no longer responding to stun requests.
... stun requests being sent to the remote device have gone unanswered repeatedly.
RTCPeerConnection.createAnswer() - Web APIs
failurecallback an rtcpeerconnectionerrorcallback which will be passed a single domexception object explaining why the request to create an answer failed.
... options optional an optional rtcofferoptions object providing options requested for the answer.
RTCRtpSender.getStats() - Web APIs
the rtcrtpsender 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.
... example this simple example obtains the statistics for an rtcrtpsender and updates an element's innertext to display the current round trip time for requests on the sender.
ReadableStreamBYOBReader.releaseLock() - Web APIs
a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readablestreambyobreader.read() method has not finished.
... exceptions typeerror the source object is not a readablestreambyobreader, or a read request is pending.
ReadableStreamDefaultReader.releaseLock() - Web APIs
a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readablestreamdefaultreader.read() method has not finished.
... exceptions typeerror the source object is not a readablestreamdefaultreader, or a read request is pending.
Reporting API - Web APIs
you can then retrieve reports by making a request to those urls.
... intervention report indicates that a request made by the website has been denied by the browser, e.g.
Response - Web APIs
WebAPIResponse
the response interface of the fetch api represents the response to a request.
... you'll notice that since we are requesting an image, we need to run body.blob (response implements body) to give the response its correct mime type.
Streams API concepts - Web APIs
pull sources require you to explicitly request data from them once connected to.
... you can make use of ready-made readable streams via mechanisms like a response.body from a fetch request, or roll your own streams using the readablestream() constructor.
SubtleCrypto.deriveBits() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the base key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
... notsupported raised when trying to use an algorithm that is either unknown or isn't suitable for derivation, or if the algorithm requested for the derived key doesn't define a key length.
SubtleCrypto.deriveKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions are encountered: invalidaccesserror raised when the master key is not a key for the requested derivation algorithm or if the cryptokey.usages value of that key doesn't contain derivekey.
... notsupported raised when trying to use an algorithm that is either unknown or isn't suitable for derivation, or if the algorithm requested for the derived key doesn't define a key length.
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
for information on pairing devices, see usb.requestdevice().
...for information on pairing devices, see usb.requestdevice().
USBInTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb device to the usb host.
... usbintransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferPacket - Web APIs
it represents the status of an individual packet from a request to transfer data from the usb device to the usb host over an isochronous endpoint.
... usbisochronousintransferpacket.statusread only read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb device to the usb host.
... usbisochronousintransferresult.packetsread only returns an array of usbisochronousintransferpacket objects containing the result of each request to receive a packet from the device.
USBIsochronousOutTransferPacket - Web APIs
it represents the status of an individual packet from a request to transfer data from the usb host to the usb device over an isochronous endpoint.
... usbisochronousouttransferpacket.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousOutTransferResult - Web APIs
it represents the result from requesting a transfer of data from the usb host to the usb device.
... properties usbisochronousouttransferresult.packetsread only returns an array of usbisochronousouttransferpacket objects containing the result of each request to send a packet to the device.
Animating objects with WebGL - Web APIs
we can do that by creating a new variable to track the time at which we last animated (let's call it then), then adding the following code to the end of the main function var then = 0; // draw the scene repeatedly function render(now) { now *= 0.001; // convert to seconds const deltatime = now - then; then = now; drawscene(gl, programinfo, buffers, deltatime); requestanimationframe(render); } requestanimationframe(render); this code uses requestanimationframe to ask the browser to call the function "render" on each frame.
... requestanimationframe passes us the time in milliseconds since the page loaded.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
remote peer on the remote peer, when we receive an sdp offer with the directionality set to "sendonly", we handle it using the holdrequested() method, which accepts as input an sdp offer string.
... async function holdrequested(offer) { try { await peerconnection.setremotedescription(offer); await audiotransceiver.sender.replacetrack(null); audiotransceiver.direction = "recvonly"; await sendanswer(); } catch(err) { /* handle the error */ } } the steps taken here are: set the remote description to the specified offer by calling rtcpeerconnection.setremotedescription().
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
signaler.send({ description: pc.localdescription }); }; pc.oniceconnectionstatechange = () => { if (pc.iceconnectionstate === "failed") { pc.onnegotiationneeded({ icerestart: true }); } }; this has a number of reliability issues and outright bugs (such as failing if the iceconnectionstatechange event fires when the signaling state isn't stable), but there was no way you could actually request an ice restart other than by creating and sending an offer with the icerestart option set to true.
... sending the restart request thus required directly invoking the negotiationneeded event's handler.
Introduction to WebRTC protocols - Web APIs
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.
...requests will be translated from the device’s private ip to the router’s public ip with a unique port.
Taking still photos with WebRTC - Web APIs
this function's job is to request access to the user's webcam, initialize the output <img> to a default state, and to establish the event listeners needed to receive each frame of video from the camera and react when the button is clicked to capture an image.
....getelementbyid('startbutton'); get the media stream the next task is to get the media stream: navigator.mediadevices.getusermedia({ video: true, audio: false }) .then(function(stream) { video.srcobject = stream; video.play(); }) .catch(function(err) { console.log("an error occurred: " + err); }); here, we're calling mediadevices.getusermedia() and requesting a video stream (without audio).
WebRTC API - Web APIs
rtcsessiondescriptioncallback the rtcsessiondescriptioncallback is passed into the rtcpeerconnection object when requesting it to create offers or answers.
... rtcidentityprovider enables a user agent is able to request that an identity assertion be generated or validated.
Writing WebSocket client applications - Web APIs
a custom protocol of "protocolone" is named in the request for the socket in this example, though this can be omitted.
... 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.
Writing a WebSocket server in Java - Web APIs
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.
... you must, obtain the value of sec-websocket-key request header without any leading and trailing whitespace link it with "258eafa5-e914-47da-95ca-c5ab0dc85b11" compute sha-1 and base64 code of it write it back as value of sec-websocket-accept response header as part of a http response.
Inputs and input sources - Web APIs
function drawframe(time, frame) { applyexternalinputs(avatar); let pose = frame.getviewerpose(avatar.referencespace); animationframerequest = session.requestanimationframe(drawframe); /* draw the frame here */ } the drawframe() function shown here is the callback invoked when it's time to draw the frame, as established by calling the the xrsession method requestanimationframe().
... after that, everything proceeds as usual, getting the viewer's pose from the updated reference frame, requesting the next frame callback through requestanimationframe(), and then continuing to set up webgl and draw the scene.
WebXR Device API - Web APIs
to get an xrframe, call the session's requestanimationframe() method, providing a callback which will be called with the xrframe once available.
...once an xrsession is obtained from navigator.xr.requestsession(), the session can be used to check the position and orientation of the viewer, query the device for environment information, and present the virtual or augmented world to the user.
Using the Web Animations API - Web APIs
it is one of the most performant ways to animate on the web, letting the browser make its own internal optimizations without hacks, coercion, or window.requestanimationframe().
...like windowtimers.settimeout() and window.requestanimationframe(), the web animations api only takes milliseconds.
Advanced techniques: Creating and sequencing audio - Web APIs
if (lastnotedrawn != drawnote) { pads.foreach(function(el, i) { el.children[lastnotedrawn].style.bordercolor = 'hsla(0, 0%, 10%, 1)'; el.children[drawnote].style.bordercolor = 'hsla(49, 99%, 50%, 1)'; }); lastnotedrawn = drawnote; } // set up to draw again requestanimationframe(draw); } putting it all together now all that's left to do is make sure we've loaded the sample before we are able to play the instrument.
...splaying; if (isplaying) { // start playing // check if context is in suspended state (autoplay policy) if (audioctx.state === 'suspended') { audioctx.resume(); } currentnote = 0; nextnotetime = audioctx.currenttime; scheduler(); // kick off scheduling requestanimationframe(draw); // start the drawing loop.
Migrating from webkitAudioContext - Web APIs
the example below shows old code which downloads an audio file over the network, and then decoded it using createbuffer(): var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { var decodedbuffer = context.createbuffer(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 r...
...elatively 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 finishes, one of the success or failure callback functions will get called depending on whether the audio decoding was successful.
Web Workers API - Web APIs
in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
...they are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
...et topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); also in the code we include a snippet that detects whether screenleft is supported, and if not, polyfills in screenleft/screentop using window.screenx/window.screeny.
Window.screenTop - Web APIs
WebAPIWindowscreenTop
in this example we are using screenleft/screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
...et topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); also in the code we include a snippet that detects whether screenleft is supported, and if not, polyfills in screenleft/screentop using window.screenx/window.screeny.
Window.screenX - Web APIs
WebAPIWindowscreenX
in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
...et topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); these work in exactly the same way as screenx/screeny.
Window.screenY - Web APIs
WebAPIWindowscreenY
in this example we are using window.screenleft/window.screentop plus window.requestanimationframe() to constantly redraw the circle in the same physical position on the screen, even if the window position is moved.
...et topupdate = initialtop - newtop; ctx.fillstyle = 'rgb(0, 0, 0)'; ctx.fillrect(0, 0, width, height); ctx.fillstyle = 'rgb(0, 0, 255)'; ctx.beginpath(); ctx.arc(leftupdate + (width/2), topupdate + (height/2) + 35, 50, degtorad(0), degtorad(360), false); ctx.fill(); pelem.textcontent = 'window.screenleft: ' + window.screenleft + ', window.screentop: ' + window.screentop; window.requestanimationframe(positionelem); } window.requestanimationframe(positionelem); these work in exactly the same way as screenx/screeny.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
for example, if using setinterval() to poll a remote server every 5 seconds, network latency, an unresponsive server, and a host of other issues could prevent the request from completing in its allotted time.
... as such, you may find yourself with queued up xhr requests that won't necessarily return in order.
WorkerNavigator.permissions - Web APIs
examples self.navigator.permissions.query({name:'notifications'}).then(function(result) { if (result.state === 'granted') { shownotification(); } else if (result.state === 'prompt') { requestnotificationpermission() } }); specification specification status comment permissions working draft initial definition.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
options optional an object with any of the following options: credentials: a requestcredentials value that indicates whether to send credentials (e.g.
...see also request.credentials.
XMLDocument.load() - Web APIs
WebAPIXMLDocumentload
can be used with document.async to indicate whether the request is synchronous or asynchronous (the default).
... as of at least gecko 1.9, this no longer supports cross-site loading of documents (use xmlhttprequest or fetch() instead).
XRFrame.getViewerPose() - Web APIs
exceptions invalidstateerror a domexception indicating that getviewerpose() was not called within the context of a callback to a session's xrsession.requestanimationframe().
... examples in this callback function for requestanimationframe(), the xrviewerpose describing the viewer's viewpoint on the world is obtained by calling getviewerpose() on the xrframe passed into the callback.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
xrsession.requestreferencespace("local") .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(startposition, {x:0, y:0, z:1.0, w: 1.0})); xrsession.requestanimationframe(drawframe); }); in this code, we obtain a local reference space, then use getoffsetreferencespace() to create a new space whose origin is adjusted to a ...
...then the first animation frame is requested using xrsession's requestanimationframe().
XRReferenceSpaceType - Web APIs
this type is used when calling the requestreferencespace() method to obtain a reference space for an xrsession.
... values the reference space returned by xrsession.requestreferencespace() is either xrreferencespace or xrboundedreferencespace.
XRSessionInit - Web APIs
the webxr device api dictionary xrsessioninit specifies required and/or optional features when requesting a new xrsession by calling the navigator.xr.requestsession() method.
... because immersive sessions are required to support the local reference space, any request to open an immersive xrsession is required to obtain explicit or implicit user consent.
XRSystem: isSessionSupported() - Web APIs
if no session is already underway, we request the vr session and, if successful, set up the session in a method called onsessionstarted(), not shown.
... if (navigator.xr) { navigator.xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { userbutton.addeventlistener('click', onbuttonclicked); userbutton.innerhtml = 'enter xr'; userbutton.disabled = false; } }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then((session) => { xrsession = session; // onsessionstarted() not shown for reasons of brevity and clarity.
XRViewport - Web APIs
these values may be passed directly into the webglrenderingcontext.viewport() method: let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); example this example sets up an animation frame callback using requestanimationframe().
... xrsession.requestanimationframe((time, xrframe) => { let viewerpose = xrframe.getviewerpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewerpose.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); // now we can use webgl to draw into a viewport matching // the viewer's needs } }); specifications specification status comment webxr device apithe definition of 'xrviewport' in that specification.
prefers-reduced-motion - CSS: Cascading Style Sheets
the prefers-reduced-motion css media feature is used to detect if the user has requested that the system minimize the amount of non-essential motion it uses.
... user preferences for firefox, the reduce request is honoured if: in gtk/gnome: gnome tweaks > general tab (or appearance, depending on version) > animations is turned off.
@media - CSS: Cascading Style Sheets
WebCSS@media
prefers-contrast detects if the user has requested the system increase or decrease the amount of contrast between adjacent colors added in media queries level 5.
...for example, prefers-reduced-motion to detect if the user has requested that the system minimize the amount of animation or motion it uses.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
rather than include each image as a separate image file, it is much more memory- and bandwidth-friendly to send them as a single image; using background position as a way to distinguish between individual images in the same image file, so the number of http requests is reduced.
... note: when using http/2, it may in fact be more bandwidth-friendly to use multiple small requests.
animation-delay - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
animation-direction - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
background-position-x - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
background-position-y - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
background-position - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
background-size - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-bottom-width - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-left-style - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-left - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-right-style - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-right - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border-top - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
border - CSS: Cascading Style Sheets
WebCSSborder
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
caption-side - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
clear - CSS: Cascading Style Sheets
WebCSSclear
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
column-count - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
cursor - CSS: Cascading Style Sheets
WebCSScursor
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... not-allowed the requested action will not be carried out.
direction - CSS: Cascading Style Sheets
WebCSSdirection
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
empty-cells - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-style - CSS: Cascading Style Sheets
if 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 general, for a requested angle of 14 degrees or greater, larger angles are prefered; otherwise, smaller angles are preferred (see the spec's font matching section for the precise algorithm).
font-variant-caps - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-variant - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
letter-spacing - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
max-height - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
mix-blend-mode - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
object-fit - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
object-position - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
outline-color - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
outline-offset - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
pointer-events - CSS: Cascading Style Sheets
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
position - CSS: Cascading Style Sheets
WebCSSposition
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
right - CSS: Cascading Style Sheets
WebCSSright
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
text-rendering - CSS: Cascading Style Sheets
in svg, when text is scaled up or down, browsers calculate the final size of the text (which is determined by the specified font size and the applied scale) and request a font of that computed size from the platform's font system.
... but if you request a font size of, say, 9 with a scale of 140%, the resulting font size of 12.6 doesn't explicitly exist in the font system, so the browser rounds the font size to 12 instead.
WAI ARIA Live Regions/API Support - Developer guides
e the offsets and removed text) text inserted text_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the offsets and inserted text) text replaced text_changed::delete followed immediately by text_changed::insert ia2_event_text_removed followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request of screen reader vendors, who avoid those events because they cause crashes on some important system -- show/hide are the equivalent of those events.
... key presses yes mouse clicks yes mouse hovers no page load events no everything else, including focus changes, timer callbacks, xmlhttprequest callbacks, etc.
Live streaming web audio and video - Developer guides
rtmp comes in various flavours including rtmpe (encrypted), rtmps (secure over ssl/tls) and rtmpt (encapsulated within http requests).
...so for example, if we detect that the network is slow, we can start requesting lower quality (smaller) chunks for the next segment.
Audio and Video Delivery - Developer guides
web audio api var context; var request; var source; try { context = new audiocontext(); request = new xmlhttprequest(); request.open("get","http://jplayer.org/audio/mp3/riomez-01-sleep_together.mp3",true); request.responsetype = "arraybuffer"; request.onload = function() { context.decodeaudiodata(request.response, function(buffer) { source = context.createbuffersource(); source.buffer = ...
...buffer; source.connect(context.destination); // auto play source.start(0); // start was previously noteon }); }; request.send(); } catch(e) { alert('web audio api not supported'); } in this example we retrieve an mp3 file via xhr, load it into a source and play it (try it for yourself).
DOM onevent handlers - Developer guides
non-element objects event handlers can also be set with properties on non-element objects that generate events, like window, document, xmlhttprequest, and others.
... for example, for the progress event on instances of xmlhttprequest: const xhr = new xmlhttprequest(); xhr.onprogress = function() { … }; html onevent attributes html elements have attributes named onevent which can be used to register a handler for an event directly within the html code.
Overview of events and handlers - Developer guides
the displayed page remains unchanged until the browser requests a new page.
...ds based on the object emitting the event including: the window object, such as due to resizing the browser, the window.screen object, such as due to changes in device orientation, the document object, including the loading, modification, user interaction, and unloading of the page, the objects in the dom (document object model) tree including user interactions or modifications, the xmlhttprequest objects used for network requests, and the media objects such as audio and video, when the media stream players change state.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
if 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 the link is followed, the browser will send post requests with the body ping to the urls.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... ping contains 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).
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...possible values: post: the data from the form are included in the body of the http request when sent to the server.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...mousedown = function() { pressed = true; }; canvas.onmouseup = function() { pressed = false; } clearbtn.onclick = function() { ctx.fillstyle = 'rgb(0,0,0)'; ctx.fillrect(0,0,width,height); } function draw() { if(pressed) { ctx.fillstyle = colorpicker.value; ctx.beginpath(); ctx.arc(curx, cury-85, sizepicker.value, degtorad(0), degtorad(360), false); ctx.fill(); } requestanimationframe(draw); } draw(); specifications specification status comments html living standardthe definition of '<input type="button">' in that specification.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
the basic idea is that if a user is filling in a sensitive form, such as a form on their banking website to transfer some money to another account, the secret they would be provided with would prove that they are who they say they are, and that they are using the correct form to submit the transfer request.
...this kind of attack is called a cross site request forgery (csrf); pretty much any reputable server-side framework uses hidden secrets to prevent such attacks.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
if 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 simple regular expression requests a string that has any number of characters, followed by a dot, followed by "myco", followed by a dot, followed by any number of characters.
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
same-origin: a referrer will be sent for same origin, but cross-origin requests will contain no referrer information.
... 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.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
if 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 you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
if 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 points to a source file containing timed text that the browser exposes when the user requests additional data.
HTML: Hypertext Markup Language
WebHTML
cors settings attributes some html elements that provide support for cors, such as <img> or <video>, have a crossorigin attribute (crossorigin property), which lets you configure the cors requests for the element's fetched data.
... preloading content with rel="preload" the preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your html <head>, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in.
MIME types (IANA media types) - HTTP
value="test.txt"></label> <button>send the file</button> </form> will send this message: post / http/1.1 host: localhost:8000 user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate connection: keep-alive upgrade-insecure-requests: 1 content-type: multipart/form-data; boundary=---------------------------8721656041911415653955004498 content-length: 465 -----------------------------8721656041911415653955004498 content-disposition: form-data; name="mytextfield" test -----------------------------8721656041911415653955004498 content-disposition: form-data; name="mycheckbox" on -----------------------------872165604191141565...
... when the 206 partial content status code is sent, this mime type indicates that the document is composed of several parts, one for each of the requested ranges.
Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz' - HTTP
simply put, the origin making the request does not match any of the origins permitted by the access-control-allow-origin header.
... if the service your code is accessing using a cors request is under your control, make sure that it's configured to include your origin in its access-control-allow-origin header, and that only one such header is included in responses.
Reason: CORS disabled - HTTP
WebHTTPCORSErrorsCORSDisabled
a request that needs to use cors was attempted, but cors is disabled in the user's browser.
...setting this to true disables cors, so whenever that's the case, cors requests will always fail with this error.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
the response to the cors request that was sent by the server includes an access-control-allow-headers header which includes at least one invalid header name.
... the access-control-allow-headers header is sent by the server in response to a preflight request; it lets the client know which http headers are permitted in cors requests.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
the response to the cors request that was sent by the server includes an access-control-allow-methods header which includes at least one invalid method name.
... the access-control-allow-methods header is sent by the server to let the client know what http request methods it supports for cors requests.
Reason: CORS header ‘Origin’ cannot be added - HTTP
the user agent was unable to add the required origin header to the http request.
... all cors requests must have an origin header.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
example 4 a web site administrator for an online banking site wants to ensure that all its content is loaded using tls, in order to prevent attackers from eavesdropping on requests.
...a browser capable of enforcing csp would send the following violation report as a post request to http://example.com/_/csp-reports, when the document is visited: { "csp-report": { "document-uri": "http://example.com/signup.html", "referrer": "", "blocked-uri": "http://example.com/css/style.css", "violated-directive": "style-src cdn.example.com", "original-policy": "default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports" } } as you can see, the re...
Feature Policy - HTTP
the features include: layout-inducing animations legacy image formats oversized images synchronous scripts synchronous xmlhttprequest unoptimized images unsized media granular control over certain features the web provides functionality and apis that may have privacy or security risks if abused.
... the features include (see features list): accelerometer ambient light sensor autoplay camera encrypted media fullscreen geolocation gyroscope magnetometer microphone midi paymentrequest picture-in-picture usb vr / xr examples using feature policy see feature policy demos for example usage of many policies.
Accept-CH-Lifetime - HTTP
the accept-ch-lifetime header is set by the server to specify the persistence of accept-ch header value that specifies for which client hints headers client should include in subsequent requests.
...accept-ch and accept-ch-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
Accept-CH - HTTP
the accept-ch header is set by the server to specify which client hints headers a client should include in subsequent requests.
...accept-ch and accept-ch-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
Accept-Encoding - HTTP
the accept-encoding request http header advertises which content encoding, usually a compression algorithm, the client is able to understand.
... header type request header forbidden header name yes syntax accept-encoding: gzip accept-encoding: compress accept-encoding: deflate accept-encoding: br accept-encoding: identity accept-encoding: * // multiple algorithms, weighted with the quality value syntax: accept-encoding: deflate, gzip;q=1.0, *;q=0.5 directives gzip a compression format using the lempel-ziv coding (lz77), with a 32-bi...
Accept-Language - HTTP
the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
... 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 *,-.;=.
Accept-Patch - HTTP
accept-patch in response to any method means that patch is allowed on the resource identified by the request-uri.
... two common cases lead to this: a server receiving a patch request with an unsupported media type could reply with 415 unsupported media type and an accept-patch header referencing one or more supported media types.
Accept-Ranges - HTTP
the accept-ranges response http header is a marker used by the server to advertise its support of partial requests.
... examples accept-ranges: bytes specifications specification title rfc 7233, section 2.3: accept-ranges hypertext transfer protocol (http/1.1): range requests ...
Access-Control-Max-Age - HTTP
the access-control-max-age response header indicates how long the results of a preflight request (that is the information contained in the access-control-allow-methods and access-control-allow-headers headers) can be cached.
... examples cache results of a preflight request for 10 minutes: access-control-max-age: 600 specifications specification status comment fetchthe definition of 'access-control-max-age' in that specification.
Authorization - HTTP
the http authorization request header contains the credentials to authenticate a user agent with a server, usually, but not necessarily, after the server has responded with a 401 unauthorized status and the www-authenticate header.
... header type request header forbidden header name no syntax authorization: <type> <credentials> directives <type> authentication type.
CSP: block-all-mixed-content - HTTP
all mixed content resource requests are blocked, including both active and passive mixed content.
... the upgrade-insecure-requests directive is evaluated before block-all-mixed-content.
CSP: connect-src - HTTP
the apis that are restricted are: <a> ping, fetch, xmlhttprequest, websocket, eventsource, and navigator.sendbeacon().
... 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/", { ...
CSP: sandbox - HTTP
the http content-security-policy (csp) sandbox directive enables a sandbox for the requested resource similar to the <iframe> sandbox attribute.
... allow-storage-access-by-user-activation lets the resource request access to the parent's storage capabilities with the storage access api.
Content-Security-Policy-Report-Only - HTTP
these violation reports consist of json documents sent via an http post request to the specified uri.
...a browser capable of enforcing csp will send the following violation report as a post request to http://example.com/_/csp-reports, when the document is visited: { "csp-report": { "document-uri": "http://example.com/signup.html", "referrer": "", "blocked-uri": "http://example.com/css/style.css", "violated-directive": "style-src cdn.example.com", "original-policy": "default-src 'none'; style-src cdn.example.com; report-uri /_/csp-reports", "disposition": "report" ...
Cookie - HTTP
WebHTTPHeadersCookie
the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
... header type request header forbidden header name yes syntax cookie: <cookie-list> cookie: name=value cookie: name=value; name2=value2; name3=value3 <cookie-list> a list of name-value pairs in the form of <cookie-name>=<cookie-value>.
Cookie2 - HTTP
WebHTTPHeadersCookie2
the obsolete cookie2 http request header used to advise the server that the user agent understands "new-style" cookies, but nowadays user agents will use the cookie header instead, not this one.
... header type request header forbidden header name yes examples cookie2: $version="1" specifications specification title rfc 2965: cookie2 historic specification of http state management mechanism, obsoleted by rfc 6265 ...
Cross-Origin-Resource-Policy - HTTP
the http cross-origin-resource-policy response header conveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the given resource.
... header type response header forbidden header name no syntax cross-origin-resource-policy: same-site | same-origin | cross-origin examples the response header below will cause compatible user agents to disallow cross-origin no-cors requests: cross-origin-resource-policy: same-origin for more examples, see https://resourcepolicy.fyi/.
DPR - HTTP
WebHTTPHeadersDPR
header type request header forbidden header name ?
... accept-ch: dpr accept-ch-lifetime: 86400 then on subsequent requests the client might send dpr header back: dpr: 1.0 ...
Device-Memory - HTTP
header type request header forbidden header name ?
... 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.
Digest - HTTP
WebHTTPHeadersDigest
the digest response http header provides a digest of the requested resource.
...the representation itself may be: fully contained in the response message body not at all contained in the message body (for example, in a response to a head request) partially contained in the message body (for example, in a response to a range request).
Feature-Policy: fullscreen - HTTP
the http feature-policy header fullscreen directive controls whether the current document is allowed to use element.requestfullscreen().
... by default, top-level documents and their same-origin child frames can request and enter fullscreen mode.
Feature-Policy: sync-xhr - HTTP
the http feature-policy header sync-xhr directive controls whether the current document is allowed to make synchronous xmlhttprequest requests.
... default policy by default the policy is set to *, which means synchronous requests are allowed in all frames.
Large-Allocation - HTTP
a large-allocation header was ignored due to the load being triggered by a non-get request.
... when a post request is used to load a document, that load cannot currently be redirected into a new process.
Last-Modified - HTTP
conditional requests containing if-modified-since or if-unmodified-since headers make use of this field.
... examples last-modified: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7232, section 2.2: last-modified hypertext transfer protocol (http/1.1): conditional requests ...
Location - HTTP
WebHTTPHeadersLocation
in cases of redirection, the http method used to make the new request to fetch the page pointed to by location depends of the original method and of the kind of redirection: if 303 (see also) responses always lead to the use of a get method, 307 (temporary redirect) and 308 (permanent redirect) don't change the method used in the original request; 301 (permanent redirect) and 302 (found) doesn't change the method most of the time, though older user-agents may (so you basically don't know).
... header type response header forbidden header name no syntax location: <url> directives <url> a relative (to the request url) or absolute url.
Proxy-Authorization - HTTP
the http proxy-authorization request header contains the credentials to authenticate a user agent to a proxy server, usually after the server has responded with a 407 proxy authentication required status and the proxy-authenticate header.
... header type request header forbidden header name no syntax proxy-authorization: <type> <credentials> directives <type> authentication type.
Save-Data - HTTP
the save-data header field is a boolean which, in requests, indicates the client's preference for reduced data usage.
... with save-data: on request: get /image.jpg http/1.0 host: example.com save-data: on response: http/1.0 200 ok content-length: 102832 vary: accept-encoding, save-data cache-control: public, max-age=31536000 content-type: image/jpeg [...] without save-data request: get /image.jpg http/1.0 host: example.com response: http/1.0 200 ok content-length: 481770 vary: accept-encoding, save-data cache-control: public, max-...
Sec-Fetch-Mode - HTTP
the sec-fetch-mode fetch metadata header indicates the request's mode.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-mode: cors sec-fetch-mode: navigate sec-fetch-mode: nested-navigate sec-fetch-mode: no-cors sec-fetch-mode: same-origin sec-fetch-mode: websocket values cors navigate nested-navigate no-cors same-origin websocket examples todo specifications specification title fetch metadata request headers the sec-fetch-mode http request header ...
Server - HTTP
WebHTTPHeadersServer
the server header describes the software used by the origin server that handled the request — that is, the server that generated the response.
... header type response header forbidden header name no syntax server: <product> directives <product> the name of the software or product that handled the request.
Strict-Transport-Security - HTTP
the http strict transport security header informs the browser that it should never load a site using http and should automatically convert all attempts to access the site using http to https requests instead.
...unfortunately, the access point you're using is actually a hacker's laptop, and they're intercepting your original http request and redirecting you to a clone of your bank's site instead of the real thing.
TE - HTTP
WebHTTPHeadersTE
the te request header specifies the transfer encodings the user agent is willing to accept.
... header type request header forbidden header name yes syntax te: compress te: deflate te: gzip te: trailers // multiple directives, weighted with the quality value syntax: te: trailers, deflate;q=0.5 directives compress a format using the lempel-ziv-welch (lzw) algorithm is accepted as a transfer coding name.
Trailer - HTTP
WebHTTPHeadersTrailer
the te request header needs to be set to "trailers" to allow trailer fields.
...these header fields are disallowed: message framing headers (e.g., transfer-encoding and content-length), routing headers (e.g., host), request modifiers (e.g., controls and conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself.
Transfer-Encoding - HTTP
when present on a response to a head request that has no body, it indicates the value that would have applied to the corresponding get message.
... examples chunked encoding chunked encoding is useful when larger amounts of data are sent to the client and the total size of the response may not be known until the request has been fully processed.
User-Agent - HTTP
the user-agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.
... header type request header forbidden header name no syntax user-agent: <product> / <product-version> <comment> common format for web browsers: user-agent: mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions> directives <product> a product identifier — its name or development codename.
Vary - HTTP
WebHTTPHeadersVary
the vary http response header determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.
... directives * each request for a url is supposed to be treated as a unique and uncacheable request.
Via - HTTP
WebHTTPHeadersVia
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.
X-Content-Type-Options - HTTP
note: x-content-type-options only apply request-blocking due to nosniff for request destinations of "script" and "style".
... header type response header forbidden header name no syntax x-content-type-options: nosniff directives nosniff blocks a request if the request destination is of type: "style" and the mime type is not text/css, or "script" and the mime type is not a javascript mime type enables cross-origin read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension: */*+json text/xml, application/xml or any other type with an xml extension: */*+xml (excluding image/svg+xml) specifications specification status comment ...
X-DNS-Prefetch-Control - HTTP
description dns requests are very small in terms of bandwidth, but latency can be quite high, especially on mobile networks.
...if the domain names for images can be resolved in advance of the images being requested, pages that load many images can see an improvement of 5% or more in the time of loading images.
X-Forwarded-For - HTTP
to see the original ip address of the client, the x-forwarded-for request header is used.
... header type request header forbidden header name no syntax x-forwarded-for: <client>, <proxy1>, <proxy2> directives <client> the client ip address <proxy1>, <proxy2> if a request goes through multiple proxies, the ip addresses of each successive proxy is listed.
X-Forwarded-Proto - HTTP
to determine the protocol used between the client and the load balancer, the x-forwarded-proto request header can be used.
... header type request header forbidden header name no syntax x-forwarded-proto: <protocol> directives <protocol> the forwarded protocol (http or https).
CONNECT - HTTP
WebHTTPMethodsCONNECT
the http connect method starts two-way communications with the requested resource.
... request has body no successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax connect www.example.com:443 http/1.1 example some proxy servers might need authority to create a tunnel.
DELETE - HTTP
WebHTTPMethodsDELETE
the http delete request method deletes the specified resource.
... request has body may successful response has body may safe no idempotent yes cacheable no allowed in html forms no syntax delete /file.html http/1.1 example request delete /file.html http/1.1 responses if a delete method is successfully applied, there are several response status codes possible: a 202 (accepted) status code if the action will likely succeed but has not yet been enacted.
HTTP Public Key Pinning (HPKP) - HTTP
the following commands will help you extract the base64 encoded information from a key file, a certificate signing request, or a certificate.
... openssl rsa -in my-rsa-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 openssl ec -in my-ecc-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 openssl req -in my-signing-request.csr -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 openssl x509 -in my-certificate.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 the following command will extract the base64 encoded information for a website.
100 Continue - HTTP
WebHTTPStatus100
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.
204 No Content - HTTP
WebHTTPStatus204
the http 204 no content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page.
... the common use case is to return 204 as a result of a put request, updating a resource, without changing the current content of the page displayed to the user.
206 Partial Content - HTTP
WebHTTPStatus206
the http 206 partial content success status response code indicates that the request has succeeded and has the body contains the requested ranges of data, as described in the range header of the request.
...--string_separator content-type: application/pdf content-range: bytes 4590-7999/8000 ...the second range --string_separator-- specifications specification title rfc 7233, section 4.1: 206 partial content hypertext transfer protocol (http/1.1): range requests ...
301 Moved Permanently - HTTP
WebHTTPStatus301
the hypertext transfer protocol (http) 301 moved permanently redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
... status 301 moved permanently example client request get /index.php http/1.1 host: www.example.org server response http/1.1 301 moved permanently location: http://www.example.org/index.asp specifications specification title rfc 7231, section 6.4.2: 301 moved permanently hypertext transfer protocol (http/1.1): semantics and content ...
308 Permanent Redirect - HTTP
WebHTTPStatus308
the hypertext transfer protocol (http) 308 permanent redirect redirect status response code indicates that the resource requested has been definitively moved to the url given by the location headers.
... the request method and the body will not be altered, whereas 301 may incorrectly sometimes be changed to a get method.
402 Payment Required - HTTP
WebHTTPStatus402
sometimes, this code indicates that the request can not be processed until the client makes a payment.
... originally it was created to enable digital cash or (micro) payment systems and would indicate that the requested content is not available until the client makes a payment.
409 Conflict - HTTP
WebHTTPStatus409
the http 409 conflict response status code indicates a request conflict with current state of the server.
... conflicts are most likely to occur in response to a put request.
414 URI Too Long - HTTP
WebHTTPStatus414
the http 414 uri too long response status code indicates that the uri requested by the client is longer than the server is willing to interpret.
... there are a few rare conditions when this might occur: when a client has improperly converted a post request to a get request with long query information, when the client has descended into a loop of redirection (for example, a redirected uri prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit potential security holes.
415 Unsupported Media Type - HTTP
WebHTTPStatus415
the http 415 unsupported media type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format.
... the format problem might be due to the request's indicated content-type or content-encoding, or as a result of inspecting the data directly.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the hypertext transfer protocol (http) 416 range not satisfiable error response code indicates that a server cannot serve the requested ranges.
... status 416 range not satisfiable specifications specification title rfc 7233, section 4.4: 416 request not satisfiable hypertext transfer protocol (http/1.1): range requests ...
422 Unprocessable Entity - HTTP
WebHTTPStatus422
the hypertext transfer protocol (http) 422 unprocessable entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
... important: the client should not repeat this request without modification.
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
the hypertext transfer protocol (http) 451 unavailable for legal reasons client error response code indicates that the user requested a resource that is not available due to legal reasons, such as a web page for which a legal action has been issued.
... http/1.1 451 unavailable for legal reasons link: <https://spqr.example.org/legislatione>; rel="blocked-by" content-type: text/html <html> <head><title>unavailable for legal reasons</title></head> <body> <h1>unavailable for legal reasons</h1> <p>this request may not be serviced in the roman province of judea due to the lex julia majestatis, which disallows access to resources hosted on servers deemed to be operated by the people's front of judea.</p> </body> </html> specifications specification title rfc 7725: 451 unavailable for legal reasons an http status code to report legal obsta...
500 Internal Server Error - HTTP
WebHTTPStatus500
the hypertext transfer protocol (http) 500 internal server error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
...sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.
510 Not Extended - HTTP
WebHTTPStatus510
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.
Equality comparisons and sameness - JavaScript
object.defineproperty(number, 'negative_zero', { value: -0, writable: false, configurable: false, enumerable: false }); function attemptmutation(v) { object.defineproperty(number, 'negative_zero', { value: v }); } object.defineproperty will throw an exception when attempting to change an immutable property, but it does nothing if no actual change is requested.
... if v is -0, no change has been requested, and no error will be thrown.
Concurrency model and the event loop - JavaScript
in the example below, the message ''this is just a message'' will be written to the console before the message in the callback gets processed, because the delay is the minimum time required for the runtime to process the request (not a guaranteed time).
...handling i/o is typically performed via events and callbacks, so when the application is waiting for an indexeddb query to return or an xhr request to return, it can still process other things like user input.
Date.prototype.toLocaleDateString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...string('fa-ir')); // → "۱۳۹۱/۹/۳۰" // arabic in most arabic speaking countries uses real arabic digits console.log(date.tolocaledatestring('ar-eg')); // → "٢٠‏/١٢‏/٢٠١٢" // for japanese, applications may want to use the japanese calendar, // where 2012 was the year 24 of the heisei era console.log(date.tolocaledatestring('ja-jp-u-ca-japanese')); // → "24/12/20" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(date.tolocaledatestring(['ban', 'id'])); // → "20/12/2012" using options the results provided by tolocaledatestring() can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // request a weekday along with a long date var...
Date.prototype.toLocaleString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...오후 12:00:00" // arabic in most arabic speaking countries uses real arabic digits console.log(date.tolocalestring('ar-eg')); // → "٢٠‏/١٢‏/٢٠١٢ ٥:٠٠:٠٠ ص" // for japanese, applications may want to use the japanese calendar, // where 2012 was the year 24 of the heisei era console.log(date.tolocalestring('ja-jp-u-ca-japanese')); // → "24/12/20 12:00:00" // when requesting a language that may not be supported, such as // balinese, include a fallback language (in this case, indonesian) console.log(date.tolocalestring(['ban', 'id'])); // → "20/12/2012 11.00.00" using options the results provided by tolocalestring() can be customized using the options argument: let date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // request a weekday along with a long date ...
Date.prototype.toLocaleTimeString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
... // → "7:00:00 pm" // british english uses 24-hour time without am/pm console.log(date.tolocaletimestring('en-gb')); // → "03:00:00" // korean uses 12-hour time with am/pm console.log(date.tolocaletimestring('ko-kr')); // → "오후 12:00:00" // arabic in most arabic speaking countries uses real arabic digits console.log(date.tolocaletimestring('ar-eg')); // → "٧:٠٠:٠٠ م" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(date.tolocaletimestring(['ban', 'id'])); // → "11.00.00" using options the results provided by tolocaletimestring() can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // an application may want to use utc and make th...
FinalizationRegistry - JavaScript
a finalizationregistry object lets you request a callback when an object is garbage-collected.
... description finalizationregistry provides a way to request that a cleanup callback get called at some point when an object registered with the registry has been reclaimed (garbage-collected).
Intl.DateTimeFormat() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...implementations are required to support at least the following subsets: weekday, year, month, day, hour, minute, second weekday, year, month, day year, month, day year, month month, day hour, minute, second hour, minute implementations may support other subsets, and requests will be negotiated against all available subset-representation combinations to find the best match.
Intl.DateTimeFormat - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...19." // arabic in most arabic speaking countries uses real arabic digits console.log(new intl.datetimeformat('ar-eg').format(date)); // → "١٩‏/١٢‏/٢٠١٢" // for japanese, applications may want to use the japanese calendar, // where 2012 was the year 24 of the heisei era console.log(new intl.datetimeformat('ja-jp-u-ca-japanese').format(date)); // → "24/12/19" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(new intl.datetimeformat(['ban', 'id']).format(date)); // → "19/12/2012" using options the date and time formats can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0, 200)); // request a weekday along with a long date var ...
Number.prototype.toExponential() - JavaScript
if 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 number has more digits than requested by the fractiondigits parameter, the number is rounded to the nearest number represented by fractiondigits digits.
Promise() constructor - JavaScript
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.
...reject) => { // do something asynchronous which eventually calls either: // // resolve(somevalue) // fulfilled // or // reject("failure reason") // rejected }); making functions return a promise to provide a function with promise functionality, have it return a promise: function myasyncfunction(url) { return new promise((resolve, reject) => { const xhr = new xmlhttprequest() xhr.open("get", url) xhr.onload = () => resolve(xhr.responsetext) xhr.onerror = () => reject(xhr.statustext) xhr.send() }); } specifications specification ecmascript (ecma-262)the definition of 'promise constructor' in that specification.
WebAssembly.Memory() constructor - JavaScript
however, the engine may ignore or clamp this reservation request.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
encodeURI() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
...codeuri(set2)); // -_.!~*'() console.log(encodeuri(set3)); // abc%20abc%20123 (the space gets encoded as %20) console.log(encodeuricomponent(set1)); // %3b%2c%2f%3f%3a%40%26%3d%2b%24%23 console.log(encodeuricomponent(set2)); // -_.!~*'() console.log(encodeuricomponent(set3)); // abc%20abc%20123 (the space gets encoded as %20) note that encodeuri() by itself cannot form proper http get and post requests, such as for xmlhttprequest, because "&", "+", and "=" are not encoded, which are treated as special characters in get and post requests.
import - JavaScript
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.
... the module: file.js function getjson(url, callback) { let xhr = new xmlhttprequest(); xhr.onload = function () { callback(this.responsetext) }; xhr.open('get', url, true); xhr.send(); } export function getusefulcontents(url, callback) { getjson(url, data => callback(json.parse(data))); } the main program: main.js import { getusefulcontents } from '/modules/file.js'; getusefulcontents('http://www.example.com', data => { dosomethinguseful(data); }); dynamic import this example shows how to load functionality on to a page based on a user action, in this case a button click, and then call a function within that module.
Recommended Web Performance Timings: How long is too long? - Web Performance
a second should be considered a rule in the maximum amount of time to indicate to a user that the request for new content was made and will load, such as the browser displaying the page title and the background color of the page displaying.
... the first asset retrieved from a request is usually an html document, which then makes calls for additional assets.
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
it provides waterfall charts for every asset served by the host and cdn as well as every third party asset and asset requests generated by all third party scripts, such as ads and analytic services.
...generally, a third party script injects a script on each page to measure and report back on page load data for every request made.
Privacy, permissions, and information security
keeping personal data safe managing site permissions bringing it all together <using feature policy with permissions and so forth; how to use them together, how they interact, etc> permission requests in <iframe> elements things can get tricky when your web app uses the <iframe> element to embed content from another site inside your own, especially if the document you load into the frame has its own permission needs to consider.
...for example, in firefox 73, the user permission requests were revised so that when an <iframe> uses the allow keyword to delegate permission to the embeded document, the browser asks the user to grant the parent document permission to use the resource, and that permission is then shared with the embedded content that requested the resource to begin with.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
request permission to show a notification, we have to request permission to do so first.
... instead of showing the notification immediately though, best practice dictates that we should show the popup when the user requests it by clicking on a button: var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotification(); } }); }); this shows a popup using the operating system’s own notifications service: when the user confirms to receive notifications, the app can then show them.
The building blocks of responsive design - Progressive web apps (PWAs)
some ideas follow, which also help to keep the number of http requests down — another key factor in mobile app performance: you should try to use css3 features to programmatically generate graphical effects where possible, rather than relying on image files.
... using web fonts for displaying icons is an effective technique for keeping file size and http requests down, and this is supported well across modern and older browsers.
Certificate Transparency - Web security
this can be accomplished via a number of different mechanisms: x.509v3 certificate extension which embeds signed certificate timestamps directly into the leaf certificate a tls extension of type signed_certificate_timestamp sent during the handshake ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist with one or more scts with the x.509 certificate extension, the included scts are decided by the issuing ca.
... the expect-ct header can be used to request that a browser always enforces the requirement for certificate transparency (e.g.
Referer header: privacy and security concerns - Web security
the referrer problem the referer (sic) header contains the address of the previous web page from which a link to the currently requested page was followed, which has lots of fairly innocent uses including analytics, logging, or optimized caching.
... security-conscious server-side frameworks tend to have built in mitigations for such problems, for example: security in django (especially see cross site request forgery (csrf) protection).
Transport Layer Security - Web security
clients that reconnect to the server can send requests immediately, eliminating the latency of the tls handshake entirely.
...some web servers use renegotiation to either ensure that client certificates are encrypted, or to request client certificates only when certain resources are requested.
Basic Example - XSLT: Extensible Stylesheet Language Transformations
t="@company" /> </b> </xsl:if> <br /> </xsl:template> <xsl:template match="myns:body"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> the example loads using synchronous xmlhttprequest both the .xsl (xslstylesheet) and the .xml (xmldoc) files into memory.
... figure 6 : example var xslstylesheet; var xsltprocessor = new xsltprocessor(); var mydom; var xmldoc; function init(){ // load the xslt file, example1.xsl var myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example1.xsl", false); myxmlhttprequest.send(null); xslstylesheet = myxmlhttprequest.responsexml; xsltprocessor.importstylesheet(xslstylesheet); // load the xml file, example1.xml myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example1.xml", false); myxmlhttprequest.send(null); xmldoc = myxmlhttpre...
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
this can be done via xmlhttprequest or xmldocument.load().
... figure 1 : instantiating an xsltprocessor var xsltprocessor = new xsltprocessor(); // load the xsl file using synchronous (third param is set to false) xmlhttprequest var myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example.xsl", false); myxmlhttprequest.send(null); var xslref = myxmlhttprequest.responsexml; // finally import the .xsl xsltprocessor.importstylesheet(xslref); for the actual transformation, xsltprocessor requires an xml document, which is used in conjunction with the imported xsl file to produce the final result.
Content Scripts - Archive of obsolete content
in particular, they can't access content hosted in an iframe, if that content is served from a different domain, or make cross-domain xmlhttprequests.
Testing the Add-on SDK - Archive of obsolete content
with travis if you merely make a pull request for the mozilla/addon-sdk then all of the jpm tests mentioned above will be run on travis-ci automatically and you will see the pass/fail results with a link to the log in the github pull request.
Working with Events - Archive of obsolete content
objects emit events on state changes that might be of interest to add-on code, such as browser windows opening, pages loading, network requests completing, and mouse clicks.
High-Level APIs - Archive of obsolete content
request make simple network requests.
core/promise - Archive of obsolete content
lets see the implementation of readasync that we used in several of the examples above: const { defer } = require('sdk/core/promise'); function readasync(url) { var deferred = defer(); let xhr = new xmlhttprequest(); xhr.open("get", url, true); xhr.onload = function() { deferred.resolve(xhr.responsetext); }; xhr.onerror = function(event) { deferred.reject(event); }; xhr.send(); return deferred.promise; } so defer returns an object that contains a promise and two resolve, reject functions that can be used to resolve / reject that promise.
dev/panel - Archive of obsolete content
if an actor can send notifications, as in the request/reply/notify pattern, then the corresponding volcan.js object emits an event, which you can listen for using addeventlistener.
system/events - Archive of obsolete content
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.
package.json - Archive of obsolete content
cross-domain-content: a list of domains for which content scripts are given cross-domain privileges to access content in iframes or to make xmlhttprequests.
Developing for Firefox Mobile - Archive of obsolete content
rd not supported context-menu not supported hotkeys supported indexed-db supported l10n supported notifications supported page-mod supported page-worker supported panel not supported passwords supported private-browsing not supported querystring supported request supported selection not supported self supported simple-prefs supported simple-storage supported system supported tabs supported timers supported ui not supported url supported widget not supported windows supported low-level apis /loader suppo...
File I/O - Archive of obsolete content
var file = url.queryinterface(components.interfaces.nsifileurl).file; // file is a nsifile to load from file://, http://, chrome://, resource:// and other urls directly, use xmlhttprequest or netutil.asyncfetch().
Rosetta - Archive of obsolete content
"" : odicts[smimetype](oscript.text); obaton.parentnode.insertbefore(ocompiled, obaton); } function reqerror (oerror) { throw new urierror("the script " + oerror.target.src + " is not accessible."); } function reqsuccess () { createscript(this.refscript, this); } function getsource (oscript) { var oreq = new xmlhttprequest(); oreq.onload = reqsuccess; oreq.onerror = reqerror; oreq.refscript = oscript; oreq.open("get", oscript.src, true); oreq.send(null); } function parsescript (oscript) { if (oscript.hasattribute("type") && !rignoremimes.test(oscript.getattribute("type").tolowercase())) { oscript.hasattribute("src") ?
Sidebar - Archive of obsolete content
resizing the sidebar programmatically in case you need to change the width of the sidebar, use the following code: function setsidebarwidth(newwidth) { var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.getelementbyid("sidebar-box").width=newwidth; } or function setsidebarwidth(newwidth) { window.top.document.getelementbyid("si...
XML-related code snippets - Archive of obsolete content
how to create a dom tree using xmlhttprequest parsing and serializing xml using xpath jxon (lossless javascript xml object notation) xsl transforms xlink xinclude xml:id xml:base support in old browsers xpointer svg namespaces, or why http://www.mozilla.org/keymaster/gat...re.is.only.xul is at the top of every xul document.
Displaying web content in an extension without security issues - Archive of obsolete content
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.
Downloading JSON and JavaScript in extensions - Archive of obsolete content
a common practice found in many extensions is using xmlhttprequest (or some other mechanism) to download javascript or json (they are different) from a remote website.
Extension Etiquette - Archive of obsolete content
overriding their request isn't very nice.
Installing Extensions and Themes From Web Pages - Archive of obsolete content
if you omit this step, the user may see two installation dialogs—since you've effectively invoked two install requests, one from the installtrigger, one from trying to load the xpi file directly.
Jetpack Processes - Archive of obsolete content
these arbitrary properties are the primary means through which context can be provided for messages; for instance, if the handle is meant to represent a network request, an xmlhttprequest instance can be attached to the handle on the chrome process.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
developers who contribute to the free office suite openoffice.org are requested to enter into a joint copyright assignment with sun microsystems, the initial developer.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
fixme: we should advise against using such method fixme: figure 1: dialog requesting privileges listing 3: grant privileges without manual confirmation for a specific file user_pref("capability.principal.codebase.test.granted", "universalxpconnect"); user_pref("capability.principal.codebase.test.id", "file url"); frequently used xpcom functions let’s take a look at those xpcom functions that are used especially frequently.
Local Storage - Archive of obsolete content
we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug.
The Essentials of an Extension - Archive of obsolete content
if you request the label attribute value for the hello world menu using dom, you get the localized string, not the string key.
XPCOM Objects - Archive of obsolete content
aspects to take into account are that methods and attributes must have the same names as their idl counterparts, and that the queryinterface method is implemented: queryinterface : function(aiid) { if (!aiid.equals(ci.xsihellocounter) && !aiid.equals(ci.nsisupports)) { throw cr.ns_error_no_interface; } return this; } the method is very simple, it validates that the caller is requesting a supported interface, otherwise it throws an exception.
Performance best practices in extensions - Archive of obsolete content
never use synchronous xmlhttprequests.
Search Extension Tutorial (Draft) - Archive of obsolete content
cu.import("resource://gre/modules/services.jsm"); // the details of the engine to add const engine_details = { name: "example engine", iconurl: "data:image/png;base64,...", alias: "example-engine", description: "an example search engine", method: "get", // the http request method url: "https://www.example.com/?q=_searchterms_" }; // keep track of whether this is the first run.
Getting the page URL in NPAPI plugin - Archive of obsolete content
or whenever you make network requests yourself, you almost always need to enforce same-origin policy.
Bypassing Security Restrictions and Signing Code - Archive of obsolete content
early versions of firefox allowed web sites to segregate principals using signed scripts, and request extra permissions for scopes within signed scripts using a function called enableprivelege.
Same-origin policy for file: URIs - Archive of obsolete content
this policy affects anything that does same-origin checks, including xmlhttprequest, xslt, and xbl.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
function updatetinderboxstatus() { var icon = document.getelementbyid('tinderbox-status'); if (gxmlhttprequest.responsetext.match("ee0000")) icon.setattribute("status", "busted"); else if (gxmlhttprequest.responsetext.match("ffaa00")) icon.setattribute("status", "testfailed"); else if (gxmlhttprequest.responsetext.match("11dd11")) icon.setattribute("status", "success"); else icon.setattribute("status", ""); } updatetinderboxstatus() retrieves a reference to the statusbarpanel element then searches through the retrieved html document (stored in the responsetext property of the xmlhttprequest instance) for one of several color references.
Download Manager improvements in Firefox 3 - Archive of obsolete content
download manager interfaces nsidownloadmanager gives applications and extensions access to the download manager, allowing them to add and remove files to the download list, retrieve information about past and present downloads, and request notifications as to the progress of downloads.
Drag and Drop - Archive of obsolete content
when a user requests to drag something that can be dragged, a drag session should be started.
Error Console - Archive of obsolete content
alternatives console2 this extension provides a replacement for error console, fixing many of its bugs and implementing long-wanted enhancement requests.
Exception logging in JavaScript - Archive of obsolete content
the ns_nointerface error is never reported when returned by a javascript object's getinterface() method on the nsiinterfacerequestor interface.
Style System Overview - Archive of obsolete content
dynamic changes to content reresolvestylecontext calculates differences (repaint, reflow, reframe, etc.) between style old and new style contexts and does appropriate cleanup it uses nsistylecontext::calcstyledifference, which only computes differences for structs that have been requested.
Code snippets - Archive of obsolete content
let mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); // obtain a reference to sync's tabs "e...
HTTP Class Overview - Archive of obsolete content
nts nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress notifications nshttpconnectioninfo identifies a connection nshttptransaction implements nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chunked transfer encoding nshttprequesthead owns a nshttpheaderarray knows how to fill a request buffer nshttpresponsehead owns a nshttpheaderarray knows how to parse response lines performs common header manipulations/calculations nshttpheaderarray stores htt...
Enabling Experimental Jetpack Features - Archive of obsolete content
methods import(stringmountpath string)imports the requested experimental feature into the script.
Enabling - Archive of obsolete content
methods import(stringmountpath string)imports the requested experimental feature into the script.
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
onfirstrun() may be called anywhere in your jetpack, but if it is called as the result of some asynchronous operation such as a timeout or xmlhttprequest, it is ignored.
Enabling Experimental Jetpack Features - Archive of obsolete content
ArchiveMozillaJetpackdocsMetaFuture
methods import(stringmountpath string)imports the requested experimental feature into the script.
Modularization techniques - Archive of obsolete content
a successful queryinterface() will call addref() on the requested interface before returning.
Mozilla Application Framework - Archive of obsolete content
web services built-in support for xmlhttprequest, xml-rpc, soap, and wsdl to enable mozilla-based application authors to take advantage of the exploding world of web services.
Plug-n-Hack - Archive of obsolete content
without integration between security tools and browsers, a user must often switch between the tool and their browser several times to perform a simple task, such as intercepting an http(s) request.
Plugin Architecture - Archive of obsolete content
sequence of events in content a content node for a plugin dom element gets created in bindtotree (usually) or another function, it calls loadobject loadobject either notices directly that it is dealing with a plugin, or it starts a network request and notices this in onstartrequest when it realizes that, it tries to create a frame, if anotify is true and no frame exists yet if a frame exists now, it is asked to instantiate the plugin that was the normal case.
Tamarin Acceptance Testing - Archive of obsolete content
successfully build release and debug versions of the shell with the debugger enabled [info] successfully run the following test suites: acceptance test suite [info] self tests [info] submit a sandbox build request to test against platforms that you may not have locally [info] available tamarin acceptance test suites actionscript acceptance tests: actionscript acceptance tests running tamarin acceptance tests abc assembler tests cmdline tests performance tests actionscript performance tests running tamarin performance tests built-in self tests ...
Binding Attachment and Detachment - Archive of obsolete content
any specified event handlers are installed on their requested targets.
XML in Mozilla - Archive of obsolete content
outside supported xml w3c recommendations specification or technology documentation mozilla project xslt w3c recommendation xslt xpath w3c recommendation xslt xmlhttprequest w3c recommendation xml extras request api (no longer supported) mozilla add-on sdk domparser and xmlserializer mozilla xml extras sax sax soap (no longer supported) w3c note web services xml-rpc (no longer supported) userland software xml-rpc ...
dirGetParent - Archive of obsolete content
method of file object syntax filespecobject dirgetparent( filespecobject fileordir ); parameters the dirgetparent method has the following parameters: fileordir a filespecobject representing the pathname of the file or directory whose parent is being requested.
gestalt - Archive of obsolete content
returns returns the requested information.
refreshPlugins - Archive of obsolete content
when you use this method in an installation script, as the example below demonstrates, you can install new plug-ins and use them to display the requested media in a web page without interrupting the experience of the user.
XPJS Components Proposal - Archive of obsolete content
any subsequent requests from the component manager that would result in nsgetfactory calls into the module will force the xpjsmanager to load up a new instance of the .js file and start over.
onpopupshowing - Archive of obsolete content
this handler is usually used to dynamically set the contents when the user requests to display it.
panel.flip - Archive of obsolete content
a sliding panel will have the start (or end) position extended such that the panel can be the requested size, meaning the arrow will no longer be at the start (or end) of the panel - i.e., the arrow will appear to have been slid along the panel to ensure the arrow is still pointing at the anchor.
panel.type - Archive of obsolete content
the panel may not appear on the side of the anchor that you requested in which case the arrow will automatically adjust.
close - Archive of obsolete content
the close event is executed when a request has been made to close the window when the user presses the close button.
Reading from Files - Archive of obsolete content
usually this string have a length equal to the number of characters that were requested.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
986 close the close event is executed when a request has been made to close the window when the user presses the close button.
PopupEvents - Archive of obsolete content
an overview of these is listed below: contextmenu this event is fired when a request is made to open a context menu, whether by the keyboard or mouse.
state - Archive of obsolete content
ArchiveMozillaXULPropertystate
showing: a request has been made to open the popup, but it has not yet been shown.
Building Trees - Archive of obsolete content
when the view requests a label for the first cell, the builder looks up the ‘http://purl.org/dc/elements/1.1/title’ predicate for the row in question and returns it.
Rule Compilation - Archive of obsolete content
var length = vbox.childnodes.length; this request to return the number of children of the vbox will make the template builder process the query and output content.
Styling a Tree - Archive of obsolete content
it first checks to see which row is being requested and sets a property for cells in every fourth row.
XBL Example - Archive of obsolete content
this causes the requested page to be displayed.
XPCOM Interfaces - Archive of obsolete content
if you call queryinterface() on an object and the requested interface is not supported by an object, an exception is thrown.
XUL accessibility guidelines - Archive of obsolete content
response time when appropriate, alert the user to time limits and allow the user to adjust a time limit or request more time.
What XULRunner Provides - Archive of obsolete content
the following features are either already implemented or planned: gecko features xpcom networking gecko rendering engine dom editing and transaction support (no ui) cryptography xbl (xbl2 planned) xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by xulrunner, and may be ov...
Archived Mozilla and build documentation - Archive of obsolete content
the life of an html http request the new nsstring class implementation (1999) this document is intended to briefly describe the new nsstring class architecture, and discuss the implications on memory management, optimizations, internationalization and usage patterns.
Gecko Compatibility Handbook - Archive of obsolete content
change the doctype to request quirks mode layout instead.
Mozilla release FAQ - Archive of obsolete content
there are some important things that you can do if you don't code or care to document: ideas - if you have an idea for what you'd like to see in mozilla, post a feature request to bugzilla artwork - design new icons and other resources for mozilla use talkback - talkback-enabled builds help the community by letting mozilla.org members where in the code crashes occur.
Format - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
2006-09-29 - Archive of obsolete content
the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
2006-10-20 - Archive of obsolete content
jesper kristensen pointed the requester here change download action for .rdp files on windows and os x a question regarding enabling firefox to associate .rdp files with microsoft remote desktop client so that the correct application opens the files automatically.
2006-10-26 - Archive of obsolete content
(what it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when the announcement about firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup.
2006-10-27 - Archive of obsolete content
(what it is, how to use it) cross-post-and followup fx2 announcment to support-firefox request for when the announcement about firefox 2's release to be posted on the mozilla.dev.apps.firefox newsgroup.
2006-11-03 - Archive of obsolete content
request to add option for removal of firefox profiles during setup or uninstall a user suggests an option to remove profiles during setup or uninstall.
2006-09-29 - Archive of obsolete content
discussions developer documentation issues for thunderbird 2 eric shepherd has requested feedback for any developer documentation issues that might need dealing with for thunderbird 2.
2006-11-17 - Archive of obsolete content
code review requested for smtp swticher no comment is made.
2006-10-20 - Archive of obsolete content
boris zbarsky's said: the reason why gtk1 builds are still being performed is because: when requests are made to change build boxes to newer versions the people responsible for making the change reply with "that would require an os upgrade".
2006-12-01 - Archive of obsolete content
paul reed has also requested that if any problems are encountered he should be contacted via irc in #build @ irc.mozilla.org.
2006-10-13 - Archive of obsolete content
author is declaring rfe (request for enhancement).
2006-10-20 - Archive of obsolete content
feedback from localizers regarding sunbird/lightning 0.3 release the sunbird/lightning developers are requesting feedback on release 0.3.
2006-07-17 - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
2006-12-01 - Archive of obsolete content
he requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be ready to check their patches in as soon as they are approved.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.quality - november 18-november 24, 2006 announcements none discussions firefox 1.5.0.7 on linux x86_64 - someone is having a problem with xhttprequest.
2006-11-17 - Archive of obsolete content
site not loading with seamonkey a user built seamonkey in debug mode and is currently receiving a "bad request" error on some websites.
2006-10-27 - Archive of obsolete content
discussions evalinsandbox and xmlhttprequest a discussion about writing something that calls a function defined by the page that the user is currently on chrome files and last modified date ways to retrieve the last modified date of a chrome file that may be in a jar or on the file system.
2006-11-10 - Archive of obsolete content
discussions developing an extension like xmlhttprequest / nsidocument / mozilla_internal_api a discussion on how to develop an extension similar to xmlhttprequest but for a different protocol than http, emulating the asynchronous aspect.
2006-12-08 - Archive of obsolete content
saving binary data from nsixmlhttprequest a discussion on how to use nsixmlhttprequest object to query data from a url in an extension implemented in javascript meetings none during this week.
2006-12-01 - Archive of obsolete content
discussions cancellable async requests discussions about a bug of calicalendar's async methods.
NPN_DestroyStream - Archive of obsolete content
npres_user_break: plug-in is terminating the stream due to a user request.
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_ForceRedraw - Archive of obsolete content
browsers may ignore this request.
NPN_GetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_HasMethod - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_HasProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
NPN_MemAlloc - Archive of obsolete content
since npn_memalloc automatically frees cached information if necessary to fulfill the request, calls to npn_memalloc may succeed where direct calls to newptr fail.
NPN NewStream - Archive of obsolete content
summary requests the creation of a new data stream produced by the plug-in and consumed by the browser.
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
NPN_RemoveProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_SetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPP_GetValue - Archive of obsolete content
value value for the requested variable.
NPStream - Archive of obsolete content
notifydata used only for streams generated in response to a npn_geturlnotify or npn_posturlnotify request.
NPWindow - Archive of obsolete content
(the drawable is provided in a graphicsexpose event, when the paint is requested.) description the npwindow structure represents the native window or a drawable, and contains information about coordinate position, size, whether the plug-in is windowed or windowless, and some platform-specific information.
Vulnerabilities - Archive of obsolete content
cross-site request forgery (csrf) ...
Building a Theme - Archive of obsolete content
thirdly, the type of data being requested.
Using SSH to connect to CVS - Archive of obsolete content
avoiding passphrase requests you can avoid repeated passphrase requests by using ssh-agent.
Summary of Changes - Archive of obsolete content
http://www.w3.org/tr/2004/rec-dom-le...e3-textcontent ie5+ elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+ elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; ie5+ new activexobject("microsoft.xmlhttp") new xmlhttprequest() proprietary or deprecated feature w3c feature or recommended replacement ...
Using Web Standards in your Web Pages - Archive of obsolete content
contents benefits of using web standards making your page using web standards - how to using the w3c dom developing cross browser and cross platform pages using xmlhttprequest summary of changes references original document information author(s): mike cowperthwaite, marcio galli, jim ley, ian oeschger, simon paquet, gérard talbot last updated date: may 29, 2008 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creative commons license | details.
Browser Detection and Cross Browser Support - Archive of obsolete content
<html> <head> <title>noscript</title> </head> <body> <script language="javascript"> window.onerror = function () { // redirect user to a page describing the limitations // of their browser and requesting that they turn off // javascript in order to view your site.
E4X - Archive of obsolete content
ArchiveWebE4X
workaround: var response = xmlhttprequest.responsetext; // bug 270553 response = response.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 var e4x = new xml(response); resources e4x tutorial processing xml with e4x on mdc e4x for templating see the list of e4x-related pages on mdc ecma-357 standard brendan's presentation e4x at faqts.com e4x quick reference at rephrase.net ...
Descendants and Filters - Archive of obsolete content
that is, if there are multiple descendants of the requested type, an xml list is returned, instead of the normal element.
Reference - Archive of obsolete content
<hr> xmlhttprequest xmlhttprequest is a host object provided by the browser, not part of js core language.
RFE to the Custom Controls Interfaces - Archive of obsolete content
introduction this page contains requests for enhancement to the custom control interfaces.
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
introduction this page contains requests for enhancement to the xforms api.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
if the project is accepted, the compiled information, analysis and research is merged into a request for proposal (rfp).
Windows Media in Netscape - Archive of obsolete content
netscape 7.1 offers its own xmlhttprequest object; here is a snippet of cross-browser code that can be used: if (window.activexobject) { req = new activexobject("microsoft.xmlhttp"); } else if (window.xmlhttprequest) { req = new xmlhttprequest(); } // req can be used in a cross-browser way -- the actual objects are similar // caveat emptor: look out for the case of methods and properties -- ie uses // capital letters where gecko use...
Archive of obsolete content
or whenever you make network requests yourself, you almost always need to enforce same-origin policy.
Introduction to game development for the Web - Game development
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.
Game promotion - Game development
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.
Building up a basic demo with A-Frame - Game development
add this code at the end of the <script> tag: var t = 0; function render() { t += 0.01; requestanimationframe(render); cylinder.setattribute('position', '3 '+(math.sin(t*2)+1)+' 0'); } render(); we're using the render() function to update the cylinder's position on every frame.
GLSL Shaders - Game development
hree.boxgeometry(10, 10, 10); var shadermaterial = new three.shadermaterial( { vertexshader: document.getelementbyid( 'vertexshader' ).textcontent, fragmentshader: document.getelementbyid( 'fragmentshader' ).textcontent }); var cube = new three.mesh(boxgeometry, shadermaterial); scene.add(cube); cube.rotation.set(0.4, 0.2, 0); function render() { requestanimationframe(render); renderer.render(scene, camera); } render(); css body { margin: 0; padding: 0; font-size: 0; } canvas { width: 100%; height: 100%; } result conclusion this article has taught the very basics of shaders.
Desktop gamepad controls - Game development
ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } in this case, we are checking the four d-pad buttons (0-3) and the a button (11).
Unconventional controls - Game development
f(horizontaldegree > degreethreshold) { playerx -= 5; } else if(horizontaldegree < -degreethreshold) { playerx += 5; } if(verticaldegree > degreethreshold) { playery += 5; } else if(verticaldegree < -degreethreshold) { playery -= 5; } if(grabstrength == 1) { alert('boom!'); } ctx.drawimage(img, playerx, playery); requestanimationframe(draw); } if the horizontaldegree value is greater than our degreethreshold, which is 30 in this case, then the ship will be moved left 5 pixels on every frame.
Techniques for game development - Game development
we touch on css transitions and css animations, and javascript loops involving window.requestanimationframe.
Move the ball - Game development
you can run a function over and over again using a javascript timing function such as setinterval() or requestanimationframe().
Visual typescript game engine - Game development
i use html request only for loading local/staged html (like register, login etc.).
404 - MDN Web Docs Glossary: Definitions of Web-related terms
a 404 is a standard response code meaning that the server cannot find the requested resource.
502 - MDN Web Docs Glossary: Definitions of Web-related terms
when you request to access a url, the gateway server can relay your request to the upstream server.
Ajax - MDN Web Docs Glossary: Definitions of Web-related terms
ajax, which initially stood for asynchronous javascript and xml, is a programming practice of building complex, dynamic webpages using a technology known as xmlhttprequest.
Cache - MDN Web Docs Glossary: Definitions of Web-related terms
a cache (web cache or http cache) is a component that stores http responses temporarily so that it can be used for subsequent http requests as long as it meets certain conditions.
Certificate authority - MDN Web Docs Glossary: Definitions of Web-related terms
this certifies that an organization that requested a digital certificate (e.g., mozilla corporation) is authorized to request a certificate for the subject named in the certificate (e.g., mozilla.org).
Effective connection type - MDN Web Docs Glossary: Definitions of Web-related terms
effective connection type (ect) refers to the measured network performance, returning a cellular connection type, like 3g, even if the actual connection is tethered broadband or wifi, based on the time between the browser requesting a page and effective type of the connection.
Fallback alignment - MDN Web Docs Glossary: Definitions of Web-related terms
in css box alignment, a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fullfilled.
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
see also requestidlecallback lazy loading ...
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
however, http can also be used as a basis for rest web services from server to server or ajax requests within web sites to make them more dynamic.
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
the primary goals for http/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of http header fields, and add support for request prioritization and server push.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
in server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
learn more https://www.w3.org/tr/csp/#directives-navigation other kinds of directives: fetch directive document directive reporting directive block-all-mixed-content upgrade-insecure-requests require-sri-for trusted-types content-security-policy ...
PAC - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy auto-configuration file (pac file) is a file which contains a function, findproxyforurl(), which is used by the browser to determine whether requests (including http, https, and ftp) should go directly to the destination or if they need to be forwarded through a web proxy server.
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
backward error correction is when the receiver requests the sender to retransmit the entire data unit.
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
when the html parser finds non-blocking resources, such as an image, the browser will request those resources and continue parsing.
Perceived performance - MDN Web Docs Glossary: Definitions of Web-related terms
actual performance is a measurement from when a request is made, through the downloading, parsing and execution of all resources, and the final paint.
Port - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the default port for the http protocol is 80 and the default port for the https protocol is 443, so a http server waits for requests on those ports.
Real User Monitoring (RUM) - MDN Web Docs Glossary: Definitions of Web-related terms
generally, a third party script injects a script on each page to measure and report page load data for every request made.
SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms
an spa (single-page application) is a web app implemention that loads only a single web document, and then updates the body content of that single document via javascript apis such as xmlhttprequest and fetch when different content is to be shown.
Server Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the server timing specification enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a javascript interface to allow applications to collect, process, and act on these metrics to optimize application delivery.
Simple header - MDN Web Docs Glossary: Definitions of Web-related terms
old term for cors-safelisted request header.
Static method - MDN Web Docs Glossary: Definitions of Web-related terms
examples in the notifications api, the notification.requestpermission() method is called on the actual notification constructor itself — it is a static method: let promise = notification.requestpermission(); the notification.close() method on the other hand, is an instance method — it is called on an specific notification object instance to close the system notification it represents: let mynotification = new notification('this is my notification')...
Synchronous - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference asynchronous synchronous and asynchronous requests using the xmlhttprequest() api ...
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp has concurrence control, which means the initial requests start small, increasing in size to the levels of bandwidth the computers, servers, and network can support.
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
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.
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
caching in the context of caching, ttl (as an unsigned 32-bit integer) being a part of the http response header or the dns query, indicates the amount of time in seconds during which the ressource can be cached by the requester.
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
the three message mechanism is designed for the two computers that want to pass information back and forth and can negotiate the parameters of the connection before transmitting data such as http browser requests.
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
opera) ms (internet explorer and microsoft edge) property and method prefixes the prefixes for properties and methods are lower-case: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefox) o (old, pre-webkit, versions of opera) ms (internet explorer and microsoft edge) sample usage: var requestanimationframe = window.requestanimationframe || window.mozrequestanimationframe || window.webkitrequestanimationframe || window.orequestanimationframe || window.msrequestanimationframe; learn more general knowledge vendor prefix on wikipedia ...
WebSockets - MDN Web Docs Glossary: Definitions of Web-related terms
through websocket, servers can pass data to a client without prior client request, allowing for dynamic content updates.
XML - MDN Web Docs Glossary: Definitions of Web-related terms
for example, web services can use xml to exchange requests and responses.
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
along with each request they make to the server, browsers include a self-identifying user-agent http header called a user agent (ua) string.
What is the difference between webpage, website, web server, and search engine? - Learn web development
the web server will send any web page from the website it is hosting to any user's browser, per user request.
What are browser developer tools? - Learn web development
these tools do a range of things, from inspecting currently-loaded html, css and javascript to showing which assets the page has requested and how long they took to load.
Basic native form controls - Learn web development
example in this example, a file picker is created that requests graphic image files.
Client-side form validation - Learn web development
even if your form is validating correctly and preventing malformed input on the client-side, a malicious user can still alter the network request.
Your first form - Learn web development
on the server side, the script at the url "/my-handling-form-page" will receive the data as a list of 3 key/value items contained in the http request.
Web forms — Working with user data - Learn web development
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.
The web and web standards - Learn web development
"sure thing web browser — here you go" [downloads files and renders web page] the actual syntax for http messages (called requests and responses) is not that human-readable, but this gives you the basic idea.
Adding vector graphics to the Web - Learn web development
make sure your svg code snippet begins and ends with the <svg></svg> tags (don't include anything outside those.) here's a very simple example of what you might paste into your document: <svg width="300" height="200"> <rect width="100%" height="100%" fill="green" /> </svg> pros putting your svg inline saves an http request, and therefore can reduce a bit your loading time.
Video and Audio APIs - Learn web development
icon fonts are very cool for many reasons — cutting down on http requests because you don't need to download those icons as image files, great scalability, and the fact that you can use text properties to style them — like color and text-shadow.
Client-side web APIs - Learn web development
in this article, we'll explain the concept, and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
What is JavaScript? - Learn web development
creating a new html table, filling it with data requested from the server, then displaying the table in a web page shown to the user.
JavaScript object basics - Learn web development
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.
Inheritance in JavaScript - Learn web development
note: getters and setters can be very useful at times, for example when you want to run some code every time a property is requested or set.
Measuring performance - Learn web development
for example, bundling tools pack your code into single files to reduce the number of http requests or minifiers that remove all whitespace from your code to make the files smaller.
Multimedia: Images - Learn web development
if all of this sounds a bit complicated or feels like too much work for your team then there is also online services that you can use as image cdns that will automate the serving of the correct image format on-the-fly, according to the type of device or browser requesting the image.
The business case for web performance - Learn web development
a performance budget is a set of limits that are set to specify limits, such as maximum number of http requests allowed, the maximum total size of all the assets combined, the minimum allowable fps on a specific device, etc, that must be maintained.
The "why" of web performance - Learn web development
as an example, consider the loading experience of cnn.com, which at the time of this writing had over 400 http requests with a file size of over 22.6mb.
Server-side website programming - Learn web development
the dynamic websites – server-side programming topic is a series of modules that show how to create dynamic websites; websites that deliver customised information in response to http requests.
Introduction to client-side frameworks - Learn web development
the wikimedia foundation recently chose to use vue for its front-end, and posted a request for comments (rfc) on framework adoption.
TypeScript support in Svelte - Learn web development
first class typescript support has been svelte's most requested feature for quite some time.
Getting started with Svelte - Learn web development
note: recently svelte has added official typescript support, one of its most requested features.
Handling common accessibility problems - Learn web development
if you have a single-page app with a main content panel that is regularly updated using xmlhttprequest or fetch, a screenreader user might miss those updates.
Implementing feature detection - Learn web development
nd not logic available — the other block applies the float layout if the flexbox properties are not available: @supports not (flex-flow: row) and (flex: 1) { /* rules in here */ } this may look a lot more convenient than the previous example — we can do all of our feature detection in css, no javascript required, and we can handle all the logic in a single css file, cutting down on http requests.
Learn web development
we'd like to hear from you about anything you think is wrong or missing on the site, requests for new learning topics, requests for help with items you don't understand, or any other questions or concerns.
Gecko info for Windows accessibility vendors
ajax: asynchronous javascript and xml ajax is a method of building interactive web applications that process user requests, user actions immediately in real time, unlike an http request, during which users must wait for a whole page to reload or for a new page to load.
Multiprocess on Windows
when an incoming rpc invokes a method on an interceptor, the interceptor dispatches a callback that allows us to do whatever we want with that request.
Theme concepts
first, request "theme" permission in the extension's manifest.json file.
A bird's-eye view of the Mozilla framework
getlink() uses the nsirdfservice to obtain an nsirdfresource for the requested link.
Command line options
-requestpending tells the application that there will be a windows dde request to open the same url specified on the command line.
Creating a Language Pack
add the preference intl.locale.requested and set it to your language code, in this case, x-testing, or add it in front of the current setting, seperated with a comma.
Creating reftest-based unit tests
the build process runs reftests in a profile that does not automatically grant elevated privileges: requesting them will cause the standard security alert to display, which will likely cause the machine running the test to hang or timeout.
Cross Process Object Wrappers
it’s possible that the request for the documenturi property will be processed before the "changedocumenturi" message, in which case uri will have its previous value.
Limitations of frame scripts
it looks something like this: window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow); this will no longer work.
Limitations of frame scripts
it looks something like this: window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .roottreeitem .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidomwindow); this will no longer work.
Errors
you can find further information about them by clicking on the links below: a request to access cookies or storage was blocked because of a custom cookie permission blocked because it came from a tracker and content blocking is enabled blocked because we are blocking all storage access requests blocked because we are blocking all third-party storage access requests and content blocking is enabled granted partitioned access because it came from a third-party and dynamic first-party isolation is enabled ...
HTMLIFrameElement.getManifest()
examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getmanifest().then(function(json) { console.log(json); }); }); specification not part of any specification.
mozbrowserusernameandpasswordrequired
details the details property returns an anonymous javascript object with the following members: host a domstring representing the host requesting the http authentification.
HTMLIFrameElement.zoom()
MozillaGeckoChromeAPIBrowser APIzoom
syntax var instanceofdomrequest = instanceofhtmliframeelement.zoom(zoomfactor); returns void.
HTTP Cache
when the writer is interrupted, the first concurrent reader in line does a range request for the rest of the data - and becomes that way a new writer.
Hacking with Bonsai
the rules no checkins when the tree is closed unless you are fixing a build problem at the request of a build person.
IPDL Tutorial
do not return false from message handlers for "normal" error conditions such as inability to load a network request!
Integrated Authentication
so, it is paramount that the browser does not freely exchange ntlm user credentials with any server that requests them.
UpdateListener
for each individual update check, the following methods will be called on the listener: either oncompatibilityupdateavailable() or onnocompatibilityupdateavailable(), depending on whether compatibility information for the requested application version was seen.
Add-on Manager
the callbacks may be called immediately while the initial function is still executing or shortly after, depending on when the requested data becomes available.
Add-on Repository
a new search will immediately fail if the addonrepository is already handling another search request.
AsyncShutdown.jsm
consequently, if any service has requested i/o to the profile directory before or during phase profilebeforechange, the system must be informed that these requests need to be completed before the end of phase profilebeforechange.
CustomizableUI.jsm
you should never call this except if the user explicitly requests it.
DownloadSource
this determines the context of the network request that is made to retrieve the resource.
FileUtils.jsm
if the directory requested does not exist, it is created, along with any parent directories that need to be created.
JavaScript OS.Constants
o_evtonly descriptor requested for event notifications only.
NetUtil.jsm
the callback receives three parameters: the input stream containing the data, if any (implementing nsiinputstream), an nsresult status code for the open operation, and a reference to the nsirequest object.
OSFile.jsm
in this mode, main thread clients use the api to request off main thread file i/o.
PerfMeasurement.jsm
variable type description eventsmeasured eventmask a bit mask of the event types recorded; this can differ from the events requested if the platform doesn't support all of the event types you specified when creating the perfmeasurement object.
PromiseWorker.jsm
in summary, from a worker file, data can only be sent back as a response to a request from the main thread, it is not possible for a worker to send data to the main thread otherwise, this is a key difference between promiseworker worker file and all other types of workers.
Services.jsm
nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessagesender 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 nsidroppedlinkhandler dropped link handler service els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservic...
XPCOMUtils.jsm
for example, if your component implements nsistreamconverter: mycomponent.prototype = { queryinterface: xpcomutils.generateqi([ components.interfaces.nsirequestobserver, components.interfaces.nsistreamlistener, components.interfaces.nsistreamconverter, ]), // ...methods...
Localizing with Koala
the easy way involves opening the console and issuing the following commands: c:\users\stas> cd c:\mozilla\l10n\application\firefox c:\mozilla\l10n\application\firefox> rmdir 3.6 c:\mozilla\l10n\application\firefox> hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 3.6 requesting all changes adding changesets adding manifests adding file changes added 33099 changesets with 158636 changes to 50664 files (+9 heads) updating working directory 40357 files updated, 0 files merged, 0 files removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized files or l...
Writing localizable code
if you want to add build processing to localized files, be sure to request feedback from l10n@.
Using the viewport meta tag to control layout on mobile browsers
to fix this, browsers will expand the viewport width if necessary to fill the screen at the requested scale.
Mozilla Port Blocking
protocol handler allowed ports ftp 21, 22 ldap 389, 636 nntp any port pop3 any port imap any port smtp any port finger 79 datetime 13 how to change mozilla port blocking permanently since each protocol can determine which ports are blocked, you should contact the protocol handler owner to request that a specific port be blocked or unblocked.
Are We Slim Yet
to this end we request that memory reporting be integrated into any new process before it is enabled on nightly.
Memory reporting
on platforms that allow it, they count the actual memory in use, including "slop" bytes caused by the heap allocator rounding up request sizes (a.k.a.
Profiling with the Firefox Profiler
reporting a performance problem has a step-by-step guide for obtaining a profile when requested by firefox developers.
tools/power/rapl
once sampling is finished — either because the user interrupted it, or because the requested number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th percentile = 8.13 w 75th percentile = 11.16 w 95th percentile = 14.63 w 100th percentile =...
Research and prep
here's the basic process: file a bug under mozilla localizations>[your_locale] to request updates to your locale's productization preferences.
AsyncTestUtils extended framework
when a timer fires because the requested duration is up, it also places an event in the queue.
Creating a Cookie Log
finally, attach the cookie-log.txt file to the bug where it was requested (by clicking on create new attachment).
NSPR Poll Method
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.
Optimizing Applications For NSPR
the unix based platforms all implement the function though there may be up to a 5 second delay in processing the request.
I/O Types
file info types prfileinfo prfileinfo64 prfiletype network address types prnetaddr pripv6addr types used with socket options functions prsocketoptiondata prsockoption prlinger prmcastrequest type used with memory-mapped i/o prfilemap offset interpretation for seek functions prseekwhence ...
Introduction to NSPR
a thread is created by an explicit client request and remains a valid, independent execution entity until it returns from its root function or the process abnormally terminates.
PRSocketOptionData
ax #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.
PRThreadScope
on systems that don't make a distinction between local and global threads, nspr silently ignores the scheduling request.
PR_GetSocketOption
on output, this structure contains the requested socket option data.
PR_InitializeNetAddr
this wildcard value is typically used to establish a socket on which to listen for incoming connection requests.
PR_SetError
the runtime merely stores the value and returns it when requested.
PR_Shutdown
returns the function returns one of the following values: upon successful completion of shutdown request, pr_success.
4.3.1 Release Notes
new in jss 4.3.1 a list of bug fixes and enhancement requests were implemented in this release can be obtained by running this bugzilla query jss 4.3.1 requires nss 3.12.5 or higher.
4.3 Release Notes
new in jss 4.3 a list of bug fixes and enhancement requests were implemented in this release can be obtained by running this bugzilla query jss 4.3 requires nss 3.12 or higher.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
verifycert.java ssl examples: org/mozilla/jss/tests/sslclientauth.java org/mozilla/jss/ssl/sslclient.java org/mozilla/jss/ssl/sslserver.java org/mozilla/jss/ssl/ssltest.java other test code that may prove useful: org/mozilla/jss/asn1/integer.java org/mozilla/jss/asn1/sequence.java org/mozilla/jss/asn1/set.java org/mozilla/jss/pkcs10/certificationrequest.java org/mozilla/jss/pkcs12/pfx.java org/mozilla/jss/pkix/cert/certificate.java org/mozilla/jss/pkix/cmmf/certrepcontent.java org/mozilla/jss/pkix/crmf/certreqmsg.java org/mozilla/jss/pkix/crmf/certtemplate.java org/mozilla/jss/pkix/primitive/name.java org/mozilla/jss/provider/javax/crypto/jsssecretkeyfactoryspi.java org/mozilla/jss/util/utf8convert...
NSS Memory allocation
when nss attempts to allocate more memory for an arena pool, the plarenapool code attempts to use an arena from its free list, and only gets a new arena from the heap if there are no arenas in the free list that are large enough to satisfy the request.
NSS_3.12.1_release_notes.html
list_appenditem function bug 442618: eliminate dead function cert_certpackagetype bug 443755: extra semicolon in pkm_tlskeyandmacderive makes conditional code unconditional bug 443760: extra semicolon in seqdatabase makes static analysis tool suspicious bug 448323: certutil -k doesn't report the token and slot names for found keys bug 448324: ocsp checker returns incorrect error code on request with invalid signing cert bug 449146: remove dead libsec function declarations bug 453227: installation of pem-encoded certificate without trailing newline fails documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS 3.12.6 release notes
the status_request extension).
NSS 3.14.1 release notes
bug 802429 - in previous versions of nss, the "cipherorder" slot configuration flag was not respected, causing the most recently added slot that supported the requested pkcs#11 mechanism to be used instead.
NSS 3.14.3 release notes
bug 840714 - "certutil -a" was not correctly producing ascii output as requested.
NSS 3.15.4 release notes
new functions cert_forcepostmethodforocsp cert_getsubjectnamedigest cert_getsubjectpublickeydigest ssl_peercertificatechain ssl_recommendedcanfalsestart ssl_setcanfalsestartcallback new types cert_rev_m_force_post_method_for_ocsp: when this flag is used, libpkix will never attempt to use the http get method for ocsp requests; it will always use post.
NSS 3.19.2.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.19.2 release notes
applications that requested or attempted to use keys smaller then the minimum size would fail.
NSS 3.19.4 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.20.1 release notes
bug 1205157 (nspr, cve-2015-7183): a logic bug in the handling of large allocations would allow exceptionally large allocations to be reported as successful, without actually allocating the requested memory.
NSS 3.27.2 Release Notes
notable changes in nss 3.27.2 the ssl_settrustanchors() function is used to set the distinguished names that an nss server includes in its tls certificaterequest message.
NSS 3.28 release notes
request to test and prepare for tls 1.3 this release contains improved support for tls 1.3, however, the code that supports tls 1.3 is still disabled by default (not built).
NSS 3.37 release notes
an issue where nss erroneously accepted hrr requests was resolved.
NSS 3.41 release notes
e9103d4758ea2abad826a90f3457d460eb4 cn = opentrust root ca g2 sha-256 fingerprint: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 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 - resend 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...
NSS 3.43 release notes
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.
NSS 3.45 release notes
53443 - 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 - helloretryrequestcallback return code for rejecting 0-rtt bug 1556591 - eliminate races in uses of pk11_setwrapkey bug 1558681 - stop using a global for anti-replay of tls 1.3 early data bug 1561510 - fix a bug where removing -arch xxx args from cc didn't work bug 1561523 - add a string for the new-ish error ssl_error_missing_post_handshake_auth_extension this bugzilla query returns all the bugs fixed in nss...
NSS 3.49 release notes
588714 - implement checkarmsupport for win64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr initialization bug 1590001 - additional hrr tests (cve-2019-17023) bug 1600144 - treat clienthello with message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - intermittent mis-reporting potential security risk sec_error_unknown_issuer bug 1535787 - fix automation/release/nss-release-helper.py on macos bug 1594933 - disable building dbm by default bug 1562548 - improve gcm perfomance on aarch32 this bugzilla query returns all the bugs fixed in nss 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=compone...
nss tech note1
it is only required for dynamically allocating memory for the structure if the template is being included from an asn.1 sequence or sequence of, or if dynamic allocation was requested from the parent template using the sec_asn1_pointer modifier here is a description of the various tags and modifiers that apply to the <tt style="color: rgb(0,0,0);">kind field.
Notes on TLS - SSL 3.0 Intolerant Servers
it is designed to permit a server to detect a man-in-the-middle that is altering the ssl client hello (connection) requests as they pass from the client to the server, altering them by changing the protocol version number to a lower version number.
Overview of NSS
rsa standard that governs the syntax for certificate requests.
NSS PKCS11 Functions
for example, mozilla uses the parameter to pass information about which window is associated with the modal dialog box requesting the password from the user.
PKCS11 Implement
slot and token management c_getslotlist the nss calls c_getslotlist on startup or when it loads a new module, requests all the module's slots, and keeps track of the list from that point on.
NSS tools : ssltab
the browser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the browser by the debugging tool on intercept.
NSS tools : ssltap
the browser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the browser by the debugging tool on intercept.
pkfnc.html
for example, communicator uses the parameter to pass information about which window is associated with the modal dialog box requesting the password from the user.
sslcrt.html
returns the function returns a certcertnicknames object containing the requested nicknames.
NSS Tools
source, documentation, tasks/plans sslstrength ssl strength documentation ssltap 3.2 proxy requests for an ssl server and display the contents of the messages exchanged between the client and server.
NSS_3.12.3_release_notes.html
t_comparecerts bug 462293: crash on fork after softoken is dlclose'd on some unix platforms in nss 3.12 bug 463342: move some headers to freebl/softoken bug 463452: sql db creation does not set files protections to 0600 bug 463678: need to add rpath to 64-bit libraries on hp-ux bug 464088: option to build nss without dbm (handy for wince) bug 464223: certutil didn't accept certificate request to sign.
NSS Tools ssltap
the browser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the browser by the debugging tool on intercept.
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
the browser retrieves the requested page from the server at www.netscape.com, but the page is intercepted and passed on to the browser by the debugging tool on intercept.
Proxies in Necko
depending on the type of the proxy info, it either asks the http protocol handler or the protocol handler for the requested uri for a new channel with the nsiproxyinfo - if the channel supports nsiproxiedprotocolhandler.
Rhino community
if you have the inclination to fix it, you are also encouraged to fix it and submit a pull request.
Rhino overview
then, the class of the code that called to request the restricted action can be obtained by looking an appropriate index into the class context array.
Hacking Tips
this is because firefox doesn't allow loading files from the harddisk using httprequest, even when the file loading the file is on the harddisk.
SpiderMonkey Internals
it runs automatically only when maxbytes (as passed to js_newruntime) bytes of gc things have been allocated and another thing-allocation request is made.
Introduction to the JavaScript shell
if you specified options on the command line, the results of calling options will indicate which options you requested.
JS_CheckForInterrupt
see also mxr id search for js_checkforinterrupt js_setinterruptcallback js_getinterruptcallback js_requestinterruptcallback bug 1058695 ...
JS_MapGCRoots
the map function cannot call js_gc, js_maybegc, js_beginrequest, or any js api entry point that acquires locks, without double-tripping or deadlocking on the gc lock.
JS_SetNativeStackQuota
this function may only be called immediately after the runtime is initialized and before any code is executed and/or interrupts requested.
SpiderMonkey 1.8
functions that were js_threadsafe-only in spidermonkey 1.7 (js_beginrequest, for example) are now present, but do nothing, in non-js_threadsafe builds.
SavedFrame
if the asynchronous call was started in a descendant frame to which the requester of the property does not have access, this will be the generic string "async".
Web Replay
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.
Secure Development Guidelines
is exploitable (in some browsers) with a simple request such as: http://www.victim.com?something=<script>alert('oops')</script> xss: prevention escape all dynamic input that will be sent back to the user html encoding &amp; → & &lt; → < &gt; → > &quot; → " &apos; → ' url encoding % encoding java/vbscript escaping depends on the context; in a single-quoted string, escaping ' would suffice ...
Signing Mozilla apps for Mac OS X
it will guide you through creating a private key, certificate signing request, and importing your new developer id into the keychain access application on your mac.
History Service Design
once places receives a place: uri or a query object an internal query builder checks for the requested options and make up a real sql query that is executed with storage apis.
Querying Places
for bookmark queries you will generally want no query parameters to retrieve all items from the requested folder(s).
Using the Places livemark service
the expiration time for a livemark is determined by using information provided by the server when the feed was requested, specifically nsicacheentryinfo.expirationtime.
Aggregating the In-Memory Datasource
now, if the in-memory datasource's implementation of queryinterface() fails because it doesn't support the requested interface, it willforward the query interface to its "outer" (which is "us").
Components.utils.Sandbox
the following objects are supported: -promise (removed in firefox 37) css indexeddb (web worker only) xmlhttprequest textencoder textdecoder url urlsearchparams atob btoa blob file crypto rtcidentityprovider fetch (added in firefox 41) caches filereader for example: var sandboxscript = 'var encoded = btoa("hello");' + 'var de...
Components.utils.exportFunction
allowcrossoriginarguments: do not check that arguments to the exported function are subsumed by the caller: this allows the caller to pass objects with a different origin into the exported function, which can then use its privileged status to make cross-origin requests with them.
Components object
utils.scheduleprecisegc requests that garbage collection occur sometime in the future when no javascript code is running; accepts a callback function to receive notification once collection is complete.
Monitoring HTTP activity
these include the ability to monitor outgoing http request headers and bodies as well as incoming http headers and complete http transactions.
NS_ConvertASCIItoUTF16
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
NS_ConvertUTF16toUTF8
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
NS_ConvertUTF8toUTF16
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
NS_LossyConvertUTF16toASCII
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsACString_internal
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsAString_internal
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsAdoptingCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsAdoptingString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsAutoString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsCAutoString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsDependentCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsDependentCSubstring
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsDependentString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsDependentSubstring
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsFixedCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsFixedString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsPromiseFlatCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsPromiseFlatString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsXPIDLCString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
nsXPIDLString
@returns the length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
IAccessibleTable
accessible if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
IAccessibleTable2
cell if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
amIWebInstallPrompt
ainstalls the addoninstalls that were requested.
amIWebInstaller
methods installaddonsfromwebpage() installs an array of add-ons at the request of a webpage.
imgICache
evantchannel is an nsichannel that is used for fetching images): var tools = components.classes["@mozilla.org/image/tools;1"].getservice(components.interfaces.imgitools); var cache = tools.getimgcachefordocument(relevantdocument); // alternatively, tools.getimgcacheforchannel(relevantchannel) if there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie.
mozIAsyncFavicons
setandfetchfaviconforpage() declares that a given page uses a favicon with the given uri and attempts to fetch and save the icon data by loading the favicon uri through a asynchronous network request.
mozIStorageError
abort 4 a callback routine requested an abort.
mozITXTToHTMLConv
methods scantxt() scans the specified text, applying the requested conversions and outputting html.
mozIThirdPartyUtil
if they can be determined, and the base domains match, the request is defined as first party.
mozIVisitStatusCallback
implement this method to determine the results of the request.
nsIAccessibleTable
if both row and column index are valid then the corresponding accessible object is returned that represents the requested cell regardless of whether the cell is currently visible (on the screen).
nsIAppShellService
follow this bug - bugzilla - bug 1280028 nsiwebnav createwindowlessbrowser( in bool aischrome ); var webnav = services.appshell.createwindowlessbrowser(true); var docshell = webnav.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidocshell); var systemprincipal = cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); docshell.createaboutblankcontentviewer(systemprincipal); var contentwindow = docshell.contentviewer.domdocument.defaultview; // when you are done with it, destroy it if (webnav.close) { webnav.close() }; // only available in firefox 46+, and is needed for good measure webn...
nsIAuthInformation
attributes attribute type description authenticationscheme autf8string the authentication scheme used for this request, if applicable.
nsIAuthPrompt2
return value promptauth() requests a username and a password.
nsIBrowserSearchService
method the http request method used when submitting a search query.
nsICacheListener
inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void oncacheentryavailable(in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status); void oncacheentrydoomed(in nsresult status); methods oncacheentryavailable() this method is called when the requested access (or appropriate subset) is acquired.
nsICancelable
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void cancel(in nsresult areason); methods cancel() call this method to request that this object abort whatever operation it may be performing.
nsICookiePromptService
cookie the cookie about which permission is being requested.
nsICryptoHMAC
ns_error_not_available if the requested amount of data to be calculated into the hash is not available.
nsICryptoHash
exceptions thrown ns_error_not_available indicates that the requested amount of data to be calculated into the hash is not available.
nsIDOMGeoGeolocation
you can request a single notification of the user's current position, or you can monitor the position over time.
nsIDOMStorage
return value a string containing the requested key.
nsIDOMStorage2
return value a string containing the requested key.
nsIDirIndexParser
this result is only valid after onstoprequest has occurred, because it can occur anywhere in the datastream.
nsIDirectoryServiceProvider2
inherits from: nsidirectoryserviceprovider last changed in gecko 0.9.6 method overview nsisimpleenumerator getfiles(in string prop); methods getfiles() the directory service calls this when it gets a request for a prop and the requested type is nsisimpleenumerator.
nsIDownloadManager
download_blocked_policy 9 windows specific: request was blocked by zone policy settings.
nsIFaviconDataCallback
void oncomplete( in nsiuri auri, in unsigned long adatalen, [const,array,size_is(adatalen)] in octet adata, in autf8string amimetype ); parameters auri receives the "favicon uri" (not the "favicon link uri") associated to the requested page.
nsIGeolocationProvider
after the provider has been initialized, any changes to location should call callback.onrequest().
nsIInstallLocation
return value a file object at the requested location.
getInterface
this content is now available at nsiinterfacerequestor.getinterface().
nsILocalFile
launch() requests that the operating system attempt to open this file.
nsILoginInfo
httprealm astring the http realm for which the login was requested.
nsILoginManager
called when looking for logins that might be applicable to a given form or authentication request.
nsILoginManagerStorage
this method is called by the login manager when looking for saved logins that might apply to a form or authentication request.
nsIMicrosummaryGenerator
return value the interval in milliseconds until the next update request.
nsIMsgWindow
notificationcallbacks nsiinterfacerequestor these are currently used to set notification callbacks on protocol channels to handle things like bad cert exceptions.
nsINavHistoryQuery
when unset (default), the uri will request an exact match of the specified uri.
nsINavHistoryQueryResultNode
1.0 66 introduced gecko 1.8 inherits from: nsinavhistorycontainerresultnode last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: if you request that places not be expanded in the options that generated the node, the node will report that it has no children and will never try to populate itself.
nsINavHistoryResultTreeViewer
obsolete since gecko 1.9 constants constant value description index_invisible 0xffffffff returned by treeindexfornode() when the requested node isn't visible (such as when its parent is collapsed).
nsIPrefBranch2
the observer can request to be held as a weak reference when it is registered.
nsIPrefLocalizedString
modules/libpref/public/nsipreflocalizedstring.idlscriptable this interface is simply a wrapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
nsIPrompt
normally you would use the prompt service as it is more flexible, but sometimes a callback will request an nsiprompt via nsiinterfacerequestor.getinterface().
nsIProperties
ns_error_no_interface if the property exists, but does not support the requested interface.
nsISSLSocketControl
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void proxystartssl(); void starttls(); attributes attribute type description forcehandshake boolean obsolete since gecko 1.9 notificationcallbacks nsiinterfacerequestor methods proxystartssl() starts an ssl proxy connection.
nsIScriptableInputStream
var scriptableinputstream = cc("@mozilla.org/scriptableinputstream;1", "nsiscriptableinputstream", "init"); var blah = { data: '', onstartrequest: function (arequest, acontext) { this.data = ''; }, ondataavailable: function(request, context, inputstream, offset, count) { var scriptstream = new scriptableinputstream(inputstream); this.data += scriptstream.read(count); scriptstream.close(); } }; see also nsscriptableinputstream nsiinputstream ...
nsIScriptableUnicodeConverter
throws ns_error_uconv_noconv if the requested charset is not supported.
nsISelection2
if false, posts a request which is processed at some point after the method returns.
nsISelectionController
if not set, posts a request which is processed at some point after the method returns.
nsISelectionPrivate
if false, posts a request which is processed at some point after the method returns.
nsISessionStore
it can also be obtained from an nsixulwindow using if (xul_win.docshell instanceof nsiinterfacerequestor) { var win = xul_win.docshell.getinterface(nsidomwindow); ...
nsISocketProvider
when set, the hostname parameter passed in this interface will be used instead of the address structure passed for a later request.
nsISocketTransport
securitycallbacks nsiinterfacerequestor security notification callbacks passed to the secure socket provider via nsisslsocketcontrol at socket creation time.
nsISound
typically, it will be more useful to request that appropriate sounds be played based on which event you wish to represent by the sound effect.
nsISupportsPriority
see also changing the priority of http requests for an example of using this interface to adjust the priority of an http request.
nsISupports proxies
the iid that you are requesting must be in the typelib.
nsISyncMessageSender
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).
nsITextInputProcessor
if this is not specified, requests to imes are handled automatically.
nsITimer
note that the delay is approximate: the timer can be fired before the requested time has elapsed.
nsIUploadChannel
in the case of http, if this parameter is non-empty, then its value will replace any existing content-type header on the http request.
nsIUserCertPicker
inherits from: nsisupports last changed in gecko 1.7 method overview nsix509cert pickbyusage(in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled); methods pickbyusage() nsix509cert pickbyusage( in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled ); parameters ctx selectednickname certusage allowinvalid allowduplicatenicknames canceled return value ...
nsIWebSocketChannel
notificationcallbacks nsiinterfacerequestor the notification callbacks for authorization and so forth.
nsIWinTaskbar
example netscape.security.privilegemanager.enableprivilege("universalxpconnect"); var taskbar = components.classes["@mozilla.org/windows-taskbar;1"].getservice(components.interfaces.nsiwintaskbar); // get the docshell for the browser var navigator2 = top.queryinterface(components.interfaces.nsiinterfacerequestor).getinterface(components.interfaces.nsiwebnavigation); var docshell = navigator2.queryinterface(components.interfaces.nsidocshell); // get the parent docshell; this is the top-level docshell var docshelltreeitem = docshell.queryinterface(components.interfaces.nsidocshelltreeitem); var parent = docshelltreeitem.parent; var ds = parent.queryinterface(components.interfaces.nsidocshell); // crea...
nsIXPConnect
requires request.
NS_CStringGetMutableData
this value will be zero if the function failed to resize its internal buffer to the size requested.
nsMsgMessageFlags
imapdeleted 0x00200000 indicates whether or not the message has been deleted on the imap server mdnreportneeded 0x00400000 indicates whether or not a delivery receipt was requested.
nsMsgViewType
for example, to request the 'show all threads' view use the constant: components.interfaces.nsmsgviewtype.eshowallthreads constants name value description eshowallthreads 0 eshowthreadswithunread 2 eshowwatchedthreadswithunread 3 eshowquicksearchresults 4 eshowvirtualfolderresults 5 eshowsearch 6 ...
XPCOM reference
for example, to request the 'show all threads' view use the constant:nsstaticmoduleinfothis data structure is used by ns_initxpcom3 to specify static xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is ...
Reference Manual
if the object still exists and supports the requested interface, you will (hopefully, temporarily) hold an owning reference to it.
Using the clipboard
if (source instanceof ci.nsidomwindow) // note: in gecko versions >16, you can import the privatebrowsingutils.jsm module // and use privatebrowsingutils.privacycontextfromwindow(sourcewindow) instead source = source.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation); res.init(source); } return res; } here, the string "text to copy" will be copied but you can replace this with the text string that you want to copy.
Working with Multiple Versions of Interfaces
this is because the call to do_createinstance(acid, aouter, error); will eventually evolve into a request for an object supporting the interface with iid ns_get_iid(nsiaccessibleretrieval).
Index
the activity manager works in conjunction with the interactive status bar to give the user notifications concerning what thunderbird is doing and how thunderbird has handled user requests.
Using popup notifications
for example, this popup notification is displayed when a web site requests geolocation information: this lets the user decide whether or not to share their location when it's convenient to do so, instead of being compelled to do it at once.
Working with windows in chrome code
this can be done using the following statement: var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); this allows you to cross the chrome-content boundaries, and r...
Initialization and Destruction - Plugins
the browser calls the plug-in's np_shutdown function, which informs the plug-in that its library is about to be unloaded, and gives it a chance to cancel any outstanding i/o requests, delete threads it created, free any memory it allocated, and perform any other closing tasks.
Plug-in Basics - Plugins
the browser downloads the requested plug-in.
Scripting plugins - Plugins
a plugin that wishes to be scriptable using this new mechanism needs to return the appropriate npobject (which is created by calling npn_createobject) when the browser requests it by calling: npp_getvalue(npp, nppvpluginscriptablenpobject, ...); accessing browser objects from a plugin a plugin that wishes to access objects in the browser window that loaded the plugin can do this by getting the npobject for the browser's window object, or the dom element that loaded the plugin.
Debugger.Memory - Firefox Developer Tools
known values include the following: “gc mode” “malloc bytes trigger” “allocation trigger” “requested” gccyclenumber the gc cycle’s “number”.
JSON viewer - Firefox Developer Tools
finally, if the document was the result of a network request, the viewer displays the request and response headers.
Throttling - Firefox Developer Tools
good 2g 450 kbps 150 kbps 150 regular 3g 750 kbps 250 kbps 100 good 3g 1.5 mbps 750 kbps 40 regular 4g/lte 4 mbps 3 mbps 20 dsl 2 mbps 1 mbps 5 wi-fi 30 mbps 15 mbps 2 network monitor features the following articles cover different aspects of using the network monitor: toolbar network request list network request details network traffic recording performance analysis ...
Frame rate - Firefox Developer Tools
to fix it, we might consider splitting it into pieces and running the pieces inside requestanimationframe, or even running the entire function in a worker.
Waterfall - Firefox Developer Tools
javascript functions executed in the page are labeled with the reason the function was called: script tag setinterval settimeout requestanimationframe promise callback promise init worker javascript uri event handler stack call stack, with links to functions.
Responsive Design Mode - Firefox Developer Tools
select a device, and responsive design mode sets the following properties to match the selected device: screen size device pixel ratio (the ratio of device physical pixels to device-independent pixels) touch event simulation additionally, firefox sets the user-agent http request header to identify itself as the default browser on the selected device.
Cache Storage - Firefox Developer Tools
the status code for the request that was made to fetch it.
Cookies - Firefox Developer Tools
same-site cookies allow servers to mitigate the risk of csrf and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registrable domain.
Web Console - Firefox Developer Tools
the web console: logs information associated with a web page: network requests, javascript, css, security errors and warnings as well as error, warning and informational messages explicitly logged by javascript code running in the page context enables you to interact with a web page by executing javascript expressions in the context of the page user interface of the web console parts of the web console ui.
Firefox Developer Tools
network monitor see the network requests made when a page is loaded.
AbsoluteOrientationSensor - Web APIs
the actual reading frequency depends device hardware and consequently may be less than requested.
AbstractRange - Web APIs
similarly, the last text node will contain simply "ve", given the request for the first two characters of the ending node.
Accelerometer.Accelerometer() - Web APIs
the actual reading frequency depends device hardware and consequently may be less than requested.
AddressErrors.addressLine - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.addressline' in that specification.
AddressErrors.city - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.city' in that specification.
AddressErrors.country - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.country' in that specification.
AddressErrors.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.dependentlocality' in that specification.
AddressErrors.languageCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.languagecode' in that specification.
AddressErrors.organization - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.organization' in that specification.
AddressErrors.phone - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.phone' in that specification.
AddressErrors.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.postalcode' in that specification.
AddressErrors.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.recipient' in that specification.
AddressErrors.region - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.region' in that specification.
AddressErrors.regionCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.regioncode' in that specification.
AddressErrors.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.sortingcode' in that specification.
AmbientLightSensor.AmbientLightSensor() - Web APIs
the actual reading frequency depends device hardware and consequently may be less than requested.
AnalyserNode.AnalyserNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Animation.ready - Web APIs
WebAPIAnimationready
since the same promise is used for both pending play and pending pause requests, authors are advised to check the state of the animation when the promise is resolved.
AudioBuffer() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
AudioContext() - Web APIs
the user agent may or may not choose to meet this request; check the value of audiocontext.baselatency to determine the true latency after creating the context.
AudioContext.createMediaStreamTrackSource() - Web APIs
example in this example, getusermedia() is used to request access to the user's microphone.
AudioContextOptions - Web APIs
the user agent may or may not choose to meet this request; check the value of audiocontext.baselatency to determine the true latency after creating the context.
AudioParam.cancelAndHoldAtTime() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
AudioProcessingEvent - Web APIs
'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata 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 ...
AudioWorkletNode.port - Web APIs
examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
AudioWorkletProcessor.port - Web APIs
examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
credentialid (variable length) - a unique identifier for this credential so that it can be requested for future authentications.
AuthenticatorAssertionResponse - Web APIs
the authenticatorassertionresponse interface of the web authentication api is returned by credentialscontainer.get() when a publickeycredential is passed, and provides proof to a service that it has a key pair and that the authentication request is valid and approved.
BaseAudioContext.createConstantSource() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BaseAudioContext.createScriptProcessor() - Web APIs
'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata 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 ...
BaseAudioContext - Web APIs
in this case, the arraybuffer is usually loaded from an xmlhttprequest's response attribute after setting the responsetype to arraybuffer.
BeforeInstallPromptEvent.prompt() - Web APIs
example var istoosoon = true; window.addeventlistener("beforeinstallprompt", function(e) { if (istoosoon) { e.preventdefault(); // prevents prompt display // prompt later instead: settimeout(function() { istoosoon = false; e.prompt(); // throws if called more than once or default not prevented }, 10000); } // the event was re-dispatched in response to our request // ...
BiquadFilterNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BlobEvent.timecode - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Bluetooth.getAvailability() - Web APIs
note: user might not allow use of web bluetooth api, even if getavailability() returned true (navigator.bluetooth.requestdevice() might not resolve with a bluetoothdevice).
characteristic - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
readValue() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
uuid - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
value - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
writeValue() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BluetoothRemoteGATTDescriptor - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
example in our fetch request example (run fetch request live), we create a new request using the request() constructor, then use it to fetch a jpg.
Body.formData() - Web APIs
WebAPIBodyformData
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).
BudgetService.getBudget() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BudgetService.getCost() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BudgetState.budgetAt - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BudgetState.time - Web APIs
WebAPIBudgetStatetime
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
BudgetState - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ByteLengthQueuingStrategy - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
CSSImageValue - Web APIs
examples we create an element <button>magic wand</button> we add some css, including a background image requesting a binary file: button { display: inline-block; min-height: 100px; min-width: 100px; background: no-repeat 5% center url(https://mdn.mozillademos.org/files/16793/magicwand.png) aqua; } we get the element's style map.
CSSStyleRule.selectorText - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Using the CSS Painting API - Web APIs
static get inputarguments() { return ['*', '<length>']; } in this case, we specifically requested the <length> attribute.
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
return value a promise that resolves to the requested cache object.
CanvasCaptureMediaStreamTrack - Web APIs
canvascapturemediastreamtrack.requestframe() manually forces a frame to be captured and sent to the stream.
CanvasRenderingContext2D.arcTo() - Web APIs
ctx.arcto(p1.x, p1.y, p2.x, p2.y, r); ctx.lineto(p2.x, p2.y); ctx.stroke(); } let t0 = 0; let rr = 0; // the radius that changes over time let a = 0; // angle let pi2 = math.pi * 2; const loop = function (t) { t0 = t / 1000; a = t0 % pi2; rr = math.abs(math.cos(a) * r); ctx.clearrect(0, 0, canvas.width, canvas.height); drawarc([p1, p2, p3], rr); drawpoints([p1, p2, p3]); requestanimationframe(loop); } loop(0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arcto' in that specification.
Optimizing canvas - Web APIs
with animations, use window.requestanimationframe() instead of window.setinterval() .
Using images - Web APIs
ame page as the canvas by using one of: the document.images collection the document.getelementsbytagname() method if you know the id of the specific image you wish to use, you can use document.getelementbyid() to retrieve that specific image using images from other domains using the crossorigin attribute of an <img> element (reflected by the htmlimageelement.crossorigin property), you can request permission to load an image from another domain for use in your call to drawimage().
ChildNode.after() - Web APIs
WebAPIChildNodeafter
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ChildNode.before() - Web APIs
WebAPIChildNodebefore
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ChildNode.replaceWith() - Web APIs
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
Client.postMessage() - Web APIs
client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification.
Clipboard.read() - Web APIs
WebAPIClipboardread
the read() method of the clipboard interface requests a copy of the clipboard's contents, delivering the data to the returned promise when the promise is resolved.
ClipboardItem() - Web APIs
examples the below example requests a png image using the fetch api, and in turn, the responses' blob() method, to create a new clipboarditem and write it to the clipboard, using the clipboard api.
ClipboardItem.getType() - Web APIs
the gettype() method of the clipboarditem interface returns a promise that resolves with a blob of the requested mime type or an error if the mime type is not found.
Clipboard API - Web APIs
the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
CloseEvent - Web APIs
1011 internal error the server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
ConvolverNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
CountQueuingStrategy - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Credential Management API - Web APIs
credentialscontainer exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out.
CredentialsContainer.create() - Web APIs
syntax var promise = credentialscontainer.create([options]) parameters options an object of type credentialcreationoptions that contains options for the requested new credentials object.
CredentialsContainer - Web APIs
the credentialscontainer interface of the the credential management api exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen.
Crypto.getRandomValues() - Web APIs
domexception (name: quotaexceedederror) the requested length exceeds 65,536 bytes.
DOMError - Web APIs
WebAPIDOMError
hierarchyrequesterror the node tree hierarchy is not correct.
DOMException() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DOMException.message - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DOMHighResTimeStamp - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DOMParser - Web APIs
WebAPIDOMParser
note: xmlhttprequest can parse xml and html directly from a url-addressable resource, returning a document in its response property.
DOMRectReadOnly.fromRect() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DOMTokenList.forEach() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DataTransfer.mozGetDataAt() - Web APIs
return value nsivariant the data item requested.
DataTransferItem.webkitGetAsEntry() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DelayNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DisplayMediaStreamConstraints.audio - Web APIs
the displaymediastreamconstraints dictionary's audio property is used to specify whether or not to request that the mediastream containing screen display contents also include an audio track.
Document: DOMContentLoaded event - Web APIs
if you want the dom to get parsed as fast as possible after the user has requested the page, you can make your javascript asynchronous and optimize loading of stylesheets.
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Document.fonts - Web APIs
WebAPIDocumentfonts
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Document.forms - Web APIs
WebAPIDocumentforms
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Document: fullscreenerror event - Web APIs
examples const requestor = document.queryselector('div'); document.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Document.hasStorageAccess() - Web APIs
} else { // storage access hasn't been granted already; // you may want to call requeststorageaccess().
Document.lastModified - Web APIs
(see: bug 4363 – document.lastmodified returns date in utc time, but should return it in local time) if you want to know whether an external page has changed, please read this paragraph about the xmlhttprequest() api.
Document.onfullscreenchange - Web APIs
example document.onfullscreenchange = function ( event ) { console.log("full screen change") }; document.documentelement.onclick = function () { // requestfullscreen() must be in an event handler or it will fail document.documentelement.requestfullscreen(); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Document - Web APIs
WebAPIDocument
document.requeststorageaccess() returns a promise that resolves if the access to first-party storage was granted, and rejects if access was denied.
DocumentFragment.querySelector() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
DocumentOrShadowRoot.getSelection() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
How to create a DOM tree - Web APIs
dom trees can be queried using xpath expressions, converted to strings or written to a local or remote files using xmlserializer (without having to first convert to a string), posted to a web server (via xmlhttprequest), transformed using xslt, xlink, converted to a javascript object through a jxon algorithm, etc.
DynamicsCompressorNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element.currentStyle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element: fullscreenchange event - Web APIs
document.exitfullscreen(); } else { document.getelementbyid('fullscreen-div').requestfullscreen(); } }); specifications specification status fullscreen api living standard ...
Element: fullscreenerror event - Web APIs
examples const requestor = document.queryselector('div'); requestor.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Element.getAttribute() - Web APIs
consequently, you should use element.hasattribute() to check for an attribute's existence prior to calling getattribute() if it is possible that the requested attribute does not exist on the specified element.
Element.onfullscreenchange - Web APIs
function togglefullscreen() { let elem = document.queryselector("video"); elem.onfullscreenchange = handlefullscreenchange; if (!document.fullscreenelement) { elem.requestfullscreen().then({}).catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.exitfullscreen(); } } function handlefullscreenchange(event) { let elem = event.target; let isfullscreen = document.fullscreenelement === elem; adjustmycontrols(isfullscreen); } specifications specification status ...
Element.onfullscreenerror - Web APIs
elem.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Element.runtimeStyle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element.scroll() - Web APIs
WebAPIElementscroll
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element.scrollLeftMax - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Element.slot - Web APIs
WebAPIElementslot
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Event - Web APIs
WebAPIEvent
ent devicelightevent devicemotionevent deviceorientationevent deviceproximityevent domtransactionevent dragevent editingbeforeinputevent errorevent fetchevent focusevent gamepadevent hashchangeevent idbversionchangeevent inputevent keyboardevent mediastreamevent messageevent mouseevent mutationevent offlineaudiocompletionevent overconstrainederror pagetransitionevent paymentrequestupdateevent pointerevent popstateevent progressevent relatedevent rtcdatachannelevent rtcidentityerrorevent rtcidentityevent rtcpeerconnectioniceevent sensorevent storageevent svgevent svgzoomevent timeevent touchevent trackevent transitionevent uievent userproximityevent webglcontextevent wheelevent constructor event() creates an event object, returning it to the caller...
EventTarget.addEventListener() - Web APIs
common targets are element, document, and window, but the target may be any object that supports events (such as xmlhttprequest).
EventTarget.dispatchEvent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
EventTarget - Web APIs
for example xmlhttprequest, audionode, audiocontext, and others.
ExtendableEvent - Web APIs
resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); important: when fetching resources, it's very important to use {mode: 'no-cors'} if there is any chance that the resources are served off of a server that doe...
FederatedCredential - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FederatedCredential.protocol - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FederatedCredential.provider - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FederatedCredential - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FetchEvent() - Web APIs
request read only the request object that would have triggered the event handler.
FetchEvent.resultingClientId - Web APIs
if the fetch request is a subresource request or the request's destination is report, resultingclientid will be an empty string.
File.webkitRelativePath - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
File - Web APIs
WebAPIFile
in particular, filereader, url.createobjecturl(), createimagebitmap(), and xmlhttprequest.send() accept both blobs and files.
FileEntrySync - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileError - Web APIs
WebAPIFileError
invalid_modification_err 9 the modification requested is not allowed.
FileReader - Web APIs
done 2 the entire read request has been completed.
FileReaderSync.readAsArrayBuffer() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileReaderSync.readAsBinaryString() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileReaderSync.readAsDataURL() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileReaderSync.readAsText() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileReaderSync - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystem.name - Web APIs
WebAPIFileSystemname
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystem.root - Web APIs
WebAPIFileSystemroot
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryEntry.createReader() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryReader.readEntries() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemDirectoryReader - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.filesystem - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.fullPath - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.getParent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.isDirectory - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.isFile - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.name - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.remove() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemEntry.toURL() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFileEntry.createWriter() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFileEntry.file() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFlags.create - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemFlags.exclusive - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FileSystemSync - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
File and Directory Entries API support in Firefox - Web APIs
you can't use the localfilesystem.requestfilesystem() method to get access to a specified local file system.
FontFace.display - Web APIs
WebAPIFontFacedisplay
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FontFaceSet - Web APIs
fontfaceset.load() returns a promise which resolves to a list of font-faces for a requested font.
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FontFaceSetLoadEvent.fontfaces - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FontFaceSetLoadEvent - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
FormData() - Web APIs
WebAPIFormDataFormData
let myform = document.getelementbyid('myform'); let formdata = new formdata(myform); specifications specification status comment xmlhttprequestthe definition of 'formdata()' in that specification.
FormData.append() - Web APIs
WebAPIFormDataappend
if the sent value is different than string or blob it will be automatically converted to string: formdata.append('name', true); formdata.append('name', 74); formdata.append('name', 'john'); formdata.getall('name'); // ["true", "74", "john"] specifications specification status comment xmlhttprequestthe definition of 'append()' in that specification.
FormData.delete() - Web APIs
WebAPIFormDatadelete
example the following line creates an empty formdata object and prepopulates it with key/value pairs from a form: var formdata = new formdata(myform); you can delete keys and their values using delete(): formdata.delete('username'); specifications specification status comment xmlhttprequestthe definition of 'delete()' in that specification.
FormData.entries() - Web APIs
WebAPIFormDataentries
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification.
FormData.get() - Web APIs
WebAPIFormDataget
creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following get() function will only return the first username value appended: formdata.get('username'); // returns "chris" specifications specification status comment xmlhttprequestthe definition of 'get()' in that specification.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
n empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following getall() function will return both username values in an array: formdata.getall('username'); // returns ["chris", "bob"] specifications specification status comment xmlhttprequestthe definition of 'getall()' in that specification.
FormData.has() - Web APIs
WebAPIFormDatahas
= new formdata(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
FormData.keys() - Web APIs
WebAPIFormDatakeys
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification.
FormData.set() - Web APIs
WebAPIFormDataset
urrently empty you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition of 'set()' in that specification.
FormData.values() - Web APIs
WebAPIFormDatavalues
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification.
FormDataEvent.formData - Web APIs
ntdefault(); // construct a formdata object, which fires the formdata event new 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); }); specifications specification status comment html living standardthe definition of 'formdata' in that specification.
FullscreenOptions - Web APIs
the fullscreenoptions dictionary is used to provide configuration options when calling requestfullscreen() on an element to place that element into full-screen mode.
GainNode() - Web APIs
WebAPIGainNodeGainNode
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Geolocation - Web APIs
be aware that each browser has its own policies and methods for requesting this permission.
Geolocation API - Web APIs
the user's operating system will prompt the user to allow location access the first time it is requested.
GestureEvent - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
GlobalEventHandlers.onformdata - Web APIs
efault e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data 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); }; specifications specification status comment html living standardthe definition of 'onformdata' in that specification.
GlobalEventHandlers.onload - Web APIs
the onload property of the globaleventhandlers mixin is an eventhandler that processes load events on a window, xmlhttprequest, <img> element, etc.
Gyroscope.Gyroscope() - Web APIs
the actual reading frequency depends device hardware and consequently may be less than requested.
HTMLAnchorElement.referrerPolicy - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLAreaElement.referrerPolicy - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLCanvasElement.captureStream() - Web APIs
if not set, a new frame will be captured each time the canvas changes; if set to 0, frames will not be captured automatically; instead, they will only be captured when the returned track's requestframe() method is called.
HTMLCanvasElement.toBlob() - Web APIs
qualityargument optional a number between 0 and 1 indicating image quality if the requested type is image/jpeg or image/webp.
HTMLElement.hidden - Web APIs
example here's an example where a hidden block is used to contain a thank you message that is displayed after a user agrees to an unusual request.
HTMLElement.offsetParent - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLElement.offsetTop - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLFormElement.submit() - Web APIs
the htmlformelement.requestsubmit() method is identical to activating a form's submit <button> and does not have these differences.
HTMLFormElement: submit event - Web APIs
however, the submitevent which is sent to indicate the form's submit action has been triggered includes a submitter property, which is the button that was invoked to trigger the submit request.
HTMLIFrameElement.csp - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLIFrameElement.src - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLIFrameElement - Web APIs
htmliframeelement.allowpaymentrequest is a boolean indicating whether the payment request api may be invoked inside a cross-origin iframe.
HTMLImageElement.align - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.alt - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.border - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.complete - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.currentSrc - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.decoding - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.height - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.hspace - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.isMap - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.loading - Web APIs
by specifying the value lazy for loading, you prevent the image from delaying the load attribute by the amount of time it takes to request, fetch, and process the image.
HTMLImageElement.longDesc - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.lowSrc - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.name - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.naturalHeight - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.naturalWidth - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.referrerPolicy - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.sizes - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.src - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.srcset - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.vspace - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.width - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.x - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLImageElement.y - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLInputElement.webkitEntries - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLInputElement.webkitdirectory - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLLinkElement.as - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement.controlsList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement.onencrypted - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement.onwaitingforkey - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement: pause event - Web APIs
the pause event is sent when a request to pause an activity is handled and the activity has entered its paused state, most commonly after the media has been paused through a call to the element's pause() method.
HTMLMediaElement.setMediaKeys() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLMediaElement.setSinkId() - Web APIs
exceptions exception explanation domexception no permission to use the requested device examples const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' + audio.sinkid); specifications specification status comment audio ...
HTMLOrForeignElement.nonce - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLSlotElement.assignedElements() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLSlotElement.name - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
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.
Drag Operations - Web APIs
with the dragenter and dragover event, the dropeffect property is initialized to the effect that the user is requesting.
File drag and drop - Web APIs
the full source code is available in mdn's drag-and-drop repository (pull requests and/or issues are welcome).
Headers.get() - Web APIs
WebAPIHeadersget
if the requested header doesn't exist in the headers object, it returns null.
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
if the requested header doesn't exist in the headers object, it returns an empty array.
History.back() - Web APIs
WebAPIHistoryback
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
History.forward() - Web APIs
WebAPIHistoryforward
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
History.scrollRestoration - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.continue() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.continuePrimaryKey() - Web APIs
example here’s how you can resume an iteration of all articles tagged with "javascript" since your last visit: let request = articlestore.index("tag").opencursor(); let count = 0; let unreadlist = []; request.onsuccess = (event) => { let cursor = event.target.result; if (!cursor) { return; } let lastprimarykey = getlastiteratedarticleid(); if (lastprimarykey > cursor.primarykey) { cursor.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid ...
IDBCursor.direction - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.primaryKey - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursorWithValue.value - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBCursorWithValue - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBDatabase.onclose - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
databases - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.multiEntry - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.objectStore - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.includes() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.lowerBound() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.lowerOpen - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.upperBound() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange.upperOpen - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBKeyRange - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStore.index() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBObjectStoreSync - Web APIs
exceptions this method can raise a databaseexception with the following code: not_found_err if no records exist in this index for the requested key range.
IDBTransaction.objectStoreNames - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IDBVersionChangeEvent.version - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IIRFilterNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
IdleDeadline.didTimeout - Web APIs
the read-only didtimeout property on the idledeadline interface is a boolean value which indicates whether or not the idle callback is being invoked because the timeout interval specified when window.requestidlecallback() was called has expired.
ImageCapture.takePhoto() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Browser storage limits and eviction criteria - Web APIs
these are then sorted according to "last access time." the least recently used origins are then deleted until there's enough space to fulfill the request that triggered this origin eviction.
InputEvent.dataTransfer - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
InputEvent.getTargetRanges() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
InstallEvent - Web APIs
resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); specifications specification status comment service workers working draft as of may 2015, the install event is an instance of e...
LargestContentfulPaint - Web APIs
largestcontentfulpaint.url if the element is an image, the request url of the image.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
the actual reading frequency depends on device hardware and consequently may be less than requested.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
syntax var request = instanceoflockedfile.abort(); return a filerequest object to handle the success or failure of the operation.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
syntax var request = instanceoflockedfile.flush(); return a filerequest object to handle the success or failure of the operation.
MIDIAccess - Web APIs
examples navigator.requestmidiaccess() .then(function(access) { // get lists of available midi controllers const inputs = access.inputs.values(); const outputs = access.outputs.values(); access.onstatechange = function(e) { // print information about the (dis)connected midi controller console.log(e.port.name, e.port.manufacturer, e.port.state); }; }); specifications ...
MIDIMessageEvent - Web APIs
examples // printing all messages to console navigator.requestmidiaccess().then(midiaccess => { array.from(midiaccess.inputs).foreach(input => { input[1].onmidimessage = console.log; }) }); specifications specification status comment web midi apithe definition of 'midimessageevent' in that specification.
MSGestureEvent - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Magnetometer.Magnetometer() - Web APIs
the actual reading frequency depends on device hardware and consequently may be less than requested.
MediaDeviceInfo.deviceId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaDeviceInfo.kind - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaDevices.enumerateDevices() - Web APIs
the mediadevices method enumeratedevices() requests a list of the available media input and output devices, such as microphones, cameras, headsets, and so forth.
MediaError.code - Web APIs
WebAPIMediaErrorcode
media error code constants name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
MediaError - Web APIs
mediaerror.code a number which represents the general type of error that occurred, as follows: name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
MediaKeyMessageEvent.messageType - Web APIs
it may be one of license-request, license-renewal, license-release, or individualization-request.
MediaKeyMessageEvent - Web APIs
may be one of license-request, license-renewal, license-release, or individualization-request.
MediaKeySession - Web APIs
mediakeysession.generaterequest() returns a promise after generating a media request based on initialization data.
MediaKeyStatusMap.entries() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.forEach() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.get() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.has() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.keys() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.size - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeyStatusMap.values() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaKeySystemAccess - Web APIs
you can request an instance of this object using the navigator.requestmediakeysystemaccess() method.
MediaMetadata.album - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaMetadata.artist - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaMetadata.artwork - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaMetadata.title - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaMetadata - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaRecorder.audioBitsPerSecond - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaRecorder.ignoreMutedMedia - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaRecorder - Web APIs
mediarecorder.requestdata() requests a blob containing the saved data received thus far (or since the last time requestdata() was called.
MediaRecorderErrorEvent.error - Web APIs
invalidstateerror an operation was attempted in a context in which it isn't allowed, or a request has been made on an object that's deleted or removed.
MediaSession.playbackState - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaSession.setActionHandler() - Web APIs
values each of the actions is a common media session control request.
Media Session action types - Web APIs
values each of the actions is a common media session control request.
MediaSessionActionDetails.fastSeek - Web APIs
the boolean property fastseek in the mediasessionactiondetails dictionary is an optional value which, when specified and true, indicates that the requested seekto operation is part of an ongoing series of seekto operations.
MediaSessionActionDetails - Web APIs
values each of the actions is a common media session control request.
active - Web APIs
example in this example, a new stream whose source is the user's local camera and microphone is requested using getusermedia().
MediaStream.getTracks() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaStream.id - Web APIs
WebAPIMediaStreamid
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
MediaStreamConstraints.audio - Web APIs
yid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ audio: { samplesize: 8, echocancellation: true } }).then(stream => audioelement.srcobject = stream) .catch(err => log(err.name + ": " + err.message)); }, false); here we see an event handler for a click event which calls getusermedia(), specifying a set of audio constraints requesting that echo cancellation be enabled and that, if possible, the sample rate be 8 bits per sample instead of the more common 16 bits (possibly as a bandwidth saving measure).
MediaStream Image Capture API - Web APIs
the example below simply says give me whatever video device is available, though the getusermedia() method allows more specific capabilities to be requested.
Recording a media element - Web APIs
recording.src = url.createobjecturl(recordedblob); downloadbutton.href = recording.src; downloadbutton.download = "recordedvideo.webm"; log("successfully recorded " + recordedblob.size + " bytes of " + recordedblob.type + " media."); }) .catch(log); }, false); when a click event occurs, here's what happens: lines 2-4 navigator.mediadevices.getusermedia() is called to request a new mediastream that has both video and audio tracks.
Using the MediaStream Recording API - Web APIs
gister an event handler to do this using mediarecorder.ondataavailable: let chunks = []; mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } note: the browser will fire dataavailable events as needed, but if you want to intervene you can also include a timeslice when invoking the start() method — for example start(10000) — to control this interval, or call mediarecorder.requestdata() to trigger an event when you need it.
MediaTrackConstraints.aspectRatio - Web APIs
the mediatrackconstraints dictionary's aspectratio property is a constraindouble describing the requested or mandatory constraints placed upon the value of the aspectratio constrainable property.
MediaTrackConstraints.channelCount - Web APIs
the mediatrackconstraints dictionary's channelcount property is a constrainlong describing the requested or mandatory constraints placed upon the value of the channelcount constrainable property.
MediaTrackConstraints.deviceId - Web APIs
the mediatrackconstraints dictionary's deviceid property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the deviceid constrainable property.
MediaTrackConstraints.displaySurface - Web APIs
the mediatrackconstraints dictionary's displaysurface property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the displaysurface constrainable property.
MediaTrackConstraints.frameRate - Web APIs
the mediatrackconstraints dictionary's framerate property is a constraindouble describing the requested or mandatory constraints placed upon the value of the framerate constrainable property.
MediaTrackConstraints.groupId - Web APIs
the mediatrackconstraints dictionary's groupid property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the groupid constrainable property.
MediaTrackConstraints.height - Web APIs
the mediatrackconstraints dictionary's height property is a constrainlong describing the requested or mandatory constraints placed upon the value of the height constrainable property.
MediaTrackConstraints.latency - Web APIs
the mediatrackconstraints dictionary's latency property is a constraindouble describing the requested or mandatory constraints placed upon the value of the latency constrainable property.
MediaTrackConstraints.logicalSurface - Web APIs
the mediatrackconstraints dictionary's logicalsurface property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the logicalsurface constrainable property.
MediaTrackConstraints.sampleRate - Web APIs
the mediatrackconstraints dictionary's samplerate property is a constrainlong describing the requested or mandatory constraints placed upon the value of the samplerate constrainable property.
MediaTrackConstraints.sampleSize - Web APIs
the mediatrackconstraints dictionary's samplesize property is a constrainlong describing the requested or mandatory constraints placed upon the value of the samplesize constrainable property.
MediaTrackControls.volume - Web APIs
the mediatrackconstraints dictionary's volume property is a constraindouble describing the requested or mandatory constraints placed upon the value of the volume constrainable property.
MediaTrackConstraints.width - Web APIs
the mediatrackconstraints dictionary's width property is a constrainlong describing the requested or mandatory constraints placed upon the value of the width constrainable property.
MediaTrackConstraints - Web APIs
a constraints dictionary is passed into applyconstraints() to allow a script to establish a set of exact (required) values or ranges and/or preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling getconstraints().
MediaTrackSettings.deviceId - Web APIs
this id is valid across multiple browsing sessions for the same origin and is guaranteed to be different for all other origins, so you can safely use it to request the same source be used for multiple sessions, for example.
MediaTrackSupportedConstraints.displaySurface - Web APIs
it adds the displaysurface constraint (requesting that only full-screen sharing be allowed) only if it is known to be supported by the browser.
MediaTrackSupportedConstraints.logicalSurface - Web APIs
it adds the logicalsurface constraint (requesting that only logical display surfaces—those which may not be entirely visible onscreen—be included among the options available to the user) only if it is known to be supported by the browser.
Media Session API - Web APIs
mediasessionactiondetails provides information needed in order to perform the action which has been requested, including the type of action to perform and any other information needed, such as seek distances or times.
MerchantValidationEvent() - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent()' in that specification.
MerchantValidationEvent.validationURL - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification.
Metadata.modificationTime - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Metadata.size - Web APIs
WebAPIMetadatasize
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Metadata - Web APIs
WebAPIMetadata
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
msFirstPaint - Web APIs
example the following example shows how to calculate the time that is required to request the document before the document begins to display for the user.
MutationObserver.MutationObserver() - Web APIs
*/ break; } }); } the callback() function is invoked when the observer sees changes matching the configuration of the observation request specified when calling observe() to begin watching the dom.
Navigator.credentials - Web APIs
the credentials property of the navigator interface returns the credentialscontainer interface, which exposes methods to request credentials.
Navigator.doNotTrack - Web APIs
the navigator.donottrack property returns the user's do not track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
Navigator.geolocation - Web APIs
be aware that each browser has its own policies and methods for requesting this permission.
Navigator.locks - Web APIs
WebAPINavigatorlocks
the locks read-only property of the navigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
Navigator.mozIsLocallyAvailable() - Web APIs
note: security exceptions can occur if the requested uri is not from the same origin.
navigator.hardwareConcurrency - Web APIs
this creates a pool of workers we can use to process requests later.
NavigatorLanguage.languages - Web APIs
the accept-language http header in every http request from the user's browser uses the same value for the navigator.languages property except for the extra qvalues (quality values) field (e.g.
Navigator.onLine - Web APIs
the update occurs when the user follows links or when a script requests a remote page.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
NotificationEvent - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
OfflineAudioContext.OfflineAudioContext() - Web APIs
return value a new offlineaudiocontext object whose associated audiobuffer is configured as requested.
OrientationSensor - Web APIs
becuase the permissions uses promises, a good way to request permissions is to use promise.all.
Page Visibility API - Web APIs
these may include: most browsers stop sending requestanimationframe() callbacks to background tabs or hidden <iframe>s in order to improve performance and battery life.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ParentNode.prepend() - Web APIs
exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
ParentNode.replaceChildren() - Web APIs
exceptions hierarchyrequesterror: the constraints of the node tree are violated.
PasswordCredential.additionalData - Web APIs
the data in the objects will be added to the request body and sent to the remote endpoint with the credentials.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
// } specifications specification status comment payment request apithe definition of 'payererrors.email' in that specification.
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
// } specifications specification status comment payment request apithe definition of 'payererrors.name' in that specification.
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
// } specifications specification status comment payment request apithe definition of 'payererrors.phone' in that specification.
PaymentAddress.addressLine - Web APIs
ory 1 suite 441, 4th floor 2 30 great guildford street these, combined with additional values for other properties of the paymentaddress, would represent the full address, which is: mozilla metal box factory suite 441, 4th floor 30 great guildford street london se1 0hs united kingdom specifications specification status comment payment request apithe definition of 'paymentaddress.addressline' in that specification.
PaymentAddress.city - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.city' in that specification.
PaymentAddress.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.dependentlocality' in that specification.
PaymentAddress.organization - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.organization' in that specification.
PaymentAddress.phone - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.phone' in that specification.
PaymentAddress.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.postalcode' in that specification.
PaymentAddress.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.recipient' in that specification.
PaymentAddress.region - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.region' in that specification.
PaymentAddress.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.sortingcode' in that specification.
PaymentCurrencyAmount.currency - Web APIs
let itemprice = { currency: "usd", value: "42.95" }; specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.currency' in that specification.
PaymentCurrencyAmount.value - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.value' in that specification.
PaymentMethodChangeEvent - Web APIs
specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent()' in that specification.
Performance.timeOrigin - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PerformanceLongTaskTiming.attribution - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PerformanceLongTaskTiming - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PerformanceNavigationTiming - Web APIs
performancenavigationtiming.requeststart read only a domhighrestimestamp representing the time immediately before the user agent starts requesting the resource from the server, or from relevant application caches or from local resources.
PerformanceResourceTiming.connectEnd - Web APIs
ource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.connectStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupEnd - Web APIs
ource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.fetchStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.initiatorType - Web APIs
if the initiator is a xmlhttprequest object, the property returns "xmlhttprequest".
PerformanceResourceTiming.redirectEnd - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.redirectStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.responseEnd - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.responseStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.secureConnectionStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.workerStart - Web APIs
ar i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart", "workerstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceServerTiming - Web APIs
example given a server that sends the server-timing header, for example a node.js server like this: const http = require('http'); function requesthandler(request, response) { const headers = { 'server-timing': ` cache;desc="cache read";dur=23.2, db;dur=53, app;dur=47.2 `.replace(/\n/g, '') }; response.writehead(200, headers); response.write(''); return settimeout(_ => { response.end(); }, 1000) }; http.createserver(requesthandler).listen(3000).on('error', console.error); the performanceservertiming ...
PerformanceTiming.connectStart - Web APIs
the legacy performancetiming.connectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the request to open a connection is sent to the network.
PerformanceTiming.fetchStart - Web APIs
the legacy performancetiming.fetchstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the browser is ready to fetch the document using an http request.
PerformanceTiming.secureConnectionStart - Web APIs
if no such connection is requested, it returns 0.
PermissionStatus.state - Web APIs
the state read-only property of the permissionstatus interface returns the state of a requested permission.
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
PhotoCapabilities.fillLightMode - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PhotoCapabilities.imageHeight - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
imageWidth - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PhotoCapabilities.redEyeReduction - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PhotoCapabilities - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PointerEvent.getCoalescedEvents() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Multi-touch interaction - Web APIs
the source code is available on github; pull requests and bug reports are welcome.
Pinch zoom gestures - Web APIs
the source code is available on github; pull requests and bug reports are welcome.
Using Pointer Events - Web APIs
the source code is available on github and pull requests and bug reports are welcome.
ProgressEvent() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'progressevent()' in that specification.
ProgressEvent.lengthComputable - Web APIs
syntax flag = progressevent.lengthcomputable specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
ProgressEvent.loaded - Web APIs
syntax value = progressevent.loaded specifications specification status comment xmlhttprequestthe definition of 'progressevent.loaded' in that specification.
ProgressEvent.total - Web APIs
syntax value = progressevent.total specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
PromiseRejectionEvent.promise - Web APIs
window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification.
PublicKeyCredential - Web APIs
methods publickeycredential.getclientextensionresults()secure context if any extensions were requested, this method will return the results of processing those extensions.
PublicKeyCredentialCreationOptions.rp - Web APIs
the rp property of the publickeycredentialcreationoptions dictionary is an object describing the relying party which requested the credential creation (via navigator.credentials.create()).
PublicKeyCredentialCreationOptions.timeout - Web APIs
note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.timeout.
PushEvent.PushEvent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushEvent.data - Web APIs
WebAPIPushEventdata
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushEvent - Web APIs
WebAPIPushEvent
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushManager.subscribe() - Web APIs
uservisibleonly: true, applicationserverkey: applicationserverkey }; serviceworkerregistration.pushmanager.subscribe(options).then( function(pushsubscription) { console.log(pushsubscription.endpoint); // the push subscription details needed by the application // server are now available, and can be sent to it using, // for example, an xmlhttprequest.
PushManager.supportedContentEncodings - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushMessageData.arrayBuffer() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushMessageData.blob() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushMessageData.json() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushMessageData.text() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushSubscription.expirationTime - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushSubscription.getKey() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushSubscription.options - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PushSubscription.subscriptionId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
RTCConfiguration - Web APIs
constants rtcbundlepolicy enum the rtcbundlepolicy enum defines string constants which are used to request a specific policy for gathering ice candidates if the remote peer isn't "bundle-aware" (compatible with the sdp bundle standard for bundling multiple media streams on a single transport link).
RTCDTMFSender.toneBuffer - Web APIs
in this example, we would send "*" to request access to the vm system, then, after a pause, send a "1" to start playback of voicemail messages, then after a pause, dial "5555" as a pin number to open the messages.
RTCDataChannel: bufferedamountlow event - Web APIs
bubbles no cancelable no interface event event handler property onbufferedamountlow examples this example sets up a handler for bufferedamountlow to request more data any time the data channel's buffer falls below the number of bytes specified by bufferedamountlowthreshold, which we have set to 65536.
RTCDataChannel: error event - Web APIs
ror", ev => { const err = ev.error; console.error("webrtc error: ", err.message); // handle specific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecode < sctpcausecodes.length) { console.error(" sctp failure: ", err.sctpcausecode); } else { console.error(" unknown sctp error"); } break; case "dtls-failure": if (err.receivedalert) { console.error(" received dlts failure alert: ", err.receivedalert); } ...
RTCIceCandidatePairStats.responsesReceived - Web APIs
syntax responsesreceived = rtcicecandidatepairstats.responsesreceived; value an integer value which specifies the number of stun connectivity request responses that have been received on the connection described by this pair of candidates so far.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
this event will occur at least once, and may occur more than once if the ice agent continues to identify candidate pairs that will work better, more closely match the requested parameters, and so forth.
RTCIceTransport.state - Web APIs
"closed" the transport has shut down and is no longer responding to stun requests.
RTCIdentityErrorEvent.loginUrl - Web APIs
syntax var loginurl = event.loginurl; event.loginurl = "https://developer.mozilla.org/fakeurl"; example pc.onidpassertionerror = function( ev ) { alert("the idp requested an authentication" + " to be performed at th3 url '" + ev.url + "'."); } ...
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.
RTCInboundRtpStreamStats - Web APIs
fircount an integer value which indicates the total number of full intra request (fir) packets which this receiver has sent to the sender.
RTCOfferOptions.iceRestart - Web APIs
ction(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.
RTCOfferOptions - Web APIs
icerestart optional a boolean which, when set to true, tells createoffer() to generate and use new values for the identifying properties of the sdp it creates, resulting in a request that triggers renegotiation of the ice connection.
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 rtcrtpsender.
RTCOutboundRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely.
RTCOutboundRtpStreamStats - Web APIs
fircount an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver.
RTCPeerConnection.iceConnectionState - Web APIs
"closed" the ice agent for this rtcpeerconnection has shut down and is no longer handling requests.
RTCPeerConnection.setLocalDescription() - Web APIs
it is passed a single domexception object explaining why the request failed.
RTCPeerConnection.setRemoteDescription() - Web APIs
it is passed a single domexception object explaining why the request failed.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
networkteststart() this function simply calls the rtcpeerconnection method getstats() to request an rtcstatsreport and store it in the variable startreport.
RTCRtpContributingSource.source - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
RTCRtpReceiver.getStats() - Web APIs
the rtcrtpreceiver method getstats() asynchronously requests an rtcstatsreport object which provides statistics about incoming traffic on the owning rtcpeerconnection, returning a promise whose fulfillment handler will be called once the results are available.
RTCRtpReceiver.track - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
RTCRtpSender.replaceTrack() - Web APIs
the new track's kind must be the same as the current track's, or the replace track request will fail.
RTCRtpStreamStats.firCount - Web APIs
the fircount property of the rtcrtpstreamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender.
RTCRtpStreamStats - Web APIs
fircount a count of the total number of full intra request (fir) packets received by the sender.
ReadableByteStreamController - Web APIs
properties readablebytestreamcontroller.byobrequest read only returns the current byob pull request.
ReadableStreamDefaultReader - Web APIs
a fetch request).
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
the actual reading frequency depends device hardware and consequently may be less than requested.
RelativeOrientationSensor - Web APIs
becuase the permissions uses promises, a good way to request permissions is to use promise.all.
Report - Web APIs
WebAPIReport
by sending requests to the endpoints defined via the report-to http header.
Response.redirect() - Web APIs
WebAPIResponseredirect
a controlling service worker could intercept a page's request and redirect it as desired.
Response.useFinalURL - Web APIs
consider a script residing in page index.html: fetch('/test').then((r) => console.log(r.url)) test.html is being controlled by the service worker sw.js: onfetch = (e) => { e.respondwith(fetch('/page2').then((r) => { r.usefinalurl = true; return r; }) } the output will be /page2 and not /test in index.html, since setting the usefinalurl means that the response's url is not set to request's url.
SVGAElement.target - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAElement - Web APIs
svgaelement.ping is a domstring that reflects the ping attribute, containing 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).
SVGAnimatedAngle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedBoolean - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedEnumeration - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedInteger - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedLength - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedLengthList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedNumber - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedNumberList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedPoints - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedPreserveAspectRatio - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedRect - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedString.animVal - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedString.baseVal - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedString - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGAnimatedTransformList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGCircleElement - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGImageElement.decoding - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGLength - Web APIs
WebAPISVGLength
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGLengthList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGNumberList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGPreserveAspectRatio - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGStylable - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGTransform - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGTransformList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SVGTransformable - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation.angle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation.lock() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation.onchange - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation.type - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation.unlock() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScreenOrientation - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Screen Orientation API - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ScriptProcessorNode.bufferSize - Web APIs
button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata 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 f...
ScriptProcessorNode.onaudioprocess - Web APIs
'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata 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 ...
ScriptProcessorNode - Web APIs
button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata 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 f...
Selection.extend() - Web APIs
WebAPISelectionextend
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Selection.removeAllRanges() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Selection.removeRange() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Selection.toString() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Selection API - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Server-sent events - Web APIs
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.
ServiceWorkerContainer.controller - Web APIs
this property returns null if the request is a force refresh (shift + refresh) or if there is no active worker.
ServiceWorkerContainer - Web APIs
this property returns null during a force-refresh request (shift + refresh) or if there is no active worker.
ServiceWorkerRegistration.navigationPreload - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
ServiceWorkerRegistration.pushManager - Web APIs
nction(serviceworkerregistration) { serviceworkerregistration.pushmanager.subscribe().then( function(pushsubscription) { console.log(pushsubscription.subscriptionid); console.log(pushsubscription.endpoint); // the push subscription details needed by the application // server are now available, and can be sent to it using, // for example, an xmlhttprequest.
ServiceWorkerRegistration.showNotification() - Web APIs
examples navigator.serviceworker.register('sw.js'); function shownotification() { notification.requestpermission(function(result) { if (result === 'granted') { navigator.serviceworker.ready.then(function(registration) { registration.shownotification('vibration sample', { body: 'buzz!
ServiceWorkerRegistration - Web APIs
serviceworkerregistration.shownotification() displays the notification with the requested title.
SharedWorkerGlobalScope.applicationCache - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SharedWorkerGlobalScope.onconnect - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Slottable: assignedSlot - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Slottable - Web APIs
WebAPISlottable
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
SourceBuffer.abort() - Web APIs
in this case you would want to manually call abort() on the source buffer to stop the decoding of the current buffer, then fetch and append the newly requested segment that relates to the current new position of the video.
SourceBuffer.appendBufferAsync() - Web APIs
return value a promise which is fulfilled when the buffer has been added successfully to the sourcebuffer, or null if the request could not be initiated.
SourceBuffer - Web APIs
= this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); } function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); } specifications specification status comment media source extensionsthe definition of 'sourcebuffer' in that specification.
SpeechRecognitionError.error - Web APIs
service-not-allowed the user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference.
SpeechRecognitionErrorEvent.error - Web APIs
service-not-allowed the user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference.
SpeechSynthesisUtterance - Web APIs
the speechsynthesisutterance interface of the web speech api represents a speech request.
StereoPannerNode.StereoPannerNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Storage API - Web APIs
data persistence and clearing if the site or app has the "persistent-storage" feature permission, it can use the storagemanager.persist() method to request that its box be made persistent.
Using readable streams - Web APIs
this mixin is implemented by both the request and response interfaces, so it is available on both, although consuming the stream of a response body is perhaps a bit more obvious.
SubtleCrypto.decrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
SubtleCrypto.encrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the signing key is not a key for the request signing algorithm or when trying to use an algorithm that is either unknown or isn't suitable for signing.
SubtleCrypto.unwrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the unwrapping key is not a key for the requested unwrap algorithm or if the cryptokey.usages value of that key doesn't contain unwrap.
SubtleCrypto.verify() - Web APIs
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the encryption key is not a key for the requested verifying algorithm or when trying to use an algorithm that is either unknown or isn't suitable for a verify operation.
SubtleCrypto.wrapKey() - Web APIs
exceptions the promise is rejected when one of the following exceptions is encountered: invalidaccesserror raised when the wrapping key is not a key for the requested wrap algorithm.
SubtleCrypto - Web APIs
subtlecrypto.exportkey() returns a promise that fulfills with a buffer containing the key in the requested format.
TaskAttributionTiming.containerId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
TaskAttributionTiming.containerType - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
TouchList.item() - Web APIs
WebAPITouchListitem
return value touchpoint the requested touch object from the touchlist.
Multi-touch interaction - Web APIs
the source code is available on github and pull requests and bug reports are welcome.
UIEvent.initUIEvent() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLSearchParams.get() - Web APIs
examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age' parameters using: let params = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
URLUtilsReadOnly.hash - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.host - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.hostname - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.href - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.origin - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.pathname - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.port - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.protocol - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.search - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly.toString() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
URLUtilsReadOnly - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
USB - Web APIs
WebAPIUSB
usb.requestdevice() returns a promise that resolves with an instance of usbdevice if the specified device is found.
USBDevice.claimInterface() - Web APIs
the claiminterface() method of the usbdevice interface returns a promise that resolves when the requested interface is claimed for exclusive access.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
let payload = new uint8array([r, g, b]); await usbdevice.controltransferout({ requesttype: 'vendor', recipient: 'device', request: 1, value: 0, index: 0, }, payload); } } specifications specification status comment webusbthe definition of 'opened' in that specification.
USBDevice - Web APIs
WebAPIUSBDevice
methods usbdevice.claiminterface() returns a promise that resolves when the requested interface is claimed for exclusive access.
Using the User Timing API - Web APIs
pull requests, enhancement requests and bug reports are welcome.
WakeLockSentinel.type - Web APIs
const requestwakelock = async () => { wakelock = await navigator.wakelock.request('screen'); console.log(wakelock.type); // logs 'screen' }; requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelocktype' in that specification.
WaveShaperNode.WaveShaperNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
return value depends on which information is requested using the pname parameter.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
return value depends on which information is requested using the pname parameter.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
return value depends on the requested information (as specified with target).
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
return value depends on the requested information (as specified with pname).
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebGLActiveInfo.name - Web APIs
the read-only webglactiveinfo.name property represents the name of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.size - Web APIs
the read-only webglactiveinfo.size property is a number representing the size of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.type - Web APIs
the read-only webglactiveinfo.type property represents the type of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLRenderingContext.drawingBufferHeight - Web APIs
it should match the height attribute of the <canvas> element associated with this context, but might differ if the implementation is not able to provide the requested height.
WebGLRenderingContext.drawingBufferWidth - Web APIs
it should match the width attribute of the <canvas> element associated with this context, but might differ if the implementation is not able to provide the requested width.
WebGLRenderingContext.getBufferParameter() - Web APIs
return value depends on the requested information (as specified with pname).
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
return value depends on the requested information (as specified with pname).
WebGLRenderingContext.getProgramParameter() - Web APIs
return value returns the requested program information (as specified with pname).
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
return value depends on the requested information (as specified with pname).
WebGLRenderingContext.getShaderParameter() - Web APIs
return value returns the requested shader information (as specified with pname).
WebGLRenderingContext.getTexParameter() - Web APIs
return value returns the requested texture information (as specified with pname).
WebGLRenderingContext.getVertexAttrib() - Web APIs
return value returns the requested vertex attribute information (as specified with pname).
Animating textures in WebGL - Web APIs
const texture = inittexture(gl); const video = setupvideo('firefox.mp4'); var then = 0; // draw the scene repeatedly function render(now) { now *= 0.001; // convert to seconds const deltatime = now - then; then = now; if (copyvideo) { updatetexture(gl, texture, video); } drawscene(gl, programinfo, buffers, texture, deltatime); requestanimationframe(render); } requestanimationframe(render); that's all there is to it!
Using WebGL extensions - Web APIs
note: in webgl, unlike in other gl apis, extensions are only available if explicitly requested.
Lifetime of a WebRTC session - Web APIs
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.
A simple RTCDataChannel sample - Web APIs
this is the peer that will send out the connection request.
Using WebRTC data channels - Web APIs
let datachannel = pc.createdatachannel("myapp channel", { negotiated: true }); datachannel.addeventlistener("open", (event) => { begintransmission(datachannel); }); requestremotechannel(datachannel.id); in this code snippet, the channel is created with negotiated set to true, then a function called requestremotechannel() is used to trigger negotiation, to create a remote channel with the same id as the local channel.
Web Animations API Concepts - Web APIs
the internet explorer team requested an animations api to consolidate and normalize animation functionality across all browsers, and thus efforts began in earnest among mozilla firefox and google chrome developers to create the one animation spec to rule them all: the web animations api.
Web Audio API best practices - Web APIs
you have to request the file and wait for it to load (this section of our advanced article shows a good way to do it), but then you have access to the data directly, which means more precision, and more precise manipulation.
Web audio spatialization basics - Web APIs
alue; panner.orientationx.value = x; panner.orientationy.value = y; panner.orientationz.value = z; break; } boombox.style.transform = 'translatex('+transform.xaxis+'px) translatey('+transform.yaxis+'px) scale('+transform.zaxis+') rotatey('+transform.rotatey+'deg) rotatex('+transform.rotatex+'deg)'; const move = prevmove || {}; move.frameid = requestanimationframe(() => moveboombox(direction, move)); return move; } wiring up our controls wiring up out control buttons is comparatively simple — now we can listen for a mouse event on our controls and run this function, as well as stop it when the mouse is released: // for each of our controls, move the boombox and change the position values movecontrols.foreach(function(el) { let ...
Web Speech API - Web APIs
speechsynthesisutterance represents a speech request.
Window.customElements - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.devicePixelRatio - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.event - Web APIs
WebAPIWindowevent
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.focus() - Web APIs
WebAPIWindowfocus
makes a request to bring the window to the front.
Window.localStorage - Web APIs
exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example).
Window.minimize() - Web APIs
WebAPIWindowminimize
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.print() - Web APIs
WebAPIWindowprint
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.prompt() - Web APIs
WebAPIWindowprompt
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.releaseEvents() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.restore() - Web APIs
WebAPIWindowrestore
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.routeEvent() - Web APIs
WebAPIWindowrouteEvent
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.scroll() - Web APIs
WebAPIWindowscroll
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.sessionStorage - Web APIs
exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example).
Window.setCursor() - Web APIs
WebAPIWindowsetCursor
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.showModalDialog() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.stop() - Web APIs
WebAPIWindowstop
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Window.updateCommands() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WindowOrWorkerGlobalScope.caches - Web APIs
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
example the following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired: var db; function opendb() { var dbopenrequest = window.indexeddb.open('todolist'); dbopenrequest.onsuccess = function(e) { db = dbopenrequest.result; } } specifications specification status comment indexed database api draftthe definition of 'indexeddb' in that specification.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
firing is deferred until the mainthread is deemed idle (similar to window.requestidlecallback()), or until the load event is fired.
WindowOrWorkerGlobalScope - Web APIs
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
Worker - Web APIs
WebAPIWorker
workers may use xmlhttprequest for network communication, but its responsexml and channel attributes are always null.
WorkerGlobalScope - Web APIs
this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
WorkerNavigator.locks - Web APIs
the locks read-only property of the workernavigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
WorkerNavigator - Web APIs
workernavigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
WritableStream - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WritableStreamDefaultWriter.ready - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
XMLDocument.async - Web APIs
WebAPIXMLDocumentasync
document.async can be set to indicate whether a xmldocument.load() call should be an asynchronous or synchronous request.
XMLDocument - Web APIs
-width="2px" /><text x="441" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} property also inherits properties from: document xmldocument.async used with xmldocument.load() to indicate an asynchronous request.
XMLSerializer.serializeToString() - Web APIs
syntaxerror a serialization of html was requested but could not succeed due to the content not being well-formed.
XPathEvaluator.evaluate() - Web APIs
not_supported_err if the provided context node is not a type permitted as an xpath context node or the request type is not permitted by the xpathevaluator, a domexception of type not_supported_err is raised.
XPathExpression.evaluate() - Web APIs
not_supported_err if the provided context node is not a type permitted as an xpath context node or the request type is not permitted by the xpathevaluator, a domexception of type not_supported_err is raised.
XRFrame - Web APIs
WebAPIXRFrame
a webxr device api xrframe object is passed into the requestanimationframe() callback function and provides access to the information needed in order to render a single frame of animation for an xrsession describing a vr or ar sccene.
XRInputSource.targetRaySpace - Web APIs
this shared space represents the same location as the space returned by the xrsession method requestreferencespace(), but is maintained as a different object to allow for future enhancements to the api.
XRPermissionDescriptor.optionalFeatures - Web APIs
the reference space returned by xrsession.requestreferencespace() is either xrreferencespace or xrboundedreferencespace.
XRPermissionDescriptor.requiredFeatures - Web APIs
this ensures that permissions are checked as applicable to ensure that those features are available upon request.
XRReferenceSpace: reset event - Web APIs
most common among them are the following: the user has manually reset the coordinate system, such as by requesting that the headset recalibrate itself to ensure that the facing direction and hand controllers are synchronized with the user's actual position and facing.
XRRigidTransform.matrix - Web APIs
thus, for an array [a0, a1, a2, ..., a13, a14, a15], the matrix looks like this: [a[0]a[4]a[8]a[12]a[1]a[5]a[9]a[13]a[2]a[6]a[10]a[14]a[3]a[7]a[11]a[15]]\begin{bmatrix} a[0] & a[4] & a[8] & a[12]\\ a[1] & a[5] & a[9] & a[13]\\ a[2] & a[6] & a[10] & a[14]\\ a[3] & a[7] & a[11] & a[15]\\ \end{bmatrix} the first time matrix is requested, it gets computed; after that, it's should be cached to avoid slowing down to compute it every time you need it.
XRSession.onvisibilitychange - Web APIs
note: the visibility state of xr session affects the frame loop so callbacks registered via xrsession.requestanimationframe() might not be called.
XRSession: visibilitychange event - Web APIs
examples this example demonstrates how to listen for a visibilitychange event on a webxr session, using addeventlistener() to begin listening for the event: navigator.xr.requestsession("inline").then((xrsession) => { xrsession.addeventlistener("visibilitychange", e => { switch(e.session.visiblitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); }); when a visibility state change occurs, the event is received and dispatched to ...
XRSessionMode - Web APIs
usage notes the xrsessionmode type indicates the values that can be specified when calling xr.issessionsupported() to determine whether or not the specified session type is supported and available to be used, and by requestsession() to attempt to open a new webxr session.
XRWebGLLayer.framebuffer - Web APIs
opaque framebuffers are considered incomplete and are not available for rendering other than while executing the requestanimationframe() callback.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
examples in this example, we request a frame buffer at the device's native resolution, regardless of any performance concerns: function requestnativescalewebgllayer(gl, xrsession) { return gl.makexrcompatible().then(() => { let scalefactor = xrwebgllayer.getnativeframebufferscalefactor(xrsession); let gllayer = new xrwebgllayer(xrsession, gl, { framebufferscalefactor: scalefactor }); xrsession.
XRWebGLLayer.getViewport() - Web APIs
example this example demonstrates in part what the callback for the requestanimationframe() function might look like, using getviewport() to get the viewport so that drawing can be constrained to the area set aside for the eye whose viewpoint is currently being rendered.
XRWebGLLayer - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); rendering every view in a frame each time the gpu is ready to render the scene to the xr device, the xr runtime calls the function you specified when you called the xrsession method requestanimationframe() to ask to render the frame.
XRWebGLLayerInit.alpha - Web APIs
syntax let layerinit = { alpha: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { alpha: boolvalue }); value a boolean which can be set to true to request that the new webgl layer for rendering the webxr scene is to have an alpha channel.
XRWebGLLayerInit.depth - Web APIs
when using the xrwebgllayer() constructor to create a new webgl rendering layer for webxr, providing as the layerinit parameter an object whose depth property is false will request that the new layer be created without a depth buffer.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
this property differs from depth in that depth requests a webgl layer that does not have a depth buffer at all, while ignoredepthvalues merely asks that the depth layer be ignored.
XRWebGLLayerInit.stencil - Web APIs
when using the xrwebgllayer() constructor to create a new webgl rendering layer for webxr, providing as the layerinit parameter an object whose stencil property is false requests that the new layer be created without a stencil buffer.
msCaching - Web APIs
WebAPImsCaching
the mscaching read/write property specifies whether stream data downloaded using xmlhttprequestis cached to disk or not.
Using the progressbar role - Accessibility
a progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action.
ARIA Test Cases - Accessibility
for example, what about reading the line number if the user requests that info?
ARIA: form role - Accessibility
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.
Accessibility: What users can do to browse more safely - Accessibility
chrome 74 and above (desktop) chrome 74 added support for reduced-motion-query, it has even added support to detect whether the user has requested a reduced motion experience.
Understandable - Accessibility
3.2.5 change on request (aaa) changes in context that could possibly confuse or disorient users should only occur only when requested by the user, or the user should be able to turn them off.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:checked - CSS: Cascading Style Sheets
WebCSS:checked
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:has() - CSS: Cascading Style Sheets
WebCSS:has
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:host-context() - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:host - CSS: Cascading Style Sheets
WebCSS:host
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:link - CSS: Cascading Style Sheets
WebCSS:link
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:read-only - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:read-write - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
:where() - CSS: Cascading Style Sheets
WebCSS:where
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
@font-feature-values - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
prefers-color-scheme - CSS: Cascading Style Sheets
(any other value causes firefox to return light.) the prefers-color-scheme css media feature is used to detect if the user has requested the system use a light or dark color theme.
prefers-contrast - CSS: Cascading Style Sheets
the prefers-contrast css media feature is used to detect if the user has requested that the web content is presented with a higher (or lower) contrast.
prefers-reduced-data - CSS: Cascading Style Sheets
the prefers-reduced-data css media feature is used to detect if the user has requested the web content that consumes less internet traffic.
prefers-reduced-transparency - CSS: Cascading Style Sheets
the prefers-reduced-transparency css media feature is used to detect if the user has requested that the system minimize the amount of transparency used across elements.
@supports - CSS: Cascading Style Sheets
WebCSS@supports
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
max-zoom - CSS: Cascading Style Sheets
the browser will not zoom in any further than this, whether automatically or at the user's request.
min-zoom - CSS: Cascading Style Sheets
the browser will not zoom out any further than this, whether automatically or at the user's request.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
if a content distribution method such as space-between, space-around or space-evenly is requested then the fallback alignment will be used, as the content is treated as a single alignment subject.
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the browser will then assign the correct amount of space to each column box to create the requested number of columns.
Variable fonts guide - CSS: Cascading Style Sheets
this results in more http requests, and more data being downloaded (usually around 20k or more per file).
CSS Images - CSS: Cascading Style Sheets
implementing image sprites in css describes the common technique grouping several images in one single document to save download requests and speed up the availability of a page.
CSS Overflow - CSS: Cascading Style Sheets
if 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 Scrollbars - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Using CSS transforms - CSS: Cascading Style Sheets
it is a space-separated list of transforms, which are applied one after the other, as requested by the composition operation.
Using media queries - CSS: Cascading Style Sheets
prefers-contrast detects if the user has requested the system increase or decrease the amount of contrast between adjacent colors added in media queries level 5.
align-content - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
align-items - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
align-self - CSS: Cascading Style Sheets
if 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 - CSS: Cascading Style Sheets
WebCSSall
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-duration - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-fill-mode - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-iteration-count - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-name - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-play-state - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation-timing-function - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
animation - CSS: Cascading Style Sheets
WebCSSanimation
if 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 (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
aspect-ratio - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
backface-visibility - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-attachment - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-blend-mode - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-clip - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-image - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-origin - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background-repeat - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
background - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<basic-shape> - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
block-size - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-end-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-end-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-end-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-start-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-start-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-start-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-block-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-bottom-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-bottom-left-radius - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-bottom-right-radius - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-bottom-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-bottom - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-collapse - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image-outset - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image-repeat - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image-slice - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image-source - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-image - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-end-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-end-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-end-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-start-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-start-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-start-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-inline-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-left-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-left-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-radius - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-right-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-right-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-spacing - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-top-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-top-left-radius - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-top-right-radius - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-top-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-top-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
border-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
bottom - CSS: Cascading Style Sheets
WebCSSbottom
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
box-decoration-break - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
box-direction - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
box-shadow - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
box-sizing - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
break-after - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
break-before - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
break-inside - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
calc() - CSS: Cascading Style Sheets
WebCSScalc
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
caret-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
color-adjust - CSS: Cascading Style Sheets
the appearance of the content should not be changed except by the user's request.
color - CSS: Cascading Style Sheets
WebCSScolor
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-fill - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-rule-color - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-rule-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-rule-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-rule - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
column-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
columns - CSS: Cascading Style Sheets
WebCSScolumns
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
conic-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
counter-increment - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
counter-reset - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
element() - CSS: Cascading Style Sheets
WebCSSelement
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
blur() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
brightness() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
contrast() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
drop-shadow() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grayscale() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
hue-rotate() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
invert() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
opacity() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
saturate() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
sepia() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
filter - CSS: Cascading Style Sheets
WebCSSfilter
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
fit-content() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-basis - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-direction - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-shrink - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
flex - CSS: Cascading Style Sheets
WebCSSflex
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
float - CSS: Cascading Style Sheets
WebCSSfloat
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-family - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-feature-settings - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-kerning - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-optical-sizing - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-size-adjust - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-synthesis - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-variant-ligatures - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-variant-numeric - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-variant-position - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-variation-settings - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font-weight - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
font - CSS: Cascading Style Sheets
WebCSSfont
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-auto-columns - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-auto-flow - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-auto-rows - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-column-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-column-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-column - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-row-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-row-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-template-areas - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-template-columns - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-template-rows - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid-template - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
grid - CSS: Cascading Style Sheets
WebCSSgrid
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
height - CSS: Cascading Style Sheets
WebCSSheight
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
initial - CSS: Cascading Style Sheets
WebCSSinitial
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
inline-size - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
isolation - CSS: Cascading Style Sheets
WebCSSisolation
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
justify-content - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
justify-items - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
justify-self - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
left - CSS: Cascading Style Sheets
WebCSSleft
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
line-height - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
linear-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
list-style-image - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
list-style-position - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
list-style-type - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
list-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-block-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-block-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-bottom - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-inline-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-inline-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-left - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-right - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin-top - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
margin - CSS: Cascading Style Sheets
WebCSSmargin
if 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-block-size - CSS: Cascading Style Sheets
if 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-inline-size - CSS: Cascading Style Sheets
if 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() - CSS: Cascading Style Sheets
WebCSSmax
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
min-block-size - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
min-height - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
min-inline-size - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
min() - CSS: Cascading Style Sheets
WebCSSmin
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
order - CSS: Cascading Style Sheets
WebCSSorder
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
orphans - CSS: Cascading Style Sheets
WebCSSorphans
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
outline-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
outline-width - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
outline - CSS: Cascading Style Sheets
WebCSSoutline
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
overflow-wrap - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
overflow-x - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
overflow-y - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-block-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-block-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-bottom - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-inline-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-inline-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-left - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-right - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding-top - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
padding - CSS: Cascading Style Sheets
WebCSSpadding
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
page-break-after - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
page-break-before - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
paint() - CSS: Cascading Style Sheets
WebCSSpaint
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
perspective-origin - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
perspective - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
place-content - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
place-items - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
place-self - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
radial-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
repeating-conic-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
repeating-linear-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
repeating-radial-gradient() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
resize - CSS: Cascading Style Sheets
WebCSSresize
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ruby-position - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
scroll-behavior - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-block-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-block-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-block - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-bottom - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-inline-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-inline-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-left - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-right - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin-top - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-margin - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-block-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-block-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-block - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-bottom - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-inline-end - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-inline-start - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-inline - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-left - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-right - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding-top - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-padding - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scroll-snap-type - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
shape-image-threshold - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
shape-margin - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
shape-outside - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<shape> - CSS: Cascading Style Sheets
WebCSSshape
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
table-layout - CSS: Cascading Style Sheets
if 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-align-last - CSS: Cascading Style Sheets
if 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-align - CSS: Cascading Style Sheets
if 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-decoration-color - CSS: Cascading Style Sheets
if 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-decoration-line - CSS: Cascading Style Sheets
if 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-decoration-skip-ink - CSS: Cascading Style Sheets
if 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-decoration-style - CSS: Cascading Style Sheets
if 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-decoration - CSS: Cascading Style Sheets
if 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-emphasis - CSS: Cascading Style Sheets
if 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-indent - CSS: Cascading Style Sheets
if 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-orientation - CSS: Cascading Style Sheets
if 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-overflow - CSS: Cascading Style Sheets
if 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-shadow - CSS: Cascading Style Sheets
if 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-transform - CSS: Cascading Style Sheets
if 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-underline-position - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
top - CSS: Cascading Style Sheets
WebCSStop
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
perspective() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
rotate3d() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
rotateX() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
rotateY() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
rotateZ() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scale3d() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
scaleZ() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
skew() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
skewX() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
skewY() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
translate3d() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
translateZ() - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transform-origin - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transform-style - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transform - CSS: Cascading Style Sheets
WebCSStransform
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transition-delay - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transition-duration - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transition-property - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transition-timing-function - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
transition - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
var() - CSS: Cascading Style Sheets
WebCSSvar
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
vertical-align - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
visibility - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
white-space - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
width - CSS: Cascading Style Sheets
WebCSSwidth
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
word-break - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
word-spacing - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
writing-mode - CSS: Cascading Style Sheets
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Guide to Web APIs - Developer guides
WebGuideAPI
ensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrt...
Setting up adaptive streaming media sources - Developer guides
other reasons to use live profile over ondemand for vod content may be: your client or server does not support range requests your server cannot cache range requests efficiently your server cannot prefetch range requests efficiently the sidx* is large and having to load it first slows down startup a little you want to use the original files for both dash and other forms of delivery (such as microsoft smooth streaming) as a transition strategy you can use the same media files for both live transmission and vod at a...
Audio and video manipulation - Developer guides
for efficiency, you should consider using requestanimationframe() instead of settimeout() when running on browsers that support it.
Media events - Developer guides
waiting sent when the requested operation (such as playback) is delayed pending the completion of another operation (such as a seek).
Event developer guide - Developer guides
WebGuideEvents
the network requests made by a web page might trigger some events.
Rich-Text Editing in Mozilla - Developer guides
the function executed the requested command using execcommand() and then sets focus back to the editable document, as clicking on a button will set focus on the button itself, which breaks the editing flow.
Constraint validation - Developer guides
even though far fewer invalid form requests are to be expected, invalid ones can still be sent by non-compliant browsers (for instance, browsers without html5 and without javascript) or by bad people trying to trick your web application.
Printing - Developer guides
<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.
Developer guides
using formdata objects the formdata object lets you compile a set of key/value pairs to send using xmlhttprequest.
HTML attribute: capture - HTML: Hypertext Markup Language
environment the outward-facing camera and/or microphone should be used note: capture was previously a boolean attribute which, if present, requested that the device's media capture device(s) such as camera or microphone be used instead of requesting a file input.
HTML attribute reference - HTML: Hypertext Markup Language
crossorigin <audio>, <img>, <link>, <script>, <video> how the element handles cross-origin requests csp <iframe> specifies the content security policy that an embedded document must agree to enforce upon itself.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
this tells the browser to request cross-origin access when trying to download the image data.
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
dash works via http, so as long as your http server supports byte range requests, and it's set up to serve .mpd files with mimetype="application/dash+xml", then you're all set.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
<a href="#some-id"> — are resolved with the <base>, triggering an http request to the base url with the fragment attached.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
onbeforeprint function to call when the user requests printing of the document.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
if 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> - HTML: Hypertext Markup Language
WebHTMLElementcol
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
if 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>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementelement
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
if 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 type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
if 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 type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
if 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 type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
if 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 type="datetime-local"> - HTML: Hypertext Markup Language
if 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 type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
if 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 type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
if 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 type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
if 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 type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
if 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 type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
if 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 type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
if 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 type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
if 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 type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
if 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 type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
if 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>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
if 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>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
it is expected that the <keygen> element will be used in an html form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
it is expected that the <keygen> element will be used in an html form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.
accesskey - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
class - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
contenteditable - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
data-* - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
dir - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
hidden - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
id - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
lang - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
spellcheck - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
style - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
tabindex - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
title - HTML: Hypertext Markup Language
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Link types - HTML: Hypertext Markup Language
<link> <a>, <area>, <form> prefetch suggests that the browser fetch the linked resource in advance, as it is likely to be requested by the user.
Basics of HTTP - HTTP
http messages http messages transmitted during requests or responses have a very clear structure.
Reason: missing token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel - HTTP
the access-control-allow-headers header is sent by the server to let the client know which headers it supports for cors requests.
Compression in HTTP - HTTP
to do this, http uses a mechanism similar 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.
Using Feature Policy - HTTP
these features include: layout-inducing animations unoptimized (poorly compressed) images oversized images synchronous scripts synchronous xmlhttprequest unsized media to avoid breaking existing web content, the default for such policy-controlled features is to allow the functionality to be used by all origins.
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
syntax alt-svc: clear alt-svc: <protocol-id>=<alt-authority>; ma=<max-age> alt-svc: <protocol-id>=<alt-authority>; ma=<max-age>; persist=1 clear the special value ''clear" indicates that the origin requests all alternatives for that origin to be invalidated.
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
Content-Disposition - HTTP
the content-disposition header is defined in the larger context of mime messages for e-mail, but only a subset of the possible parameters apply to http forms and post requests.
Content-Encoding - HTTP
examples compressing with gzip on the client side, you can advertise a list of compression schemes that will be sent along in an http request.
Content-Language - HTTP
header type entity header forbidden header name no cors-safelisted response header yes cors-safelisted request header yes, with the additional restriction that values can only be 0-9, a-z, a-z, space or *,-.;=.
CSP: child-src - HTTP
for workers, non-compliant requests are treated as fatal network errors by the user agent.
CSP: report-uri - HTTP
these violation reports consist of json documents sent via an http post request to the specified uri.
Expect-CT - HTTP
ct requirements can be satisfied via any one of the following mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the browser check that any certificate for that site appears in public ct logs.
Feature-Policy: autoplay - HTTP
the http feature-policy header autoplay directive controls whether the current document is allowed to autoplay media requested through the htmlmediaelement interface.
Feature-Policy: encrypted-media - HTTP
when this policy is enabled, the promise returned by navigator.requestmediakeysystemaccess() will reject with a domexception.
Feature-Policy: midi - HTTP
when this policy is enabled, the promise returned by navigator.requestmidiaccess() will reject with a domexception.
Feature-Policy: xr-spatial-tracking - HTTP
this policy controls whether navigator.xr.requestsession() can return xrsession that requires spatial tracking and whether user agent can indicate support for sessions supporting spatial tracking via navigator.xr.issessionsupported() and devicechange event on navigator.xr object.
NEL - HTTP
WebHTTPHeadersNEL
the http nel response header is used to configure network request logging.
Proxy-Authenticate - HTTP
it authenticates the request to the proxy server, allowing it to transmit the request further.
Sec-WebSocket-Accept - HTTP
header type response header forbidden header name no syntax sec-websocket-accept: <hashed key> directives <hashed key> the server takes the value of the sec-websocket-key sent in the handshake request, appends 258eafa5-e914-47da-95ca-c5ab0dc85b11, takes sha-1 of the new value, and is then base64 encoded.
Server-Timing - HTTP
the server-timing header communicates one or more metrics and descriptions for a given request-response cycle.
SourceMap - HTTP
header type response header forbidden header name no syntax sourcemap: <url> x-sourcemap: <url> (deprecated) directives <url> a relative (to the request url) or absolute url pointing to a source map file.
Firefox user agent string reference - HTTP
the recommended way to do this, if it's absolutely necessary (remember that it slows down every request) is to set a custom http header.
Proxy Auto-Configuration (PAC) file - HTTP
a proxy auto-configuration (pac) file is a javascript function that determines whether web browser requests (http, https, and ftp) go directly to the destination or are forwarded to a web proxy server.
101 Switching Protocols - HTTP
WebHTTPStatus101
the http 101 switching protocols response code indicates the protocol the server is switching to as requested by a client which sent the message including the upgrade request header.
103 Early Hints - HTTP
WebHTTPStatus103
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
203 Non-Authoritative Information - HTTP
WebHTTPStatus203
the http 203 non-authoritative information response status indicates that the request was successful but the enclosed payload has been modified by a transforming proxy from that of the origin server's 200 (ok) response .
300 Multiple Choices - HTTP
WebHTTPStatus300
the http 300 multiple choices redirect status response code indicates that the request has more than one possible responses.
302 Found - HTTP
WebHTTPStatus302
the hypertext transfer protocol (http) 302 found redirect status response code indicates that the resource requested has been temporarily moved to the url given by the location header.
401 Unauthorized - HTTP
WebHTTPStatus401
the http 401 unauthorized client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
403 Forbidden - HTTP
WebHTTPStatus403
the http 403 forbidden client error status response code indicates that the server understood the request but refuses to authorize it.
404 Not Found - HTTP
WebHTTPStatus404
the http 404 not found client error response code indicates that the server can't find the requested resource.
405 Method Not Allowed - HTTP
WebHTTPStatus405
the hypertext transfer protocol (http) 405 method not allowed response status code indicates that the request method is known by the server but is not supported by the target resource.
406 Not Acceptable - HTTP
WebHTTPStatus406
the hypertext transfer protocol (http) 406 not acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
407 Proxy Authentication Required - HTTP
WebHTTPStatus407
the http 407 proxy authentication required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the browser and the server that can access the requested resource.
411 Length Required - HTTP
WebHTTPStatus411
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.
413 Payload Too Large - HTTP
WebHTTPStatus413
the http 413 payload too large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a retry-after header field.
417 Expectation Failed - HTTP
WebHTTPStatus417
the http 417 expectation failed client error response code indicates that the expectation given in the request's expect header could not be met.
425 Too Early - HTTP
WebHTTPStatus425
the hypertext transfer protocol (http) 425 too early response status code indicates that the server is unwilling to risk processing a request that might be replayed, which creates the potential for a replay attack.
426 Upgrade Required - HTTP
WebHTTPStatus426
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.
428 Precondition Required - HTTP
WebHTTPStatus428
the http 428 precondition required response status code indicates that the server requires the request to be conditional.
503 Service Unavailable - HTTP
WebHTTPStatus503
the hypertext transfer protocol (http) 503 service unavailable server error response code indicates that the server is not ready to handle the request.
504 Gateway Timeout - HTTP
WebHTTPStatus504
the hypertext transfer protocol (http) 504 gateway timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
505 HTTP Version Not Supported - HTTP
WebHTTPStatus505
the hypertext transfer protocol (http) 505 http version not supported response status code indicates that the http version used in the request is not supported by the server.
507 Insufficient Storage - HTTP
WebHTTPStatus507
it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request.
508 Loop Detected - HTTP
WebHTTPStatus508
it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity".
About JavaScript - JavaScript
a javascript web server would expose host objects representing a http request and response objects, which could then be manipulated by a javascript program to dynamically generate web pages.
JavaScript data types and data structures - JavaScript
strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using responsetext, etc.) and it can be tempting to only work with strings.
Grammar and types - JavaScript
// basic literal string creation `in javascript '\n' is a line-feed.` // multiline strings `in javascript, template strings can run over multiple lines, but double and single quoted strings cannot.` // string interpolation var name = 'bob', time = 'today'; `hello ${name}, how are you ${time}?` // construct an http request prefix used to interpret the replacements and construction post`http://foo.org/bar?a=${a}&b=${b} content-type: application/json x-credentials: ${credentials} { "foo": ${foo}, "bar": ${bar}}`(myonreadystatechangehandler); you should use string literals unless you specifically need to use a string object.
Introduction - JavaScript
and, likewise, node.js javascript on the server can respond to custom requests from code written in the browser.
JavaScript technologies overview - JavaScript
xmlhttprequest makes it possible to send asynchronous http requests.
constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
extends - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
static - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Default parameters - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Method definitions - JavaScript
if 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 arguments object - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
getter - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Rest parameters - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
setter - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.reduce() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.reduceRight() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.concat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.copyWithin() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.entries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.every() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.fill() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.filter() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.find() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.findIndex() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.flat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.flatMap() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.forEach() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.from() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.includes() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.indexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.join() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.keys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.lastIndexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.length - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.map() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.pop() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.push() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.reverse() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.shift() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.slice() - JavaScript
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.
Array.prototype.some() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.sort() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Array.prototype.splice() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ArrayBuffer() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ArrayBuffer.prototype.byteLength - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ArrayBuffer.isView() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
ArrayBuffer.prototype.slice() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.add() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.and() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.compareExchange() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.exchange() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.isLockFree() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.load() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.or() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.store() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.sub() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Atomics.xor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
BigInt.asIntN() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
BigInt.asUintN() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
BigInt.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
BigInt.prototype.valueOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Boolean() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Boolean.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Boolean.prototype.valueOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.buffer - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.byteLength - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.byteOffset - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getBigInt64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getBigUint64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getFloat32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getFloat64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getInt16() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getInt32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getInt8() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getUint16() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getUint32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.getUint8() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setBigInt64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setBigUint64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setFloat32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setFloat64() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setInt16() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setInt32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setInt8() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setUint16() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setUint32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
DataView.prototype.setUint8() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.UTC() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getDate() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getDay() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getFullYear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getHours() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getMilliseconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getMonth() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getSeconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getTime() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getTimezoneOffset() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getUTCDay() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getUTCFullYear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getUTCHours() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.getUTCMonth() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.parse() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setDate() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setFullYear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setHours() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setMilliseconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setMinutes() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setSeconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setTime() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCDate() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCFullYear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCHours() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCMilliseconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCMinutes() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCMonth() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.setUTCSeconds() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toDateString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toISOString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toJSON() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toTimeString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Date.prototype.toUTCString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.prototype.apply() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.prototype.bind() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.prototype.call() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.length - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.name - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Infinity - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Collator() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Collator.prototype.compare() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Collator.supportedLocalesOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Collator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DateTimeFormat.prototype.format() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DisplayNames() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DisplayNames.prototype.of() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.DisplayNames.prototype.resolvedOptions() - JavaScript
if any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
Intl.DisplayNames - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.ListFormat() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl​.List​Format​.prototype​.resolvedOptions() - JavaScript
if any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
Intl.ListFormat - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Locale.prototype.maximize() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Locale.prototype.minimize() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.Locale.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.NumberFormat() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.NumberFormat.prototype.format() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
if any unicode extension values were requested in the input bcp 47 language tag that led to this locale, the key-value pairs that were requested and are supported for this locale are included in locale.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.RelativeTimeFormat - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Intl.getCanonicalLocales() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
JSON.parse() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
JSON.stringify() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype[@@iterator]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype[@@toStringTag] - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.clear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.delete() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.entries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.forEach() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.get() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.keys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.set() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.size - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Map.prototype.values() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.E - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.LN10 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.LN2 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.LOG10E - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.LOG2E - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.PI - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.SQRT1_2 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.SQRT2 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.abs() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.acos() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.acosh() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.asin() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.asinh() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.atan() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.atan2() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.atanh() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.cbrt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.ceil() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.clz32() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.cos() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.cosh() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.exp() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.expm1() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.floor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.fround() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.hypot() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.imul() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.log() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.log10() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.log1p() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.log2() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.max() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.min() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.pow() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.round() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.sign() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.sin() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.sinh() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.sqrt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.tan() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Math.trunc() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
NaN - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.EPSILON - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.MAX_SAFE_INTEGER - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.MAX_VALUE - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.MIN_SAFE_INTEGER - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.MIN_VALUE - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.NEGATIVE_INFINITY - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.POSITIVE_INFINITY - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.isFinite() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.isInteger() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.isNaN() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.isSafeInteger() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.parseFloat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.parseInt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.prototype.toFixed() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Number.prototype.valueOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.assign() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.create() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.defineProperties() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.defineProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.entries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.freeze() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.fromEntries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.getOwnPropertyDescriptor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.getOwnPropertySymbols() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.getPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.hasOwnProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.isExtensible() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.isFrozen() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.isPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.isSealed() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.keys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.preventExtensions() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.propertyIsEnumerable() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.seal() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.toLocaleString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.prototype.valueOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object.values() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Promise.all() - JavaScript
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.
Promise.prototype.catch() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Promise.prototype.finally() - JavaScript
examples using finally let isloading = true; fetch(myrequest).then(function(response) { var contenttype = response.headers.get("content-type"); if(contenttype && contenttype.includes("application/json")) { return response.json(); } throw new typeerror("oops, we haven't got json!"); }) .then(function(json) { /* process your json further */ }) .catch(function(error) { console.error(error); /* this line can also throw, e.g.
Promise.race() - JavaScript
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.
Promise.reject() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Promise.prototype.then() - JavaScript
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.
Promise - JavaScript
loading an image with xhr another simple example using promise and xmlhttprequest to load an image is available at the mdn github js-examples repository.
handler.apply() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.construct() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.defineProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.deleteProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.get() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.getOwnPropertyDescriptor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.getPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.isExtensible() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.ownKeys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.preventExtensions() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.set() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
handler.setPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.apply() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.construct() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.defineProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.deleteProperty() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.get() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.getOwnPropertyDescriptor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.getPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.isExtensible() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.ownKeys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.preventExtensions() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.set() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Reflect.setPrototypeOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype[@@match]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype[@@matchAll]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype[@@replace]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype[@@search]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
get RegExp[@@species] - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype[@@split]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.exec() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.flags - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.global - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.ignoreCase - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.multiline - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.source - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.sticky - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.test() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
RegExp.prototype.unicode - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype[@@iterator]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.add() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.clear() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.delete() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.entries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.forEach() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.size - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Set.prototype.values() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
SharedArrayBuffer() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
SharedArrayBuffer.prototype.byteLength - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
SharedArrayBuffer.prototype.slice() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype[@@iterator]() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.charAt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.charCodeAt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.codePointAt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.concat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.endsWith() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.fromCharCode() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.fromCodePoint() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.includes() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.indexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.lastIndexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.localeCompare() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.match() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.matchAll() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.normalize() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.padEnd() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.padStart() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.repeat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.replace() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.replaceAll() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.search() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.slice() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.split() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.startsWith() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.substr() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.substring() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.toLocaleLowerCase() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.toLocaleUpperCase() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.toLowerCase() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.toUpperCase() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.trim() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.trimEnd() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
String.prototype.trimStart() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol() constructor - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.asyncIterator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.prototype.description - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.for() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.hasInstance - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.isConcatSpreadable - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.iterator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.keyFor() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.match - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.matchAll - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.replace - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.search - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.species - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.split - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.toPrimitive - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.toStringTag - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Symbol.unscopables - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.BYTES_PER_ELEMENT - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.buffer - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.byteLength - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.copyWithin() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.entries() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.every() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.fill() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.filter() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.find() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.findIndex() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.from() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.includes() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.indexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.join() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.keys() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.lastIndexOf() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.length - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.map() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.name - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.of() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.reduce() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.reverse() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.set() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.slice() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.some() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.sort() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.subarray() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.toString() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray.prototype.values() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
TypedArray - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakMap.prototype.delete() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakMap.prototype.get() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakMap.prototype.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakMap.prototype.set() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakSet.prototype.add() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakSet.prototype.delete() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WeakSet.prototype.has() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
WebAssembly.CompileError() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.CompileError - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Global() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Global - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Instance() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Instance.prototype.exports - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Instance - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.LinkError() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.LinkError - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Memory.prototype.buffer - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Memory.prototype.grow() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Memory - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Module() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Module.customSections() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Module.exports() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Module.imports() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Module - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.RuntimeError() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.RuntimeError - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table() constructor - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table.prototype.get() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table.prototype.grow() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table.prototype.length - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table.prototype.set() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.Table - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.compile() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.compileStreaming() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.instantiate() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.instantiateStreaming() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly.validate() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
WebAssembly - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
decodeURI() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
decodeURIComponent() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
encodeURIComponent() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
eval() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
globalThis - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
isFinite() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
null - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
parseFloat() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
parseInt() - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
undefined - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Addition (+) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Addition assignment (+=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Assignment (=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise AND (&) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise AND assignment (&=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise NOT (~) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise OR (|) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise OR assignment (|=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise XOR (^) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Bitwise XOR assignment (^=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Comma operator (,) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Conditional (ternary) operator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Decrement (--) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Destructuring assignment - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Division (/) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Division assignment (/=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Equality (==) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Exponentiation (**) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Exponentiation assignment (**=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Greater than (>) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Greater than or equal (>=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Grouping operator ( ) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Increment (++) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Inequality (!=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Left shift (<<) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Left shift assignment (<<=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Less than (<) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Less than or equal (<=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical AND (&&) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical AND assignment (&&=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical NOT (!) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical OR (||) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical OR assignment (||=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Logical nullish assignment (??=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Multiplication (*) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Multiplication assignment (*=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Nullish coalescing operator (??) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Object initializer - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Operator precedence - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Optional chaining (?.) - JavaScript
if 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 accessors - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Remainder (%) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Remainder assignment (%=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Right shift (>>) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Right shift assignment (>>=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Spread syntax (...) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Strict equality (===) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Strict inequality (!==) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Subtraction (-) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Subtraction assignment (-=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Unary negation (-) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Unary plus (+) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Unsigned right shift (>>>) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Unsigned right shift assignment (>>>=) - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
class expression - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
delete operator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
function* expression - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Function expression - JavaScript
if 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 operator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
instanceof - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
new.target - JavaScript
if 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 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
typeof - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
void operator - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
yield* - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
yield - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
empty - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
async function - JavaScript
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.
block - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
break - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
class - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
const - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
continue - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
do...while - JavaScript
if 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...in - JavaScript
if 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...of - JavaScript
if 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 - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
function* - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
function declaration - JavaScript
if 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...else - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
label - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
let - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
return - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
switch - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
throw - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
try...catch - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
var - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
while - JavaScript
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
JavaScript typed arrays - JavaScript
xmlhttprequest.prototype.send() xmlhttprequest instances' send() method now supports typed arrays and arraybuffer objects as argument.
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay and autoplay blocking the term autoplay refers to any feature that causes audio to begin to play without the user specifically requesting that playback begin.
Media container formats (file types) - Web media technologies
if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Lazy loading - Web Performance
fonts by default, font requests are delayed until the render tree is constructed, which can result in delayed text rendering.
Introduction to progressive web apps - Progressive web apps (PWAs)
this is achieved using a combination of technologies: service workers to control page requests (for example storing them offline), the cache api for storing responses to network requests offline (very useful for storing site assets), and client-side data storage technologies such as web storage and indexeddb to store application data offline.
Progressive web apps (PWAs)
service workers a service worker is a script that allows intercepting and control of how a web browser handles its network requests and asset caching.
alignment-baseline - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
baseline-shift - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
clip-path - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
clip-rule - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color-interpolation-filters - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color-interpolation - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color-profile - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
cursor - SVG: Scalable Vector Graphics
WebSVGAttributecursor
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
dominant-baseline - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
fill-opacity - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
fill-rule - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-family - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-style - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
font-weight - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
pointer-events - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
shape-rendering - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
spreadMethod - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-dasharray - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-dashoffset - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-linecap - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-miterlimit - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-opacity - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke-width - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
_top the content of the full active window or tab is replaced by the linked content, if it exists and can be securely accessed from this document _blank a new un-named window or tab is requested for the display of the linked content, if this document can securely do so.
text-anchor - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
text-rendering - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
writing-mode - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
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).
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
css properties are not guaranteed to be inherited by the cloned dom unless you explicitly request them using css inheritance.
Other content in SVG - SVG: Scalable Vector Graphics
the specification requests applications to support at least png, jpeg and svg format files.
XPath snippets - XPath
if you are using xmlhttprequest to read a local or remote xml file into a dom tree (as described in parsing and serializing xml), the first argument to evaluatexpath() should be req.responsexml.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
this can be done via xmlhttprequest or xmldocument.load().
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
id="example"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> <div>10</div> </div> // javascript var xslref; var xslloaded = false; var xsltprocessor = new xsltprocessor(); var mydom; var xmlref = document.implementation.createdocument("", "", null); function sort() { if (!xslloaded){ p = new xmlhttprequest(); p.open("get", "example2.xsl", false); p.send(null); xslref = p.responsexml; xsltprocessor.importstylesheet(xslref); xslloaded = true; } // create a new xml document in memory xmlref = document.implementation.createdocument("", "", null); // we want to move a part of the dom from an html document to an xml document.
Index - WebAssembly
8 index index, webassembly found 12 pages: 9 loading and running webassembly code fetch, javascript, webassembly, xmlhttprequest, bytecode to use webassembly in javascript, you first need to pull your module into memory before compilation/instantiation.
WebAssembly
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.